Sims Stat System

Hey,

I’m looking for a Sims-like stat system for my rpg-survival game, i have a post in collab about looking for a programmer, if you’re interested, go and read about it :smile:

The system needs to have Dehydration, Starvation, Strength, and Fatigue, all of which naturally deteriorate, but are restored when food, water, etc is consumed.

I have had a look and tried but cannot find any suitable, or even similar scripts, help would be very appreciated,

Many Thanks,

Here something what could give you way to go , i writed it on my head and its just some speudo stuff so you cant copy paste.
If you are willing to pay for this, i can do you some very simple code. Otherwise if you can code yourself, use this idea and do it youself - or remake whole logic and use your own ideas :slight_smile:
Cheers

var count : int;
var Renew : boolean = false;
var Dehydration : float  = 10;
var fStarvation : float  = 10;
var Strength : float  = 10;
var Fatigue : float  = 10;

function Update()
{
count++;
if(count > 100)
{
// here we decrease stats
DecreaseStats();
count = 0;
}

if(Renew == true)
{
// here we renew all stats
count =0;
 RenewAllstats();
}
}

function DecreaseStats()
{
Dehydration -= Random.Range(0.05f,0.1f);
fStarvation -= Random.Range(0.05f,0.15f);
Strength -= Random.Range(0.05f,0.5f);
Fatigue -= Random.Range(0.05f,0.6f);
}

function RenewAllstats()
{
Dehydration = 10;
fStarvation = 10;
Strength = 10;
Fatigue = 10;
}

Thanks i’ll try to work with it

I edited code bit, forgot add float stuff