The following are are a bunch of Native items flipped. The resource can be downloaded here.
The following changes should also be made so that damage type and appearance correspond properly.
By making these two changes, pickaxes will look different from fighting picks and the business end of the bec-de-corbin should do pierce damage by default now.
Code:
["h_alt", "Rock Pick", [("alt_iron_hammer_new",0),("iron_hammer_new",ixmesh_carry),], itp_type_one_handed_wpn|itp_merchandise|itp_primary|itp_wooden_parry, itc_scimitar,
7 , weight(2)|spd_rtng(100) | weapon_length(55)|swing_damage(20 , pierce) | thrust_damage(0 , pierce),imodbits_mace ],
["pick_alt", "Hammer", [("alt_rusty_pick",0),("rusty_pick",ixmesh_carry),], itp_type_one_handed_wpn|itp_merchandise|itp_primary|itp_wooden_parry, itc_scimitar|itcf_carry_axe_left_hip,
27 , weight(2)|spd_rtng(99) | weapon_length(69)|swing_damage(18 , blunt) | thrust_damage(0 , pierce),imodbits_pick ],
["fp_alt", "Fighting Hammer", [("alt_fighting_pick_new",0),("fighting_pick_new",ixmesh_carry),], itp_type_one_handed_wpn|itp_merchandise|itp_primary|itp_wooden_parry, itc_scimitar|itcf_carry_axe_left_hip,
108 , weight(1.0)|spd_rtng(98) | weapon_length(70)|swing_damage(22 , blunt) | thrust_damage(0 , pierce),imodbits_pick ],
["mp_alt", "Military Hammer", [("alt_steel_pick_new",0),("steel_pick_new",ixmesh_carry),], itp_type_one_handed_wpn|itp_merchandise|itp_primary, itc_scimitar|itcf_carry_axe_left_hip,
280 , weight(1.5)|spd_rtng(98) | weapon_length(70)|swing_damage(29 , blunt) | thrust_damage(0 , pierce),imodbits_pick ],
["ih_alt", "Battle Pick", [("alt_military_hammer",0),("military_hammer",ixmesh_carry),], itp_type_one_handed_wpn|itp_merchandise|itp_primary, itc_scimitar|itcf_carry_axe_left_hip,
173 , weight(2.5)| spd_rtng(97) | weapon_length(70)|swing_damage(25 , pierce) | thrust_damage(0 , pierce),imodbits_mace ],
["bec_de_corbin_alt", "War Hammer", [("alt_bec",0),("bec_de_corbin_a",ixmesh_carry),], itp_type_two_handed_wpn| itp_two_handed|itp_primary|itp_bonus_against_shield|itp_wooden_parry|itp_can_knock_down, itc_nodachi|itcf_carry_axe_back,
251 , weight(3.0)|difficulty(10)|spd_rtng(80) | weapon_length(120)|swing_damage(40 , blunt) | thrust_damage(0 , pierce),imodbits_axe ],
["sarranid_two_handed_pick_b", "Exotic War Pick", [("alt_handed_battle_axe_h",0),("two_handed_battle_axe_h",ixmesh_carry),], itp_type_two_handed_wpn|itp_two_handed|itp_primary|itp_bonus_against_shield|itp_unbalanced, itc_nodachi|itcf_carry_axe_back,
280 , weight(3.0)|difficulty(10)|spd_rtng(90) | weapon_length(90)|swing_damage(40 , pierce) | thrust_damage(0 , pierce),imodbits_pick ],
Code:
["pickaxe", "Pickaxe", [("rusty_pick",0)], itp_type_one_handed_wpn|itp_merchandise|itp_primary|itp_wooden_parry, itc_scimitar|itcf_carry_mace_left_hip,
27 , weight(3)|difficulty(0)|spd_rtng(99) | weapon_length(70)|swing_damage(19 , pierce) | thrust_damage(0 , pierce),imodbits_pick ],
["bec_de_corbin_a", "War Hammer", [("bec_de_corbin_a",0)], itp_type_polearm|itp_merchandise| itp_cant_use_on_horseback|itp_primary|itp_penalty_with_shield|itp_wooden_parry|itp_two_handed, itc_staff|itcf_carry_spear,
125 , weight(3.0)|difficulty(0)|spd_rtng(81) | weapon_length(120)|swing_damage(38, pierce) | thrust_damage(38 , pierce),imodbits_polearm ],
This sets up the item relationships and reciprocates the slot setting so that you can toggle between them. Note that while it is possible to do this automatically (using python trickery), for a small item set it is simpler to do so manually. One disadvantage of this is that by not using itp_next_item_as_melee, the stats on the alternate version will not display. This can be fixed by either changing the item order so that the engine recognizes they are next to one another, or by fetching item damage values (populated by python) from game_get_item_extra_text.
Code:
(item_set_slot, "itm_sarranid_two_handed_pick_b", slot_item_alternate, "itm_sarranid_two_handed_axe_b"),
(item_set_slot, "itm_sarranid_two_handed_axe_b", slot_item_alternate, "itm_sarranid_two_handed_pick_b"),
(item_set_slot, "itm_bec_de_corbin_a", slot_item_alternate, "itm_bec_de_corbin_alt"),
(item_set_slot, "itm_bec_de_corbin_alt", slot_item_alternate, "itm_bec_de_corbin_a"),
(item_set_slot, "itm_pick_alt", slot_item_alternate, "itm_pickaxe"),
(item_set_slot, "itm_pickaxe", slot_item_alternate, "itm_pick_alt"),
(item_set_slot, "itm_fp_alt", slot_item_alternate, "itm_fighting_pick"),
(item_set_slot, "itm_fighting_pick", slot_item_alternate, "itm_fp_alt"),
(item_set_slot, "itm_mp_alt", slot_item_alternate, "itm_military_pick"),
(item_set_slot, "itm_military_pick", slot_item_alternate, "itm_mp_alt"),
(item_set_slot, "itm_hammer", slot_item_alternate, "itm_h_alt"),
(item_set_slot, "itm_h_alt", slot_item_alternate, "itm_hammer"),
(item_set_slot, "itm_military_hammer", slot_item_alternate, "itm_ih_alt"),
(item_set_slot, "itm_ih_alt", slot_item_alternate, "itm_military_hammer"),
Code:
common_player_weapon_toggle = (0,0,1, [
(neg|main_hero_fallen),
(game_key_clicked, gk_toggle_weapon_mode),
(get_player_agent_no, ":player_agent"),
(agent_get_wielded_item, ":item", ":player_agent", 0),
(gt, ":item", 0),
(item_slot_ge, ":item", slot_item_alternate, 1),
],
[
(get_player_agent_no, ":player_agent"),
(agent_get_wielded_item, ":item", ":player_agent", 0),
(item_get_slot, ":alternate", ":item", slot_item_alternate),
(gt, ":alternate", 1),
(agent_unequip_item, ":player_agent", ":item"),
(agent_equip_item, ":player_agent", ":alternate"),
(agent_set_wielded_item, ":player_agent", ":alternate"),
],
)
common_ai_order_toggle = (ti_on_order_issued, 0, 0, [
(store_trigger_param_1, ":order_no"),
(this_or_next|eq, ":order_no", mordr_use_any_weapon),
(eq, ":order_no", mordr_use_blunt_weapons),
],
[
(store_trigger_param_1, ":order_no"),
(store_trigger_param_2, ":agent_id"), #probably the player
(agent_get_team, ":team_id", ":agent_id"),
(try_for_agents, ":agent_no"),
(agent_is_active, ":agent_no"),
(agent_is_human, ":agent_no"),
(agent_is_non_player, ":agent_no"),
(agent_is_alive, ":agent_no"),
(agent_get_team, ":team_no", ":agent_no"),
(eq, ":team_no", ":team_id"),
(agent_get_class, ":class_no", ":agent_no"),
(class_is_listening_order, ":team_no", ":class_no"),
(agent_get_wielded_item, ":item_no", ":agent_no", 0),
(try_begin), #could be using fists
(gt, ":item_no", 0),
(item_get_slot, ":swap_no", ":item_no", slot_item_alternate),
(else_try),
(assign, ":swap_no", 0),
(try_end),
(try_begin), #none found on wielded item
(eq, ":swap_no", 0), #
(assign, ":end", ek_head),
(try_for_range, ":item_slot", ek_item_0, ":end"),
(agent_get_item_slot, ":item_no", ":agent_no", ":item_slot"),
(gt, ":item_no", 0),
(item_get_slot, ":swap_no", ":item_no", slot_item_alternate),
(gt, ":swap_no", 0),
(assign, ":end", -1),
(try_end),
(try_end),
(gt, ":swap_no", 0),
(try_begin), #make use of the other item slots
(eq, ":order_no", mordr_use_any_weapon), #too lazy to re-set, just plain swapping
(else_try),
(eq, ":order_no", mordr_use_blunt_weapons), #switching to blunt modes only
#check inventory to see if weapon can be toggled
(try_begin),
(try_for_range, ":item_slot", ek_item_0, ":end"),
(agent_get_item_slot, ":item_id", ":agent_no", ":item_slot"),
(this_or_next|eq, ":item_id", "itm_h_alt"),
(this_or_next|eq, ":item_id", "itm_ih_alt"),
(this_or_next|eq, ":item_id", "itm_bec_de_corbin_a"),
(this_or_next|eq, ":item_id", "itm_pickaxe"),
(is_between, ":item_id", "itm_fighting_pick", "itm_morningstar"),
(assign, ":item_no", ":item_id"),
(assign, ":end", ek_item_0),
(item_get_slot, ":swap_no", ":item_no", slot_item_alternate),
(try_end),
(try_end),
#these are piercing weapons
(this_or_next|eq, ":item_no", "itm_h_alt"),
(this_or_next|eq, ":item_no", "itm_ih_alt"),
(this_or_next|eq, ":item_no", "itm_bec_de_corbin_a"),
(this_or_next|eq, ":item_no", "itm_pickaxe"),
(is_between, ":item_no", "itm_fighting_pick", "itm_morningstar"),
(else_try), #exclude them
(assign, ":swap_no", 0),
(try_end),
(gt, ":swap_no", 0),
(agent_unequip_item, ":agent_no", ":item_no"),
(agent_equip_item, ":agent_no", ":swap_no"),
(agent_set_wielded_item, ":agent_no", ":swap_no"),
(try_end),
])