Gmod Fatigue mods + Sleep System - Script
Gmod Fatigue & Sleep System is a sleep management addon for Gmod and it brings the sleep related server environment, entities and effects to it. I had created this system for my server to allow players to help each other, because when you sleep you become vulnerable. Taking a break and coming to share their experiences on the discord or the forum while their character was sleeping allowed them to meet players who would not normally participate in the conversations, the link of the discord or the wiki was displayed as a clickable button, so they could learn a little more about the server and discuss a little more with the community, while being a Roleplay action. In the RP it will always be better than falling in ragdoll which is not realistic in the current systems and heavy for the server. Some content has been added like caffeine pills that reduce fatigue. The effects of fatigue on your server are adjustable from a management menu included. It also includes a flexible HUD with 13 different modular styles. When the player is tired, the malus you choose to activate will take effect. The screen will be darker around the edges and the character's eyes will blink.
❮
❯
Description of Gmod Fatigue mods + Sleep System
Summary:- π What is Gmod Fatigue mods and Sleep System addon?
- π¦ Contents of Gmod Fatigue mods and Sleep System
- β What kind of need can Gmod Fatigue mods and Sleep System meet?
- βοΈ The integrated fatigue system management panel
- ποΈ Saving stats on Gmod
- π Fatigue system server modules (Gameplay options)
- π¨ Flexible HUD to edit the fatigue indicator
- βοΈ List of spawnable entities of the sleep system
- 𧲠Symbiosis with other gmod addons
- 𧩠Fatigue system APIs for devs
- π‘ Ideas for combining scripts to make an inn or motel (hotel) system
π What is Gmod Fatigue mods and Sleep System addon?
Gmod Fatigue mods and Sleep System as its name indicates adds two complementary systems.
1. Fatigue mods will add the notion of fatigue, the flexible HUD, the special effect on the HUD when the player reaches the maximum in fatigue, the rules of gameplay and the conditions related to the fatigue but also the special effects and the malus for example the stamina does not reload any more when a player reaches the maximum threshold of fatigue.
2. Sleep System will bring several recovery methods, including a system that allows you to recover from fatigue by resting on an entity defined as such. And various ways to decrease the fatigue gauge such as coffee for example or caffeine pills, these are default examples that you can of course modify, delete or replace.
All these gameplay mechanics that revolve around fatigue will allow players to rest in a roleplay way, while his character will take a nap, an interface will offer him various things to do or link to visit as your discord or your website, or your store for example.
In another context you will have the possibility to place beds to offer rest in hotels or hostels. But also to deploy a tent, or a sleeping bag offering the possibility to your players to build camps and a way to rest their character. These elements are also deactivatable and are not imposed. The script is 3 files long.
On the configuration side you can configure the rest time. 3 seconds by default but if you want it to take longer you have the free will to do so. You are the owner, you decide.
A management panel will allow you to configure the HUD among 13 flexible styles. And manage various options.
π¦ Contents of Gmod Fatigue mods and Sleep System
1. A database that saves the user character's fatigue state, so he doesn't fix his fatigue problem by disconnecting and reconnecting.
2. Flexible HUD to customize the fatigue indicator
3. A management interface to manage everything.
4. Dynamic options to change gameplay, malus and conditions from the management interface.
5. A Job and Job Category Management System that allows you to limit fatigue alteration depending on the job you are doing or the rank of the user.
6. 9 spawnable entities to add content to the server but also to serve as examples.
7. A sleep interface allowing the user to visit links that you put yourself. For example your shop, your forum, discord, website, wiki, etc...
8. The sound played during the sleep is created by me. But you can replace it.
β What kind of need can Gmod Fatigue mods and Sleep System meet?
Do you want to avoid crash servers with ragdolls falling to the ground and colliding with the environment?
You want your players to make their character sleep in a roleplay way?
Do you want more player participation on certain links like for example to go chat on the forum or on discord during the rest time?
Add a new state alteration which is "Fatigue".
βοΈ The integrated fatigue system management panel
You have the possibility to manage everything from an interface that you are now used to see. And to switch between all the interfaces of my different systems from the shortened buttons.
From this single interface you will be able to manage the database, the DarkRP jobs (or team), the modules, and the HUD.
ποΈ Saving stats on Gmod
The database allows you to save the state of fatigue of your users or their characters.
The backup prevents the fatigue from being restored after a simple disconnection.
π Fatigue system server modules (Gameplay options)
The module panel allows you to enable and disable a wide variety of options.
The list of modules:
fatigue_reset: Reset fatigue points when a player dies. 0=OFF.
fatigue_progress_time: Fatigue naturally increases with time, in seconds. 0=OFF.
fatigue_progress_points: Number of fatigue points distributed per loop defined by: fatigue_progress_time.
fatigue_kill: If the fatigue threshold reaches the maximum the user dies.
fatigue_sprint: When the player is tired he can't sprint anymore.
fatigue_jump: When the player is tired he can't jump anymore.
persist_tent: Deployed obejts are persistent, after a reboot they are stored in their bag.
recup_time: How long does it take to sleep to be rested (in seconds).
fatigue_stamina: When the player is tired he doesn't recover his stamina anymore.
fatigue_mana: When the player is tired he doesn't recover his mana points anymore.
π¨ Flexible HUD to edit the fatigue indicator
The management interface allows you to edit the HUD from a simple menu. The HUD is ultra editable and has 13 different styles, each of which is customizable. All in all you have a good chance to make something unique for your server. You buy a script but you remain creative and the author of your visual, stop trying to look like another server and be part of those who have a unique server.
βοΈ List of spawnable entities of the sleep system
Its spawnable entities appear in the spawnmenu of the sandbox gmod but also in the spawnmenu of the system of tiredness:
The entity Somnifère: Is a consumable which allows to increase by 50% the gauge of tiredness. Useful to test the system.
Caffeine pill: Allows to decrease the fatigue rate by 10%.
Cup of coffee: Allows to decrease the fatigue of 5%.
Sleeping bag: Allows you to deploy a sleeping bag to sleep anywhere.
5 Tent bags: Allows you to deploy a tent to sleep (Tent Blue, Tent Red, Tent Green, Tent Yellow, Tent Orange).
Bed 1: Is a bed that you can place anywhere on the map. If a player presses USE in front of it he can choose to rest.
Example Bed: Is an example bed entity to help you add more bed models.
Invisible Bed: If your map already has beds that you can't remove because they are not removable props it doesn't matter, place an invisible point that will allow your users to use it.
𧲠Symbiosis with other gmod addons
Bonuses by combination of addons allow to add extra functions. For example with the Stamina System if your user reaches a max fatigue level his stamina will not regenerate, which can make him sleep his character.
None of my scripts are DLC. Don't confuse the DLC that can't work without the base script. Each one plays its role individually and all of them can work without any Gamemode and do not depend on any other script to work properly, when you put them together you get a symbiosis automatically with support between their features. This means that features will complement each other without interference. And if this is the case the technical support is also to update each script of Originahl Scripts to solve the problem if there is one.
So among the scripts already in the store:
1. Possibility to display the fatigue rate only in the user's inventory to avoid displaying it on his HUD with Gmod Advanced Inventory System
2. Possibility to prevent the restoration of the stamina when a player is tired. With Gmod Stamina System + Editable HUD
3. Ability to prevent restoration of mana points when a player reaches the maximum fatigue threshold. With Gmod Mana System + HUD Creator
𧩠Fatigue system APIs for devs
player:Fatigue() -- Returns the number of fatigue points of the user. (Client + Server)
player:GetMaxFatigue() -- Returns the maximum fatigue. (Client + Server)
player:addFatigue(add) -- Add and remove fatigue points. Works with positive and negative numeric values. (Server)
player:setFatigue(add) -- Allows you to directly assign the number of karma points of the user. (Server)
π‘ Ideas for combining scripts to make an inn or motel (hotel) system
Create an innkeeper (Created with Gmod Items Dealer) who will offer a room with a dialog window and the keys in his inventory (Lock and Key System created with Gmod Lock and Key System + Door Manager) for sale with his custom text that can sell the key to a one-time use room. Where a bed from the sleep system awaits its adventurer. And there you have an innkeeper who provides a room, and its key.
Path: garrysmod/addons/norda_fatigue_sleep_system
- The AddWorkshop function is automatically added to the script server file and can be deactivated from the configuration file. : resource.AddWorkshop( 2967075466 )
- To add gmod workshop resources to your collection : Gmod Fatigue mods + Sleep System [Content Only] | Gmod Workshop
Or via the administration interface of : Gmod Admin System
Caffeine pills: Reduces fatigue by 10%.
Cup of coffee: Reduces fatigue by 5%.
It includes a sleeping bag that you can deploy.
A tent bag that you can set up/dismantle.
And spawnable beds.
The invisible bed allows you to place rest areas where there are non-removable beds on the map.
Delete the line that contains the class name of the entity you want to remove. And reboot your server.