Config

This mod is really simple and it can be a nice showcase, how to add a new modifier to the game.

If you want to add a new modifier, you need to extend an enum of eModifiers

Code is available on github

Default config file

Upon starting the server, the config is created in $profiles/CRDTN/FireRegen/World.json

float HealRadius                            = 2;        // Radius in meters
float HealTreshold                          = 100;
float BloodTreshold                         = 5000;
EStatLevels HungerThreshold                 = 1;        // GREAT - 0, HIGH - 1, MEDIUM - 2, LOW - 3, CRITICAL - 4
EStatLevels ThirstThreshold                 = 1;        
float HealthRatePerTick                     = 0.25;     // Amount of stat add/subtract per TickIntervalActive
float BloodRatePerTick                      = 0.25;
bool IndoorOnly                             = true;     // If false, works on every fireplace object
float TickIntervalInactive                  = 10.0;
float TickIntervalActive                    = 10.0;
// All notifications can be left blank "" so they are not displayed within the game
string NotificationHealEnded                = "Goodbye my lovely fireplace!";    // A notification displayed when leaving the fireplace or the effect stops
string NotificationHealStarted              = "Ho Ho Ho... I'm getting much better now.";    // A notification displayed upon start
string NotificationHungerAndThirst          = "Player is too hungry or thirsty to heal";    // Shown when player is not elligible for the regen
string NotificationHealthIncrement          = "Player's health is increasing";             // Shown per tick
string NotificationBloodIncrement           = "Player's blood is increasing";                // Shown per tick
string NotificationHealthReached            = "Player's health is full";                    // When filled the stat
string NotificationBloodReached             = "Player's blood is full";                    // When filled the stat
World.json
{
    "HealRadius": 10.0,
    "HealTreshold": 100.0,
    "BloodTreshold": 5000.0,
    "HungerThreshold": 1,
    "ThirstThreshold": 1,
    "HealthRatePerTick": 10.0,
    "BloodRatePerTick": 10.0,
    "IndoorOnly": 0,
    "TickIntervalInactive": 10.0,
    "TickIntervalActive": 2.0,
    "NotificationHealEnded": "Goodbye my lovely fireplace!",
    "NotificationHealStarted": "Ho Ho Ho... I'm getting much better now.",
    "NotificationHungerAndThirst": "Player is too hungry or thirsty to heal",
    "NotificationHealthIncrement": "Player's health is increasing",
    "NotificationBloodIncrement": "Player's blood is increasing",
    "NotificationHealthReached": "Player's health is full",
    "NotificationBloodReached": "Player's blood is full"
}

Last updated