Weekly Update – April 28, 2023

Work, illness, and visitors made for a slow start to the week. Despite this, I checked off a few big history generation tasks.

I felt a bit burned out all week. I need to take some time off from history generation. I’ve been working on it almost exclusively over the past four months. It will be good to temporarily back away; I fear I’ve lost sight of the forest for the trees on this stuff.

  • New history event types for room types. Ten new history event types were added to build various room types such as barracks, bedchambers, and fountains.
  • History event entities can now be placed into container entities. This allows a dead actor to be placed in a coffin, for example.
  • History event era ranges. History event types can now specify a range of eras in which they can occur.
  • More robust history event entity binding. The details aren’t interesting, but I’ve included this in my update because it was the most time-consuming task this week. 
  • History event editor enhancements. Entity attributes and their associated binding criteria are now arranged horizontally rather than vertically, making it easier to see the attributes and making the Inspector window more compact. A “Default” button was added to some fields that usually have the same value, to bypass opening the asset selection window.
  • Basic history generation stats. I started capturing some simple history generation stats such as the number of events generated and percentage of available event types used. The stats are output to a text file that also contains the history events and entities. Ideally, the stats would be dumped into a database so that I could aggregate the data. But, I don’t want to put the time into that yet (I’m too far off track as it is).
Basic history generation stats
  • Somewhat improved history generation logging. Troubleshooting history generation issues is tedious and mentally taxing. It involves pouring through dense log entries in the Unity Console. I was spending too much time on this and looked for better ways to view the log. I wanted to be able to organize the log hierarchically, reflecting the structure of the history generation entries. As a quick solution, I experimented with indentation. The results were ok, but it was a hassle to maintain in the code. I then looked at the Unity asset store. I bought an asset called Console Enhanced Pro, a replacement for the Unity console with more capabilities. It looks promising but it takes far too long to display large logs. I’m waiting to hear back from the developer on how to improve the performance. In the end, the only change I made was cleaning up log entry text. I added suggestions to some of the error messages to remind me of how to fix problems.

There are two more history generation goals I want to complete before giving history generation a brief break. The first is generating multiple events from a single event trigger. This is how I intend to handle settlements. A faction will arrive at a map section and settle in that section by building a variety of areas according to the faction’s purpose. The second is optimization. History generation currently takes up to 20 seconds. I suspect it’s due to excessive debug statements and an extremely inefficient event type selection process that has to create a history event for each event type to determine which event types are eligible.


Posted

in

by

Comments

Leave a Reply

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