Stop making duplicates, let's put things in order with the help of structures and enumerations

Due to a trivial typo in the type, the engine simply loses sight of the character. We tell you how enumerations help to restore order and avoid breakdowns in the code

The problem: free-text fields quietly disagree

As long as everything is laid out on the shelves - health, speed and damage are counted as integers, and new enemies appear from the form based on a single object - long live optimization!

However, one field has not yet been systematized in any way: type of entity. Write in the field bossBoss or boSs - for the balance table and for the engine, these are three different values that will never match.

The same drift applies to related data. The weak point in one enemy is a body part, in the other is the damage table.

The fix is to stop describing these things in arbitrary text and instead define them once as real types structures that assemble several related fields into one reusable form, and enumerations limit the field to a fixed set of acceptable values.

What a structure and an enum are

Structure is a reusable form that collects several fields with properties into one unit. Define it once, and any element can use it as a field type. Then the editor will display it as a nested form, and the value will be saved as a single structured object.

An Enumeration a fixed list of acceptable values. Instead of arbitrary text, the field accepts only the values that you have defined, each with a stable service name under the hood. When selecting a value, the exact key is stored in the data, so the engine and the balance tables always see the same consistent row.

Create an Enemy structure

Structures are created as ordinary elements. Click Create elementOther, choose Structure as the type, and name it Enemy. It opens in a dedicated structure editor.

Click Add field to define the shape every enemy shares. Each field has a title, a type, and a service name. Give the Enemy structure the fields that appear together across your roster:

  • Weak point — Type: Structure (the body-part shape you define next)
  • Loot table — Type: Reference / Element selector

Now Weak point isn't a loose word — it's a known shape with trusted sub-fields.

Define an EnemyType enum

Now the type vocabulary. Click Create elementOther, choose Enumeration as the type, and name it EnemyType. A dedicated enum editor opens with an empty value list.

Click Add element to add each allowed type:

  • Mall-walker
  • Brute
  • Boss

Each entry has a title (what you see) and a service name (the stable key stored in data — shown in the tag). The editor rejects duplicate service names, so you simply cannot create boss and Boss as separate entries; there is exactly one Boss, and every element that uses this enum selects the same value.

Use the structure and enum as prop types

Setting a field's type to Structure or Enumeration is what puts them to work. On your base Enemy object, add a Type field and set its type to Enumeration, then choose EnemyType in the parameters. Add a Weak point field with type Structure and choose your Enemy structure in the parameters.

Now every enemy instance edits these as controlled inputs: Type is a dropdown limited to your three values, Weak point is a nested form built from the structure.

The designer can no longer invent a typo type, and the engine can rely on the fact that the dictionary will remain the same.

The payoff: input is trustworthy

Valid inputs are the point. A designer can no longer invent a typo'd type, and the engine can rely on the vocabulary staying one thing.

What's next: browse the link graph

Your design is now structured, linked, and standardized with real types. We'll browse the design as a link graph — characters, abilities, and enemies drawn as one connected web, so you know exactly what depends on what before you edit.


FAQ

What is a Structure in a game design document?

A Structure is a reusable shape that bundles several property fields into one unit. Define it once and use it as a field type on multiple elements; each element then fills in a nested form built from the structure's fields.

What is an Enumeration (enum) in a game design document?

An Enumeration is a fixed list of allowed values for a field. Instead of free text, the field accepts only the values you defined, each with a stable service name, so the vocabulary stays consistent everywhere it's used.

How do I create a Structure in IMS Creators?

Click Create element, choose Structure as the type, and name it. It opens a dedicated structure editor where you add fields with Add field, setting a title, type, and service name for each.

How do I create an Enumeration in IMS Creators?

Click Create element, choose Enumeration as the type, and name it. A dedicated enum editor opens where you add allowed values with Add element; each has a title and a service name, and duplicate service names are rejected.

How do I use a structure or enum as a field type?

When editing a property's type, choose Structure or Enumeration, then pick the specific structure or enum definition in the parameters. The element then edits that field as a controlled input — a nested form for a structure, a dropdown for an enum.

Why do I need enums instead of typing the value myself?

Because free text drifts: bossBoss, and BOss are three different values to a machine. Enumeration captures the dictionary in a consistent set, so everyone can be sure that there are no duplicates in the document.

Zurück zum Blog