Minimum Damage Code
Moderator: Forum Moderators
Minimum Damage Code
Hello! Does anyone know where the "minimum damage code" is located at in the game files?
If you have 100% (or greater) resistance to a damage type, it still deals 1 damage. I'd like to make this 0 damage.
If you have 100% (or greater) resistance to a damage type, it still deals 1 damage. I'd like to make this 0 damage.
Re: Minimum Damage Code
"If gameplay requires it, they can be made to live on Venus." -- scott
Re: Minimum Damage Code
In other words, buried in the C++ source code?
I was hoping it'd be an easy text editor mod. Thank you for your help!
I was hoping it'd be an easy text editor mod. Thank you for your help!
Re: Minimum Damage Code
You can edit C++ with a text editor. But you would need to recompile the game after that and of course you'll get out-of-sync errors if you play multiplayer with unmodified clients.
"If gameplay requires it, they can be made to live on Venus." -- scott
Re: Minimum Damage Code
Alternatively you could do this in WML too, by applying an attack event that temporarily sets the actual base damage to 0, if the opponent's resistance is 100%. This will actually force 0 damage from this attack.
Note that if an attack's base damage is 0, if I recall correctly, the animation will always play the "miss" animation, even if it was a hit. Namely, the engine won't display a 0-damage hit. If you want it displayed correctly, you also need to do that by hand: for example using [harm_unit] for 0, or by a floating text of 0 and playing the appropriate hit sound.
Note that if an attack's base damage is 0, if I recall correctly, the animation will always play the "miss" animation, even if it was a hit. Namely, the engine won't display a 0-damage hit. If you want it displayed correctly, you also need to do that by hand: for example using [harm_unit] for 0, or by a floating text of 0 and playing the appropriate hit sound.
Main UMC campaigns: The Ravagers - now for 1.16, with new bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny