While searching through the JSON files to cannibalize code for a project I’m working on, I came across a comment which stated that it wasn’t currently possible for effects to alter morale.
And true enough, I can’t seem to find any other effect or effect_on_condtion that does… which made me wonder… how the heck do Mood Swings or Bad Temper work then? And is there any way for me to tap into whatever makes those two things work to get my thing to work? Or is there some other workaround for this I maybe haven’t thought of other than an effect?
Any feedback would be appreciated.
So I don’t know off the top of my head how mood swing or bad temper work, they probably are hard coded. However it is possible to add morale effects with effects or effect_on_conditions, here is an example of how to do it. Or look at the NPCs.md doc and look up u_add_morale
Now the possible catch here is that morale effects generally have a time out associated with them, I’m not sure if you could make one permanent. You could however maker an eoc that runs every so often and readds your morale when it expires though.
1 Like
Ah! This is exactly what I was looking for! “u_add_morale” should be exactly what I needed! Thanks! I’d basically given up on figuring out how Mood Swings does what it does, chalking it up to being hardcoded… so I was pretty much just randomly scouring ever file in the JSONs ctrl-f’ing ‘morale’.
As for the duration issue, my particular mutation is going to be an activated one anyway. So using an eoc is probably the way I’ll be going with it anyway but it’s definitely a good workaround to have if I decide to create any traits with a more indefinite duration down the line.
Happy to help. If you have any more questions feel free to ask.