profile

The player's profile: credits, relocations, resupplies, trophies, statistics (since API 3).

The saved profile. Credits, relocations and resupplies are writable; every write is logged (the console and the game's log) and kept with the game's save, like the game's own purchases. Trophies and statistics are read only; licences are content.unlocked / content.unlock; purchase flags are never written.

Functions

# profile.credits(n?) → integer

since API 3

The credits (player.credits / addCredits too).

ParameterType
n optionalinteger0-999999999
Returns
integer

# profile.relocations(n?) → integer

since API 3

Relocations owned (Ice Age does not use them).

ParameterType
n optionalinteger
Returns
integer

# profile.resupplies(n?) → integer

since API 3

Resupplies owned (Ice Age gives one per hunt).

ParameterType
n optionalinteger
Returns
integer

# profile.trophies() → table

since API 3

The trophy room's trophies.

Returns
table{slot, species, weapon, time, points, scale, range, locked}...

# profile.stats() → table

since API 3

Lifetime statistics.

Returns
table{timePlayed, distance, shots, hits, surviveScore, surviveWaves, surviveTime}

# profile.fields() → table

since API 3

Every member of the profile (the raw layer).

Returns
tableFieldInfo list

# profile.get(name) → any

since API 3

One member.

ParameterType
namestring
Returns
any

# profile.set(name, value)

since API 3

One member (logged).

ParameterType
namestring
valueany