Symbol Value Grid
Gives every coin symbol on the grid a seeded coin value, the maths behind money symbols and cash-collect features. A maths node that also compiles to the RGS.
Wire Reels from Weighted Reels reels and Seeds from ISAAC Random Number Array Generator array. Every cell showing Value Symbol is a coin and draws one entry of Values with the odds in Weights; a Weights array of another length means equal odds. With Values Are Bet Multiples on, the value is multiplied by Bet Amount and rounded to minor units; off, the face value is used. Set Value Symbol to a real id: left at 0, every blank cell counts as a coin.
valueGrid has the shape of the reels, with the coin value in each coin cell and 0 elsewhere; coinPositions lists the coins as [row, col] pairs, coinCount their number and totalValue their sum. Wire valueGrid to Coin Collector valueGrid to pay it when a collector lands, or to Hold And Win Grid valueGrid to carry the prices into a bonus, and coinPositions to pixi.CellOverlay cells or a value-label layer.
One seed is enough: the draw runs the same generator as Weighted Reels from the first seed, so the preview and the server land the same values. With no coins on the grid nothing is drawn and no seed is needed. With coins and no seed the node fails closed: it logs the reason, writes it to inspect data, empties every output and still fires Done. An empty or ragged grid, or an empty Values list, fails the same way. The node is stateless.
Inputs
Parameters
| Data | Description |
|---|---|
| Reels (array) | The landed grid, reels[col][row], from Weighted Reels reels. |
| Value Symbol (number) | Symbol id that carries a coin value. Left at 0, every blank cell counts as a coin. Default 0. |
| Values (array) | Possible coin values, as bet multiples or face values. Default [1, 2, 5, 10]. |
| Weights (array) | Draw weight per entry of Values; a different length means equal odds. Default empty. |
| Bet Amount (number) | Bet in minor units, multiplied into each value while Values Are Bet Multiples is on. Default 100. |
| Values Are Bet Multiples (boolean) | When on, a value is value x betAmount rounded to minor units; when off, the face value. Default on. |
| Seeds (array) | Random seeds, wired from ISAAC Random Number Array Generator array. Required; the node refuses to run unseeded. |
Actions
| Signal | Description |
|---|---|
| Do | Runs the node. |
Outputs
Events
| Signal | Description |
|---|---|
| Done | Fires when the node has finished, on success and failure alike. |
Results
| Data | Description |
|---|---|
| Value Grid (array) | Coin value per cell in minor units, same shape as the reels, 0 where there is no coin. |
| Coin Positions (array) | The coin cells as [row, col] pairs. |
| Coin Count (number) | Number of coin cells. |
| Total Value (number) | Sum of every coin value in minor units. |
Usage
- Wire Weighted Reels
reelsinto Reels and a fresh ISAAC array into Seeds. - Set Value Symbol to the coin symbol and list Values and Weights.
- Fire Do from Weighted Reels Done.
- Wire
valueGridinto Coin Collector Value Grid, with the same grid on both Reels inputs. - Wire
coinPositionsinto pixi.CellOverlay Cells or your value labels.