Jump to content

Copy/Edit Smoker Trait


Jester

Recommended Posts

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 by Jester
Link to comment
Share on other sites

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

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
×
×
  • Create New...