Working on UI Interactions


This weekend was a messy one but I still managed to get some progress done. Like I mentioned last week, the focus right now is on adding the necessary UI elements to get the tribal expansion action to work in the game. For this I created a new overlay to be used when the player activates the expansion action (or more specifically, when the player picks an action that requires them to choose a region). This overlay will display the regions that are considered to be "core" to the polity with a blue shade, and all regions that the tribe could potentially migrate to with a cyan shade, like this:


The next step is to make the game do something when the player chooses one of the possible target regions. I also want to add a helper dialog that explains what the player is supposed to do while the new overlay is active.

I also took the time to create a new decision that is supposed to be enabled once the player chooses the target region. I'll post it here as an example of how decisions can be combined with actions to confirm player choices (work in progress):

{
  "decisions": [
    {
      "id": "tribe_decide_expand_toward_region",
      "name": "tribe decide expand toward region",
      "target": "faction",
      "parameters": [
        { "id": "selected_region", "type": "region" }
      ],
      "properties": [
        { "id": "target_polity", "value": "target.polity" },
        { "id": "cohesion_preference", "value": "target.preferences.cohesion" }
      ],
      "description": [
        {
          "id": "description_intro",
          "text": "Should the <<target_polity>> expand into the <<region>> region?"
        }
      ],
      "options": [
        {
          "id": "option_allow_expansion",
          "text": "Allow tribe to expand...",
          "weight": "1 - cohesion_preference"
        },
        {
          "id": "option_prevent_expansion",
          "text": "Prevent tribe from expanding...",
          "weight": "cohesion_preference"
        }
      ]
    }
  ]
}

This next weekend I'll continue working on the UI interaction and try to get the tribal expansion to work as expected.

Get Worlds - History Simulator

Comments

Log in with itch.io to leave a comment.

firs