Meditation
This mod brings meditation to Project Zomboid!
Meditation comes with a trait called "Yogi" that gives a +1 bonus to Lightfoot. All of the other effects of this mod are locked to players with this trait by default; however, in sandbox options, you may allow everyone to meditate exactly as yogis do!
When a yogi (or anyone else who is capable of meditating) sits down on the ground, they will do so using a unique animation. This animation can be disabled using Mod Options after joining a server. This animation will override vanilla sitting by default for anyone who can meditate; if you would prefer that players be required to activate Meditation in Mod Options, there is a sandbox option for turning the animation off by default.
The act of meditating offers a range of possible benefits that can be toggled or adjusted in sandbox options:
1. Become invisible to zombies (SEE WARNINGS BELOW).
2. Recover endurance as though you have activated the rest mechanic.
3. Recover emotional health (in terms of fear, panic, stress, anger, boredom, and happiness).
4. Become less hungry and thirsty (so Meditation is more useful for pausing in multiplayer).
All of these features will be OFF BY DEFAULT. Please check sandbox options carefully to adjust this mod to fit your preferences. Please note that even if you enable Meditative Recovery, the act of meditation will not reduce hunger or thirst until you change their recovery values in sandbox options. Meditative Recovery does not reduce hunger or thirst by default because I expect people to have mixed feelings about whether meditation should be allowed to affect hunger and thirst. I respect both sides: on the one hand, meditation wouldn’t do much for a truly hungry person, because it’s not magic or a sandwich; on the other hand, we’re all playing a game, and multiplayer pausing is a lot better if you know you won’t starve to death. Have fun your way, as far as I’m concerned.
WARNING: This feature works by calling player:setInvisible(true) shortly after a player has begun sitting IF the player has not seen or been seen by a zombie recently (according to in-game variables that are not always objectively accurate but are close enough for the purposes of this mod). You MUST disable Anti-Cheat Type 12 in your server’s ServerName.ini file in order to allow clients to make their own players invisible! For me, that file is in the following location:
C:UsersZenZomboidServer
Zen is my username on Windows. Your username is probably not Zen.
ANOTHER WARNING: Your invisibility will be canceled if you press any buttons while your character is meditating. This is so that you cannot simply sit there and do things to draw zombie attention while you are invisible (thus exploiting the mod in an effort to gather zombies for a friend to kill them). You are not allowed to meditate while the game is receiving button or keyboard input from you. If you would like to leave Project Zomboid running while you meditate for safety, you must Alt+Tab out of Project Zomboid immediately after you sit down to meditate, before your invisibility has become active. You have several seconds after activating "Sit on ground" to switch out of the application before input will cancel meditation. Pressing buttons while Zomboid is not in focus does not interrupt meditation on my PC, so, as far as I know, that should be safe.
Meditative Recovery: When players are allowed to use meditation for resting or recovering emotional health, server hosts may also decide whether players must refrain from pressing buttons in-game to receive these benefits. Remember, this feature is OFF by default. You must enable it in your sandbox options AFTER enabling this mod in your Main Menu!
IMPORTANT UPDATE: I have replaced "No Cheating" in sandbox options with a similar option called "One With The Force" that will be OFF BY DEFAULT. This setting will determine whether meditation can make you invisible to zombies. In other words, INVISIBILITY USING MEDITATION WILL BE OFF BY DEFAULT GOING FORWARD.
If you like using Meditation to make yourself invisible to zombies, YOU MUST NOW ENABLE THIS OPTION.
I am GENUINELY SORRY if this change confuses anyone (and TREMENDOUSLY sorry if it kills anyone), but I have given it a lot of thought and I think more people are likely to use this mod without the invisibility feature. Also, I would prefer that the mod does something Anti-Cheat-safe until players have taken the extra steps to enable invisibility properly. This feature’s new tooltip will serve as an extra barrier of protection against people trying to run "cheating" aspects of the mod without realizing they need to disable the relevant Anti-Cheat.
Workshop ID: 2891623922
Mod ID: Meditation
