Docm30 said:Can someone point me in the direction of where it decides how much gold you get after winning a battle?
Thanks.
#script_party_give_xp_and_gold:
# INPUT:
# param1: destroyed Party-id
# calculates and gives player paty's share of gold and xp.
("party_give_xp_and_gold",
[
(store_script_param_1, ":enemy_party"), #Party_id
(call_script, "script_calculate_main_party_shares"),
(assign, ":num_player_party_shares", reg0),
(assign, ":total_gain", 0),
(party_get_num_companion_stacks, ":num_stacks",":enemy_party"),
(try_for_range, ":i_stack", 0, ":num_stacks"),
(party_stack_get_troop_id, ":stack_troop",":enemy_party",":i_stack"),
(neg|troop_is_hero, ":stack_troop"),
(party_stack_get_size, ":stack_size",":enemy_party",":i_stack"),
(store_character_level, ":level", ":stack_troop"),
(store_add, ":gain", ":level", 10),
(val_mul, ":gain", ":gain"),
(val_div, ":gain", 10),
(store_mul, ":stack_gain", ":gain", ":stack_size"),
(val_add, ":total_gain", ":stack_gain"),
(try_end),
(val_mul, ":total_gain", "$g_strength_contribution_of_player"),
(val_div, ":total_gain", 100),
(val_min, ":total_gain", 40000), #eliminate negative results
(assign, ":player_party_xp_gain", ":total_gain"),
(store_random_in_range, ":r", 50, 100),
(val_mul, ":player_party_xp_gain", ":r"),
(val_div, ":player_party_xp_gain", 100),
(party_add_xp, "p_main_party", ":player_party_xp_gain"),
(store_mul, ":player_gold_gain", ":total_gain", player_loot_share),
(val_min, ":player_gold_gain", 60000), #eliminate negative results
(store_random_in_range, ":r", 50, 100),
(val_mul, ":player_gold_gain", ":r"),
(val_div, ":player_gold_gain", 100),
(val_div, ":player_gold_gain", ":num_player_party_shares"),
#add gold now
(party_get_num_companion_stacks, ":num_stacks","p_main_party"),
(try_for_range, ":i_stack", 0, ":num_stacks"),
(party_stack_get_troop_id, ":stack_troop","p_main_party",":i_stack"),
(try_begin),
(troop_is_hero, ":stack_troop"),
(call_script, "script_troop_add_gold", ":stack_troop", ":player_gold_gain"),
(try_end),
(try_end),
]),
Search for "castle_start_siege" in module_game_menus.py and replace the 0 from the line (lt, ":reln", 0), with a 1 (or replace the "lt" with a "le", it's the same).Pilgrim said:Which values do I edit to allow a player to start a siege even if his relation with the faction is 0? Which values do I also edit to allow a player to loot and burn a village, even if his relation with the town is 0? Thx.
(1, 0, 5, [(eq, "$g_belligerent_drunk_leaving", 0),],
[
(store_random_in_range,":randomized",0,4),
(try_begin),
(eq,":randomized",1),
(assign, "$entry_point_destination",7),
(add_visitors_to_current_scene,8,"trp_alari_local",1),
(else_try),
(eq,":randomized",2),
(assign, "$entry_point_destination",8),
(add_visitors_to_current_scene,8,"trp_alari_local",1),
(try_end),
(try_for_agents, ":agent"),
(agent_get_troop_id, ":troop_no", ":agent"),
(eq,":troop_no","trp_alari_local"),
(entry_point_get_position, pos1, "$entry_point_destination"),
(agent_set_scripted_destination, ":agent", pos1),
(assign, "$g_belligerent_drunk_leaving", ":agent"),
(try_end),
]),
(1, 0, 0,
[
(gt, "$g_belligerent_drunk_leaving", 0),
(entry_point_get_position, pos0, "$entry_point_destination"),
(agent_get_position, pos1, "$g_belligerent_drunk_leaving"),
(get_distance_between_positions, ":dist", pos0, pos1),
(le, ":dist", 150),
],
[
(agent_fade_out, "$g_belligerent_drunk_leaving"),
(assign, "$g_belligerent_drunk_leaving", 0),
]),
Somebody said:It probably has to do with reusing $g_belligerent_drunk_leaving for more than one agent at a time.
Not too familiar with it but from the discussions I read there are obfuscation methods, and there's such a thing to enable in swysdk(which I use).Duh said:I was contacted recently about measures against decompiling. As all my work has been pretty open source, i never looked into these things, though i do seem to recall a topic about it. If anybody could link me the topic or wishes to assist the person in need, that would be greatly appreciated.