demiurgeQuantified / StatsAPI

Project Zomboid mod that reimplements stat calculations in Lua, so that they can be further modded.
4 stars 2 forks source link

Add a hook for a constant stat change. #2

Closed Diakon5 closed 1 year ago

Diakon5 commented 1 year ago

I suppose second feature request. What I want with my mod is to make the player feel stressed based on their other moodles being at critical levels. My issue is balancing the increase/decrease, not to mention issues with speedup-slowdown of time. My request is to be able to set a value I want the stat to be changing over a period of time.

Example use: StatsAPI.SetDailyStressDelta("GeneralAnxiety",0.2) -- this would make the character gain 20% stress, excluding other factors, over a period of 24 hours... First argument would be the name of the effect, to be able to modify/cancel it later.