Wax

game

The game tree: game, game.Players and the Instances they give you.

The Explorer searches everything on this page, and the classes of the game too.

game

The root every mod starts from. It is read-only, and reading a member it does not have raises an error.

Type name: WaxGame.

Open in the Explorer

MemberTypeDescription
WorldWorldThe current world. Its children are the actors in it.
GameInstanceBP_IcarusGameInstance_CLives from the start of the game to its end.
GameStateIcarusGameStateBaseThe state of the session that every player sees.
GameModeIcarusGameModeBase?The rules of the session. Nil when you are a client in someone else's game.
LocalPlayerIcarusPlayerControllerThe local player's controller. At the title screen it is the title screen's own controller.
CharacterIcarusPlayerCharacter?The pawn the local player controls. nil at the main menu.
EngineIcarusGameEngine
ViewportIcarusGameViewportClientThe game viewport.
MapNamestring?The name of the current world.
InProspectbooleanTrue while you are in a prospect.
ModeWaxModeHow this copy of the game runs: a dedicated server, a host, a client or alone, and whether it has a screen.
IsHostbooleanTrue when this game runs the session's rules: you play alone or you are the host. False when you are a client in someone else's game, and while there is no world.
PlayersWaxPlayersThe players in the session and the characters they control, with signals for when they come and go.
CreaturesWaxCreaturesThe animals and enemies in the world, kept as a live list. A kind is named the way the game names it: "Wolf", "Conifer_Wolf", "Cave Worm". Letter case, spaces and underscores do not matter. A wrong name raises an error that suggests the right one.
HighlightWaxHighlightOutlines actors so they show through walls, using the outline the game itself draws. The game has room for four filled colours and three outline-only colours at a time. A colour counts once, however many actors use it.
DataWaxDataThe game's data tables as plain Lua values.
CraftingWaxCraftingThe bench or crafting screen that is open.
ResearchWaxResearchThe tech tree: what a recipe still needs researched, and researching it.
WorkshopWaxWorkshopThe store on the station: its categories, nodes and prices, and where the player stands with them.
FrameWaxFrameSignalFires once every frame with the seconds since the frame before. For work that has to run every frame.
MeWaxMeThe local player's character, whichever one that is: its fields and functions, and signals for its health, food, level and the like. It is there with no character too, and says so.
ItemsWaxItemsThe kinds of item the game has, and the facts of each: its shown name, weight, stack size, durability and picture.
ContainersWaxContainersThe structures around the player that hold items, nearest first, and what each one takes.
RecipesWaxRecipesThe game's crafting recipes: finding them, and changing what they take, what they give, how long they take and where they are made.
AssetsWaxAssetsThe game's assets by path, pictures from a mod's own files, materials made from the game's, and shapes made of numbers, each kept in memory for the mod that asked.
BlueprintsWaxBlueprintsThings described in Lua and spawned: an actor of a class the game has, with parts, assets and functions of your own. The game does not save them.
AnimationsWaxAnimationsThe game's own clips on anything with a skeleton, and animations written as keys in Lua for bones and for things.
EffectsWaxEffectsThe game's particle effects, lights, glowing trails and camera shakes, on anything.
SoundsWaxSoundsThe game's own sounds.
TimeWaxTimeThe time of day in the prospect: the hour, the clock as text, the part of the day, and a signal for a new hour.
WeatherWaxWeatherThe weather on your character, and for the host every weather event that is running on the map.
ProspectWaxProspectThe prospect you are in: which one it is, its mission, and how long it has run.
SignalHandler receivesDescription
MapChangedname: stringFires with the new map's name when the world changes.

game.wrap(object)

The Instance for a UE4SS object, or nil for a null or invalid one. The same object always gives the same Instance.

game.wrap(object: any): WaxInstance?
ParameterType
objectany

Returns WaxInstance?

Open in the Explorer

game:Find(class_name)

The first live object of a class ("PlayerController", "BP_IcarusPlayerCharacterSurvival_C"), or nil. The editor then knows the members of that class.

game:Find(class_name: string): WaxInstance?
ParameterTypeDescription
class_namestringThe name of a class, given as text.

Returns WaxInstance? An Instance of that class, or nil.

Open in the Explorer

game:FindAll(class_name)

Every live object of a class. It searches all objects, so never call it per frame.

game:FindAll(class_name: string): WaxInstance[]
ParameterTypeDescription
class_namestringThe name of a class, given as text.

Returns WaxInstance[] Instances of that class.

Open in the Explorer

game:Library(name)

One of the game's function libraries ("KismetSystemLibrary", "GameplayStatics", "KismetMathLibrary"). A library has no objects in the world. Its functions are called on what this returns: game:Library("KismetMathLibrary"):RandomFloat(). A wrong name raises an error that suggests the right one.

game:Library(name: string): WaxInstance
ParameterTypeDescription
namestringThe name of a class, given as text.

Returns WaxInstance An Instance of that class.

Open in the Explorer

game:GetTagged(tag)

Every live Instance carrying the tag.

game:GetTagged(tag: string): WaxInstance[]
ParameterType
tagstring

Returns WaxInstance[]

Open in the Explorer

game:GetChildren()

The top of the tree: World, GameInstance, GameState, GameMode, LocalPlayer, Engine and Viewport, where they exist.

game:GetChildren(): WaxInstance[]

Returns WaxInstance[]

Open in the Explorer

game:GetService(name)

The member of game with this name, the same as game[name].

game:GetService(name: WaxGameMember): any
ParameterType
nameWaxGameMember

Returns any

Open in the Explorer

game.Players

The players in the session and the characters they control, with signals for when they come and go.

Type name: WaxPlayers.

Open in the Explorer

MemberTypeDescription
LocalPlayerIcarusPlayerControllerThe local player's controller, the same as game.LocalPlayer.
SignalHandler receivesDescription
CharacterAddedcharacter: IcarusPlayerCharacterFires when a player's character appears.
CharacterRemovedcharacter: IcarusPlayerCharacterFires when a player's character leaves the world.
Joinedplayer: IcarusPlayerStateFires when a player is in the session who was not there at the last look. The players are looked at once a second, and only while a handler is connected to Joined or Left. It does not fire for the players who are there when you connect, nor for those who are there on another map when the map changes.
Leftplayer: IcarusPlayerState, name: string?Fires when a player who was in the session is gone at the next look, with the name that was last seen. The Instance can no longer be used, only compared. It is looked at with Joined, and does not fire for the players a map change takes away.

game.Players:GetPlayers()

One Instance per player in the session (their player state). Works for the host and for clients.

game.Players:GetPlayers(): IcarusPlayerState[]

Returns IcarusPlayerState[]

Open in the Explorer

game.Players:GetCharacters()

The characters those players are controlling right now.

game.Players:GetCharacters(): IcarusPlayerCharacter[]

Returns IcarusPlayerCharacter[]

Open in the Explorer

game.Players:ObserveCharacters(fn)

Calls fn(character) for each player's character that is here now and each that appears later (a join, a respawn). If fn returns a function, that runs when the character is gone or the watch is stopped.

game.Players:ObserveCharacters(fn: fun(character: IcarusPlayerCharacter): (fun()?)): WaxConnection
ParameterType
fnfun(character: IcarusPlayerCharacter): (fun()?)

Returns WaxConnection

Open in the Explorer

game.Players:GetName(character)

The name of the player who controls a character, or nil while the game has not said yet.

game.Players:GetName(character: IcarusPlayerCharacter): string?
ParameterType
characterIcarusPlayerCharacter

Returns string?

Open in the Explorer

game.Players:IsLocal(character)

True for the character this player controls.

game.Players:IsLocal(character: IcarusPlayerCharacter): boolean
ParameterType
characterIcarusPlayerCharacter

Returns boolean

Open in the Explorer

game.Creatures

The animals and enemies in the world, kept as a live list. A kind is named the way the game names it: "Wolf", "Conifer_Wolf", "Cave Worm". Letter case, spaces and underscores do not matter. A wrong name raises an error that suggests the right one.

Type name: WaxCreatures.

Open in the Explorer

SignalHandler receivesDescription
Addedcreature: WaxCreatureFires for each creature that appears from now on.
Removedcreature: WaxCreature, info: WaxCreatureEndFires when a creature leaves the world. The Instance can no longer be used, only compared.
Diedcreature: WaxCreature, info: WaxCreatureEndFires when a creature is killed, a few seconds before it is removed.
ClearednothingFires once when the map changes, in place of one Removed per creature.
Damagedcreature: WaxCreature, amount: integer, info: WaxDamageInfoFires when the game says a creature took damage: the creature, the damage of the hit, and what the game knows of it, as Damaged of a character hands it over. The game's own damage call is listened to from the first handler on, and nothing is looked at meanwhile. It tells of the creatures that are an IcarusNPCCharacter, which nearly all are. Seen on the host of a session.

game.Creatures:GetAll(kind?, options?)

Every creature, or those of one kind. Dead ones are left out unless asked for.

game.Creatures:GetAll(kind?: string, options?: WaxCreatureQuery): WaxCreature[]
game.Creatures:GetAll(options: WaxCreatureQuery): WaxCreature[]
ParameterType
kind (optional)string
options (optional)WaxCreatureQuery

Returns WaxCreature[]

Open in the Explorer

game.Creatures:GetNearest(kind?, options?)

The closest matching creature and its distance in metres, or nil.

game.Creatures:GetNearest(kind?: string, options?: WaxCreatureQuery): WaxCreature?, number?
game.Creatures:GetNearest(options: WaxCreatureQuery): WaxCreature?, number?
ParameterType
kind (optional)string
options (optional)WaxCreatureQuery

Returns

Open in the Explorer

game.Creatures:Count(kind?)

How many creatures of a kind are in the world now.

game.Creatures:Count(kind?: string): integer
ParameterType
kind (optional)string

Returns integer

Open in the Explorer

game.Creatures:GetKinds()

Every kind this version of the game has, with how many of each are here now.

game.Creatures:GetKinds(): WaxCreatureKind[]

Returns WaxCreatureKind[]

Open in the Explorer

game.Creatures:GetLiveKinds()

The names of the kinds that are in the world now.

game.Creatures:GetLiveKinds(): string[]

Returns string[]

Open in the Explorer

game.Creatures:GetKind(creature)

The kind and variant of a creature, or nil when it is not a creature in the world.

game.Creatures:GetKind(creature: WaxCreature): string?, string?
ParameterType
creatureWaxCreature

Returns

  • string?
  • string?

Open in the Explorer

game.Creatures:Describe(creature)

The common facts about one creature as plain values.

game.Creatures:Describe(creature: WaxCreature): WaxCreatureFacts
ParameterType
creatureWaxCreature

Returns WaxCreatureFacts

Open in the Explorer

game.Creatures:GetInfo(kind)

What the game's tables say about one variant of a kind: its team, diet, carcass and loot, the taming rule that names it, and what it is like as a tamed animal. Give a variant such as "Conifer_Wolf", or a creature, for that variant. Give a kind such as "Wolf" for the variant that is named like the kind, or else the kind's first variant. Variants lists them all. The first call reads the game's tables of taming rules, tamed animals and saddles. What it read is kept until one of those tables changes or the map does. A wrong name raises an error that suggests the right one.

game.Creatures:GetInfo(kind: string|WaxCreature): WaxCreatureInfo
ParameterType
kindstring | WaxCreature

Returns WaxCreatureInfo

Open in the Explorer

game.Creatures:GetTamed(kind?, options?)

The tamed animals among the creatures in the world: mounts, pets and livestock, whoever they belong to. Dead ones are left out unless asked for.

game.Creatures:GetTamed(kind?: string, options?: WaxCreatureQuery): WaxCreature[]
game.Creatures:GetTamed(options: WaxCreatureQuery): WaxCreature[]
ParameterType
kind (optional)string
options (optional)WaxCreatureQuery

Returns WaxCreature[]

Open in the Explorer

game.Creatures:Observe(kind?, fn)

Calls fn(creature) for each matching creature that is here now and each that appears later. If fn returns a function, that runs when the creature is gone or the watch is stopped.

game.Creatures:Observe(kind?: string, fn: fun(creature: WaxCreature): (fun()?)): WaxConnection
game.Creatures:Observe(fn: fun(creature: WaxCreature): (fun()?)): WaxConnection
ParameterType
kind (optional)string
fnfun(creature: WaxCreature): (fun()?)

Returns WaxConnection

Open in the Explorer

game.Creatures:Highlight(kind?, options?)

Outlines every creature of a kind, now and as more appear. Disconnect the result to stop.

game.Creatures:Highlight(kind?: string, options?: WaxHighlightOptions|WaxHighlightLook): WaxConnection
ParameterType
kind (optional)string
options (optional)WaxHighlightOptions | WaxHighlightLook

Returns WaxConnection

Open in the Explorer

game.Creatures:GetModel(name, options?)

What a Model control needs to show a creature, by its set-up row ("Bear", "Conifer_Wolf") or its kind ("Wolf"). The creature does not have to be in the world. With options.saddle a mount wears that saddle in the picture, such as GetModel("Mount_Horse", { saddle = "Saddle_Standard" }). Gives nil and the reason when Wax has no model for it, or no such saddle for that mount; a name that is no creature raises an error.

game.Creatures:GetModel(name: string, options?: WaxCreatureModelOptions): WaxCreatureModel?, string?
ParameterType
namestring
options (optional)WaxCreatureModelOptions

Returns

Open in the Explorer

game.Creatures:GetSaddles(name)

What Wax can put on a creature's model through GetModel's saddle option, in the order of the game's saddle table: saddles, carts, a pack harness and the like, for the set-up row of a tamed mount such as "Mount_Horse". An empty list for a creature that wears nothing, and for one Wax has no model for, with the reason as a second value. A name that is no creature raises an error.

game.Creatures:GetSaddles(name: string): WaxSaddle[], string?
ParameterType
namestring

Returns

Open in the Explorer

game.Creatures:Spawn(kind, place?, options?)

Puts a new wild creature into the world with the game's own spawn. kind is a variant such as "Conifer_Wolf" or "Deer", or a kind that has one variant. A kind with several raises an error that lists them. place is a position, an actor or game.Me. When it is omitted the creature goes six metres in front of your character, and the options may stand in its place. Wax asks the game for ground a creature can walk on near the place, within 5 metres to the sides and at any height, and puts the creature a little above it. Where the game has none it raises an error and nothing is spawned. Inside a task Spawn waits until the game has given the creature its level, two seconds at most, and then answers the creature. Outside a task it answers at once, and Level and Health are right a few frames later. It answers nil and the reason when the creature left the world before it was finished. A tamed variant is refused in this version of Wax. The game's call took 3 to 4 ms when it was timed, and 18 ms once: a kind that is not in memory is loaded by the game inside the call. What is spawned stays when the mod unloads, unless the option keep is false.

game.Creatures:Spawn(kind: string, place?: WaxInstance|WaxMe|{ X: number, Y: number, Z: number }, options?: WaxSpawnOptions): WaxCreature?, string?
ParameterType
kindstring
place (optional)WaxInstance | WaxMe | { X: number, Y: number, Z: number }
options (optional)WaxSpawnOptions

Returns

Open in the Explorer

game.Creatures:SpawnMount(kind, place?, options?)

Puts a tamed animal into the world that is yours and can be ridden at once. kind is its set-up row such as "Mount_Moa" or "Mount_Horse", or a kind such as "Moa". It is made with the game's own spawn, named, given to you, and a saddle is put in its saddle slot, which is what makes the game give it a seat: after that the game's own "ride" works on it. place is a position or an actor. When it is omitted the mount comes a few metres in front of you, and the options may stand in its place. Where the game knows no ground to walk on under the place, as on a platform a mod built, the mount is made on the ground below and brought up. Inside a task it answers once the saddle is on, with the reason as a second value when the saddle did not go on. Outside a task it answers at once and finishes a moment later. The mount is saved with the prospect like any other.

game.Creatures:SpawnMount(kind: string, place?: WaxInstance|WaxMe|{ X: number, Y: number, Z: number }, options?: WaxMountOptions): WaxCreature?, string?
ParameterType
kindstring
place (optional)WaxInstance | WaxMe | { X: number, Y: number, Z: number }
options (optional)WaxMountOptions

Returns

Open in the Explorer

game.Highlight

Outlines actors so they show through walls, using the outline the game itself draws. The game has room for four filled colours and three outline-only colours at a time. A colour counts once, however many actors use it.

Type name: WaxHighlight.

Open in the Explorer

MemberTypeDescription
Colorsstring[]The colour names that can be used.

game.Highlight:Add(target, options?)

Outlines anything with a shape: an actor (a creature, a player's character, an item, something built) or one mesh part of an actor.

game.Highlight:Add(target: WaxInstance, options?: WaxHighlightOptions|WaxHighlightLook): WaxHighlightMark
ParameterType
targetWaxInstance
options (optional)WaxHighlightOptions | WaxHighlightLook

Returns WaxHighlightMark

Open in the Explorer

game.Highlight:Remove(target)

Takes the outline off an actor or a part that Add was given. It does nothing when that one has no outline.

game.Highlight:Remove(target: WaxInstance)
ParameterType
targetWaxInstance

Returns nothing.

Open in the Explorer

game.Highlight:Clear()

Takes every outline off.

game.Highlight:Clear()

Returns nothing.

Open in the Explorer

game.Highlight:GetAll()

The actors that are outlined now.

game.Highlight:GetAll(): WaxInstance[]

Returns WaxInstance[]

Open in the Explorer

game.Highlight:Look(options?)

A look to give to many outlines, so one call changes them all.

game.Highlight:Look(options?: WaxHighlightOptions): WaxHighlightLook
ParameterType
options (optional)WaxHighlightOptions

Returns WaxHighlightLook

Open in the Explorer

game.Highlight:Configure(options)

Settings every outline shares: Fill is how strongly a filled model is tinted (0 to 1), Width the line width (1 to 4), Range how far away an outlined thing can be and still show, in metres (1 to 5000; the game's own 14 until set, and false goes back to it). Tags made with a mark show exactly as far. ThroughWalls (true when never set) keeps a filled mark's tint as well as its outline behind walls in every colour slot; false leaves the game's own setting, which drops the tint for one of the four.

game.Highlight:Configure(options: { Fill?: number, Width?: number, Range?: number|false, ThroughWalls?: boolean }): { Fill: number, Width: number, Range: number, ThroughWalls: boolean }
ParameterType
options{ Fill?: number, Width?: number, Range?: number|false, ThroughWalls?: boolean }

Returns { Fill: number, Width: number, Range: number, ThroughWalls: boolean }

Open in the Explorer

game.Highlight:GetRange()

How far away an outlined thing can be and still show, in metres: what Configure set, else the game's own 14.

game.Highlight:GetRange(): number

Returns number

Open in the Explorer

game.Crafting

The bench or crafting screen that is open: the recipes it lists, and choosing one of them.

Type name: WaxCrafting.

Open in the Explorer

game.Crafting:GetRecipes()

The recipes the open screen lists, in the game's order. Nothing when no bench and no crafting tab is open.

game.Crafting:GetRecipes(): WaxListedRecipe[]?, integer?, "bench"|"crafting"|"menu"?

Returns

  • WaxListedRecipe[]? (recipes)
  • integer? (screen) A number that stays the same while that screen stays open.
  • "bench" | "crafting" | "menu"? (kind) "menu" is another tab of the game's menu: the list is then what can be made by hand.

Open in the Explorer

game.Crafting:GetScreen()

The number of the screen that is open, without reading its recipes. Nothing when none is.

game.Crafting:GetScreen(): integer?, "bench"|"crafting"|"menu"?

Returns

  • integer? (screen)
  • "bench" | "crafting" | "menu"? (kind)

Open in the Explorer

game.Crafting:GetHovered()

What the mouse is over in the game's own screens, whichever of them is open: "item" and its row name in D_ItemsStatic for a slot that holds an item, "recipe" and its row name in D_ProcessorRecipes for a recipe tile, "talent" and its row name in D_Talents for a node of the tech tree or of the talents. Nothing over anything else, over an empty slot, or while the game does not show the mouse. It asks its way down the widgets under the mouse, which took about a millisecond when it was measured, so ask when a key is pressed and not every frame. A list the game builds as a list view is not looked into.

game.Crafting:GetHovered(): "item"|"recipe"|"talent"?, string?

Returns

  • "item" | "recipe" | "talent"? (kind)
  • string? (row)

Open in the Explorer

game.Crafting:IsTyping()

True while one of the game's own text boxes has the keyboard, such as the search box of the crafting screen or of the tech tree. It asks its way down the widgets the keyboard is in, so ask when a key is pressed and not every frame.

game.Crafting:IsTyping(): boolean

Returns boolean

Open in the Explorer

game.Crafting:OpenTab()

Goes from another tab of the game's menu to its crafting tab, the way the game's own key for crafting does. True when the crafting tab was asked for or is showing already, false on any other screen.

game.Crafting:OpenTab(): boolean

Returns boolean

Open in the Explorer

game.Crafting:Select(row)

Chooses a recipe on the open screen, as a click on its tile does. False when the screen does not list it.

game.Crafting:Select(row: string): boolean
ParameterType
rowstring

Returns boolean

Open in the Explorer

game.Crafting:SetListHidden(on)

Hides the game's own recipe list on the open screen, or shows it again. Hidden, it keeps its place and takes no clicks. A screen opened later has its list again. It is shown again when the mod reloads.

game.Crafting:SetListHidden(on: boolean): boolean
ParameterType
onboolean

Returns boolean

Open in the Explorer

game.Crafting:Refresh(options?)

Asks the crafting tab to show what the recipe table holds now. However often it is asked in a frame, one refresh is made when the frame ends, and only when the crafting tab is the screen that shows. On another tab of the menu the game builds the list itself when the crafting tab is opened, and a bench that is open is left as it is in this version. Without options the tab's list is built again and the recipe that was chosen is chosen again, which took 33 to 41 ms for 25 recipes when it was measured. game.Recipes asks for this itself whenever a recipe was written, so a mod that changes recipes through it has nothing to do.

game.Crafting:Refresh(options?: WaxCraftingRefreshOptions)
ParameterType
options (optional)WaxCraftingRefreshOptions

Returns nothing.

Open in the Explorer

game.Research

The tech tree: what a recipe still needs researched, and researching it with the player's points.

Type name: WaxResearch.

Open in the Explorer

SignalHandler receivesDescription
Changedlevel: integer?, points: integer?Fires when the player's level or points changed. It is looked at about twice a second.

game.Research:IsReady()

True while the player has a tech tree to ask, which is in a prospect.

game.Research:IsReady(): boolean

Returns boolean

Open in the Explorer

game.Research:GetLevel()

The player's level as the tech tree counts it. Nothing while there is no tech tree.

game.Research:GetLevel(): integer?

Returns integer? (level)

Open in the Explorer

game.Research:GetPoints()

The player's tech tree points. Nothing while there is no tech tree.

game.Research:GetPoints(): integer?, integer?, integer?

Returns

  • integer? (available) The points left to spend.
  • integer? (total)
  • integer? (spent)

Open in the Explorer

game.Research:GetPlan(recipe)

What researching the node of a recipe takes. Nothing when the recipe needs no node, when the game has no such recipe, and while there is no tech tree. Letter case does not matter. The game is asked about each node, so call it when something is shown or pressed, not every frame.

game.Research:GetPlan(recipe: string): WaxResearchPlan?
ParameterTypeDescription
recipestringA row name of D_ProcessorRecipes.

Returns WaxResearchPlan?

Open in the Explorer

game.Research:Unlock(recipe)

Researches the node of a recipe, and first every node it still needs, with the player's own points. It does nothing unless the plan says can, and it stops at the first node the game does not research. It waits a few frames after each node, so call it inside a task.

game.Research:Unlock(recipe: string): boolean, integer, string?
ParameterTypeDescription
recipestringA row name of D_ProcessorRecipes.

Returns

  • boolean (ok) True when the recipe's node is researched now.
  • integer (bought) How many nodes were researched by this call.
  • string? (failed) The name of the node the game did not research.

Open in the Explorer

WaxInstance

An engine object. Every class of the game (Actor, Pawn, IcarusPlayerCharacter ...) is an Instance: it has what is listed here, and adds the properties and functions of its own class and of the classes that one is built on. A member the editor does not know is still read from the object, so nothing here stops you using it.

You get one from game.Highlight:GetAll, game.wrap, game:Find, game:FindAll, game:Library, game:GetTagged, game:GetChildren, game.Assets:Load and others. Below, instance stands for one of these.

Open in the Explorer

PropertyTypeDescription
NamestringThe object's name.
ClassNamestringThe name of the object's class.
FullNamestringThe engine's full name for the object: its class, then its path.
ParentWaxInstance?What GetParent() returns.
RawanyThe UE4SS object itself, for unchecked access.
any other key ([string])any

instance:Get(name)

Reads a reflected property by name, including one whose name Wax also uses (Name, Parent ...).

instance:Get(name: string): any
ParameterType
namestring

Returns any

Open in the Explorer

instance:Set(name, value)

Writes a reflected property by name, converting and checking the value first.

instance:Set(name: string, value: any)
ParameterType
namestring
valueany

Returns nothing.

Open in the Explorer

instance:Call(name, ...)

Calls a reflected function by name, converting and checking the arguments first.

instance:Call(name: string, ...: any): any
ParameterType
namestring
...any

Returns any

Open in the Explorer

instance:IsValid()

False once the object has been destroyed or the map has changed.

instance:IsValid(): boolean

Returns boolean

Open in the Explorer

instance:IsA(class_name)

True when the object's class is, or inherits from, the named class ("Actor", "BP_IcarusPlayerCharacterSurvival_C").

instance:IsA(class_name: string): boolean
ParameterType
class_namestring

Returns boolean

Open in the Explorer

instance:GetClassChain()

The class names from this object's own class up to Object.

instance:GetClassChain(): string[]

Returns string[]

Open in the Explorer

instance:GetMembers()

Every property and function name this object has, with the names Wax gives its class, sorted.

instance:GetMembers(): string[]

Returns string[]

Open in the Explorer

instance:GetParent()

The actor or component this one is attached to. For an actor attached to nothing it is the world, and for anything else the object's outer.

instance:GetParent(): WaxInstance?

Returns WaxInstance?

Open in the Explorer

instance:GetChildren()

The children: actors for the world, components and attached actors for an actor, attached components for a component.

instance:GetChildren(): WaxInstance[]

Returns WaxInstance[]

Open in the Explorer

instance:FindFirstChild(name, recursive?)

The first child with this Name, or nil. recursive searches every descendant.

instance:FindFirstChild(name: string, recursive?: boolean): WaxInstance?
ParameterType
namestring
recursive (optional)boolean

Returns WaxInstance?

Open in the Explorer

instance:FindFirstChildOfClass(class_name)

The first child of exactly this class, or nil.

instance:FindFirstChildOfClass(class_name: string): WaxInstance?
ParameterTypeDescription
class_namestringThe name of a class, given as text.

Returns WaxInstance? An Instance of that class, or nil.

Open in the Explorer

instance:FindFirstChildWhichIsA(class_name)

The first child of this class or a class derived from it, or nil.

instance:FindFirstChildWhichIsA(class_name: string): WaxInstance?
ParameterTypeDescription
class_namestringThe name of a class, given as text.

Returns WaxInstance? An Instance of that class, or nil.

Open in the Explorer

instance:GetDescendants(limit?)

Every Instance below this one, nearest first, stopping at limit (default 5000).

instance:GetDescendants(limit?: integer): WaxInstance[]
ParameterType
limit (optional)integer

Returns WaxInstance[]

Open in the Explorer

instance:GetAttribute(name)

The value SetAttribute stored on the Instance under name, or nil.

instance:GetAttribute(name: string): any
ParameterType
namestring

Returns any

Open in the Explorer

instance:GetAttributes()

A copy of every attribute, as name -> value.

instance:GetAttributes(): table<string, any>

Returns table<string, any>

Open in the Explorer

instance:SetAttribute(name, value)

Stores a value on the Instance under name. nil removes it.

instance:SetAttribute(name: string, value: any)
ParameterType
namestring
valueany

Returns nothing.

Open in the Explorer

instance:GetAttributeChangedSignal(name)

A signal for one attribute, fired with (value, previous). Without a name it covers every attribute and fires with (name, value, previous).

instance:GetAttributeChangedSignal(name: string): WaxSignal<fun(value: any, previous: any)>
instance:GetAttributeChangedSignal(): WaxSignal<fun(name: string, value: any, previous: any)>
ParameterType
namestring

Returns WaxSignal<fun(value: any, previous: any)>

Open in the Explorer

instance:GetPropertyChangedSignal(name, seconds?)

A signal for one value of the object: a property of the game's that holds a number, true or false, text or an object, or a field Wax gives the class. It fires with (value, previous) when the value is found changed. The value is read ten times a second, and only while a handler is connected. An object arrives as an Instance, or nil when the property holds none. A table a field returns is compared by what it holds. seconds sets another time between reads, up to 3600. It is rounded to the nearest 0.05, and anything under 0.05 counts as 0.05. When one value is asked for at two paces, the faster is used. It works on an actor in the world and on a component that a property of its actor holds. Anything else raises an error that says why. When the object is gone, reading stops and every handler is disconnected. A task that waits on the signal is then not woken. A wrong name raises an error that suggests the right one.

instance:GetPropertyChangedSignal(name: string, seconds?: number): WaxSignal<fun(value: any, previous: any)>
ParameterType
namestring
seconds (optional)number

Returns WaxSignal<fun(value: any, previous: any)>

Open in the Explorer

instance:AddTag(tag)

Marks the Instance with a tag. game:GetTagged(tag) finds it again.

instance:AddTag(tag: string)
ParameterType
tagstring

Returns nothing.

Open in the Explorer

instance:RemoveTag(tag)

Takes a tag off the Instance.

instance:RemoveTag(tag: string)
ParameterType
tagstring

Returns nothing.

Open in the Explorer

instance:HasTag(tag)

True when the Instance carries the tag.

instance:HasTag(tag: string): boolean
ParameterType
tagstring

Returns boolean

Open in the Explorer

instance:GetTags()

The Instance's tags, sorted.

instance:GetTags(): string[]

Returns string[]

Open in the Explorer

WaxHighlightLook

A colour and fill that many outlines share. Changing it changes all of them at once.

You get one from game.Highlight:Look. Below, look stands for one of these.

Open in the Explorer

look:Set(options)

Changes the colour or the fill of every outline that has this look. What is left out stays as it is.

look:Set(options: WaxHighlightOptions)
ParameterType
optionsWaxHighlightOptions

Returns nothing.

Open in the Explorer

WaxHighlightMark

One outlined actor.

You get one from game.Highlight:Add. Below, mark stands for one of these.

Open in the Explorer

PropertyTypeDescription
InstanceWaxInstanceAn engine object. Every class of the game (Actor, Pawn, IcarusPlayerCharacter ...) is an Instance: it has what is listed here, and adds the properties and functions of its own class and of the classes that one is built on. A member the editor does not know is still read from the object, so nothing here stops you using it.
ActivebooleanFalse once it was removed or its actor is gone.
TagWaxTag?The tag over the actor, when the mark was given one. It goes with the mark.

mark:Remove()

Takes the outline off. Safe to call twice, and after the actor is gone.

mark:Remove()

Returns nothing.

Open in the Explorer

mark:Set(options)

Changes the colour or the fill of this one outline: mark:Set({ Color = "#ff8800", Fill = false }). What is left out stays as it is. An outline that was made with a shared look no longer follows that look afterwards.

mark:Set(options: WaxHighlightOptions)
ParameterType
optionsWaxHighlightOptions

Returns nothing.

Open in the Explorer

mark:SetColor(color)

Changes the colour of this one outline, as Set does with { Color = color }.

mark:SetColor(color: string|{ R: number, G: number, B: number })
ParameterType
colorstring | { R: number, G: number, B: number }

Returns nothing.

Open in the Explorer

WaxCreatureQuery

The options GetAll, GetNearest and GetTamed take: which creatures to give, and in what order.

Used by game.Creatures:GetAll, game.Creatures:GetNearest, game.Creatures:GetTamed.

Open in the Explorer

FieldTypeDescription
within (optional)numberOnly creatures this many metres away or nearer. The result is then sorted nearest first.
from (optional)WaxInstance | { X: number, Y: number, Z: number }Where to measure from. Your character when omitted.
dead (optional)booleanTrue also returns bodies that have not been cleared away yet.
sort (optional)"nearest"Sorts nearest first without a distance limit.

WaxCreatureKind

One kind of creature, as GetKinds lists it. The table is a copy: it does not change when creatures come and go.

Returned by game.Creatures:GetKinds.

Open in the Explorer

FieldTypeDescription
NamestringThe kind's name in the game's data, such as "Wolf".
DisplayNamestringThe name the game shows players.
TagstringThe game's own tag for the kind, such as "NPC.Wolf".
Variantsstring[]The versions of the kind, such as "Conifer_Wolf" and "Snow_Wolf".
CountintegerHow many are in the world now.

WaxCreatureFacts

What Describe gives: the common facts about one creature as plain values, as they were when it was asked.

Returned by game.Creatures:Describe.

Open in the Explorer

FieldTypeDescription
Kindstring
Variantstring
DisplayNamestring
ClassNamestring
Namestring
IsAliveboolean
Healthinteger?
MaxHealthinteger?
Levelinteger?
Position{ X: number, Y: number, Z: number }In the engine's units: 100 is one metre.

WaxCreatureEnd

What Removed and Died give beside the creature: what it was, as plain values that can still be read when the creature cannot. Reason and Position come with Removed only. Killer, Instigator and Damage come with Died only.

Open in the Explorer

FieldTypeDescription
Kindstring
Variantstring
ClassNamestring
Namestring
Reason (optional)"Destroyed" | "Unloaded"Only with Removed: "Destroyed" when the game took the creature out of the world, "Unloaded" when its part of the map or the whole map went.
Position (optional){ X: number, Y: number, Z: number }Only with Removed: where it was, when the game could still say.
Killer (optional)WaxInstanceOnly with Died: the actor the game named as what did the hit that left the creature no health. nil for a death with no hit that Wax heard, such as one by Kill(). A death that is seen by looking waits up to 0.4 seconds for the game's word of the hit, so Died comes that much later.
Instigator (optional)WaxInstanceOnly with Died: the controller the game named as who did that hit.
Damage (optional)integerOnly with Died: the damage of that hit.

WaxHighlightOptions

Used by game.Creatures:Highlight, look:Set, mark:Set, game.Highlight:Add, game.Highlight:Look.

Open in the Explorer

OptionTypeDescription
Colorstring | { R: number, G: number, B: number }A name from game.Highlight.Colors, "#rrggbb", or values from 0 to 1. "Red" when omitted.
FillbooleanAlso tints the whole model. True when omitted.
FillColorstring | { R: number, G: number, B: number } | falseThe tint's colour when it is not the outline's. false goes back to the outline's colour.
Tagstring | WaxTagOptions | falseA line of text over the actor (as ui.Tag makes), shown exactly as far as the outline is unless its own within is given. On Set, false takes it off.

WaxListedRecipe

One recipe a bench or the crafting screen lists.

Returned by game.Crafting:GetRecipes.

Open in the Explorer

FieldTypeDescription
rowstringThe recipe's row name in D_ProcessorRecipes.
validbooleanThe game's own answer to "can this be made right now".

WaxResearchStep

One node of the tech tree that still has to be researched.

Open in the Explorer

FieldTypeDescription
nodestringThe node's row name in D_Talents, in lower case.
namestringThe name the game shows for it.
levelintegerThe level it asks of the player.

WaxResearchPlan

What researching the node of one recipe takes.

Returned by game.Research:GetPlan.

Open in the Explorer

FieldTypeDescription
nodestringThe node's row name in D_Talents, in lower case.
namestringThe name the game shows for it.
unlockedbooleanTrue when it is researched already.
defaultbooleanTrue for a node every character has from the start.
levelintegerThe level this node asks of the player.
stepsWaxResearchStep[]Every node that still has to be researched, in the order to do it, the node itself last.
pointsintegerHow many points that takes: one for each step.
availableintegerThe points the player has left.
player_levelintegerThe player's level.
needed_levelintegerThe highest level any of the steps asks.
canbooleanTrue when level and points are enough and the game says the first step can be researched now.
blockedbooleanTrue when level and points are enough and it still cannot be done: a step needs a mission finished or a DLC owned.

Named values

Short names for a fixed set of values. Where a function asks for one of these, pass one of the values listed.

WaxCreature

A creature. Nearly all are an IcarusNPCCharacter. A few bosses are an IcarusPawn.

One of IcarusNPCCharacter or IcarusPawn.

Open in the Explorer

WaxGameMember

One of "World", "GameInstance", "GameState", "GameMode", "LocalPlayer", "Character", "Engine", "Viewport", "MapName", "InProspect", "Players", "Creatures", "Highlight", "Data", "MapChanged", "IsHost", "Mode", "Me", "Items", "Time", "Weather", "Prospect".

Open in the Explorer

On this page

gamegame.wrap(object)game:Find(class_name)game:FindAll(class_name)game:Library(name)game:GetTagged(tag)game:GetChildren()game:GetService(name)game.Playersgame.Players:GetPlayers()game.Players:GetCharacters()game.Players:ObserveCharacters(fn)game.Players:GetName(character)game.Players:IsLocal(character)game.Creaturesgame.Creatures:GetAll(kind?, options?)game.Creatures:GetNearest(kind?, options?)game.Creatures:Count(kind?)game.Creatures:GetKinds()game.Creatures:GetLiveKinds()game.Creatures:GetKind(creature)game.Creatures:Describe(creature)game.Creatures:GetInfo(kind)game.Creatures:GetTamed(kind?, options?)game.Creatures:Observe(kind?, fn)game.Creatures:Highlight(kind?, options?)game.Creatures:GetModel(name, options?)game.Creatures:GetSaddles(name)game.Creatures:Spawn(kind, place?, options?)game.Creatures:SpawnMount(kind, place?, options?)game.Highlightgame.Highlight:Add(target, options?)game.Highlight:Remove(target)game.Highlight:Clear()game.Highlight:GetAll()game.Highlight:Look(options?)game.Highlight:Configure(options)game.Highlight:GetRange()game.Craftinggame.Crafting:GetRecipes()game.Crafting:GetScreen()game.Crafting:GetHovered()game.Crafting:IsTyping()game.Crafting:OpenTab()game.Crafting:Select(row)game.Crafting:SetListHidden(on)game.Crafting:Refresh(options?)game.Researchgame.Research:IsReady()game.Research:GetLevel()game.Research:GetPoints()game.Research:GetPlan(recipe)game.Research:Unlock(recipe)WaxInstanceinstance:Get(name)instance:Set(name, value)instance:Call(name, ...)instance:IsValid()instance:IsA(class_name)instance:GetClassChain()instance:GetMembers()instance:GetParent()instance:GetChildren()instance:FindFirstChild(name, recursive?)instance:FindFirstChildOfClass(class_name)instance:FindFirstChildWhichIsA(class_name)instance:GetDescendants(limit?)instance:GetAttribute(name)instance:GetAttributes()instance:SetAttribute(name, value)instance:GetAttributeChangedSignal(name)instance:GetPropertyChangedSignal(name, seconds?)instance:AddTag(tag)instance:RemoveTag(tag)instance:HasTag(tag)instance:GetTags()WaxHighlightLooklook:Set(options)WaxHighlightMarkmark:Remove()mark:Set(options)mark:SetColor(color)WaxCreatureQueryWaxCreatureKindWaxCreatureFactsWaxCreatureEndWaxHighlightOptionsWaxListedRecipeWaxResearchStepWaxResearchPlanNamed valuesWaxCreatureWaxGameMember