Sign in to follow this  
EuedeAdodooedoe

Where is the fire damage declared?

Recommended Posts

EuedeAdodooedoe    1187
2 hours ago, RedHairedHero said:

I'd go to Willow.lua file for fire resistance and go to Staff.lua for fire damage.

Nope, it doesn't seem like it's in either of those two, but tuning.lua for DST seems to have MAX_FIRE_DAMAGE_PER_SECOND variable, which is set to 120... while in single player such a variable doesn't exist at all. Changing the variable to, say, 600 or 1200 (set to 120 by default) doesn't really change the amount of hp your character loses or anything else for that matter when they stand near something that is on fire.

It seems like it's complexly coded within health.lua, however I might be wrong. The difference between DST and DS is the rate at which the 4 hp is taken away. For single player it's either 4 per frame or, in total, 40 per 2.5 seconds, while for multiplayer it's 4 per 2.5 seconds. There must be some form of variable that controls the rate at which fire deals damage, but where I can't find it.

Share this post


Link to post
Share on other sites
Aquaterion    821
10 minutes ago, EuedeAdodooedoe said:

Nope, it doesn't seem like it's in either of those two, but tuning.lua for DST seems to have MAX_FIRE_DAMAGE_PER_SECOND variable, which is set to 120... while in single player such a variable doesn't exist at all. Changing the variable to, say, 600 or 1200 (set to 120 by default) doesn't really change the amount of hp your character loses or anything else for that matter when they stand near something that is on fire.

It seems like it's complexly coded within health.lua, however I might be wrong. The difference between DST and DS is the rate at which the 4 hp is taken away. For single player it's either 4 per frame or, in total, 40 per 2.5 seconds, while for multiplayer it's 4 per 2.5 seconds. There must be some form of variable that controls the rate at which fire deals damage, but where I can't find it.

check armor_dragonfly.lua in the onequip function.

Share this post


Link to post
Share on other sites

What I meant by checking those files is see where they pull fire related damage and protection from. Example would be like inst.components.health.whatever. So then you know it's in the components folder in the health.lua.

Share this post


Link to post
Share on other sites
EuedeAdodooedoe    1187
19 hours ago, RedHairedHero said:

What I meant by checking those files is see where they pull fire related damage and protection from. Example would be like inst.components.health.whatever. So then you know it's in the components folder in the health.lua.

Kek, we arrived to the same spot; health.lua. However, only the damage scale is declared there and it's just set to 1. There is nothing indicative of 4 hp being taken away every time hp is actually taken away from you standing in fire and there is no damage rate declared either.

Share this post


Link to post
Share on other sites

This was inside the Health.lua file.

amount = TUNING.MAX_FIRE_DAMAGE_PER_SECOND - self.firedamageinlastsecond

self:DoDelta(-amount*self.fire_damage_scale, false, "fire")

This is in Tuning.lua

MAX_FIRE_DAMAGE_PER_SECOND = 120

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this