Katar Damage Questions

Users who are viewing this thread

dariel

Sergeant Knight at Arms
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?

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),
],
),

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!
 
Maaan, I've been trying forever to implement some martial arts' weapons in the game. Katars and knuckle dusters among those.
The mission template trigger looks good, but I would make another one to ensure that katars won't be used with a weapon, since they'd be basically a glove. Also, would probably do the check for if the agent has katar items equipped, in the conditions block. Other than that, I'd be super interested in tests and results!
About #2. If I am not mistaken, Rome at War has the Peltasts use a glove, which is basically a vanilla game hand, with 2-3 javelins in a grip, to imitate the classic "peltasts holding a bunch of javelins" thing. It works great, because they hold them in the hand, and I think that the javelin number even goes down with each weapon being thrown.
The 3d aspect of it would be quite easy (I may not remember it well, but didn't you have some katars in one of your OSP?), but it would look funny when the player/agent would punch. I assume the weapons would be diagonal to the face, instead of hitting it head on. That was my issue, with previous tries, anyway.
 
Back
Top Bottom