VerseBuilderDocs

Docs/Game data/Config

Config

Numbers and constants you want designers to tweak in UEFN — without redeploying code. Compiled to @editable fields.

Last updated 2026-06-06

What is this?

Configs are read-only constants from the rules' perspective. They're baked once when the island loads — designers can change them via UEFN's Details panel, but rules can't write back to them.

Compared to Variables (live state that changes at runtime) and Messages (text), Configs are tunables — the dials your designer can turn after the code ships.

When do I need it?

  • Balanceenemy_hp, damage_multiplier, spawn_rate.
  • Time constantsround_time, respawn_delay, cooldown_seconds.
  • Capsmax_lives, max_enemies, kill_target.

Walkthrough: add a config

  1. Open Game Data → Config

    The Config sub-tab sits next to Variables. The empty state offers the difficulty settings pattern (max_enemies, round_time) to seed two useful configs at once.
  2. Add a row

    Click + Add Config. Each row has Name, Type (int or float), and Default value. Names are snake_case automatically.
  3. Use it in a rule via the cfg toggle

    In the Rules editor, every numeric param has a small cfg toggle next to the field. Click it to swap the fixed value for a dropdown of your configs — e.g. set Increment Variable's amount to income_rate instead of typing 5. Click cfg again to revert to a fixed value. Configs whose type matches the param are offered (and a float param accepts any config). This is the only way a rule consumes a config — there is no “set config” action, since configs are read-only.
  4. Designer tunes it in UEFN

    After Composer emits the code, the value appears in the UEFN editor's Details panel for your device — designers tweak it without touching Verse.

Common patterns

Difficulty bundle

max_enemies (int, default 10), round_time (int, default 180), damage_multiplier (float, default 1.0). Pin them next to each other so the designer sees the dial board at a glance.

Round timing

warmup_seconds, round_seconds, cooldown_seconds— pair with a Timer Device and a phase flow.

Economy tuning

kill_reward, round_bonus, shop_price_shield— every magic number in your earn/spend loop becomes a Config.

Gotchas

⚠️ Watch out

Primitives only. Configs are int or float. For strings designers can edit, use a Message.

⚠️ Watch out

Default must be a valid play value. If a designer never edits the UEFN field, the default ships — so test with the default, don't set it to 0 “just because”.

📌 Note

Configs are read-only at runtime. If a rule needs to mutate the value, use a Variable instead — or read the Config as the “starting point” into a Variable in On Begin.

What gets generated?

Each Config becomes a single @editable field on the device class with the type and default you set:

my_device := class(creative_device):

    @editable MaxEnemies:int = 10
    @editable RoundTime:int = 180
    @editable DamageMultiplier:float = 1.0

    # rule body reads them directly
    if (CurrentEnemies < MaxEnemies):
        SpawnEnemy()

See also