Tired of writing down the parameters of each enemy manually? Create a template and simplify your routine

Why waste time duplicating code when you can just fill out a convenient form and get a new character?

The problem: Duplicate fields and abilities in each character

Yesterday you put the fields in order and set strict types, so now all the values in the collection are clear and predictable. Great base!

The next step is to optimize your routine. Each time you create another enemy, you have to re—describe the same properties - health, speed, damage. While there are only three or four enemies, it just gets boring. But when the bestiary grows to thirty or fifty positions, you will spend a lot of time routinely copying the structure instead of doing game design, it's hard to imagine how long it will take if you decide to add a new property to the heroes and it will need to be declared to all enemies.

The solution is to stop defining the schema for each element and define it once, for all

What is the base object?

In IMS Creators, the filling tasks are solved by the base object. A base object is a regular game object that you mark as a template. It carries a field schema - a list of fields and their types that each member of the category should have - and, like any object, it can also hold values. Those values become the default for every instance you create, so a new enemy gets your typical base stats filled in for you. From any game object you can create an instance of it - a new game object that inherits the same field schema and is ready for you to fill in the values.

Marking an element as a template is optional. Even without the flag, you can still create instances of any game object. A normal template lives in the project tree just like any other object - you navigate to it, right-click, and create an instance. (There's also a dedicated internal Base objects section, but that's for the app's root templates, not the ones you mark yourself.) The real role of the flag is to keep the template itself out of progress tracking: in the cloud version, a template element is not shown in the to-do list, because the categories aren't content to ship - they're the structure for content. So mark the category's defining element as a template to keep your progress list focused on actual content.

The connection is simple: the base object defines what each member has. The instance defines what exactly this particular member is.

  • Base object (template): defines the schema of fields - names, types, default values. It may carry values, which become the defaults for its instances.
  • Instance: inherits the schema from the base object and fills in specific values for one specific element.

The app also ships its own root base objects - templates it uses internally for shared, cross-cutting concepts. For example, root base objects can define reusable things like dialogue triggers and variables that apply across all dialogues. We'll cover those in a future tutorial.

Game Object → Enemy → Concrete enemy

Let's take a collection of enemies from yesterday's post. Now each enemy has its own fields of HealthSpeed and Damage - all typed, all correct

Mark the first enemy, and in the Properties block, add the fields that each enemy should have:

  • Health - Integer number
  • Speed - Number
  • Damage - Number

Leave the values empty. Now create an instance, right-click on the template and select Create Instance. IMS Creators will create a new game object with three already defined fields - Health, Speed, Damage. Name him Bruiser and fill in: Health = 200', Speed = 15Damage = 15'. A heavy, slow enemy, ready.

Game Object → Ability → Concrete ability

The same pattern applies to abilities. Create a game object for the base, mark it as a template, and give it the fields every ability shares:

  • Name - String
  • Cost - Integer number
  • Cooldown - Integer number

Create an instance, name it Fire Extinguisher Blast, and fill in Name = Fire Extinguisher BlastCost = 10Cooldown = 8. Create another: Shopper's Frenzy with Cost = 15Cooldown = 12. Each instance inherits the same three fields from the same base; only the values differ.

If you decide in the future that each ability should have a Description field. Instead of editing each ability individually, you add it once to the base. Each existing and future instance automatically receives a new field, and the change is propagated instantly.

Result: configured once, use it constantly

base object defines what every enemy has, what every ability has, what every item has. An instance is just one concrete version of that shape.

Practical benefit: adding the next enemy, the next ability, the next item - filling out the finished form. If something needs to be changed, you edit it once in the base object, and each instance changes after it.

Next: let's learn how to connect characters and abilities.

The templates have defined the category structure, but characters, abilities, and enemies are still distributed in isolated lists. In the next post, we will link the characters to the abilities through links. This will combine the disparate files into a common data structure.

Are you ready to get rid of the routine when working with data? Download IMS Creators, open ims.cr5.space/desktop, mark one game object as a template, and create your first instance. A few minutes of base-object setup is what makes adding the next enemy take two minutes instead of ten.


FAQ

What is a base object in IMS Creators?

A base object is a regular game object that is used to produce new objects. It defines a field schema - names and types - and any values it holds become the defaults for its instances. New game objects created from an instance inherit its fields automatically.

How do I mark a game object as a base object (template)?

Open the game object, go to its settings, and toggle Is template to on. A normal template stays in the project tree like any other object. (The dedicated Base objects section is for the app's internal root templates, not the ones you mark yourself.) The flag's main role is to keep the category definition out of progress tracking - in the cloud version it won't show in the to-do list, leaving that list for actual content. You can still create instances either way.

How do I create an instance of a base object?

Right-click the base object (or any game object, template or not) and choose Create instance. A new game object appears with the same field schema inherited from the base, ready for you to fill in values. Marking it as a template isn't required - it only keeps the element out of progress tracking.

Can I still add custom fields to one instance?

Yes. Instances inherit the base's schema, but you can add extra fields to a specific instance without affecting the others. The base defines the shared shape; instances can extend it.

Is this the same as duplicating an element?

No. Duplicating copies the element with its current values. Creating an instance inherits the field schema from a base object - you get the same structure but start with empty values to fill in. The instance stays linked to its base, so schema changes propagate.

Where do base objects live in the project?

Normal templates are regular game object files on disk and stay in the project tree like any other object - marked as templates internally (isAbstract: true in the JSON). There is also a dedicated Base objects section in the app (visible in Settings), but that's for the internal root templates the app itself provides, not the ones you mark.

Zurück zum Blog