I noticed that some history event types were never selected by the history generator. These events involved multiple existing entities, for example the leader of a faction attacking the leader of an opposing faction. After a laborious review of the history generation logs, I pieced together what was happening. An event type’s selection eligibility is based on the triggers it can respond to and its entity binding criteria. The latter determines which existing entities can be bound to entity placeholders in the event. If there are no existing entities that meet the binding criteria, the event type cannot be selected. The problem was that when an entity was bound to an entity placeholder, it could limit the bindable entities for other placeholders in the event. In the above example, entities were selected in the following order: attacking faction, attacking actor, defending faction, defending actor. If the attacking faction was selected, but the leader of that faction was dead, the history event type would be immediately excluded from selection. Other factions would not be evaluated. To fix this, every entity combination needed to be checked. I spent most of the week implementing a solution. The code works, but it’s relatively complicated and grossly inefficient.
The rest of the week went to an assortment of minor bug fixes, enhancements, and refactorings.
Next week, I’ll do the tasks that were originally planned for this week (fixing the issues introduced by upgrading Unity, adding more history generation event types, and addressing open bugs in the main game loop).
Leave a Reply