Decision Text Parsing


The work on event generators is basically done and I created a basic unit test to validate that event mods are loaded and that event generators are properly created from them. I still have to integrate event mods into the game. Though that will have to wait a little for decision mods to be done, since I need them too to properly test events that trigger decisions within the simulation. There a few issues I discovered thanks to the unit test which I still need to fix. Although I don't expect it will prevent me from start working on decision mods over the next weekend. 

Once I start working on decision mods, I expect the biggest hurdle will be to parse text strings like the following one:

"text": "A new clan with influence <target.influence - new_influence.max> - <target.influence - new_influence.min> splits from <target.name>"

This is an example of a text that will be displayed within a dialog of a modded decision. The segments enclosed by '<' and '>' characters are expressions that need to be evaluated when the dialog is presented on the screen. Here there a few steps that need to be done correctly:

  1. Identifying the expressions nested within the string
  2. Splitting the original string into fixed text segments, and expression segments and store them for future evaluation
  3. Appending back the fixed text segments with the outcomes of the evaluation of the expression segments when needed

Besides parsing dialog texts, there a few other things that will require quite a bit of work for decision mods to be completed. Nevertheless I don't thing they will require too much of an effort.

March is going to be a busy month for me. There are quite a few real life obligations, besides work, that I need to take care of and that will probably cut on the time I have to spend on the project. I hope I'll be able to compensate a little by spending more time working on the project midweeks. Still, there probably is going to be a slowdown on progress. Nevertheless I think things will go back to normal by April and, any case, I hope to get done with decision modding before that regardless.

Get Worlds - History Simulator

Comments

Log in with itch.io to leave a comment.

Efsane