Morale mod feasible via json only?

I want to make a mod that makes morale far more important, essentially making joy activities an essential part of every day, or making friends with NPCs/pets.
The idea being that if the mental wellbeing of your survivor is neglected for too long it has significant drawbacks.
For some people this would be an annoying debuff chasing them, for others it might be an added challenge.
I wonder if such a system, or simplified portions of it, are possible via json modding only?
I look at other mods that affect morale, such as filthy clothing, and they appear to be partially hardcoded?
Maybe a simple system to start off with, with two player traits “loner” or “social”
“loner” has no morale debuff from not having pets or NPCs, and infact may have debuffs from having NPCs around
“social” has morale debuff ( growing with time? ) for not having NPCs or pets, but will gain more joy from interacting with them.

Is any of this possible via json?

I’m a baby coder – I don’t know nearly enough, so don’t take this as gospel but I do have a healthy bit of experience with the JSON at this point.

But no, I don’t think it’s doable in JSON. You’re talking about tracking player interactions with NPCs, proximity to NPCs, or at the very least a counter for how long it’s been since they last saw another human. These are things that, to my knowledge, would require code.

You can do other things with morale in JSON, with food or items, but I think what you’re talking about would require a compile. Again, I can’t say that 100%, but I’m pretty sure.

I thought that might be the case, items that have morale effects I can see in existing JSON, but checks for other game code - yeah.
Well I was gonna have to learn C++ at some point anyway lol

ideas…ideas…