OpenXcom Forum
Modding => Work In Progress => Topic started by: NoelBuddy on September 02, 2014, 09:24:47 pm
-
I've been playing around with MOD ideas and was wondering if someone could explain how the system determines stun damage from weapons that cause health damage?
I was thinking about options for stun weapons causing some actual damage( for example a stun rod that does some health damage from the electric shock, or bad reactions to stun bomb chemicals) or weapons that cause a nerfed amount of health damage with a disproportionately high amount of stun damage(like rubber bullets they mostly just hurt but there's a good chance they'll knock someone out before they kill them).
-
All impossible. Harcoded, nothing a modder can do. Unless you want to work on the code.
-
I did experimental branch that do exactly that, only drawback is that you need compile it yourself (all changes to ruleset will work only with that exe).
You can get it on:
https://github.com/Yankes/OpenXcom/tree/UnifiedDamageTypes
-
Yankes, what part should I be focusing on to see how damage is handled?
-
In my branch damage type is defined in "src/Ruleset/RuleDamageType.cpp"
and mainly used in "src/Savegame/BattleUnit.cpp" function `damage(const Position &relative, int power, const RuleDamageType *type)`.
Usage is described in my pull request: https://github.com/SupSuper/OpenXcom/pull/938
-
THANKS!! I must have been blind.
https:/// Conversion form power to item damage.
float ToItem;
Hmm... (https://i.imgur.com/jRKCSi9.png)