Configuration System

In order to easily configure and balance the game's buildings, we had to implement some kind of offline configuration system that allowed us to tweak values without the need of rebuilding the game. To achieve this we built a config loader system that was adaptable to different scenarios like loading npc sounds, animations and prefabs or loading building data, including positioning of different tiles, entrances and production or consumption rates.

A config pool with several pool loaders was implemented. It is used to load data from config files into objects like "BuildingData", "ProductData" or "NPCData". In the case of "BuildingData" objects, the one example config entry looks something like seen in the screenshot.

Each objects has its unique identifier and a type id. The type id is used to categorize the building and employ the right internal functionality like production buildings, or decoration buildings for example. Additionally a couple of prefabs are defined that serve as variations in order to not have repeating models when the same building is placed multiple times in close proximity. A display name, onClick sound menu category are also set here. In the case of residential buildings, the "products" entry defines which products the building needs in order to upgrade. On production buildings, these define which products the building produces. The according products are found in a different configuration file. "PlacementCost", "PerWorkerWage" and "requiredWorker" are balancing fields that can be used to adjust the game's difficulty. The "LandValueModifier" is used to calculate the landvalue falloff from the center tile the building is placed on. Finally the shape defines npc access points with "2", occupied tiles with "1" and empty tiles with "0".

Files 148 MB
May 26, 2022

Get Tennō