I'm writing my first game. It's an adventure-RPG in the style of Starflight. I'm thinking about how to represent game state. There are three obvious parts of game state: dialog, combat, and story/quest.
I could have three separate data structures, but some state elements don't fall clearly into a single jurisdiction. For example, maybe a quest requires that you damage several ships without destroying them. Quest directives are generally story elements, and ship damage is an element of combat, so in this case a collection of combat elements is equivalent to a story element.
You might suggest a workaround where the quest element is separate, and isn't updated until combat ends. This is limited, though. What if a particular ship is supposed to spawn during combat once the quest directive is met? Now you have a dependence between elements in two different data structures -- elements that represent essentially the same piece of information.
This might lead me to a use a monolithic structure that houses all state elements, but intuitively this strikes me as sloppy and error-prone.
So how is it generally done?