Gambling configuration for server admins

Important This feature is only available for communities that host servers (Player mode disabled).

This article will help explain how the /server gamble command works and how to configure it.

The Gambling Equation

The equation used in ESM that calculates the amount of Poptabs a Player wins

AmountGambled * (random(Randomizer) * Percentage + Modifier)

Let's break the equation apart:

  • AmountGambled
    • The amount of Poptabs the Player initially gambles
  • Randomizer
    • The pre-configured randomizer values, this value becomes:
      [Payout Randomizer Min, Payout Randomizer Mid, Payout Randomizer Max]
    • ESM uses the normal distribution randomizer to focus more on the mid value (Alternative Syntax 1)
  • Percentage
    • The percentage of AmountGambled to give to the Player if they win
    • This is added together with the Modifier to ensure the value is always above the amount they initially gambled (More on this later)
  • Modifier
    • The value added to Percentage so they will win at least what they Gambled.

What does all of that mean?

Given the following example:

AmountGambled: 100
Randomizer: Low: 0.1, Mid: 0.5, Max: 1
Percentage: 90 (This will be converted to 0.90)
Modifier: 1

        AmountGambled * (random(Randomizer) * Percentage + Modifier)

        // Lowest Amount
        100 * (0.1 * 0.90 + 1)
        100 * (0.09 + 1)
        100 * 1.09
        = 109

        // Mid Amount
        100 * (0.5 * 0.90 + 1)
        100 * (0.45 + 1)
        100 * 1.45
        = 145

        // Max Amount
        100 * (1 * 0.90 + 1)
        100 * (0.90 + 1)
        100 * 1.90
        = 190
    

So if the Player gambled 100 Poptabs and won:
- The lowest they could win is 109 Poptabs
- The max amount they could win is 190 Poptabs
- But on average, they will win around 145 Poptabs


Gambling Settings

These are all configurable in the Server Portal under Register Server or Modify Server

Win Chance

The percentage chance the Player has to win

Range: 0 - 100
Default: 35

Payout Percentage

Range: 0 - 100
Default: 90

Payout Modifier

Range: Recommended to be greater or equal to 1
Default: 1

Payout Randomizer Min

This value should be smaller than Payout Randomizer Mid

Range: 0 - n
Default: 0

Payout Randomizer Mid

This value should be smaller than Payout Randomizer Max, but bigger than Payout Randomizer Min

Range: 0 - n
Default: 0.5

Payout Randomizer Max

This value should be bigger than Payout Randomizer Mid

Range: 0 - n
Default: 1