Table of Contents

Interface ISaveGame

Namespace
Vintagestory.API.Server
Assembly
VintagestoryAPI.dll
public interface ISaveGame
Extension Methods

Properties

CreatedGameVersion

The game version under which this savegame was created

string CreatedGameVersion { get; }

Property Value

string

EntitySpawning

bool EntitySpawning { get; set; }

Property Value

bool

IsNew

True if this is a newly created world

bool IsNew { get; }

Property Value

bool

LandClaims

List<LandClaim> LandClaims { get; set; }

Property Value

List<LandClaim>

LastSavedGameVersion

The game version under which this savegame was last saved

string LastSavedGameVersion { get; }

Property Value

string

PlayStyle

string PlayStyle { get; set; }

Property Value

string

SavegameIdentifier

A globally unique identifier for this savegame

string SavegameIdentifier { get; }

Property Value

string

Seed

int Seed { get; set; }

Property Value

int

TotalGameSeconds

long TotalGameSeconds { get; set; }

Property Value

long

WorldConfiguration

ITreeAttribute WorldConfiguration { get; }

Property Value

ITreeAttribute

WorldName

string WorldName { get; set; }

Property Value

string

WorldType

string WorldType { get; set; }

Property Value

string

Methods

GetData(string)

Gets a previously saved object from the savegame. Returns null if no such data under this key was previously set.

byte[] GetData(string key)

Parameters

key string

The key to look for

Returns

byte[]

GetData<T>(string, T)

Gets a previously saved object from the savegame. Returns null if no such data under this key was previously set.

T GetData<T>(string key, T defaultValue = default)

Parameters

key string
defaultValue T

Returns

T

Type Parameters

T

StoreData(string, byte[])

Store the given data persistently to the savegame. Size limit is around 1 gigabyte for all data stored along with the savegame datastructure. If you need more space, you have to store it somewhere else.

void StoreData(string key, byte[] data)

Parameters

key string

Key value

data byte[]

Data to save

StoreData<T>(string, T)

Store the given data persistently to the savegame. Size limit is around 1 gigabyte for all data stored along with the savegame datastructure. If you need more space, you have to store it somewhere else.

void StoreData<T>(string key, T data)

Parameters

key string
data T

Type Parameters

T