Jester Posted September 21, 2018 Share Posted September 21, 2018 (edited) Hey everyone, I want to create a mods where a trait similar to the smoker trait is being used. Obviously I do not want the same settings as the smoker trait but I can not find the piece of code in the original files that is responsible for making the player anxcious and so on when you do not smoke. items.txt with "OnEat" and "CustomContextMenu" + recipecode.lua and a .lua creating the trait have been edited/created to my needs and everything is working fine so far. It is just that I can not find the code responsible for making someone anxious when not smoking. Edited September 21, 2018 by Jester Link to comment Share on other sites More sharing options...
Fenris_Wolf Posted September 21, 2018 Share Posted September 21, 2018 Its not in the lua files, its hardcoded in the java, as are many of the effects/penalties from not smoking. Also stress produced by not smoking is not normal stress, the game defines it as StressFromCigarettes. You'll have to implement your own version in lua. But to answer the question, its in zombie.characters.BodyDamage.class, in the function UpdateBoredom() Link to comment Share on other sites More sharing options...
Jester Posted September 21, 2018 Author Share Posted September 21, 2018 Thanks a lot for your fast response. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now