// Management · RimWorld Mod

World Faster Aging

World Faster Aging mod preview for RimWorld

This mode has been modified to adjust the age of the world pawns.

This mode has been modified to adjust the age of the world pawns.



-original description-

This mod allows you to control the rate at which pawns age. Use the config menu to set the desired rate.

Requires Hugslib, loaded before this mod.

Mod made and tested for Rimworld version 1.1.

You are free to redistribute this mod and use its code for non-commercial purposes, just give credit to Verdiss in descriptions and in source code.




It is not calculated directly, but implemented to check every 5 day to reduce the cpu operation.

--- added code ---

public class worldPawnAging : MapComponent
{
public int Today { get; private set; }

public override void MapComponentTick()
{
base.MapComponentTick();
int checkTick = 60000 * 5;
bool flag = Find.TickManager.TicksGame % checkTick == 0;
if (flag)
{

RimWorld.Planet.WorldPawns worldPawns = Find.WorldPawns;
Pawn[] ar_pawn = worldPawns.AllPawnsAlive.ToArray();

foreach (Pawn pawn in ar_pawn)
{
//Log.Message(pawn.Name.ToStringFull);
//Log.Message(pawn.ageTracker.AgeBiologicalYears.ToString());

int multiplier = 0;

if (pawn.ageTracker.AgeBiologicalYears < FasterAging.pawnCutoffAge)
{
multiplier = FasterAging.pawnSpeedMultBeforeCutoff;
}
else
{
multiplier = FasterAging.pawnSpeedMultAfterCutoff;
}

if (multiplier == 0) return;

int totalTick = checkTick * multiplier;

pawn.ageTracker.AgeTickMothballed(totalTick);

//Log.Message(pawn.ageTracker.AgeBiologicalYears.ToString());

}

}
}

public worldPawnAging(Map map) : base(map)
{
}
}

---




original mod by Verdiss
https://steamcommunity.com/sharedfiles/filedetails/?id=1850802618