Allow templating for room descriptions. This could extend to other gameobjects as well.
For example:
- name: template_example
description: |
You enter the {{room_type}} room, there are cobwebs in the sides of the ceiling, and
it seems as though nobody has entered for years.
template:
- room_type: 'template'
actions:
...
The workflow would go as follows:
Player enters the room; variables from template are loaded as gameobjects (only if they do not exist)
Variables are loaded into the template, text displays "You enter the template room, ..."
Player enters another room which sets room_type: 'something else', and then visits template_example room again.
The text will now display as "You enter the something else room, ...", since the value of room_type has been modified.
This sets up rooms which can be modified at runtime, and the dev can create 1 room with a template rather than creating a whole different branch of rooms for the user. The same could be done with enemy descriptions and item descriptions.
Allow templating for room descriptions. This could extend to other gameobjects as well.
For example:
The workflow would go as follows:
template
are loaded as gameobjects (only if they do not exist)room_type: 'something else'
, and then visitstemplate_example
room again.room_type
has been modified.This sets up rooms which can be modified at runtime, and the dev can create 1 room with a template rather than creating a whole different branch of rooms for the user. The same could be done with enemy descriptions and item descriptions.