Availability Logic
As you already know, the game consists of NPCs, NPC objectives, and missions. These are all created in the game development front end. But how do we control which of these are available? Okay, so we essentially start by giving each of these systems a status. NPC statuses include 'available' and 'unavailable'. NPC objective statuses are 'available', 'unavailable', and 'completed'. Mission statuses are 'available', 'unavailable', and 'completed'. In addition, Missions have various outcomes per the potential outcomes for each mission. These are essentially the inputs to the availability logic system. Based on these values, we then put together a boolean string that when we evaluate it, returns True (available) or False (unavailable). If something is marked as completed, then essentially that thing is already completed so we don’t have to worry about evaluating the logic string.
So what does the logic string look like? There are two types of availability logic strings. These are named-based availability logic and ID-based availability logic. Here is a string-based availability logic string and its corresponding id-based availability logic string.
The first string is essentially what the game-designer enters into the game designer frontend. This is maintained as an id-based string in the backend based on corresponding NoSQL document IDs since the name-based string is subject to change whereas the id-based string is consistent. When one of these availability strings is created, we are saying availability object X is dependent on availability objects A, B, C etc. To track these dependencies, each availability object (npc, objectives, mission) has an associated set of dependency and dependent objects in the NoSQL DB. This is essentially just a graph. This graph is maintained so when an availability object is updated, we can look at downstream availability objectives and update them as necessary.
Essentially, this is a low-code way of allowing a non-technical person to control the requirements necessary for determining and updating the status of NPCs, NPC objectives, and missions.
Last updated