Table of Contents

Class Options

Namespace
TinyLife
Assembly
Tiny Life.dll

The game's options, which are displayed in the Initialize(UiSystem, bool, Tab) menu and saved to disk

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

Fields

AllowMods

Whether loading mods is allowed.

[DataMember]
public bool AllowMods

Field Value

bool

AutoSaveIntervalSeconds

The auto-save interval in seconds. Note that this value should be set to 30, 60, 180, 300 or 600, as otherwise, the options menu will display it incorrectly.

[DataMember]
public int AutoSaveIntervalSeconds

Field Value

int

BlurZoomedOut

Whether the camera should be blurred when zoomed out. This value is automatically used by GetMapSampler().

[DataMember]
public bool BlurZoomedOut

Field Value

bool

BrightnessIncrease

A percentage that the game's world's brightness is increased by, mainly intended for users with darker screens

[DataMember]
public float BrightnessIncrease

Field Value

float

CameraDownKeybind

[DataMember]
public readonly Keybind CameraDownKeybind

Field Value

Keybind

CameraLeftKeybind

[DataMember]
public readonly Keybind CameraLeftKeybind

Field Value

Keybind

CameraRightKeybind

[DataMember]
public readonly Keybind CameraRightKeybind

Field Value

Keybind

CameraRotation

The game's camera rotation. To use this value effectively, you can use ToVisualY(Vector2), ApplyCameraRotation(Vector2, bool, Direction2?) and ApplyInverseCameraRotation(Vector2, Direction2?). This value should be changed through RotateCamera(bool).

[DataMember]
public Direction2 CameraRotation

Field Value

Direction2

CameraUpKeybind

[DataMember]
public readonly Keybind CameraUpKeybind

Field Value

Keybind

CheatsKeybind

[DataMember]
public readonly Keybind CheatsKeybind

Field Value

Keybind

CopyFurnitureKeybind

[DataMember]
public readonly Keybind CopyFurnitureKeybind

Field Value

Keybind

CurrentFloor

The floor that the game's camera is currently focused on. For the active lot, all floors that are above the current floor are hidden, and all floors below the current floor are always displayed.

[DataMember]
public int CurrentFloor

Field Value

int

CursorScale

The game's Cursor scale.

[DataMember]
public float CursorScale

Field Value

float

DecreaseSpeedKeybind

[DataMember]
public readonly Keybind DecreaseSpeedKeybind

Field Value

Keybind

EmotionStingVolume

The volume of emotion sting sound effects. Note that the sting volume is still multiplied with the sound master volume SoundVolume.

[DataMember]
public float EmotionStingVolume

Field Value

float

EventStingVolume

The volume of event sting sound effects, used by PlayEventSting(SoundEffect). Note that the sting volume is still multiplied with the sound master volume SoundVolume.

[DataMember]
public float EventStingVolume

Field Value

float

FloorDownKeybind

[DataMember]
public readonly Keybind FloorDownKeybind

Field Value

Keybind

FloorUpKeybind

[DataMember]
public readonly Keybind FloorUpKeybind

Field Value

Keybind

GameSpeeds

An array of all defined GameSpeed values

public static readonly GameSpeed[] GameSpeeds

Field Value

GameSpeed[]

GamepadCursorSpeed

The speed of the gamepad's cursor.

[DataMember]
public float GamepadCursorSpeed

Field Value

float

GamepadScreenBorder

A percentual border around the screen's border at which the camera will start scrolling when gamepad controls are used.

[DataMember]
public float GamepadScreenBorder

Field Value

float

GamepadSwapAForB

Whether the A and B buttons' behaviors should be swapped when using a gamepad. This value is used in AButton and BButton.

[DataMember]
public bool GamepadSwapAForB

Field Value

bool

GamepadSwapTriggers

Whether the left and right trigger's behavior should be swapped when using a gamepad. This value is used in LeftTrigger and RightTrigger.

[DataMember]
public bool GamepadSwapTriggers

Field Value

bool

GamepadSwapXForY

Whether the X and Y buttons' behaviors should be swapped when using a gamepad. This value is used in XButton and YButton.

[DataMember]
public bool GamepadSwapXForY

Field Value

bool

GridKeybind

[DataMember]
public readonly Keybind GridKeybind

Field Value

Keybind

HideControlsHints

Whether the ControlsHint in the bottom-right corner of the screen should be hidden.

[DataMember]
public bool HideControlsHints

Field Value

bool

HideDemoHints

Whether "unavailable in demo" hints should be hidden.

[DataMember]
public bool HideDemoHints

Field Value

bool

HideEarlyAccessHints

Whether "on the roadmap" hints should be hidden.

[DataMember]
public bool HideEarlyAccessHints

Field Value

bool

HideGamepadControlsHints

Whether the gamepad controls hints should be hidden, even when using a gamepad. This value is used by GamepadHint(Anchor, Func<Options, Buttons>, Vector2, Vector2?, Func<bool>).

[DataMember]
public bool HideGamepadControlsHints

Field Value

bool

HideHangingObjects

Whether hanging objects should be hidden in the world if walls are down. This property is automatically evaluated when a Furniture object is drawn.

[DataMember]
public bool HideHangingObjects

Field Value

bool

HighlightTinies

Whether Tinies in the world should be highlighted using the selection outline effect.

[DataMember]
public bool HighlightTinies

Field Value

bool

InGameMusic

Whether music should be played in Play Mode. This is used by the Music InGame occasion.

[DataMember]
public bool InGameMusic

Field Value

bool

IncreaseSpeedKeybind

[DataMember]
public readonly Keybind IncreaseSpeedKeybind

Field Value

Keybind

InstantTooltips

Whether a MLEM.Ui.Elements.Tooltip should display instantly, rather than with a short delay.

[DataMember]
public bool InstantTooltips

Field Value

bool

Keybinds

An array that contains all of the fields of type MLEM.Input.Keybind in the Options class

public static readonly FieldInfo[] Keybinds

Field Value

FieldInfo[]

Language

The currently selected language's language code. Determines the language used by Localization.

[DataMember]
public string Language

Field Value

string

LongerNotifications

Whether Notifications should display with twice the amount of time before they disappear.

[DataMember]
public bool LongerNotifications

Field Value

bool

MusicVolume

The current music volume as a percentage, ranging from 0 to 1

[DataMember]
public float MusicVolume

Field Value

float

PauseGameKeybind

[DataMember]
public readonly Keybind PauseGameKeybind

Field Value

Keybind

RotateCameraKeybind

[DataMember]
public readonly Keybind RotateCameraKeybind

Field Value

Keybind

RotateKeybind

[DataMember]
public readonly Keybind RotateKeybind

Field Value

Keybind

RoundCameraPosition

Whether the Camera's position should be rounded. In Apply(bool), this value is passed to MLEM.Cameras.Camera.RoundPosition.

[DataMember]
public bool RoundCameraPosition

Field Value

bool

ScreenshotKeybind

[DataMember]
public readonly Keybind ScreenshotKeybind

Field Value

Keybind

SellHeldObjectKeybind

[DataMember]
public readonly Keybind SellHeldObjectKeybind

Field Value

Keybind

ShowBuildModeGrid

Whether a grid should be displayed in build mode.

[DataMember]
public bool ShowBuildModeGrid

Field Value

bool

SoundVolume

The current sound volume as a percentage, ranging from 0 to 1

[DataMember]
public float SoundVolume

Field Value

float

SoundscapeVolume

The volume of ambiant sounds created by Soundscape. Note that the soundscape volume is still multiplied with the master sound volume SoundVolume.

[DataMember]
public float SoundscapeVolume

Field Value

float

SpeechVolume

The volume of speech sounds, used by Speak(SpeakStyle, float, float). Note that the speech sound volume is still multiplied with the sound master volume SoundVolume.

[DataMember]
public float SpeechVolume

Field Value

float

StoreInHouseholdKeybind

[DataMember]
public readonly Keybind StoreInHouseholdKeybind

Field Value

Keybind

SwitchPersonKeybind

[DataMember]
public readonly Keybind SwitchPersonKeybind

Field Value

Keybind

TabBackKeybind

[DataMember]
public readonly Keybind TabBackKeybind

Field Value

Keybind

TabForwardKeybind

[DataMember]
public readonly Keybind TabForwardKeybind

Field Value

Keybind

TransparentTooltips

Whether a MLEM.Ui.Elements.Tooltip should be displayed with transparency.

[DataMember]
public bool TransparentTooltips

Field Value

bool

UiAnimations

Whether ui animations should be enabled. This value is automatically used by CoveringGroup.

[DataMember]
public bool UiAnimations

Field Value

bool

UiScale

A modifier that is applied to the game's MLEM.Ui.UiSystem's MLEM.Ui.UiSystem.GlobalScale

[DataMember]
public float UiScale

Field Value

float

UnbindKeybind

The keybind used to unbind other keybinds in the options menu, which is set to Microsoft.Xna.Framework.Input.Keys.Escape.

public static readonly Keybind UnbindKeybind

Field Value

Keybind

WallDisplays

An array of all defined WallDisplay values

public static readonly WallDisplay[] WallDisplays

Field Value

WallDisplay[]

WallMode

The currently selected WallMode.

[DataMember]
public WallDisplay WallMode

Field Value

WallDisplay

WallsDownKeybind

[DataMember]
public readonly Keybind WallsDownKeybind

Field Value

Keybind

WallsUpKeybind

[DataMember]
public readonly Keybind WallsUpKeybind

Field Value

Keybind

WorldSoundVolume

The volume of in-world sounds, used by PlaySound(SoundEffect, Vector2, float, float, float, bool, bool) and its overloads. Note that the world sound volume is still multiplied with the sound master volume SoundVolume.

[DataMember]
public float WorldSoundVolume

Field Value

float

ZoomInCameraKeybind

[DataMember]
public readonly Keybind ZoomInCameraKeybind

Field Value

Keybind

ZoomOutCameraKeybind

[DataMember]
public readonly Keybind ZoomOutCameraKeybind

Field Value

Keybind

Properties

AButton

Returns the Microsoft.Xna.Framework.Input.Buttons value that is currently considered to be the A (or accept) button. This value is based on GamepadSwapAForB.

public Buttons AButton { get; }

Property Value

Buttons

BButton

Returns the Microsoft.Xna.Framework.Input.Buttons value that is currently considered to be the B (or deny) button. This value is based on GamepadSwapAForB.

public Buttons BButton { get; }

Property Value

Buttons

Instance

The static singleton instance of Options

public static Options Instance { get; }

Property Value

Options

LeftTrigger

Returns the Microsoft.Xna.Framework.Input.Buttons value that is currently considered to be the left trigger. This value is based on GamepadSwapTriggers.

public Buttons LeftTrigger { get; }

Property Value

Buttons

RightTrigger

Returns the Microsoft.Xna.Framework.Input.Buttons value that is currently considered to be the right trigger. This value is based on GamepadSwapTriggers.

public Buttons RightTrigger { get; }

Property Value

Buttons

XButton

Returns the Microsoft.Xna.Framework.Input.Buttons value that is currently considered to be the X button. This value is based on GamepadSwapXForY.

public Buttons XButton { get; }

Property Value

Buttons

YButton

Returns the Microsoft.Xna.Framework.Input.Buttons value that is currently considered to be the Y button. This value is based on GamepadSwapXForY.

public Buttons YButton { get; }

Property Value

Buttons

Methods

Apply(bool)

Applies the currently selected options of this instance to the game

public void Apply(bool fullyLoaded = true)

Parameters

fullyLoaded bool

Save()

Saves the options to the default options file path

public void Save()