hunt

This hunt: credits, cooldowns, resupplies, the call, trophies, statistics, ships, rules (since API 3).

Counters of the hunt being played (they end with it), read-outs of its trophies, statistics and ships, and hunt.rules (HuntRules): session versions of the hunt and score rules, undone when your mod unloads. Getters return nothing outside a hunt; setters raise an error there.

Fields

FieldTypeAccess
hunt.rulesHuntRulesreadSession rules: relocation and evacuation delays, the resupply threshold and water rule, the score rules and the equipment bonuses.

Functions

# hunt.credits(n?) → integer

hunt only since API 3

Credits earned this hunt (paid when he evacuates alive).

ParameterType
n optionalinteger
Returns
integer

# hunt.relocateCooldown(s?) → number

hunt only since API 3

Seconds before the next relocation.

ParameterType
s optionalnumber
Returns
number

# hunt.resupplies(n?) → integer

hunt only since API 3

Resupplies left (Dinosaur Hunter: the profile's count; Ice Age: one per hunt).

ParameterType
n optionalinteger
Returns
integer

# hunt.relocations(n?) → integer?

hunt only since API 3

Relocations left (Dinosaur Hunter: the profile's count).

ParameterType
n optionalinteger
Returns
integer?nil in Ice Age (not counted)

# hunt.call(species?) → string?

hunt only since API 3

The call (decoy): which species it imitates.

ParameterType
species optionalSpeciesone of hunt.licensed()
Returns
string?the call's species

# hunt.callCooldown(s?) → number

hunt only since API 3

Seconds before the next call (3 after one).

ParameterType
s optionalnumber
Returns
number

# hunt.trophyCount() → integer

hunt only since API 3

Trophies taken this hunt.

Returns
integer

# hunt.trophies() → table

hunt only since API 3

This hunt's trophies.

Returns
table{species, weapon, pose, points, scale, distance}...

# hunt.stats() → table

hunt only since API 3

This hunt's statistics.

Returns
table{shots, hits, hunted, mapOpened, binoculars, calls, relocations, resupplies, timeAlive, distanceWalked, distanceSwum, weapons = {{shots, hits}...}, bySpecies}

# hunt.licensed() → table

hunt only since API 3

The species licensed for this hunt.

Returns
tablespecies ids

# hunt.ship() → table

hunt only since API 3

The trophy drop ship.

Returns
table{state = "idle" | "approaching" | "lowering" | "lifting" | "leaving", carrying, queue, x, y, z}

# hunt.supply() → table

hunt only since API 3

The supply ship and its bag.

Returns
table{state = "none" | "approaching" | "dropped", bag = "none" | "falling" | "ground", inProgress, x, y, z}

# hunt.survive() → table?

hunt only since API 3

Survive mode's state (Dinosaur Hunter; nil otherwise).

Returns
table?{wave, score, kills, killScore, accuracyBonus, time, nextWave}

# hunt.balance(key, value?) → number?

since API 3

A balance value of the game for this session (content.setBalance is the permanent one). Only values the game reads when used act at once (SCORE_BONUS_*, RESUPPLIES_COST, RELOCATIONS_COST, PLAYER_FORWARD_SPEED_SCALE); undone when your mod unloads.

ParameterType
keystringa balance value ("SCORE_BONUS_CAMOUFLAGE")
value optionalnumbernil = the game's
Returns
number?

# hunt.fields() → table

since API 3

Every member of the hunt state (Game, the characters manager, the hunt GUI: the raw layer).

Returns
tableFieldInfo list

# hunt.get(name) → any

since API 3

One member.

ParameterType
namestring
Returns
any
print(hunt.get("ship.state"), hunt.get("supply.bag"))

# hunt.set(name, value)

hunt only since API 3

One member.

ParameterType
namestring
valueany