Skip to main content

Paytable Rows

Turns a paytable into display rows for the pay table or info screen, priced at the current bet. Maths node that also compiles to the RGS.

Wire Paytable from Get Paytable paytable, or from Paytable Modifier paytable so the screen shows the multipliers that are actually paying. The table is { symbol: { count: multiplier } }, as an object or JSON text. Set Bet Amount (minor units) and Paylines Count, then fire Do. Each payout is round(betAmount / paylinesCount * multiplier), the Calculate Winnings convention, in integer minor units.

Rows is [{ symbol, name, entries: [{ count, multiplier, payout }] }], one row per symbol with symbols and counts ascending, ready for a Repeater. Flat Rows is one entry per symbol-count pair, { symbol, name, count, multiplier, payout }, for a flat list or table. Symbol Count is the number of rows and Bet Per Line is betAmount / paylinesCount, unrounded.

Symbol Names maps symbol ids to names: an array indexed symbol - 1, or an object keyed by symbol id. An unnamed symbol shows its number. Symbol keys that are not numbers, rows that are not objects and counts of 0 or less are skipped. A negative bet counts as 0 and fewer than one payline counts as 1.

Stateless and seedless, and the node never fails: an empty paytable simply gives empty rows. Re-fire Do whenever the bet changes so the payouts refresh. On the RGS the same core produces the same rows, so the numbers the player reads are the numbers the server pays.

Inputs​

Parameters​

DataDescription
Paytable (object)Table to display, { symbol: { count: multiplier } } as an object or JSON text. Default {}.
Symbol Names (array)Symbol names as an array indexed symbol - 1 or an object keyed by symbol id; unnamed symbols show their number.
Bet Amount (number)Total bet in minor units; negative values count as 0. Default 100.
Paylines Count (number)Number of paylines the bet is spread over; values below 1 count as 1. Default 20.

Actions​

SignalDescription
DoRuns the node.

Outputs​

Events​

SignalDescription
DoneFires when the node has finished, on success and failure alike.

Results​

DataDescription
Rows (array)One row per symbol, [{ symbol, name, entries: [{ count, multiplier, payout }] }], symbols and counts ascending.
Flat Rows (array)One entry per symbol-count pair, { symbol, name, count, multiplier, payout }, payouts in minor units.
Symbol Count (number)Number of symbols that produced a row.
Bet Per Line (number)betAmount / paylinesCount in minor units, unrounded.

Usage​

  1. Wire Get Paytable paytable, or Paytable Modifier paytable, into Paytable.
  2. Wire the current bet into Bet Amount and the payline count into Paylines Count.
  3. Provide Symbol Names as an array or an object.
  4. Fire Do, and again whenever the bet changes.
  5. Feed Rows to a Repeater, one item per symbol, or Flat Rows to a table.