Any way to mod how AI chooses melee weapons?

Users who are viewing this thread

Philozoraptor

Sergeant
My fellow modders, title says it all. Do any of you know how to affect how AI chooses from multiple melee weapons? Recent vanilla patches resulted in spear being preferred even over axes and maces (at least in RBM). If any of you know which part of the code is responsible for this behaviour I would be really grateful.

Edit: just realized this is wrong section, would it be possible to move this thread to Bannerlord smithy instead?
 
Last edited:
Hopefully some bright mind will create a switch-weapon order soon. It is beyond my understanding how Taleworlds has managed to go from having that kind of mechanic (use of weapons) in the previous installments and now in Bannerlord betting everything on the AI's decision without the player having the remotest chance. I don't get it... this should belong to the "basics" within the UI.
 
Hmm, found workaround. Game only needs to "think" that some weapons have certain damage, their real damage can be totally different.
 
Yes thats what is happenning since I increased damage of 1h weapons to 60-120. However I reworked entire troop tree prior to that with focus on mixed units (part of units only with polearm while part of unit got polearm vs cav and sidearm such as axe, sword or mace vs foot infantry. However this turned into spears only when I gave all weapons roughly the same damage (60-120). So I had to reduce thrust damage in its calculation for all weapons (this primarely hit polearms), so the game things that thrust damage of spears is low, then I buff the damage again in different part of the code so the damage is still comparable to sword / axe raw damage. I hope this makes sense.

What I found out is that if swords and axes need to deal at least twice as much damage then spears in order to be preferred and three times as much if you want them preferred for cav vs cav melee.
 
FWIW, this problem in the AI existed in Warband, too.

How I got around it was by force-loading the appropriate weapons into the inventories of the Agents involved when they changed situations, and nothing else. This applied to other situations, like forcing troops with supporting weapons like javelins or bows to get rid of them when it wasn't appropriate any more. It worked, but it required a lot of specific references to Troop IDs, etc. Making a universal system that actually works would be pretty complicated.
 
FWIW, this problem in the AI existed in Warband, too.

How I got around it was by force-loading the appropriate weapons into the inventories of the Agents involved when they changed situations, and nothing else. This applied to other situations, like forcing troops with supporting weapons like javelins or bows to get rid of them when it wasn't appropriate any more. It worked, but it required a lot of specific references to Troop IDs, etc. Making a universal system that actually works would be pretty complicated.
Do you have the source code for this? I'm currently struggling to code an allied unit to change between weapons
 
The source for all that ships with Blood and Steel, and that's all Open Source, so far as I'm concerned. The key function is in module_scripts, called via a Mission trigger, but there are bits of ancillary code dealing with situations. Here's the core script, though:

Python:
#TROOP EQUIPMENT SYSTEM
#input:  agent id
("cf_troop_equipment_system",[
    (this_or_next|multiplayer_is_server),
    (neg|game_in_multiplayer_mode), 
    #(display_message, "@Running equipment script"),#DEBUG
    (store_trigger_param_1, ":agent_no"),
    
    (assign, ":stop", 0),   
    (agent_is_human, ":agent_no"),
    (agent_is_active, ":agent_no"),
    (agent_is_alive, ":agent_no"),
    (neq, ":agent_no", 0),
    (agent_get_troop_id, ":id", ":agent_no"),
        
    #MERCHANT FIXES   
    (try_begin),
        (this_or_next|is_between, ":id", armor_merchants_begin, armor_merchants_end),
        (this_or_next|is_between, ":id", weapon_merchants_begin, weapon_merchants_end),
        (this_or_next|is_between, ":id", goods_merchants_begin, goods_merchants_end),
        (this_or_next|eq, ":id", "trp_tavern_bookseller_1"),
        (this_or_next|eq, ":id", "trp_tavern_bookseller_2"),
        (is_between, ":id", horse_merchants_begin, horse_merchants_end),
        #(display_message, "@Merchant found, equipping him/her"),
        
        #Remove the gloves
        (agent_get_item_slot, ":gloves", ":agent_no", 7),#Get the gloves
        (try_begin),
            (gt, ":gloves", 0),
            (agent_unequip_item, ":agent_no", ":gloves"),
        (try_end),   
        #Remove the hats
        (agent_get_item_slot, ":hat", ":agent_no", 4),#Get the hats
        (try_begin),
            (gt, ":hat", 0),
            (agent_unequip_item, ":agent_no", ":hat"),
        (try_end),           
        
        (try_begin),
            (troop_get_type, ":cur_troop_gender", ":id"),
            (eq, ":cur_troop_gender", 0),
            (store_random_in_range, ":clothes", "itm_tunic_with_green_cape","itm_female_civ_clothes_start"),
            (store_random_in_range, ":shoes", "itm_ankle_boots", "itm_narf_bear_paw_shoes"),
            (agent_equip_item, ":agent_no", ":shoes"),
            (agent_equip_item, ":agent_no", ":clothes"),
        (else_try),
            (store_random_in_range, ":clothes", "itm_red_dress", "itm_female_civ_clothes_end"),
            (store_random_in_range, ":shoes", "itm_ankle_boots", "itm_narf_bear_paw_shoes"),
            (agent_equip_item, ":agent_no", ":shoes"),               
            (agent_equip_item, ":agent_no", ":clothes"),
        (try_end),
    (try_end),
    
    #CARAVAN MASTER
    (try_begin),
        (eq, ":id", "trp_caravan_master"),
        (agent_equip_item, ":agent_no", "itm_coat_of_plates_red"),
        (agent_equip_item, ":agent_no", "itm_steel_shield"),
        (agent_equip_item, ":agent_no", "itm_scale_gauntlets"),
        (agent_equip_item, ":agent_no", "itm_iron_greaves"),
        (agent_equip_item, ":agent_no", "itm_segmented_helmet"),
        (agent_equip_item, ":agent_no", "itm_winged_mace"),
    (try_end),   
    
    #Adjust the speeds of all Agents.
    (troop_get_slot, ":speed_mult", ":id", slot_troop_speed_mult),
    #(assign, reg0, ":speed_mult"),
    #(display_message, "@Speed Mult: {reg0}"),
    (agent_set_speed_modifier, ":agent_no", ":speed_mult"),
    (agent_set_speed_limit, ":agent_no", 35),
    
    #Speed up the player.
    (try_begin),
        (eq, ":id", "trp_player"),
        #Special speed boost for Barbarians.
        (troop_get_slot, ":char_class", "trp_player", slot_troop_character_class),
        (try_begin),
            (eq, ":id", "trp_player"),#It's the player
            (eq, ":char_class", 3),#Player is a Barbarian
            (agent_set_speed_modifier, ":agent_no", 200),#Really fast!
        (else_try),   
            (agent_set_speed_modifier, ":agent_no", 150),
        (try_end),
    (try_end),   
    
    #Gets rid of duplicate / extra weapons
    (try_begin),
        (neg|troop_is_hero, ":id"),
        (agent_get_wielded_item, ":wielded_item", ":agent_no", 0),
        (assign, ":got_weapon", 0),
        (assign, ":weapon_slot", 0),
        (is_between, ":wielded_item", "itm_weapons_start", "itm_missile_weapons_start"),#Agent is wielding a hand weapon at this time
        (try_for_range, ":i", 0, 4),#Search the item slots 0-3
            (agent_get_item_slot, ":item_id", ":agent_no", ":i"),
            (is_between, ":item_id", "itm_weapons_start", "itm_missile_weapons_start"),#hand weapon
            (assign, ":got_weapon", 1),
            (assign, ":weapon_slot", ":i"),
        (try_end),

        (try_for_range, ":i", 0, 4),#Search the item slots 0-3
            (eq, ":got_weapon", 1),
            (agent_get_item_slot, ":item_id", ":agent_no", ":i"),
            (is_between, ":item_id", "itm_weapons_start", "itm_missile_weapons_start"),#hand weapon
            (neq, ":weapon_slot", ":i"),
            (agent_unequip_item, ":agent_no", ":item_id", ":i"),#ditch it
        (try_end),       
    (try_end),
    
    #Gets rid of double shields.
    (try_begin),
        (neg|troop_is_hero, ":id"),
        (agent_get_wielded_item, ":wielded_item", ":agent_no", 1),#Shields
        (is_between, ":wielded_item", "itm_shields_start", "itm_shields_end"),#shield
        (assign, ":got_shield", 0),
        (assign, ":shield_slot", 0),
        (try_for_range, ":i", 0, 4),#Search the item slots 0-3
            (agent_get_item_slot, ":item_id", ":agent_no", ":i"),
            (is_between, ":item_id", "itm_shields_start", "itm_shields_end"),#shield
            (assign, ":got_shield",1),
            (assign, ":shield_slot",":i"),
        (try_end),
        (try_for_range, ":i", 0, 4),#Search the item slots 0-3
            (eq, ":got_shield",1),
            (agent_get_item_slot, ":item_id", ":agent_no", ":i"),
            (is_between, ":item_id", "itm_shields_start", "itm_shields_end"),#shield
            (neq, ":shield_slot", ":i"),
            (agent_unequip_item, ":agent_no", ":item_id", ":i"),#ditch it
        (try_end),       
    (try_end),       

    #Alephs can't crouch and are really slow
    (try_begin),
        (this_or_next|eq, ":id", "trp_aleph"),
        (eq, ":id", "trp_aleph_non_player"),
        (agent_ai_set_can_crouch, ":agent_no", 0),
    (try_end),
    
    #Remnants can't crouch and are really fast
    (try_begin),
        (eq, ":id", "trp_death_knight_remnant"),
        (agent_ai_set_can_crouch, ":agent_no", 0),
    (try_end),   
    
    #Convert Marnid into the Aleph if player is not driving it and we're not indoors
    (try_begin),
        (eq, "$g_player_drives_aleph", 0),
        (eq, "$g_player_owns_aleph", 1),
        (eq, "$g_can_drive_aleph_here", 1),
        (try_begin),
            (eq, ":id", "trp_npc2"),#Is Marnid
            (agent_get_team, ":team", ":agent_no"),
            (agent_get_position, pos1, ":agent_no"),
            (agent_fade_out, ":agent_no"),
            (set_spawn_position, pos1),
            (spawn_agent, "trp_aleph_non_player"),
            (agent_ai_set_can_crouch, reg0, 0),#disable crouching
            (agent_set_speed_modifier, reg0, 50),#Really slooow!
            (agent_set_team, reg0, ":team"),
        (try_end),
    (try_end),
    
    #EQUIP ALL SPECIAL-CASE TROOPS
    #FEMALE IRREGULARS
    #NOW WIELD BOWS FIRST
    (try_begin),
        (this_or_next|eq, ":id", "trp_mercenary_infantry_woman"),
        (this_or_next|eq, ":id", "trp_mercenary_infantry_woman_sergeant"),
        (this_or_next|eq, ":id", "trp_mercenary_infantry_woman_elite"),
        (eq, ":id", "trp_mercenary_infantry_woman_expert"),       
        (agent_equip_item, ":agent_no", "itm_javelin"),
        (agent_equip_item, ":agent_no", "itm_rogue_bow"),
        (agent_equip_item, ":agent_no", "itm_arrows"),
        (assign, ":tempIII", "itm_lui_inquisitorsword"),
        (val_add, ":tempIII", 1),       
        (store_random_in_range, ":sword", "itm_lui_inquisitiongreatsword", ":tempIII"),
        (agent_equip_item, ":agent_no", ":sword"),
        (assign, ":endme", 0),
        (try_for_range, ":i", 0, 4),#(slots < 10)?
            (eq, ":endme", 0),
            (troop_get_inventory_slot,":item",":id",":i"),
            (eq, ":item", "itm_rogue_bow"),
            (agent_set_wielded_item, ":agent_no", ":item"),
            (assign, ":endme", 1),
        (try_end),
    (try_end),
    
    #BATTLE SISTERS
    #GUARANTEED BWANGAS
    (try_begin),
        (this_or_next|eq, ":id", "trp_mercenary_polearm_woman_recruit"),
        (this_or_next|eq, ":id", "trp_mercenary_polearm_woman_regular"),
        (eq, ":id", "trp_mercenary_polearm_woman_elite"),       
        (agent_equip_item, ":agent_no", "itm_xenoargh_bwanga"),
    (try_end),
    
    #SISTERS OF MERCY
    #GUARANTEED GRENADES
    (try_begin),
        (eq, ":id", "trp_sister_of_mercy"),   
        (agent_equip_item, ":agent_no", "itm_xenoargh_troop_grenade"),
    (try_end),       
    
    #VAEGIR LEGIONNAIRES AND CRUSHERS
    (try_begin),
        (assign, ":tempI", "trp_vaegir_legionnaire_elite"),
        (val_add, ":tempI", 1),   
        (assign, ":tempII", "trp_vaegir_crusher_elite"),
        (val_add, ":tempII", 1),   
        (this_or_next|is_between, ":id", "trp_vaegir_legionnaire_recruit", ":tempI"),
        (this_or_next|is_between, ":id", "trp_vaegir_crusher_recruit", ":tempII"),
        (eq, ":id", "trp_vaegir_praetorian"),
        
        #Give 'em their throwing spears
        (agent_equip_item, ":agent_no", "itm_throwing_spears"),
        (agent_equip_item, ":agent_no", "itm_jarid"),
        
        #Give Legionnaires short-swords and Crushers two-handers
        (try_begin),
            (is_between, ":id", "trp_vaegir_legionnaire_recruit", ":tempI"),
            (assign, ":tempIII", "itm_lui_mercenaryshort"),
            (val_add, ":tempIII", 1),       
            (store_random_in_range, ":sword", "itm_sword_medieval_b_small", ":tempIII"),
            (agent_equip_item, ":agent_no", ":sword"),
            (assign, ":tempIII", "itm_spak_hermitage_shield_3"),
            (val_add, ":tempIII", 1),               
            (store_random_in_range, ":shield", "itm_spak_hermitage_shield_1", ":tempIII"),
            (agent_equip_item, ":agent_no", ":shield"),           
        (else_try),
            (assign, ":tempIII", "itm_lui_roughdaksword"),
            (val_add, ":tempIII", 1),       
            (store_random_in_range, ":sword", "itm_lui_midnight", ":tempIII"),
            (agent_equip_item, ":agent_no", ":sword"),       
        (try_end),
        (assign, ":endme", 0),
        (try_for_range, ":i", 0, 4),#(slots < 10)?
            (eq, ":endme", 0),
            (troop_get_inventory_slot,":item",":id",":i"),
            (eq, ":item", "itm_throwing_spears"),
            (agent_set_wielded_item, ":agent_no", ":item"),
            (assign, ":endme", 1),
        (try_end),
    (try_end),   
    
    #MERC GRENADIERS
    #BIG CHANGES, NO LONGER GET SHIELDS, ALWAYS GET GRENADES IN SECOND SLOT
    #ALWAYS SET TO WIELD ARQUEBUS
    (try_begin),
        (eq, ":id", "trp_mercenary_grenadier"),
        (agent_equip_item, ":agent_no", "itm_arquebus"),
        (agent_equip_item, ":agent_no", "itm_xenoargh_troop_grenade"),
        (agent_equip_item, ":agent_no", "itm_bolts"),
        (agent_equip_item, ":agent_no", "itm_boar_spear"),
        (assign, ":endme", 0),
    (try_end),
    
    #MERC DRAGOON
    #ALWAYS GET GRENADES IN SECOND SLOT AND DRAGONS
    (try_begin),
        (eq, ":id", "trp_mercenary_dragoon"),
        (agent_equip_item, ":agent_no", "itm_dragon"),
        (agent_equip_item, ":agent_no", "itm_xenoargh_troop_grenade"),
        (agent_equip_item, ":agent_no", "itm_bolts"),
        (assign, ":endme", 0),
    (try_end),   
    
    #ROYAL HUNTSMEN
    (try_begin),
        (eq, ":id", "trp_swadian_royal_huntsman"),
        (agent_equip_item, ":agent_no", "itm_long_bow"),
        (agent_equip_item, ":agent_no", "itm_arrows"),
        (agent_equip_item, ":agent_no", "itm_xenoargh_troop_grenade"),
        (assign, ":endme", 0),
        (try_for_range, ":i", 0, 4),#(slots < 10)?
            (eq, ":endme", 0),
            (troop_get_inventory_slot,":item",":id",":i"),
            (eq, ":item", "itm_long_bow"),
            (agent_set_wielded_item, ":agent_no", ":item"),
            (assign, ":endme", 1),
        (try_end),
    (try_end),   

    #HERO BATTLE EQUIPMENT
    (try_begin),
        (troop_is_hero,":id"),
        #Swadians
        (try_begin),
            (this_or_next|is_between, ":id", "trp_knight_1_1", "trp_knight_2_1"),
            (eq, ":id", "trp_kingdom_of_swadians_lord"),
            (neq, "$talk_context", tc_court_talk),
            (agent_equip_item, ":agent_no", "itm_narf_gothic_plate"),
            (agent_equip_item, ":agent_no", "itm_spak_warhorse_imperial"),
            (agent_equip_item, ":agent_no", "itm_narf_shynbaulds"),
            (agent_equip_item, ":agent_no", "itm_dejawolf_greathelm1"),
            (agent_equip_item, ":agent_no", "itm_narf_plate_mittens"),
        (try_end),
        #Vaegir
        (try_begin),
            (this_or_next|is_between, ":id", "trp_knight_2_1", "trp_knight_3_1"),
            (eq, ":id", "trp_kingdom_of_vaegirs_lord"),
            (neq, "$talk_context", tc_court_talk),
            (agent_equip_item, ":agent_no", "itm_amade_bronze_plate"),
            (agent_equip_item, ":agent_no", "itm_warhorse_sarranid"),
            (agent_equip_item, ":agent_no", "itm_amade_bronze_greaves"),
            (agent_equip_item, ":agent_no", "itm_amade_bronze_gauntlets"),
            (agent_equip_item, ":agent_no", "itm_amade_bronze_winged_helm"),
        (try_end),
        #Khergits
        (try_begin),
            (this_or_next|is_between, ":id", "trp_knight_3_1", "trp_knight_4_1"),
            (eq, ":id", "trp_kingdom_of_khergits_lord"),
            (neq, "$talk_context", tc_court_talk),
            (agent_equip_item, ":agent_no", "itm_ssh_yoroi"),
            (agent_equip_item, ":agent_no", "itm_warhorse_steppe"),
            (agent_equip_item, ":agent_no", "itm_ssh_suneate"),
            (agent_equip_item, ":agent_no", "itm_ssh_kote"),
            (agent_equip_item, ":agent_no", "itm_ssh_kabuto"),               
        (try_end),
        #Nords
        (try_begin),
            (this_or_next|is_between, ":id", "trp_knight_4_1", "trp_knight_5_1"),
            (eq, ":id", "trp_kingdom_of_nords_lord"),
            (neq, "$talk_context", tc_court_talk),
            (agent_equip_item, ":agent_no", "itm_dejawolf_vikingbyrnie"),
            (agent_equip_item, ":agent_no", "itm_warhorse_chain_barding01"),
            (agent_equip_item, ":agent_no", "itm_splinted_greaves"),
            (agent_equip_item, ":agent_no", "itm_mail_mittens"),
            (agent_equip_item, ":agent_no", "itm_xenoargh_viking_steel_winged_helm02"),               
        (try_end),
        #Rhodoks
        (try_begin),
            (this_or_next|is_between, ":id", "trp_knight_5_1", "trp_knight_6_1"),
            (eq, ":id", "trp_kingdom_of_rhodoks_lord"),
            (neq, "$talk_context", tc_court_talk),
            (agent_equip_item, ":agent_no", "itm_narf_milanese_plate"),
            (agent_equip_item, ":agent_no", "itm_charger_plate"),
            (agent_equip_item, ":agent_no", "itm_narf_steel_greaves"),
            (agent_equip_item, ":agent_no", "itm_gauntlets"),
            (agent_equip_item, ":agent_no", "itm_narf_visored_sallet_coif"),
        (try_end),
        #Sarranids
        (try_begin),
            (this_or_next|is_between, ":id", "trp_knight_6_1", "trp_kingdom_of_swadians_pretender"),
            (eq, ":id", "trp_kingdom_of_sarranids_lord"),
            (neq, "$talk_context", tc_court_talk),
            (agent_equip_item, ":agent_no", "itm_wei_xiadi_sarranid_mamluk_armor"),
            (agent_equip_item, ":agent_no", "itm_warhorse_sarranid"),
            (agent_equip_item, ":agent_no", "itm_sarranid_boots_c"),
            (agent_equip_item, ":agent_no", "itm_narf_wisby_gauntlets_black"),
            (agent_equip_item, ":agent_no", "itm_sarranid_veiled_helmet"),
        (try_end),
        #Death Knights
        (try_begin),
            #(this_or_next|is_between, ":id", "trp_knight_6_1", "trp_kingdom_of_swadians_pretender"),
            (eq, ":id", "trp_death_knights_lord"),
            (neq, "$talk_context", tc_court_talk),
            (agent_equip_item, ":agent_no", "itm_narf_milanese_plate_dark"),
            (agent_equip_item, ":agent_no", "itm_spak_horny_charger_plate"),
            (agent_equip_item, ":agent_no", "itm_narf_steel_greaves_dark"),
            (agent_equip_item, ":agent_no", "itm_narf_wisby_gauntlets_black"),
            (agent_equip_item, ":agent_no", "itm_spak_demon_hood"),
        (try_end),
        #Holy Army
        (try_begin),
            #(this_or_next|is_between, ":id", "trp_knight_6_1", "trp_kingdom_of_swadians_pretender"),
            (eq, ":id", "trp_templars_lord"),
            (neq, "$talk_context", tc_court_talk),
            (agent_equip_item, ":agent_no", "itm_narf_early_transitional_templar"),
            (agent_equip_item, ":agent_no", "itm_warhorse_chain_barding_templar"),
            (agent_equip_item, ":agent_no", "itm_narf_steel_greaves_dark"),
            (agent_equip_item, ":agent_no", "itm_narf_wisby_gauntlets_black"),
            (agent_equip_item, ":agent_no", "itm_narf_sugarloaf_coif_templar"),
        (try_end),       
    (try_end),   
    
    #SPECIAL AMMO SYSTEM
    (try_begin),
        (agent_has_item_equipped, ":agent_no", "itm_xenoargh_rocket_projector"),
        (neg|agent_has_item_equipped, ":agent_no", "itm_universal_cannon_ammo"),
        (agent_unequip_item, ":agent_no", "itm_xenoargh_rocket_projector"),
    (try_end),

    (try_begin),
        (agent_has_item_equipped, ":agent_no", "itm_xenoargh_byzantine_flamethrower"),
        (neg|agent_has_item_equipped, ":agent_no", "itm_universal_cannon_ammo"),
        (agent_unequip_item, ":agent_no", "itm_xenoargh_byzantine_flamethrower"),
    (try_end),   
    
    (try_begin),
        (agent_has_item_equipped, ":agent_no", "itm_handgonne"),
        (neg|agent_has_item_equipped, ":agent_no", "itm_universal_cannon_ammo"),
        (agent_unequip_item, ":agent_no", "itm_handgonne"),
    (try_end),       

    (try_begin),
        (agent_has_item_equipped, ":agent_no", "itm_aleph_cannon"),
        (neg|agent_has_item_equipped, ":agent_no", "itm_universal_cannon_ammo"),
        (agent_unequip_item, ":agent_no", "itm_aleph_cannon"),
    (try_end),       

    (try_begin),#Strip universal cannon ammunition
        (neg|agent_has_item_equipped, ":agent_no", "itm_aleph_cannon"),
        (agent_has_item_equipped, ":agent_no", "itm_universal_cannon_ammo"),
        (agent_unequip_item, ":agent_no", "itm_universal_cannon_ammo"),
        
        #Strip attempts to get around ammo limits.
        (try_begin),
                (agent_has_item_equipped, ":agent_no", "itm_universal_cannon_ammo"),
                (agent_unequip_item, ":agent_no", "itm_universal_cannon_ammo"),
        (try_end),
        
        (try_begin),
                (agent_has_item_equipped, ":agent_no", "itm_universal_cannon_ammo"),
                (agent_unequip_item, ":agent_no", "itm_universal_cannon_ammo"),
        (try_end),       
        
        (try_begin),
            (eq, ":stop", 0),
            (agent_has_item_equipped, ":agent_no", "itm_handgonne"),
            (agent_equip_item, ":agent_no", "itm_mortar_grenade"),
            (try_begin),
                (agent_has_item_equipped, ":agent_no", "itm_xenoargh_rocket_projector"),
                (agent_unequip_item, ":agent_no", "itm_xenoargh_rocket_projector"),
            (try_end),   
            (try_begin),
                (agent_has_item_equipped, ":agent_no", "itm_xenoargh_byzantine_flamethrower"),
                (agent_unequip_item, ":agent_no", "itm_xenoargh_byzantine_flamethrower"),
            (try_end),               
            (agent_refill_ammo, ":agent_no"),               
            (assign, ":stop", 1),
        (try_end),   

        (try_begin),
            (eq, ":stop", 0),
            (agent_has_item_equipped, ":agent_no", "itm_aleph_cannon"),           
            (assign, ":stop", 1),
        (try_end),           

        (try_begin),
            (eq, ":stop", 0),
            (agent_has_item_equipped, ":agent_no", "itm_xenoargh_rocket_projector"),
            (agent_equip_item, ":agent_no", "itm_explosive_rocket_arrows"),       
            (try_begin),
                (agent_has_item_equipped, ":agent_no", "itm_handgonne"),
                (agent_unequip_item, ":agent_no", "itm_handgonne"),
            (try_end),       
            (try_begin),
                (agent_has_item_equipped, ":agent_no", "itm_xenoargh_byzantine_flamethrower"),
                (agent_unequip_item, ":agent_no", "itm_xenoargh_byzantine_flamethrower"),
            (try_end),           
            (agent_refill_ammo, ":agent_no"),           
            (assign, ":stop", 1),
        (try_end),

        (try_begin),
            (eq, ":stop", 0),
            (agent_has_item_equipped, ":agent_no", "itm_xenoargh_byzantine_flamethrower"),
            (agent_equip_item, ":agent_no", "itm_xenoargh_byzantine_flamethrower_fuel"),       
            (try_begin),
                (agent_has_item_equipped, ":agent_no", "itm_handgonne"),
                (agent_unequip_item, ":agent_no", "itm_handgonne"),
            (try_end),       
            (try_begin),
                (agent_has_item_equipped, ":agent_no", "itm_xenoargh_rocket_projector"),
                (agent_unequip_item, ":agent_no", "itm_xenoargh_rocket_projector"),
            (try_end),           
            (agent_refill_ammo, ":agent_no"),           
            (assign, ":stop", 1),
        (try_end),           
    (try_end),
]),
 
Back
Top Bottom