Random Event Encounter System

I am taking advantage of my experience as a web developer, where it is my daily work to organize and structure data and their relationships. This becomes handy for a random event system in Godot. I developed this system with my SQLite integration in Godot 3.5.

Involved characters

I organized the data, so every can have multiple dialog options and multiple affected people. First you write the event, after that you set up which residents are involved. Since you don’t actually know the possible residents upfront, you create some kind of model or buyer persona. Q quick profile of the person so to say. For example, if I have a fight between two men from the same clan, I connect the event with two random residents, that are at least adults and both are warriors. The system will choose fitting residents, which are then connected to the system. Of course, the system can be even more complex and every value can be considered.

Consequences

Another 1:n relation is are the options. Each option represents a button in the popup dialogue. Each options has text with placeholders for stuff like names or titles. Also, each options has a set of consequences for each involved resident. So if you decide on option 1, you can increase or decrease some values from the involved character 1 and also do other stuff to the second character.

Follow-up

After all is said and done, the system can decide, if it shows the conclusion of the event, if it waits on the result of another triggered event (think of the fight between two men. You could start a fight event and wait for the result), or it could even trigger another connected event.

With this quiet simple logic, you could create endless random encounters and manage them easily through a database. This has also the advantage, that you can change the structure of the data for all events at once.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *