lotgd / core

Core functionality for Legend of the Green Dragon, a text-based RPG game.
GNU Affero General Public License v3.0
152 stars 15 forks source link

Implement a possibility to parse values within Scene-related values #144

Closed Vassyli closed 3 years ago

Vassyli commented 3 years ago

It would be a great addition if variables could be used within scene descriptions, titles, and maybe actions too. I suggest to maybe rely on twig or at least use a similar syntax, we might be able to use their code:

You enter the shop of {{ Scene.Property.VendorName }}. 
They look at you,
 {% if Character.Property.Race == "dwarf" %} and start to smile. "A fellow dwarf, I see", they mumble
 {% else %} and look at you with distrustful eyes {% endif %} 
as they show you their wares.