NO MOM
I CANT PAUSE.
Scientific Number Tools Documentation
Support
Browse lessons

4. Create a format in the editor and use it in your widget

Display the balance with a reusable formatter.

On this page

Goal: Display the balance with a reusable formatter.

Before you start: The wallet and its widget. Use Normal for the core path.

The idea you will use

Formatting is presentation. 1250.00 and 1.25K can represent the same balance.

Predict before running

Does switching from Fixed to a K suffix make a purchase of 100 cheaper?

Build and check

  1. Stop Play. In Data, right-click → Miscellaneous → Scientific Number Formatter. Name the asset DA_MisMonedas and open it.
  2. Set Formatter Name = MisMonedas; Notation = Suffix; Exponent Step = 3; Pattern = {Mantissa}{Suffix}.
  3. Set Maximum Fractional Digits = 2; Minimum Fractional Digits = 0. For Initial Suffixes, set the first entry empty, then K, M, B.
  4. In Preview Value, enter 1.25e3; in Preview Parse Input, enter 1.25K. Check both previews: they should represent 1250. Do not continue if you do not understand the validation message.
  5. Save. In Edit → Project Settings, find Scientific Number Settings, add DA_MisMonedas to Formatter Assets, save, and restart the editor.
  6. Open your widget. In ActualizarSaldo, replace To Fixed String with To Formatted String, Formatter Name = MisMonedas. Because it is pure, connect execution directly to the next node, Set Text.
  7. Temporarily initialize Wallet to 1250 and run: the widget should show 1.25K. Do not change the text manually in Designer to get this output.
  8. In a copy of the formatter, remove {Mantissa} from the pattern and observe validation. Restore the valid pattern. Try rounding near a suffix change and decide whether it suits your game. Change the Notation selector between Suffix and Exponent: the pattern adapts its marker and exponent separator while preserving the custom text. Check the preview and use Undo to return to the previous state. Errors introduced by manually editing Pattern remain visible so you can fix them.
Explore display formats and print pins

Try Print Scientific Number with Fixed

  1. In BP_MiNumero, connect the numeric output of Add to Print Scientific Number, in addition to the To Fixed String path you just built. Connect its execution after Print String.
  2. Select Fixed under Formatter Name: Decimal Places should appear. With 2 and a result of 5000, both prints should match: 5000.00.
  3. Change Decimal Places to 0 and then 4: check for 5000 and 5000.0000.
  4. Change to Scientific: the pin disappears. Switch back to Fixed: it should retain the value 4. If the pins do not update, use Refresh Node.
  5. Try Suffix and Engineering. For comparison, use 12500: the outputs are approximately 12.5k, 1.25e4, and 12.5 x 10^3, depending on the format and configured suffixes.
  6. Connect a Name variable to the format: the decimal pin should remain available because the format can vary at runtime. This setting only affects Fixed.

Fixed accepts 0 to 18 decimal places. For values that cannot be represented safely as a double, it uses the same exponential fallback as To Fixed String. Also check 1.25e400. This text is for display, not lossless storage.

Check your reasoning

See the explanation

No. Operations consume the Scientific Number; the suffix changes only its display.

Your turn: Check the same balance with two formats and restore the initial balance to 1000 afterwards.

Ready to continue when: the widget reads the actual balance and formatting does not change purchases.

Back to the path and its extensions

No Mom I Cant Pause · Contact support · Discord

Scientific Number Tools 1.0.0 · Practical lessons ·