Dealing with Descriptions


The work on Context Properties is more or less done. I ended up adding one extra type of property which is just a value property. These properties are designed to resolve directly into values of any of the supported types: numbers, booleans, strings, and entities. I still have to add some tests for properties but I decided to hold on that until moddable decisions are more complete so that I can test both together.

From there I started working on mod text parsing, which is what mentioned was going to be the hardest part of implementing moddable decisions. I spend half a day just working on the regular expression (or regex) that is supposed to parse mod texts, possibly making it one of the trickiest regexes I have ever worked on. The regex should be able to split a mod text into constant strings (strings that never change), and mod expressions that are dynamically resolved within a simulation run in order to be replaced with, for example, tribe names, leader names, etc.

So next week I will implement the code that will use that regex to parse decision description texts to be used in-game. I don't expect this to take more than one extra half day, so I hope to get to work on decision options straight after. These are the actual options that will appear on a decision dialog, prompting the player to make a choice. There are also the last element that needs to be implemented to be able to read entire decision mod entries. If that goes well, then I'll be able to finally start integrating event and decision mods and into the game, which will probably take at least a couple of weeks more.

Get Worlds - History Simulator

Leave a comment

Log in with itch.io to leave a comment.