Jump to content

Recommended Posts

This is out of general curiosity, but how do i change the penalty of Waxwelljournal? I thought for sure it was:

local function canread(inst)    return inst.components.sanity:GetMaxWithPenalty() >= TUNING.SHADOWWAXWELL_SANITY_PENALTYend

And then just change the tuning to whatever number i want it to be but it still penalizes me heavily. I have a character with 200 Sanity, using it once drains me to 90, using it twice drains me to 35. 

 

Any help is appreciated thanks

Link to comment
https://forums.kleientertainment.com/forums/topic/50876-quick-questionprefab/
Share on other sites

@rons0n, As it's written now, the sanity penalty is calculated by just going through every entity in the world and seeing if they have a defined sanity penalty. So if you have preexisting shadowwaxwells, their penalties will be added to it. So it sounds like you had one shadowwaxwell already (penalty of 55, bringing you to 145) then made a second (causing the penalty to be calculated, based on two shadowwaxwells, 110 bringing you to 90), then made a third, (165 bringing you to 35).

 

Changing the tuning value in your modmain would probably work, but you could also modify the inst.components.sanity.penalty of shadowwaxwell in a postinit, or even override RecalculatePenalty() for your character's sanity component.

@rons0n, As it's written now, the sanity penalty is calculated by just going through every entity in the world and seeing if they have a defined sanity penalty. So if you have preexisting shadowwaxwells, their penalties will be added to it. So it sounds like you had one shadowwaxwell already (penalty of 55, bringing you to 145) then made a second (causing the penalty to be calculated, based on two shadowwaxwells, 110 bringing you to 90), then made a third, (165 bringing you to 35).

 

Changing the tuning value in your modmain would probably work, but you could also modify the inst.components.sanity.penalty of shadowwaxwell in a postinit, or even override RecalculatePenalty() for your character's sanity component.

 

@rezecib

 

Haha i just realized this the moment you made your post. But now have a better understanding thanks!

Edited by rons0n

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...