MATTIE.static

This namespace contains all game specific values IE: if you need crow mauler's id it should be here.
This also allows us to update values that are present in both 1 & 2 to their correct values

Namespaces

actors

commands

commonEvents

events

items

maps

rpg

skills

states

switch

variable

Members

static _activeModule :Object|null

The currently active game module, set after selection and application.

static _registeredModules :Array.<Object>

All registered game modules. Populated by calls to registerGameModule().

static teleports

used by the cheat menu to teleport to key points

Methods

static _applyGameModule(module)

Apply a game module's data into MATTIE.static.* namespaces.
Called automatically by MATTIE.static.update() when a module is selected.

Parameters:
Name Type Description
module Object

The game module to apply.

static _selectGameModule() → {Object|null}

Find the first registered module whose versionMatch() returns true.

Returns:
Object | null -

The matching module, or null if none found.

static rangeParser()

this function takes an array of ints and strings, the strings must be in the format "int-int" as a range of ints,
this function then changes those strings of ranges into the ints themselves and returns the value.

Returns:
-

array

static registerGameModule(module)

Register a game module with the engine.
Each module must provide at minimum: id, name, versionMatch.

Full interface contract:
{
id: string, // e.g. "fearandhunger1"
name: string, // e.g. "Fear & Hunger"
versionMatch: function() -> boolean, // returns true when this game is running

actors: { mercenaryId, girlId, ... },
maps: { menuMaps, blockingMaps, charCreationMap, startMap, fortress, ... },
teleports: [ { id, name, cmd, bool, btn }, ... ],
switches: {
ignored, synced, syncedSelfSwitches, ignoredSelfSwitches,
characterLimbs, logical, hardMode, starvation,
crowMaulerCanSpawn, crowMaulerDead, crowMaulerDisabled, ...
},
variables: { ignored, synced, secondarySynced, godAffinityAndPrayerVars, ... },
states: { knockout, resistDeath, armCut, legCut, bleeding, ... },
troops: { crowMauler, ... },
items: function($dataItems) -> { emptyScroll, silverCoin, icons },
skills: function($dataSkills) -> { hurting, ... },
commonEvents: { smallFood, medFood, largeFood, lootTables, ... },
events: { images: { shiny, coin }, crowMauler },

multiplayer: {
ghost: { mapId, eventId, troopId, troopIndex },
pvpActorTroopMap: { [actorId]: troopId },
gameOverText: { death, place, spectate, rebirth },
spawnMap: { mapId, x, y },
charPortraitMap: { [actorId]: faceName },
},

features: { hasCrowMauler, hasLighting },
compat: { blockedMods, ignoredPlugins, menuIconMap },
hooks: { onStaticUpdate, onMultiplayerInit },
dependencies: [], // commonLib paths to load, e.g. "_common/betterCrowMauler"
}

Parameters:
Name Type Description
module Object

The game module to register