Table of Contents

Class PerSaveOptions

Namespace
TinyLife
Assembly
Tiny Life.dll

The game's per-save options, which are displayed in the Initialize(UiSystem, bool, Tab) menu and saved to disk. Note that Instance is null if there is no CurrentMap loaded.

[DataContract]
public class PerSaveOptions : JsonTypeSafeGenericDataHolder, IGenericDataHolder
Inheritance
JsonTypeSafeGenericDataHolder
PerSaveOptions
Implements
IGenericDataHolder
Inherited Members
JsonTypeSafeGenericDataHolder.GetDataKeys()
Extension Methods

Fields

AiImportantActions

Whether the AI should be able to execute important options, like paying the bills. This option is intended to be used through CanDoImportantAction(ActionInfo, bool).

[DataMember]
public bool AiImportantActions

Field Value

bool

AiRelationships

Whether the AI should be able to build complex relationships. This option is intended to be used through CanDoSocialAction(ActionInfo, bool) and IsReadyForRomance(ActionInfo, bool).

[DataMember]
public bool AiRelationships

Field Value

bool

AiSkillBuilding

Whether the AI should be able to execute skill building actions like painting and programming. This option is intended to be used through GetSkillPriorityMod(PersonLike, SkillType, bool).

[DataMember]
public bool AiSkillBuilding

Field Value

bool

Difficulty

This save's current DifficultyModifier. Note that difficulty should only apply to lots and people that pertain to the currently active household. This can be achieved easily through Difficulty.

[DataMember]
public DifficultyModifier Difficulty

Field Value

DifficultyModifier

DisableAiHousehold

Whether the AI of everyone in the CurrentHousehold should be disabled or not

[DataMember]
public bool DisableAiHousehold

Field Value

bool

DisableAiSelected

Whether the AI of the SelectedPerson should be disabled or not

[DataMember]
public bool DisableAiSelected

Field Value

bool

DisplayedHints

The Name of InGameHint objects that have already been displayed

[DataMember]
public readonly HashSet<string> DisplayedHints

Field Value

HashSet<string>

LastGameVersion

The game version that this save was last loaded with.

[DataMember]
public string LastGameVersion

Field Value

string

LastMap

The map that the camera was last on when playing this save, out of Maps.

[DataMember]
public string LastMap

Field Value

string

LastPlayedLot

The Id of the Lot that was last played.

[DataMember]
public Guid LastPlayedLot

Field Value

Guid

LoadedMods

A set of mod ids, mapped to their names, of mods that were loaded the last time this save game was played. This dictionary is used to display a warning when a save is loaded with missing mods.

[DataMember]
public Dictionary<string, string> LoadedMods

Field Value

Dictionary<string, string>

Maps

The maps that this save contains. Do not change this value, or the save will likely be corrupted. Instead, use AddMapToSave(MapInfo, Action) and RemoveMapFromSave(Map).

[DataMember]
public readonly List<PerSaveOptions.MapInfo> Maps

Field Value

List<PerSaveOptions.MapInfo>

MaxRegularVisitors

The maximum amount of regular visitors that the current map can have. When this value is changed, UpdateExternalPeople(ICollection<Map>, Action<string>, Action<float>) should be called to apply it.

[DataMember]
public int MaxRegularVisitors

Field Value

int

Migrations

public static readonly List<Migration<(PerSaveOptions Options, string Save)>> Migrations

Field Value

List<Migration<(PerSaveOptions Options, string Save)>>

OtherLifespan

The LifeSpan that a PersonLike who is not in the currently played household should have. This value is used by GetDaysBeforeAging(AgeGroup, LifeSpan).

[DataMember]
public LifeSpan OtherLifespan

Field Value

LifeSpan

PlayedLifespan

The LifeSpan that a PersonLike who is in the currently played household should have. This value is used by GetDaysBeforeAging(AgeGroup, LifeSpan).

[DataMember]
public LifeSpan PlayedLifespan

Field Value

LifeSpan

PopulateLots

Whether lots should automatically be populated using PopulateLots() every few in-game days.

[DataMember]
public bool PopulateLots

Field Value

bool

Properties

Instance

The static singleton instance of PerSaveOptions. Note that this value is null if there is no CurrentMap loaded.

public static PerSaveOptions Instance { get; }

Property Value

PerSaveOptions

Methods

Load(string, bool)

Loads the options from the default options file path for the given save

public static PerSaveOptions Load(string save, bool create)

Parameters

save string
create bool

Returns

PerSaveOptions

Save(string)

Saves the options to the default options file path for the given save

public void Save(string save)

Parameters

save string