Meditation
This mod brings meditation to Project Zomboid!
Meditation comes with a trait called "Yogi" that gives a +1 bonus to Lightfoot (making yogis move a bit quieter). 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!
By default, the option to Meditate will appear as an extra choice in the world context menu (the right-click menu); again, this will only appear for yogis unless the aforementioned sandbox setting is selected. For those who would prefer to always sit this way, there is an option in Mod Options that allows players to override the behavior of the vanilla "Sit on ground" option.
Meditation also includes a unique animation! This animation can be disabled using Mod Options after joining a server. This animation will override the vanilla sitting animation by default for anyone who can meditate; if you prefer requiring players to activate this animation via Mod Options, there is a sandbox option for turning the animation off by default.
Details
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 vanilla resting mechanic.
3. Recover physical health (in terms of hunger, thirst, and fatigue) and ignore pain.
4. Recover emotional health (in terms of fear, panic, stress, anger, boredom, and happiness).
5. Enable dedication effects in sandbox options to base restoration rates on player habits!
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.
Halo Notes
By default, a brief green message will appear above your player's head indicating certain state changes. These messages are intended to help new players track this mod's events. Halo notes may be off by default for you if you installed Meditation before the update that turned them on by default; they can be disabled using Mod Options.
Warnings
WARNING: One with the Force works by calling player:setInvisible(true), which can be flagged as cheating when called by someone who isn't an admin. You therefore 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:
%userprofile%\Zomboid\Server
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). 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.
Optional Features
As I mentioned above, meditation comes with several sandbox options. These options are described below.
Train for the Trait
Admins can enable the ability to gain the yogi trait (and thus access to its supernatural abilities) by simply meditating for a minimum number of in-game minutes. When this is enabled, meditation will be available to all players, but it will not grant any special abilities until players acquire the "Yogi" trait via practice or book-reading.
Must Read Before Training
Enabling this will require you to read a book from Mastering Yoga (below) before you can meditate and begin to train for the trait (and its special abilities).
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!
Dedication Effects
I've added experimental (optional) adjustments to meditative recovery that depend on how frequently players meditate. If this is enabled, players who fail to meditate regularly (meditating less than 1 in 10 days) will recover at 75% of the rate listed in sandbox options. However, if players meditate more than 3, 5, 7, or 9 days out of every 10 days, they will recover at 125%, 150%, 175%, or 200% of the base rate, respectively.
Painless Recovery
You may now choose to allow players who can meditate to "ignore pain" while they are meditating. Pain will return quickly once meditation has ended, as the reality of wounds is only ignored, not eliminated.
Serenity Takes Practice
I've added an optional feature that requires players to maintain the highest tier of dedication in order to become invisible to zombies when they meditate.
Mastering Yoga
This Steam Workshop Item includes an expansion to Meditation called Mastering Yoga. The second mod will add four books to the game world: Mastering Yoga, Zen and the Art of Motorcycle Maintenance, the Neiye, and the Mandukya Upanishad. If you read at least 300 pages of one of these books, your character will gain the Yogi trait. To add this mod to a server that already uses Meditation, either go to the Mods section of your server options and add "Meditation - Mastering Yoga" (which appears directly below Meditation), or remove Meditation via Workshop Items and add it again.