Damage types

Users who are viewing this thread

As damage type is 2 bits, there's is one value, damage_type = 3 that 's not used by module_system. But may be the game itself don't use the value. I think we should wait for cmpxchg8b to answer.
 
For instance If I was to add a new damage type that was a clone of another type e.g. I make a clone of cut damage and call it Hack damage. Effectively they would be the same damage type. But say I wanted to give one different armor soak and reduction rates
 
Jamould said:
For instance If I was to add a new damage type that was a clone of another type e.g. I make a clone of cut damage and call it Hack damage. Effectively they would be the same damage type. But say I wanted to give one different armor soak and reduction rates
Any ideas?
 
Look in header_items.py, and define hack = 3 or something. You might need to adjust some flags, but it might not work at all in-game (for one, the damage type won't show up).
 
A workaround would be possible if there is no solution to your current question. You could check for the weapon used and modify the damage done scriptwise. Not as elegant as to simply apply a new damage type and a bit of a waste of ressources but not impossible (I guess).

You would need ti_agent_hit.
ti_on_agent_hit          = -28.0 #can only be used in module_mission_templates triggers
# 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

Check the weapon used from the Id stored in parameter2 and if it fits a specific category do some calculations with the damage stored in parameter3 and add it afterwards.

Haven't done that but as far as I can see this should work.
 
Back
Top Bottom