Skip to main content

Calculate Free Spins States

This node calculates the outcome of a free spins session.

The Calculate Free Spins States node processes the logic for free spins, including winnings, remaining spins, and re-triggers.

The Calculate Free Spins States node is a core component of slot game logic. It takes the current state of the game (reels, bet amount, current free spins count) and determines the result of the current spin within a free spins bonus round. It handles checking for winning combinations of the "Free Spins" symbol to award additional spins.

Inputs

Parameters

DataDescription
Engine ReelsThe 2D array representing the current symbols on the reels.
Current Free SpinsThe number of free spins remaining before this spin.
Bet AmountThe bet amount active when free spins were triggered.
CapitalThe player's current balance.
Total BetsThe total amount bet so far (usually 0 during free spins).
Total Free Spins WonThe total number of free spins won in this session.

Configuration

DataDescription
Blocked ReelsComma-separated indices of reels to ignore (e.g., "0,4").
Free Spins SymbolThe ID of the symbol that triggers free spins (e.g., 10).
Free Spins Reward FormulaA math formula to calculate spins won based on symbol count x. Default: x <= 1 ? 0 : (x * (x + 1)) / 2.

Custom Free Spins Rewards

DataDescription
Free Spins for N SymbolsDynamic inputs to override the formula for specific counts (e.g., "Free Spins for 3 Symbols").

Actions

SignalDescription
DoTriggers the calculation.

Outputs

Results

DataDescription
Current Free SpinsThe updated number of free spins remaining.
Free Spins Symbol CountHow many scatter/free spin symbols appeared.
Current Free Spins WonHow many new free spins were won this round.
Total Free Spins WonUpdated total.
Current Free Spins LinesDetails of the winning lines for free spins.

Events

SignalDescription
DoneTriggered when calculation is complete.

Usage

Free Spins Logic

  1. Connect the Slot Spin result (Reels) to Engine Reels.
  2. Connect your game state variables (Free Spins Count, Bet Amount) to the inputs.
  3. Trigger Do after the spin.
  4. Update your game state variables with the outputs (e.g., set FreeSpinsCount to Current Free Spins).

Detailed Behavior

  • Decrement: It automatically decrements Current Free Spins by 1 (since a spin occurred).
  • Re-Trigger: It scans the reels (skipping blocked ones) for the Free Spins Symbol. It calculates how many new spins to add based on the formula or custom overrides.
  • Capital: It does not deduct the bet amount from capital (since it's a free spin), but it tracks the hypothetical cost in Total Bets.

Troubleshooting

  • Not Awarding Spins: Check Free Spins Symbol ID matches your asset ID. Check Blocked Reels isn't excluding the reels where symbols appear.