Content tagging
Main bit of work this week was the use of content tagging in the native plugin, and some further refactoring avalanche that succeeded that. Previously, tagging was supported on the C# side, filtering the configuration that was supplied to the native plugin. But now, I wanted a bit of extra control especially on prefab placement, so that when we're populating the contents of a particular room/area, some elements would appear under different circumstances/tags. In the beginning, I used this to have for example a bloody altar versus a non-bloody one, or an abandoned room or prison vs a regular one. After adding this support, I decided that adding for example bloody/abandoned prefab placement elements for each prefab placement configuration was just too much work, so refactoring round 2 started.
By now, the "prefab chaos storm" is clearing up a bit, and some patterns are becoming clearer. I have two systems for placing map features. Generic features (traps, encounters, fountains) use one system, whereas specific features (altar area contents, wilderness cabin area contents) use another system. Both systems support very explicit placement of things, as well as procedural. Now, realising that blood, skulls and cobwebs can be pretty generic, they moved into the "generic" system, and they are tag-oriented. This means that if a zone is tagged as "abandoned", then suitable areas (indoors environments or rooms in outdoors environments) will contain the occasional cobweb. Similarly, if a zone is tagged as "bloody" we increase the chance of blood pools or skulls. If a zone is tagged as "carnage" we increase those chances even more. So, now I can spawn an "altar area" zone and tag it with "carnage" so that the specific prefab placement system will populate it with the altar and statues and the generic system will populate it with blood and bones.
Adding this required that I take a hard look on the existing generic system that was written a while ago, so the refactoring hammer started ... hammering again, breaking and rearranging bits. And the dust slowly settles.