Wax

The store

game.Workshop: the store where exotics are spent, its categories, nodes and prices.

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

game.Workshop

The store on the station, which the game calls the Workshop: its categories, its nodes and their prices, and where the player stands with them. The categories, nodes and prices are read from the game's tables and can be asked anywhere. What the player has researched and holds can be asked while IsReady is true. Nothing here buys, researches or replicates anything. Node, Category and Reset change the store for the mod that calls them: prices, places, what a node needs, line styles and levels. Every change is a change of the game's tables made through game.Data. It is checked first, belongs to the mod, and is put back when the mod unloads. After a change Wax asks the game's store to refresh, and asks each changed node on the store's screen to read its row and its store item again. In the game that was seen to bring a node's place and price up to date while the store was not showing. With the store open it has not been looked at yet. The store is paid from each player's own account. What cannot be undone is what a player did while a change stood: what they researched is saved in their account under the node's row name, whatever it cost then, and Wax pays nothing back and takes nothing away when a price or a requirement changes or goes back. Row names are matched without regard to letter case. What is returned is a new table each time, yours to change.

Type name: WaxWorkshop.

Open in the Explorer

MemberTypeDescription
LayoutWaxStoreLayoutShapes that place nodes, and what does not fit the store's screen.
SignalHandler receivesDescription
Changedwhat: "player" | "store"Fires with "player" when the player's side changed: the store came or went, its points changed, the account's list of researched rows grew or shrank, or the amount held of a currency changed. Fires with "store" when game.Data dropped rows of the store's tables, so they may read differently now. The player's side is looked at about twice a second, and only while something is connected.

game.Workshop:IsReady()

True while the player has a store to ask. That is so in a prospect, and not at the title screen.

game.Workshop:IsReady(): boolean

Returns boolean

Open in the Explorer

game.Workshop:Load()

Reads the whole store ahead of time, a slice a frame, and returns how many nodes it has. It only works inside a task. Without it, the first GetNodes, also of one category, and the first Check of a store that gives something read every row of D_Talents and every node of the store in that one call, which holds the game up.

game.Workshop:Load(): integer

Returns integer (nodes)

Open in the Explorer

game.Workshop:GetCategories()

The store's categories, in the order the game lists them.

game.Workshop:GetCategories(): WaxStoreCategory[]

Returns WaxStoreCategory[]

Open in the Explorer

game.Workshop:GetNodes(category?)

The nodes of one category, in the order of the game's table. With no category named, the nodes of every category: one category after the other as GetCategories lists them, each in the order of the game's table. Joints are among them. Each call builds the list anew (329 nodes for the whole store), so keep what it returns and ask again when Changed fires with "store". Do not call it every frame. What the player has bought is GetState, not this list. A category the store does not have raises an error that suggests the right name.

game.Workshop:GetNodes(category?: string): WaxStoreNode[]
ParameterTypeDescription
category (optional)stringA category's row name, such as "Workshop_Axes".

Returns WaxStoreNode[]

Open in the Explorer

game.Workshop:GetNode(id)

One node by its row name, or nil when the store has no such node.

game.Workshop:GetNode(id: string): WaxStoreNode?
ParameterTypeDescription
idstringA node's row name, such as "Workshop_Axe_Printed".

Returns WaxStoreNode?

Open in the Explorer

game.Workshop:GetCurrencies()

The game's currencies, in the order of its table.

game.Workshop:GetCurrencies(): WaxStoreCurrency[]

Returns WaxStoreCurrency[]

Open in the Explorer

game.Workshop:GetState(id)

Where a node stands for the player, as the game's own model of the store answers: "bought" when it is researched, "available" when the model says it can be researched next, "locked" otherwise. What it costs is not part of the answer, and neither is the lock the store's screen keeps for a node that waits for a mission. A joint answers as the game counts it. Nil when the store has no such node, when the player's store does not hold it, and while IsReady is false. Each call asks the game, so call it when something is shown or pressed, not every frame.

game.Workshop:GetState(id: string): "bought"|"available"|"locked"?
ParameterTypeDescription
idstringA node's row name.

Returns "bought" | "available" | "locked"?

Open in the Explorer

game.Workshop:GetBalance(currency?)

How many of a currency the account holds, read from the profile the game keeps in memory. 0 when the profile does not list the currency. Without a name it returns the amount of every currency by row name. Nil while IsReady is false. A currency the game does not have raises an error that suggests the right name.

game.Workshop:GetBalance(currency?: string): integer?
game.Workshop:GetBalance(): table<string, integer>?
ParameterTypeDescription
currency (optional)stringA currency's row name, such as "Credits".

Returns integer? (amount)

Open in the Explorer

game.Workshop:Check(store, options?)

Checks a store a mod describes and returns what is wrong with it, errors first. Nothing is put into the game. Rows are named after the mod that calls it. Give options.mod when no mod is calling, as from the command bar. A mod's id here is the name of its folder. It has to start with a letter and use only letters, digits and _, because research is saved under the row names for good. A mod in a folder named otherwise is told to rename the folder, and nothing else is checked. The first check of a store that gives something reads every row of D_Talents, as the first GetNodes does. Call Load first, inside a task. An option other than mod is an error.

game.Workshop:Check(store: WaxStoreSpec, options?: { mod?: string }): WaxStoreProblem[]
ParameterType
storeWaxStoreSpec
options (optional){ mod?: string }

Returns WaxStoreProblem[]

Open in the Explorer

game.Workshop:Node(id)

A node of the store by its row name, to change it. Any node the store has can be named, whichever mod added it. A name the store does not have raises an error that suggests the nearest one.

game.Workshop:Node(id: string): WaxStoreNodeHandle
ParameterTypeDescription
idstringA node's row name, such as "Workshop_Axe_Printed".

Returns WaxStoreNodeHandle

Open in the Explorer

game.Workshop:Category(id)

A category of the store by its row name, to lay it out or to add nodes to it. A name the store does not have raises an error that suggests the nearest one.

game.Workshop:Category(id: string): WaxStoreCategoryHandle
ParameterTypeDescription
idstringA category's row name, such as "Workshop_Axes".

Returns WaxStoreCategoryHandle

Open in the Explorer

game.Workshop:AddCategory(options)

A new category for the calling mod's store, to add nodes to. In this version of Wax it checks the names of its options and then raises "a new category is not switched on in this version of Wax": a category's name is text and its picture a reference to an asset, and game.Data does not write those yet.

game.Workshop:AddCategory(options: WaxStoreCategoryOptions): WaxStoreCategoryHandle
ParameterType
optionsWaxStoreCategoryOptions

Returns WaxStoreCategoryHandle

Open in the Explorer

game.Workshop:Define(store)

Puts a described store into the game: rows for its new categories, its nodes, what they sell and what they hand over, each named "<ModId>_<id>" and added by the mod they are named after. The description is checked as Check does it, and an error of Check is raised as an error here, with how many more there are. In this version of Wax a store that passes then ends in one of three errors and nothing is added: a node that needs all of several is refused, a store with a new category raises "a new category is not switched on in this version of Wax", and any other store raises "adding rows to the game's tables is not switched on in this version of Wax". Research is saved in the player's account under a node's row name for good. So an id, and with it the mod's folder name, never changes once players have the mod: a node under a new name is a new node, and what was researched under the old name no longer counts.

game.Workshop:Define(store: WaxStoreSpec): WaxStoreProblem[]
ParameterType
storeWaxStoreSpec

Returns WaxStoreProblem[] (warnings)

Open in the Explorer

game.Workshop:Reset()

Takes back everything the calling mod changed through Node and Category: every field goes back to what it would hold without this mod. What the mod changed through game.Data itself, and what other mods changed, stays. If the game does not take a field back, an error says so and that change stands, so Reset can be called again.

game.Workshop:Reset(): integer

Returns integer (count) How many changes were taken back.

Open in the Explorer

WaxStoreLayout

Shapes that place a category's nodes, and what does not fit the store's screen. A place is the middle of a node in the store's own units, on a canvas that begins at 0, 0 at the top left. The store pans sideways only, so a category can be as wide as it likes and its height has to fit the screen.

Below, layout stands for one of these.

Open in the Explorer

layout:Place(shape, items, options?)

Places for nodes in a shape, in the order the nodes were given, rounded to whole numbers. "line" puts them one after the other, "grid" in rows, "ring" and "arc" round a middle, "spiral" outwards from a middle, "path" evenly along a line through points, and "tree" by what each node needs: a node goes one step further than the furthest node it needs. A function is called with (index, id, count) for each node and returns its place as two numbers. The defaults keep to the screen's height where the count allows. Options you give are used as they are. A wrong shape or option raises an error that suggests the right name. A shape that would put a node further than 1000000 from 0 raises an error too. One call places up to 10000 nodes.

layout:Place(shape: "line"|"grid"|"ring"|"arc"|"spiral"|"tree"|"path"|fun(index: integer, id: any, count: integer): number, number, items: integer|any[]|{ id: any, needs?: any }[], options?: WaxStoreShapeOptions): WaxStorePlace[]
ParameterTypeDescription
shape"line" | "grid" | "ring" | "arc" | "spiral" | "tree" | "path" | fun(index: integer, id: any, count: integer): number, number
itemsinteger | any[] | { id: any, needs?: any }[]How many nodes, or a list of ids. For "tree" a list of { id = , needs = }, where needs is one id, a list of ids, or a table with any and all as a described store has it. A node goes after every node it needs, whichever of these names it.
options (optional)WaxStoreShapeOptions

Returns WaxStorePlace[]

Open in the Explorer

layout:Check(places)

What does not fit among places that share a category, as warnings: two nodes that lie on each other, two whose middles are closer than 300, a node whose middle is outside the heights 250 to 1450, and a node that reaches past the canvas's left or top. A place that is not two numbers, one further than 1000000 from 0, and a Size that is not a number raise an error that says which place it is.

layout:Check(places: WaxStorePlace[]): WaxStoreProblem[]
ParameterType
placesWaxStorePlace[]

Returns WaxStoreProblem[]

Open in the Explorer

layout:GetShapes()

The names of the shapes.

layout:GetShapes(): string[]

Returns string[]

Open in the Explorer

layout:GetLimits()

The measures Check and the shapes go by.

layout:GetLimits(): WaxStoreLimits

Returns WaxStoreLimits

Open in the Explorer

WaxStoreNodeHandle

One node of the store, to change it. It holds the node's row name and nothing of the game, so it can be kept for as long as you like.

You get one from game.Workshop:Node. Below, storeNode stands for one of these.

Open in the Explorer

PropertyTypeDescription
IdstringThe node's row name, as the game spells it.

storeNode:Set(change)

Changes the node: its prices, what it needs, its place, its line style, its level. It is written before Set returns. Everything is checked first, and when something is wrong an error says what, with the nearest right name, and nothing is written: an option Set does not have, a currency or a node the game does not have, a price that is not a whole number from 0 to 2147483647, a place that is not two numbers, and needs that could never be met, such as the node itself or nodes that wait for each other in a circle. When the game's tables refuse one of the fields, what this call had already written is taken back and the error says why. Returns what Check would warn about now that the change is in, as warnings: a parent in another category, a node it lies on or too close to, a place outside the heights that fit the screen, a straight line that runs over a node, a price in more than two currencies. An empty list when there is nothing. The change belongs to the mod and goes back when the mod unloads or calls Reset. When two mods change one field, game.Data's rules decide which shows.

storeNode:Set(change: WaxStoreNodeChange): WaxStoreProblem[]
ParameterType
changeWaxStoreNodeChange

Returns WaxStoreProblem[] (warnings)

Open in the Explorer

storeNode:Hide()

Takes the node off its tree, so a store the game builds afterwards does not have it. Its row stays in the game's table. Switched off in this version of Wax: Hide raises an error that says so. A node in no tree is in no store, and it is not known what the game does with a player's research of such a node when it saves their account.

storeNode:Hide()

Returns nothing.

Open in the Explorer

storeNode:Show()

Puts a node this mod hid back on its tree. Returns true when it was hidden. Switched off in this version of Wax, like Hide.

storeNode:Show(): boolean

Returns boolean (shown)

Open in the Explorer

storeNode:Reset()

Takes back what this mod changed of the node through its handle: its fields and the prices in its store item. What other mods changed stays.

storeNode:Reset(): integer

Returns integer (count) How many fields were taken back.

Open in the Explorer

WaxStoreCategoryHandle

One category of the store, to lay it out or to add nodes to it. It holds a name and nothing of the game.

You get one from game.Workshop:Category, game.Workshop:AddCategory. Below, storeCategory stands for one of these.

Open in the Explorer

PropertyTypeDescription
IdstringThe category's row name, as the game spells it. For a category from AddCategory, the row name it will have.

storeCategory:Arrange(shape, options?)

Gives every node of the category a place in a shape, as Layout:Place does, and writes the places that differ from where the nodes are. Joints are placed like any other node, and a "tree" goes by what each node needs inside the category. A function is called with (index, row name, count). A wrong shape or option raises an error that suggests the right name, and nothing is written. Returns what Check would warn about for the new places: nodes that lie on each other or too close, nodes outside the heights that fit the screen, straight lines that run over a node. The places are written all the same. Each place is a change of the calling mod, put back when it unloads. On the store's screen the nodes follow a few a frame. Every node that moves is written in the one call, so call it when the mod loads or when something is pressed, not every frame. For a category from AddCategory it sets the shape for the nodes that have no at, as arrange does in a described store.

storeCategory:Arrange(shape: "line"|"grid"|"ring"|"arc"|"spiral"|"tree"|"path"|fun(index: integer, id: string, count: integer): number, number, options?: WaxStoreShapeOptions): WaxStoreProblem[]
ParameterType
shape"line" | "grid" | "ring" | "arc" | "spiral" | "tree" | "path" | fun(index: integer, id: string, count: integer): number, number
options (optional)WaxStoreShapeOptions

Returns WaxStoreProblem[] (warnings)

Open in the Explorer

storeCategory:Add(node)

Adds a node to the category, as a node of a described store. In this version of Wax it checks that it was given a table and then raises "adding rows to the game's tables is not switched on in this version of Wax".

storeCategory:Add(node: WaxStoreNodeSpec): WaxStoreProblem[]
ParameterType
nodeWaxStoreNodeSpec

Returns WaxStoreProblem[] (warnings)

Open in the Explorer

WaxStoreCategory

One category of the store: a row of D_TalentArchetypes whose model is the store's.

Returned by game.Workshop:GetCategories.

Open in the Explorer

FieldTypeDescription
IdstringThe category's row name, such as "Workshop_Axes".
NamestringThe name the game shows for it.
Iconstring?The path of its picture.
LevelintegerThe level its row asks for (RequiredLevel). 0 for every category of the game's own.
Treestring?Its row of D_TalentTrees, which its nodes name. The first one, should it have several.
Backgroundstring?The path of the picture behind its nodes.

WaxStoreFlag

A flag a node asks for.

Open in the Explorer

FieldTypeDescription
IdstringThe flag's row name.
Kind"character" | "session" | "account" | "dlc"?Which table the flag is a row of: D_CharacterFlags, D_SessionFlags, D_AccountFlags or D_DLCPackageData. Nil when the game does not say.

WaxStoreNode

One node of the store: a row of D_Talents in a tree of the store.

Returned by game.Workshop:GetNodes, game.Workshop:GetNode.

Open in the Explorer

FieldTypeDescription
IdstringThe node's row name, such as "Workshop_Axe_Printed". What a player has researched is saved under this name.
CategorystringThe Id of its category.
JointbooleanTrue for a joint: a node of no size that shows nothing, sells nothing and stands for its parents.
Namestring?The name of what it sells, as the game shows it. The store takes it from the item, not from the node's own row.
Iconstring?The path of the item's picture.
StoreItemstring?Its row of D_WorkshopItems, which says what it gives and what it costs.
Givesstring?The row of D_ItemTemplate that is handed over.
Itemstring?The row of D_ItemsStatic behind that template. Nil when the game has no such template.
ResearchWaxStoreCostWhat researching it costs, paid once. Empty for a joint.
ReplicateWaxStoreCostWhat each one made costs. Empty for a joint.
Needsstring[]The row names of the nodes it comes after. With several, one of them bought is enough.
FlagsWaxStoreFlag[]The flags its row asks for. A DLC that has to be owned is one of these.
LevelintegerThe level its row asks for (RequiredLevel). 0 for every node of the game's own.
FreebooleanTrue when its row says it is researched from the start. The rows of joints say so, and the game still counts a joint as bought only once one of its parents is.
At{ X: number, Y: number }The middle of the node on its category's canvas, which begins at 0, 0 at the top left.
SizenumberHow wide and high it is: 250 for a node, 0 for a joint.
Line"elbow" | "elbow-down" | "straight" | "none"?The line style its row sets: the game's XThenY, YThenX, ShortestDistance or NoLine. Nil when the row sets none and the store's own style applies, which is XThenY.

WaxStoreCurrency

One of the game's currencies: a row of D_MetaCurrency.

Returned by game.Workshop:GetCurrencies.

Open in the Explorer

FieldTypeDescription
IdstringThe currency's row name, such as "Credits".
NamestringThe name its row gives, without the "[DNT]" mark some carry. "Credits" is named "Ren".
Iconstring?The path of its picture.
ShownbooleanTrue when its row says it is shown on the game's main screen.

WaxStoreProblem

One thing that is wrong with a store.

Returned by layout:Check, game.Workshop:Check, game.Workshop:Define, storeNode:Set, storeCategory:Arrange, storeCategory:Add.

Open in the Explorer

FieldTypeDescription
Level"error" | "warning"An error means the store cannot be made as described.
CodestringA short name for the kind of problem, such as "id-twice" or "off-screen".
Nodestring?The id of the node it is about.
Categorystring?The id of the category it is about.
TextstringThe problem as a sentence.

WaxStoreGives

What a node hands over when it is not a ready row of D_ItemTemplate: an item and how many.

Open in the Explorer

FieldTypeDescription
itemstringA row name of D_ItemsStatic.
count (optional)integerHow many are handed over. 1 when omitted.

WaxStoreNeeds

What a node asks for, in the long form.

Open in the Explorer

FieldTypeDescription
any (optional)string | string[]Nodes of which one bought is enough. This is the game's own rule for a node with several parents.
all (optional)string | string[]Nodes that all have to be bought. The game has no such rule, so Check warns about it, and in this version of Wax nothing keeps the rule: Define, Add and Set refuse a node that uses it.
level (optional)integerThe level the node's row asks for (RequiredLevel).
flags (optional)string | string[]Account flags the player must have: row names of D_AccountFlags.

WaxStoreNodeSpec

One node of a described store.

Used by storeCategory:Add.

Open in the Explorer

FieldTypeDescription
idstringLetters, digits and , used once in the mod. The node's row is named "<ModId><id>", and what a player has researched is saved under that name, so an id is never changed. The row name can be 100 characters long at most.
givesstring | WaxStoreGivesWhat it sells: a row name of D_ItemTemplate, or an item and a count.
research (optional)WaxStoreCostWhat researching it costs, paid once. Nothing when omitted.
replicate (optional)WaxStoreCostWhat each one made costs. Nothing when omitted.
needs (optional)string | string[] | WaxStoreNeedsA node, a list of nodes of which one is enough, or the long form. A node is named by its id in this store, or by the row name of one of the game's nodes.
at (optional){ [1]: number, [2]: number }The middle of the node, such as { 500, 850 }, each number no further than 1000000 from 0. A node without one is placed by its category's arrange.
line (optional)"elbow" | "elbow-down" | "straight" | "none"The line style for its row: the game's XThenY, YThenX, ShortestDistance or NoLine.
free (optional)booleanTrue marks the node as researched from the start.

WaxStoreShapeOptions

The options of a shape. Each shape reads the ones named for it. A place is two numbers, such as { 500, 850 }, and angles are in degrees: 0 points right, 90 points down. No distance, angle or place given here, and no place that comes out, can be further than 1000000 from 0: such a shape is an error.

Used by layout:Place, storeCategory:Arrange.

Open in the Explorer

OptionTypeDescription
from{ [1]: number, [2]: number }Where the first node goes. For "line" and a "tree" that grows right { 500, 850 } when omitted, for "grid" and a "tree" that grows down { 500, 250 }.
stepnumber | { [1]: number, [2]: number }From one node to the next. For "line" a distance (350) or a pair, for a "tree" a pair ({ 500, 350 }, or { 350, 300 } when it grows down), for a "radial" tree the distance between rings (360).
anglenumberFor "line" with a step that is one number: the direction. 0 when omitted.
cellnumber | { [1]: number, [2]: number }For "grid": how wide and high one cell is. { 350, 300 } when omitted.
columnsintegerFor "grid": how many nodes go in a row.
rowsintegerFor "grid": the most rows there can be. A row holds as many nodes as that takes, and each row is filled from the left, so fewer rows can come out: 5 nodes with rows = 4 make rows of 2, 2 and 1. When neither this nor columns is given, the most rows that fit the screen's height.
center{ [1]: number, [2]: number }For "ring", "arc", "spiral" and a "radial" tree: the middle. When omitted the shape is put at height 850, with no node left of 500.
radiusnumber | { [1]: number, [2]: number }For "ring" and "arc": how far the nodes are from the middle, or a pair for an oval. When omitted it is the smallest that keeps neighbours 360 apart, and an oval no taller than the screen when a circle would not fit.
startnumberFor "ring" and "arc": the angle of the first node. For "spiral", whose first node sits in the middle: the direction of the second node from there. -90 for "ring" and "spiral", 180 for "arc".
sweepnumberFor "ring" and "arc": how far round the nodes go. 360 for "ring", 180 for "arc".
gapnumberFor "spiral": how far a node is from the next, and one turn from the next turn. 1 or more, and 360 when omitted.
turn"right" | "left"For "spiral": which way it turns. "right" when omitted.
direction"right" | "down" | "radial"For "tree": which way it grows. "right" when omitted, which is the way the store pans.
points{ [1]: number, [2]: number }[]For "path": the places the path goes through.

WaxStoreArrange

How a category places the nodes that have no at: a shape and its options.

Extends WaxStoreShapeOptions.

Open in the Explorer

FieldTypeDescription
shape (optional)"line" | "grid" | "ring" | "arc" | "spiral" | "tree" | "path" | fun(index: integer, id: string, count: integer): number, numberThe shape. "tree" when omitted.

WaxStoreCategorySpec

One category of a described store. With id and name it is a new category. With into its nodes go into one of the game's categories.

Open in the Explorer

FieldTypeDescription
id (optional)stringLetters, digits and . The category's rows are named "<ModId><id>", which can be 100 characters long at most.
into (optional)stringThe row name of one of the game's categories, such as "Workshop_Axes". With the shapes "tree", "line" and "grid", nodes without an at start to the right of what it has, unless from says where. Two entries with the same into are each arranged by themselves, with those shapes the later one to the right of the earlier one's nodes as well, and Check looks at the nodes of both together.
name (optional)stringThe name to show for a new category.
icon (optional)stringThe path of a texture of the game's for a new category.
background (optional)stringThe path of a texture to show behind the nodes of a new category.
level (optional)integerThe level a new category's row asks for. 0 when omitted.
arrange (optional)"line" | "grid" | "ring" | "arc" | "spiral" | "tree" | "path" | WaxStoreArrange | fun(index: integer, id: string, count: integer): number, numberHow nodes without an at are placed: a shape's name, a shape with options, or a function that returns a place for each. "tree" when omitted.
nodesWaxStoreNodeSpec[]Its nodes. At least one.

WaxStoreSpec

A store as a mod describes it. game.Workshop:Check says what is wrong with it, and game.Workshop:Define puts it into the game. A node added to one of the game's categories (into) shows there with its picture, price and line. When that happens while the player stands in the store, Wax has the game build its store again, so the node can be bought at once, and it goes again when the mod is switched off. What the account has researched is kept by the game under the node's row name, so it is still there after the mod was off for a while. A new category of a mod's own is not switched on in this version.

Used by game.Workshop:Check, game.Workshop:Define.

Open in the Explorer

FieldTypeDescription
mod (optional)stringThe id of the mod it belongs to. Not needed when the mod itself calls Check.
categoriesWaxStoreCategorySpec[]Its categories. At least one.

WaxStoreLimits

The measures the store's screen sets, in the store's own units.

Returned by layout:GetLimits.

Open in the Explorer

FieldTypeDescription
SizeintegerHow wide and high a node is: 250.
GapintegerThe least distance between the middles of two nodes in the game's own store: 300.
TopintegerThe smallest height of a middle that is known to fit a 1080p screen: 250.
BottomintegerThe largest such height: 1450.
EdgeintegerA middle nearer than this to the canvas's left or top has part of its node outside: 125.
FarintegerNo number of a place can be further than this from 0: 1000000.

WaxStorePlace

A place for a node: its middle. Neither number can be further than 1000000 from 0.

Returned by layout:Place. Used by layout:Check.

Open in the Explorer

FieldTypeDescription
Xnumber
Ynumber
Idstring?A name for it in what Check says. "Place 3" when omitted.
Sizenumber?0 for a joint, which Check leaves out. 250 when omitted.

WaxStoreNodeNeeds

What a node needs, in the long form Set takes.

Open in the Explorer

FieldTypeDescription
any (optional)string | string[]Row names of nodes of which one bought is enough. An empty list takes every parent away.
all (optional)string | string[]Refused in this version of Wax: the game has no such rule and nothing keeps it.
level (optional)integerThe same as level beside it. With no any, the node's parents stay as they are.

WaxStoreNodeChange

What Set changes on a node. What is left out stays as it is.

Used by storeNode:Set.

Open in the Explorer

FieldTypeDescription
research (optional)WaxStoreCostWhat researching the node costs. {} is a price of nothing, written as the game writes it: 0 of its first currency. The price is kept in the node's store item (its row of D_WorkshopItems), and every node of the game's own store has a store item to itself. A joint has no price, and asking for one is an error.
replicate (optional)WaxStoreCostWhat each one made costs, kept in the same store item.
needs (optional)string | string[] | WaxStoreNodeNeedsThe row name of a node of the store, a list of names of which one bought is enough, or the long form. Written as the node's list of parents (RequiredTalents). The lock comes from the game's own model of the store, which follows when the frame ends: GetState gives the old answer in the frame of the write and the new one from the next frame on. How the lines to new parents draw on the store's screen has not been seen yet.
at (optional){ [1]: number, [2]: number }The middle of the node, such as { 1000, 1150 }, rounded to whole numbers, each no further than 1000000 from 0.
line (optional)"elbow" | "elbow-down" | "straight" | "none"The line style of the lines into the node: the game's XThenY, YThenX, ShortestDistance or NoLine. No node of the game's own store uses the last two, and how they draw there has not been seen yet.
level (optional)integerThe level the node's row asks for (RequiredLevel), 0 or more. No node of the game's own store sets one. The game's model keeps a node locked while the level is above the player's, and follows a change when the frame ends, as with needs.

WaxStoreCategoryOptions

What AddCategory takes: a new category for the calling mod's store.

Used by game.Workshop:AddCategory.

Open in the Explorer

OptionTypeDescription
id (required)stringLetters, digits and . The category's rows are named "<ModId><id>".
name (required)stringThe name to show.
iconstringThe path of a texture of the game's.
backgroundstringThe path of a texture to show behind the nodes.
levelintegerThe level the category's row asks for. 0 when omitted.
arrange"line" | "grid" | "ring" | "arc" | "spiral" | "tree" | "path" | WaxStoreArrange | fun(index: integer, id: string, count: integer): number, numberHow nodes without an at are placed. "tree" when omitted.

Named values

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

WaxStoreCost

A price: how many of each currency. A key is a currency's row name in D_MetaCurrency, as in { Credits = 100, Exotic1 = 25 }. An amount is a whole number from 0 to 2147483647, the largest the game's field keeps.

The same as table<string, integer>.

Open in the Explorer

On this page