Unknown Era uses Windows sapi.h in order to provide text to speech voices for characters.
How this is works is that when a character speaks the speech class checks the game state for a speech object pointer,
if NULL, speech object is created and stored in the game state as a pointer. If not NULL, the stored speech object pointer is used
to be operated with speech commands.
When a level is left, the speech object in the game state is destroyed. The speech object is not persistent.
ReadWrite Manager
This is placeable invisible object inside the level that will loop through each character present in the scene
and match the current present character to a matching character ID stored in the game state object
(a game state object is an object that gets created once the game is started and persists through the duration
that the game is running on your device/computer.) Almost all characters present in a scene/level have all their
data stored inside the game state. Anyways, once the a match between the scene character's ID and a character's ID in
the game state is found, the game state can choose wether to apply the information from the game state
to the in scene character (Read) or get the current information about the in scene character and apply it
to the game state (Write).
Examples:
Let's say in your game state you have data about a character called Bob, so the game spawns a identityless blank slate human character, And
then the game decides to identify this blank nameless featureless human as 'Bob'
Then instantly after this the game applies all the traits from 'Bob' data as stored in the game state, to this in-scene blank slate character that the game decided to identify as 'Bob'
Bob is stored as being alive in the game state originally, and he is currently alive in the physical scene.
Now, IF Bob in the scene dies, the ReadWrite Manager will grab the information of Bob as he
is in the scene (dead), and overwrite the data in the gamestate for Bob, changing his alive status to dead.
Therefore now when you re-enter the scene/level, Bob will no longer spawn because he is now recorded in the game state
as being dead. (This is an example of how the ReadWrite Manager reads (applies) and writes (overwrites old data/store new data) )
AI Scheduler Manager
All non player characters/NPCs have programming module attached to their code that reads/gets the the current
in-game date and time from the game state (or from a very similar class/object to the game state).
And then the module gets the assigned job of the NPC, and commands the NPC to behave a certain way based
on the date and time and job they are assigned to. ie, farmers plow the field every weekday between
8 AM to 5 PM.
Entry Point System
The game uses invisible static actors (actors are placeable objects) called entry points. The entry points
are manually placed in a level/scene. The entry point spawns a character after reading through the character data stored in the
game state object (a persistent data object that is initiated once every time the game file is opened and remains for the duration that
the game is running on your computer.) Alternatively, the ReadWrite Manager reads the game state object data, and then commands the specific
entry points to spawn a character if there is supposed to be a character present in the current level/scene at a specific entry point (this information is stored inside the game state object)
Idler System
Gets current system time on launch and compares it to last saved system time, if it exists. Then calculates hours passed
and runs the World Automation Manager to calculate changes to the data of the game world, events, places and characters