kalarhan 说:
kalarhan 说:
kalarhan 说:
kalarhan 说:
# Trigger Param 1: damage inflicted agent_id
# Trigger Param 2: damage dealer agent_id
# Trigger Param 3: inflicted damage
# Register 0: damage dealer item_id
# Position Register 0: position of the blow
# rotation gives the direction of the blow
vitali_on_couched_lance_damage = (
ti_on_agent_hit, 0, 0, [],
[
(store_trigger_param_1, ":inflicted_agent"),
(store_trigger_param_2, ":cur_agent"),
(store_trigger_param_3, ":inflicted_damage"),
(assign, ":cur_item", reg0),
(call_script, "script_vitali_game_event_agent_hit", ":inflicted_agent", ":cur_agent", ":inflicted_damage", ":cur_item"),
(try_end),
])
#script_vitali_game_event_agent_hit
("vitali_game_event_agent_hit",
[
#(store_script_param, ":inflicted_agent", 1), #uncomment the line when will you use this variable
(store_script_param, ":cur_agent", 2),
(store_script_param, ":inflicted_damage", 3),
(store_script_param, ":cur_item", 4),
(get_player_agent_no, ":player_agent"),
(try_begin),
(gt, ":inflicted_damage", 90), #if this is a big damage
(agent_is_active, ":cur_agent"),
#If a polish hussar lance is used
(this_or_next|eq, ":cur_item", itm_gusar_lanza),
(this_or_next|eq, ":cur_item", itm_gusar_lanza_b),
( eq, ":cur_item", itm_gusar_lance),
(play_sound_at_position, "snd_lance_broken", pos0),
#If it's a player
(try_begin),
(eq, ":cur_agent", ":player_agent"),
(troop_has_item_equipped, "trp_player", ":cur_item"),
#add 1 more broken lance
(val_add, "$g_hussar_lance_broken", 1),
(try_end),
. . . etc.
#If there is 1 or more broken lances, call the script
(try_begin),
(ge, "$g_hussar_lance_broken", 1),
(call_script, "script_vitali_remove_hussar_lance"),
(try_end),
#script_vitali_remove_hussar_lance
("vitali_remove_hussar_lance",
[
#Through the lance away(cause it's broken)
(display_message, "@script_vitali_remove_hussar_lance started"),
(try_for_range, ":i", 0, "$g_hussar_lance_broken"), #loop as many times as the player broke the lances in the previous battle
(assign, ":break", 0),
(try_for_range, ":slot_no", 0, 4),
(eq, ":break", 0),
(troop_get_inventory_slot, ":cur_slot", "trp_player", ":slot_no"),
(this_or_next|eq, ":cur_slot", "itm_gusar_lanza"),
(this_or_next|eq, ":cur_slot", "itm_gusar_lanza_b"),
( eq, ":cur_slot", "itm_gusar_lance"),
(troop_set_inventory_slot, "trp_player", ":slot_no", -1),
(assign,":break", 1),
(assign, reg10, ":cur_slot"),
(assign, reg11, ":slot_no"),
(display_message, "@The broken lance is removed from the inventory"),
(display_message, "@hussar lance = {reg10}, slot_no = {reg11}"),
(try_end),
(try_end),
(assign, "$g_hussar_lance_broken", 0), #obnulim :)
]),
Well, I could not find a way to define the IMOD of the ":cur_item". Maybe you know how to do this?kalarhan 说:
#If it's a player remove it from the inventory forever(cause it's broken)
(try_begin), #vitali TEST(not working yet. work on)
(eq, ":cur_agent", ":player_agent"),
(assign, ":has_item", -1),
(try_for_range, ":slot_no", 0, 4),
(troop_get_inventory_slot, ":cur_slot", ":player_agent", ":slot_no"),
(eq, ":cur_slot", ":cur_item"),
#(store_item_kind_count, ":num_cur_items", ":cur_item"), #add this(if 2 hussar lances, decide which to remove) and extend when the simple removing will work
(assign, ":has_item", ":cur_item"),
(try_end),
(try_begin),
(ge, ":has_item", 0),
(troop_remove_item, "trp_player", ":cur_item"),
(display_message, "@The broken lance is removed form the inventory :)"),
(else_try),
(display_message, "@The lance could not be found :("),
(try_end),
(try_end),
GoldenDawnEmpire 说:
kalarhan 说:
# Trigger Param 1: damage inflicted agent_id
# Trigger Param 2: damage dealer agent_id
# Trigger Param 3: inflicted damage
# Register 0: damage dealer item_id
# Position Register 0: position of the blow
# rotation gives the direction of the blow
vitali_on_couched_lance_damage = (
ti_on_agent_hit, 0, 0, [],
[
(store_trigger_param_1, ":inflicted_agent"),
(store_trigger_param_2, ":cur_agent"),
(store_trigger_param_3, ":inflicted_damage"),
(assign, ":cur_item", reg0),
(call_script, "script_game_event_agent_hit", ":inflicted_agent", ":cur_agent", ":inflicted_damage", ":cur_item"),
(try_end),
])
# Param 1: damage inflicted agent_id
# Param 2: damage dealer agent_id
# Param 3: inflicted damage
# Param 4: damage dealer item_id
# Param 5: position of the blow
# rotation gives the direction of the blow
("game_event_agent_hit",
[
#(store_script_param, ":inflicted_agent", 1), #uncomment the line when will you use this variable
(store_script_param, ":cur_agent", 2),
(store_script_param, ":inflicted_damage", 3),
(store_script_param, ":cur_item", 4),
(get_player_agent_no, ":player_agent"),
(try_begin),
(gt, ":inflicted_damage", 70),
(agent_is_active, ":cur_agent"),
#If a polish hussar lance is used
(this_or_next|eq, ":cur_item", itm_gusar_lanza),
(this_or_next|eq, ":cur_item", itm_gusar_lanza_b),
( eq, ":cur_item", itm_gusar_lance),
(play_sound_at_position, "snd_lance_broken", pos0),
#If it's a player through the lance away(cause it's broken)
(try_begin),
(eq, ":cur_agent", ":player_agent"),
(assign, ":break", 0),
(try_for_range, ":slot_no", 0, 4),
(eq, ":break", 0),
(agent_get_item_slot, ":cur_slot", ":player_agent", ":slot_no"),
(eq, ":cur_slot", ":cur_item"),
#(troop_remove_item, "trp_player", ":cur_item"), #TEST -> does not work
(troop_set_inventory_slot, "trp_player", ":slot_no", -1), #does not work either
(assign,":break", 1),
(display_message, "@The broken lance is removed form the inventory"),
(try_end),
(try_end),
(agent_unequip_item, ":cur_agent", ":cur_item"),
(agent_equip_item, ":cur_agent", "itm_konchar"),
(agent_set_wielded_item, ":cur_agent", "itm_konchar"),
]),
kalarhan 说:
(try_begin),
(eq, ":cur_agent", ":player_agent"),
(assign, ":break", 0),
(try_for_range, ":slot_no", 0, 4),
(eq, ":break", 0),
(agent_get_item_slot, ":cur_slot", ":player_agent", ":slot_no"),
(eq, ":cur_slot", ":cur_item"),
#(troop_remove_item, "trp_player", ":cur_item"), #TEST -> does not work
(troop_set_inventory_slot, "trp_player", ":slot_no", -1), #does not work either
(assign,":break", 1),
(try_end),
(try_end),
(assign, ":empty_slots", 0), #number of empty slots
#If the agent has 2 empty weapon slots
(try_for_range, ":slot_no", 0, 4),
(troop_get_inventory_slot, ":cur_slot", ":cur_agent", ":slot_no"),
(eq, ":cur_slot", -1), #if it's an empty slot
(val_add, ":empty_slots", 1), #increment the number of empty slots
(try_end),
DruGs 说:
(troop_clear_inventory, "trp_temp_troop"),
(call_script, "script_party_calculate_loot", "p_total_enemy_casualties"), #p_encountered_party_backup changed to
total_enemy_casualties
#(gt, reg0, 0), #vitali commented line
(troop_sort_inventory, "trp_temp_troop"),
(change_screen_loot, "trp_temp_troop"), #vitali --> loot screen
(else_try),
(display_message, "@The enemy has been forced to retreat. The assault is over, but the siege continues."),
(assign, "$g_battle_simulation_cancel_for_party", "$g_encountered_party"),
(call_script, "script_party_give_xp_and_gold", "p_temp_party"), #vitali added
(call_script, "script_troop_add_gold", "trp_player", 500), #vitali added
#(leave_encounter), #vitali commented for loot screen after have defended a castle
#(change_screen_return), #vitali commented for loot screen after have defended a castle
(assign, "$g_battle_simulation_auto_enter_town_after_battle", "$g_encountered_party"),
(assign, "$g_next_menu", -1), #vitali added for loot screen after have defended a castle
(jump_to_menu, "mnu_total_victory"), #vitali added for loot screen after have defended a castle
["quick_battle_troop_1","Rodrigo de Braganca","Rodrigo de Braganca", tf_hero,0,0,fac_kingdom_1,
["quick_battle_troop_1","New Name","Rodrigo de Braganca", tf_hero,0,0,fac_kingdom_1,
I agree with you. But the first and last ids are also used in module_constants.py and module_strings.py so they should be the same in all 3 files. Change quick_battle_troop_1 to e.g. quick_battle_troop_01 only in module_troops.py and you'll get an error when compiling the files.jacobhinds 说:
["quick_battle_troop_1","Rodrigo de Braganca","Rodrigo de Braganca", tf_hero,0,0,fac_kingdom_1,
["quick_battle_troop_1","Vitali Brezhnev","Rodrigo de Braganca", tf_hero,0,0,fac_kingdom_1,
("choose_skill",mnf_disable_all_keys,"You spot a battle-ready men in the distance.", "none"
("choose_skill", mnf_disable_all_keys,"{s13}", "none",
["quick_battle_troop_1", "Reiter","Reiters", tf_hero,0,0,fac_kingdom_1,......
["quick_battle_troop_2", "Hussar","Hussars", tf_hero,.....
["quick_battle_troop_3", "Boyar","Boyars", tf_hero,0,0,fac_kingdom_1,.....
.....
["quick_battle_troop_11", "Halberdier","Halberdiers", tf_hero,0,0,fac_kingdom_1,
["quick_battle_troop_1", "Hussar","Hussars", tf_hero,0,0,fac_kingdom_1,......
["quick_battle_troop_2", "Boyar","Boyars", tf_hero,0,.....
["quick_battle_troop_3", "Mirza Chambul","Mirza Chambul", tf_hero,0,0,fac_kingdom_1,....
.....
["quick_battle_troop_18", "Winged Hussar","Winged Hussars", tf_hero,0,0,fac_kingdom_1,...
Hi. I had such problem when playing one of the mods. But there not only the heads, almost everything was just white: terrain, weapons etc. They told me it's my graphic card's problem and advised to choose DirectX7 instead of DirectX9 in the main menu options, and everything became normal. Hope this helps.TheVideoGameInn 说:
DruGs 说:
(display_message, "@The enemy has been forced to retreat. The assault is over, but the siege continues."),
(assign, "$g_battle_simulation_cancel_for_party", "$g_encountered_party"),
(call_script, "script_troop_add_gold", "trp_player", 1000),
(add_xp_as_reward, 300),
Hello. I'm interested in this thing as well. I am new to modding as well. I looked at these mission-templates, but didn't find the answer either. What I was thinking about: After we win in usual battles in the field we get both 'capture prisoners' and 'looting' screens. After we capture a settlement we only have the 'capture prisoners' screen So we should just copy the code of looting menu from the usual battle's code and put it after the 'capture prisoners' code from the siege victory code.kraggrim 说:
(troop_clear_inventory, "trp_temp_troop"),
(call_script, "script_party_calculate_loot", "p_total_enemy_casualties"), #p_encountered_party_backup changed to total_enemy_casualties
(gt, reg0, 0),
(troop_sort_inventory, "trp_temp_troop"),
(change_screen_loot, "trp_temp_troop"),
(else_try),
#finished all
(try_begin),
(le, "$g_ally_party", 0),
(end_current_battle),
(try_end),
(call_script, "script_party_give_xp_and_gold", "p_total_enemy_casualties"), #p_encountered_party_backup changed to total_enemy_casualties
(try_begin),
(eq, "$g_enemy_party", 0),
(display_message,"str_error_string"),
(try_end),
#Add a fixed amount of money and xp to player after he has captured a settlement
(call_script, "script_troop_add_gold", "trp_player", 5000),
(add_xp_as_reward, 500),
(call_script, "script_change_troop_renown", "trp_player", 5),
Did you use the map of Caldaria as a template or the WFaS map? And which files should I put?Csatádi 说: