Loading Leap…

Creating Resources

Create resources such as gold, gems and energy, and set their limits and starting values.

Creating Resources

Resources are everything a player earns, spends or accumulates — soft and hard currencies, energy, experience, and counters such as total wins. You manage them from the Resources tab of the Element Explorer on the Design tab.

Tip: Currencies and statistics are both resources in Leap. Model gold, gems and total wins the same way, giving each the limits and starting value it needs.

Creating a Resource

In a workspace, click New Resource, name the resource in the Inspector — e.g. "Gold", with the slug gold — and click Save. A new resource starts with a Min Value of 0, a Max Value of 9999 and no starting value. The fields every element shares are covered in Navigating Leap Studio; the ones below are specific to resources.

Limits and Starting Value

  • Min Value and Max Value — the lowest and highest amount a player can have. Leave a field empty ("Unbounded") for no limit on that side. When both are set, Min must be less than or equal to Max.
  • Starting value — what a player reads before anything changes this resource. Empty means 0. It must lie between Min and Max. Changing it also affects existing players who have never changed the resource.

If you leave Starting value empty while Min Value is above 0, the Inspector warns you: "Empty means this starts at 0 — below its own minimum of {min}."

To change the limits or starting value of several resources at once, select them together in the Element Explorer.

At Min/Max

At Min/Max decides how adding to or subtracting from the resource behaves at its limits:

  • Clamp — the value stops at the limit and the action still succeeds. Taking more than a player has leaves them at the minimum. This is the default.
  • Wrap — the value counts round, so crossing the Max continues from the Min (and the other way round), and the action succeeds. Wrap needs both a Min and a Max, with Max greater than Min.
  • Disallow — an add or subtract that would cross a limit fails the whole action, including every other effect in it. Use it when a cost should block an action the player can't afford.

Setting the resource to an exact value is not affected by this choice: setting it outside Min and Max always fails the action.

Using Resources

  • Changing a resource — add a Resource effect to an operation. Its toggle switches between + (add — use a negative amount to subtract) and = (set to an exact value). See Operations and Effects.
  • Reading a resource — compare it in a condition, or use it in a value expression. See Conditions and Values and Expressions.
  • From your game — your game reaches a resource by its slug: gold at the top level, daily_rewards.gold inside a group called Daily Rewards.

Next Steps

Continue to Creating Constants to add the fixed tuning values your design reads.