Hi all, I'm trying to implement katars and katar-like weapons using Somebody's unarmed damage code (https://forums.taleworlds.com/index.php?threads/extra-unarmed-damage.366778/) and Xenoargh's Fancy Damage code (https://forums.taleworlds.com/index.php?threads/fancy-damage-systems.152057/), and have some questions about it.
1) Is this code correct?
2) How could I equip the katar wielder with the correct gauntlet type? I'm assuming I have to make gauntlets with the katar model placed in the hand, and somehow equip the agent with it, right? Will a trigger on the weapon type entry in module_items work for the swap? I will have to unequip the katar-as-weapon right? Suggestions would be very welcome!
Thanks!
1) Is this code correct?
katar_damage = (
ti_on_agent_hit,0,0,
[
(eq, reg0, -1), #unarmed/fists damage
# (store_trigger_param_2, ":attacker"),
# (agent_get_troop_id, ":troop_no", ":attacker"),
# (troop_is_hero, ":troop_no"), #bots normally do not punch/kick
# #should probably do distance check for close-range vs delivered damage? ],
[
(store_trigger_param_1, ":defender"),
(store_trigger_param_2, ":attacker"),
(agent_get_troop_id, ":troop_no", ":attacker"),
(store_trigger_param_3, ":damage"),
(agent_get_wielded_item, ":weapon", ":attacker", 0),
(eq, ":weapon", -1),
(agent_get_item_slot, ":item_no", ":attacker", ek_gloves),
(is_between,":item_no","itm_katar_glove_a","itm_katar_glove_x+1"),
(store_random_in_range,":katar_dmg",10,25),
(val_add,":damage",":katar_dmg"),
(store_agent_hit_points, ":hitpoints" , ":defender", 1),
(val_sub,":hitpoints",":katar_dmg"),
(agent_set_hit_points,":defender",":hitpoints",1),
],
),
ti_on_agent_hit,0,0,
[
(eq, reg0, -1), #unarmed/fists damage
# (store_trigger_param_2, ":attacker"),
# (agent_get_troop_id, ":troop_no", ":attacker"),
# (troop_is_hero, ":troop_no"), #bots normally do not punch/kick
# #should probably do distance check for close-range vs delivered damage? ],
[
(store_trigger_param_1, ":defender"),
(store_trigger_param_2, ":attacker"),
(agent_get_troop_id, ":troop_no", ":attacker"),
(store_trigger_param_3, ":damage"),
(agent_get_wielded_item, ":weapon", ":attacker", 0),
(eq, ":weapon", -1),
(agent_get_item_slot, ":item_no", ":attacker", ek_gloves),
(is_between,":item_no","itm_katar_glove_a","itm_katar_glove_x+1"),
(store_random_in_range,":katar_dmg",10,25),
(val_add,":damage",":katar_dmg"),
(store_agent_hit_points, ":hitpoints" , ":defender", 1),
(val_sub,":hitpoints",":katar_dmg"),
(agent_set_hit_points,":defender",":hitpoints",1),
],
),
2) How could I equip the katar wielder with the correct gauntlet type? I'm assuming I have to make gauntlets with the katar model placed in the hand, and somehow equip the agent with it, right? Will a trigger on the weapon type entry in module_items work for the swap? I will have to unequip the katar-as-weapon right? Suggestions would be very welcome!
Thanks!