Sign in to follow this  
mypp32

Character/item coding help

Recommended Posts

mypp32    0

Good morning/day/evening, sir/madam!

I'm currently making a character for DST, all artwork is done, but now I need some help with coding, more specifically:

Heat and cold damage. I wanted to make that my character takes the double heat damage per second and lower heat tolerance, but no cold damage what so ever. As when the temperature drops below some point, character gaining speed and damage boost, his hunger rate is draining faster.

Item. And here I have no idea what so ever even on the file hierarchy. I want to make an amulet that will be neglecting sanity drain from night (dusk one still should be there) and full darkness. (additionally if you can, give me some tutorials on character specific item creation, like how to make it what so ever I will be grateful) 

 

Thanks for the help beforehand 

 

P.S

Sorry if something wasn't clear, or for my terrible grammar, English isn't native language for me. Though I will totally understand the answers, if you have questions to ask go ahead I'll try to reply ASAP.

fawkes.lua

Share this post


Link to post
Share on other sites
Mobbstar    14122

For greater heat damage and no cold damage, you want to edit the "temperature" component (specifically "overheattemp and hurtrate". The buffs when cold can be handled in a variety of ways, but I suggest you listen for the events "startfreezing", "stopfreezing", "startoverheating" and "stopoverheating" to change the hurtrate and buffs as required (note that this might not remove the red overlay and freezing animation, to avoid those, you have to set "mintemp" above 0 and handle the buffs elsehow).

The amulet could change its "dapperness" based on the current time phase. Listening for the respective events and checking once when loading the server should do the trick.

Share this post


Link to post
Share on other sites
mypp32    0
12 minutes ago, Mobbstar said:

For greater heat damage and no cold damage, you want to edit the "temperature" component (specifically "overheattemp and hurtrate". The buffs when cold can be handled in a variety of ways, but I suggest you listen for the events "startfreezing", "stopfreezing", "startoverheating" and "stopoverheating" to change the hurtrate and buffs as required (note that this might not remove the red overlay and freezing animation, to avoid those, you have to set "mintemp" above 0 and handle the buffs elsehow).

The amulet could change its "dapperness" based on the current time phase. Listening for the respective events and checking once when loading the server should do the trick.

Ahhh I see, thanks for the reply! And actually I kinda would like overlays to stay as some sort of indication when buff will take place, rather than just I got faster and stuff.

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