Warband Script Enhancer 2 (v1.1.2.0)

Users who are viewing this thread

Hey K700,

thanks a lot for your program. Good job!

I have a little problem: Using your WSE2 with Floris(v2.55) mod and if I press back space in battle then the order tool opens but doesn't close if I press back space again. It's just blinking (I think it reopens again). I can close it just by ESC and "Done" to be in fight mode myself again.
I've tested other hotkeys for it - same effect.

Everything else works just fine.
By the way:
usual load time for floris: ~40sec
load time for floris with wse2: ~5sec (!!)
 
I have a little problem: Using your WSE2 with Floris(v2.55) mod and if I press back space in battle then the order tool opens but doesn't close if I press back space again. It's just blinking (I think it reopens again). I can close it just by ESC and "Done" to be in fight mode myself again.
I've tested other hotkeys for it - same effect.
When you run floris in a regular warband, is there no such problem?
 
When you run floris in a regular warband, is there no such problem?
In both Vanilla and Floris the order window appears on back space and disappears by pushing it again.
Just in WSE2 it is blinking. Testet this behaviour several times. Even after restarting the game 4 times.
 
Hello.
I have a problem in multiplayer mode.
If playerA 's agent is killed by someone.and he click mouse ,switch camera to follwow playerB's agent (agent_id is stored in reg0) ,
how can moder through reg0 to get the list of people that are watching playerB?
 
Here is a question does the launcher have a limit to how many module can be accessed in the drop down menu? The regular launcher only allow us to access about 33 modules at a time through the drop down menu. The only solution I have found is to have many installations of Warband to have a higher limit of modules.
 
Encountering a bit of an odd issue on Prophesy of Pendor, I am gaining weapon proficiencies way too quickly. Worth adding is that the save I'm playing on is imported from normal Warband.
 
the kill count feature i added to my mod isn't working with WSE2.
with warband without WSE2 it works fine.

mod in question: 1257AD Enhanced Edition.
Steps to reproduce the bug:
1. load the 1257AD EE mod
2. go into any battle
3. kill a few enemies
4. win the battle
5. no kill count after the battle nor the renown


Also someone has reported to me that the coin sound that plays when you earn some money after battle isn't playing at all.


here's the code for it:
################## KILL COUNT AFTER BATTLE
("print_kill_count_to_s0",
[
(assign, ":var0", 0),
(str_clear, s0),
(try_for_agents, ":cur_troop"),
(agent_is_human, ":cur_troop"),
(agent_get_troop_id, ":troop_id", ":cur_troop"),
(troop_is_hero, ":troop_id"),
(agent_get_kill_count, ":cur_troop_kill_count", ":cur_troop"),
(agent_get_kill_count, ":cur_troop_wounded_count", ":cur_troop", 1),
(troop_get_slot, ":cur_troop_kill_count_total", ":troop_id", slot_troop_kill_count),
(troop_get_slot, ":cur_troop_wounded_count_total", ":troop_id", slot_troop_wounded_count),
(val_add, ":cur_troop_kill_count_total", ":cur_troop_kill_count"),
(val_add, ":cur_troop_wounded_count_total", ":cur_troop_wounded_count"),
(troop_set_slot, ":troop_id", slot_troop_kill_count, ":cur_troop_kill_count_total"),
(troop_set_slot, ":troop_id", slot_troop_wounded_count, ":cur_troop_wounded_count_total"),
(this_or_next|gt, ":cur_troop_kill_count", 0),
(gt, ":cur_troop_wounded_count", 0),
(str_store_troop_name, s1, ":troop_id"),
(store_add, reg3, ":cur_troop_kill_count", ":cur_troop_wounded_count"),
(assign, reg4, ":cur_troop_kill_count"),
(assign, reg5, ":cur_troop_wounded_count"),
(str_store_string, s2, "@{reg4} killed, {reg5} wounded"),
(try_begin),
(this_or_next|eq, ":troop_id", "trp_player"),
(is_between, ":troop_id", "trp_npc1", "trp_kingdom_1_lord"),
(str_store_string, s0, "@{s0}^{s1}: {reg3} ({s2})"),
(else_try),
(agent_is_ally, ":cur_troop"),
(str_store_string, s0, "@{s0}^{s1}(ally): {reg3} ({s2})"),
(else_try),
(str_store_string, s0, "@{s0}^{s1}(enemy): {reg3} ({s2})"),
(try_end),
(val_add, ":var0", 1),

############## Player gets renown for number of enemies killed by him
(try_begin),
(eq, ":troop_id", "trp_player"),
(ge, ":cur_troop_kill_count", 3),
(assign, reg6, ":cur_troop_kill_count"),
(val_div, reg6, 3), #### every 3 enemies = +1 renown
(call_script, "script_change_troop_renown", "trp_player", reg6),
# (str_store_string, s3, "@{reg4} killed, {reg5} wounded"),
(display_message, "@You earned {reg6} renown as a result of your battle prowess.", 5308240), ####### GREEN
(try_end),

(try_end),
(try_begin),
(eq, ":var0", 0),
(str_store_string, s0, "@^None"),
(try_end),
]),
#######################################################################################

Edit: I forgot the code for battle_debrief:
("battle_debrief",mnf_scale_picture|mnf_disable_all_keys,
"{s11}^^Your Casualties:{s8}{s10}^^Enemy Casualties:{s9}^^Kill count:{s12}",
"none",
[
#TOM
#### battlesize?
#### battlesize?
#### shaders
# (set_fixed_point_multiplier, 100),
# (set_shader_param_float, "@vFresnelMultiplier", shader_float_default),
#### shaders
#copy backup to main party
(try_begin),
(eq, "$auxilary_player_active", 1),

###new method, adjust the main party, by the manualy counted one
##adjust the party to pre battle
(party_get_num_companion_stacks, ":stack_num", "p_temp_casualties_3"),
(try_for_range, ":stack_no", 0, ":stack_num"),
(party_stack_get_troop_id, ":stack_troop", "p_temp_casualties_3", ":stack_no"),
(neq, ":stack_troop", "trp_player"), #player does not count
(neg|troop_is_hero, ":stack_troop"), #heroes either
(party_count_members_of_type, ":main_troop_count", "p_main_party", ":stack_troop"), #get number of troops from main
(party_count_members_of_type, ":sub_troop_count", "p_temp_casualties_3", ":stack_troop"), #get number of troops from sub
(try_begin),
(gt, ":sub_troop_count", ":main_troop_count"), #sub party has more members
(store_sub, ":amount", ":sub_troop_count", ":main_troop_count"), #calculate number of troops to adjust
(party_add_members, "p_main_party", ":stack_troop", ":amount"), #adjust number of troops in the main party
(else_try),
(lt, ":sub_troop_count", ":main_troop_count"), #sub party has less members
(store_sub, ":amount", ":main_troop_count", ":sub_troop_count"), #calculate number of troops to adjust
(party_remove_members, "p_main_party", ":stack_troop", ":amount"), #adjust number of troops in the main party
(try_end),
#wound the members, only if there are less wounded in the main party
(party_stack_get_num_wounded, ":num_wounded_sub", "p_temp_casualties_3", ":stack_no"),
(party_stack_get_num_wounded, ":num_wounded_main", "p_main_party", ":stack_no"),
(try_begin),
(gt, ":num_wounded_sub", ":num_wounded_main"), #sub has more wounded
(store_sub, ":amount", ":num_wounded_sub", ":num_wounded_main"), #calculate number of troops to wound
(party_wound_members, "p_main_party", ":stack_troop", ":amount"),
(try_end),
(try_end),

##adjust the party based on the casualties sustained on the battlefield
(party_get_num_companion_stacks, ":num_stacks", "p_player_casualties"),
(try_for_range, ":stack_no", 0, ":num_stacks"),
(party_stack_get_troop_id, ":stack_troop", "p_player_casualties", ":stack_no"),
(neq, ":stack_troop", "trp_player"), #player does not count
(neg|troop_is_hero, ":stack_troop"), #heroes either
(party_stack_get_size, ":stack_size", "p_player_casualties", ":stack_no"),
(party_stack_get_num_wounded, ":num_wounded", "p_player_casualties", ":stack_no"),
(val_sub, ":stack_size", ":num_wounded"),
(party_remove_members, "p_main_party", ":stack_troop", ":stack_size"),
(party_wound_members, "p_main_party", ":stack_troop", ":num_wounded"),
(try_end),

(party_clear, "p_temp_casualties_3"),
(assign, "$auxilary_player_active", 0),
(try_end),

#TOM
# (assign, "$g_battle_preparation_phase", 0),
# (assign, "$g_battle_preparation", -1),

(try_begin),
(eq, "$g_battle_result", 1),
(call_script, "script_change_troop_renown", "trp_player", "$battle_renown_value"),

(try_begin),
(ge, "$g_encountered_party", 0),
(party_is_active, "$g_encountered_party"),
(party_get_template_id, ":encountered_party_template", "$g_encountered_party"),
(eq, ":encountered_party_template", "pt_kingdom_caravan_party"),

(get_achievement_stat, ":number_of_village_raids", ACHIEVEMENT_THE_BANDIT, 0),
(get_achievement_stat, ":number_of_caravan_raids", ACHIEVEMENT_THE_BANDIT, 1),
(val_add, ":number_of_caravan_raids", 1),
(set_achievement_stat, ACHIEVEMENT_THE_BANDIT, 1, ":number_of_caravan_raids"),

(try_begin),
(ge, ":number_of_village_raids", 3),
(ge, ":number_of_caravan_raids", 3),
(unlock_achievement, ACHIEVEMENT_THE_BANDIT),
(try_end),
(try_end),

(try_begin),
(party_get_current_terrain, ":cur_terrain", "p_main_party"),
(eq, ":cur_terrain", rt_snow),
(get_achievement_stat, ":number_of_victories_at_snowy_lands", ACHIEVEMENT_BEST_SERVED_COLD, 0),
(val_add, ":number_of_victories_at_snowy_lands", 1),
(set_achievement_stat, ACHIEVEMENT_BEST_SERVED_COLD, 0, ":number_of_victories_at_snowy_lands"),

(try_begin),
(eq, ":number_of_victories_at_snowy_lands", 10),
(unlock_achievement, ACHIEVEMENT_BEST_SERVED_COLD),
(try_end),
(try_end),

(try_begin),
(ge, "$g_enemy_party", 0),
(party_is_active, "$g_enemy_party"),
(party_stack_get_troop_id, ":stack_troop", "$g_enemy_party", 0),
(eq, ":stack_troop", "trp_mountain_bandit"),

(get_achievement_stat, ":number_of_victories_aganist_mountain_bandits", ACHIEVEMENT_MOUNTAIN_BLADE, 0),
(val_add, ":number_of_victories_aganist_mountain_bandits", 1),
(set_achievement_stat, ACHIEVEMENT_MOUNTAIN_BLADE, 0, ":number_of_victories_aganist_mountain_bandits"),

(try_begin),
(eq, ":number_of_victories_aganist_mountain_bandits", 10),
(unlock_achievement, ACHIEVEMENT_MOUNTAIN_BLADE),
(try_end),
(try_end),

(try_begin),
(is_between, "$g_ally_party", walled_centers_begin, walled_centers_end),
(unlock_achievement, ACHIEVEMENT_NONE_SHALL_PASS),
(try_end),

(try_begin),
(eq, "$g_joined_battle_to_help", 1),
(unlock_achievement, ACHIEVEMENT_GOOD_SAMARITAN),
(try_end),
(try_end),

(assign, "$g_joined_battle_to_help", 0),
(call_script, "script_count_casualties_and_adjust_morale"),#new
(call_script, "script_encounter_calculate_fit"),

(call_script, "script_party_count_fit_regulars", "p_main_party"),
(assign, "$playerparty_postbattle_regulars", reg0),

(try_begin),
(eq, "$g_battle_result", 1),
(eq, "$g_enemy_fit_for_battle", 0),
(str_store_string, s11, "@You were victorious!"),
# (play_track, "track_bogus"), #clear current track.
# (call_script, "script_music_set_situation_with_culture", mtf_sit_victorious),
(try_begin),
(gt, "$g_friend_fit_for_battle", 1),
(set_background_mesh, "mesh_pic_victory"),
(try_end),
(else_try),
(eq, "$g_battle_result", -1),
(ge, "$g_enemy_fit_for_battle",1),
(this_or_next|le, "$g_friend_fit_for_battle",0),
(le, "$playerparty_postbattle_regulars", 0),
(str_store_string, s11, "@Battle was lost. Your forces were utterly crushed."),
(set_background_mesh, "mesh_pic_defeat"),
(else_try),
(eq, "$g_battle_result", -1),
(str_store_string, s11, "@Your companions carry you away from the fighting."),
(troop_get_type, ":is_female", "trp_player"),
(try_begin),
(eq, ":is_female", 1),
(set_background_mesh, "mesh_pic_wounded_fem"),
(else_try),
(set_background_mesh, "mesh_pic_wounded"),
(try_end),
(else_try),
(eq, "$g_battle_result", 1),
(str_store_string, s11, "@You have defeated the enemy."),
(try_begin),
(gt, "$g_friend_fit_for_battle", 1),
(set_background_mesh, "mesh_pic_victory"),
(try_end),
(else_try),
(eq, "$g_battle_result", 0),
(str_store_string, s11, "@You have retreated from the fight."),
(try_end),
#NPC companion changes begin
##check for excessive casualties, more forgiving if battle result is good
(try_begin),
(gt, "$playerparty_prebattle_regulars", 9),
(store_add, ":divisor", 3, "$g_battle_result"),
(store_div, ":half_of_prebattle_regulars", "$playerparty_prebattle_regulars", ":divisor"),
(lt, "$playerparty_postbattle_regulars", ":half_of_prebattle_regulars"),
(call_script, "script_objectionable_action", tmt_egalitarian, "str_excessive_casualties"),
(try_end),
#NPC companion changes end

(call_script, "script_print_casualties_to_s0", "p_player_casualties", 0),
(str_store_string_reg, s8, s0),
(call_script, "script_print_casualties_to_s0", "p_enemy_casualties", 0),
(str_store_string_reg, s9, s0),

(call_script, "script_print_kill_count_to_s0"),
(str_store_string_reg, s12, s0),

(str_clear, s10),
(try_begin),
(eq, "$any_allies_at_the_last_battle", 1),
(call_script, "script_print_casualties_to_s0", "p_ally_casualties", 0),
(str_store_string, s10, "@^^Ally Casualties:{s0}"),
(try_end),
(try_begin),
(assign,reg20, "$killcount"),
(assign, "$killcount",0),
(try_end),
],
[
("continue",[], "Continue...",[(jump_to_menu, "$g_next_menu"),]),
]
),
 
Last edited:
Back
Top Bottom