Action Category Mod Scripts


This past weekend I continued work on the implementation of the action toolbar and scripts. One thing that I decided to change from last week was the implementation of action categories, which are the toggles with images that appear on the toolbar, each associated with a set of actions. My previous intention was for the categories in the toolbar to be fixed. But I chose instead to make them also customizable through mod scripts. So it will be possible not only to change the contents of each category through mods, but also to remove existing categories and add new ones to the toolbar. Here's an example of an action category mod script:

{
  "actionCategories": [
    {
      "id": "territory",
      "name": "Territory Actions",
      "image": "territory.png"
    },
    {
      "id": "diplomacy",
      "name": "Diplomacy Actions",
      "image": "diplomacy.png"
    }
  ]
}

Each category has an id used to associate actions to it. They have a name that will be used as the dialog title for that category and for the toggle tooltip. And they have the name of an image file to use for the toggle button, so that it can be possible to set custom images for each one of them.

After finishing the implementation of the category scripts, I also finished the implementation of the action toolbar behavior. Now I started working on making sure action effects actually trigger in-game and have an effect on the simulation. As I mentioned before, this will be something that will require quite a bit of effort to implement since I need actions to pause the simulation and request information from the player in an iterative fashion (a single action might request multiple inputs from the player), and then resume the simulation once the full action has been processed. So next week I'll continue working on the action process loop.

Get Worlds - History Simulator

Comments

Log in with itch.io to leave a comment.

(+1)

great work still waiting to see how cool the game is gonna look