No stream today
Still planning though
Unfortunately I've come down with something, so I slept in today instead of doing the regularly scheduled stream.
Regardless I think we're approaching the correct way to do the event "causes".
All events are directly caused by existing game state. Each event had a set of causes.
When the time is appropriate for an event (turn start, post-battle, etc), we:
- See what causes are valid for the current game state.
- See what events correspond to these causes
- Pick one
We may identify available events first and then check cause validity from there, that's a more straightforward approach; that's all implementation noise though.
The real trick is, the cause is going to need to transport information to the event.
What do I mean?
Take for instance a "feud" cause. That will look for two characters that hate each other. When a cause determines that is true, it needs to specify those two characters to the event,
Thankfully, we already have most of this system: events themselves pick the individuals and assign them to generic "target" or "subject" or "object" records in a catch-all data "container" that events can paw through as they need. We just need instead for the causes to pass this data into the event instead of the event making those decisions themselves.
All in all, I'm pretty happy with the concept for this. We'll see how it is in practice and how the implementation goes. I think this is a pretty simple and scalable approach though!