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(Person, SkillType).

[DataMember]
public bool AiSkillBuilding

Field Value

bool

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

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>

MapCustom

Whether the map that is used in this save game is a custom map. Do not change this value, or the save will likely be corrupted.

[DataMember]
[Obsolete("Use the new Maps collection instead")]
public bool MapCustom

Field Value

bool

MapName

The name of the map that is used in this save game. Do not change this value, or the save will likely be corrupted.

[DataMember]
[Obsolete("Use the new Maps collection instead")]
public string MapName

Field Value

string

Maps

The maps that this save contains.

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

Field Value

HashSet<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

OtherLifespan

The LifeSpan that a Person 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 Person 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