inheriting from and unlocking with technology
Posted: Thu Oct 03, 2019 8:28 am
A detail pertaining to same-tier things or technology that descends from another. Currently, technology is explicitly named as following another. This breaks with internal technology name changes or mods that change names, unlocks, etc. Instead, a technology or recipe could specify it unlocks alongside another entity/etc, or descends from the technology containing that specific thing. This would simplify a lot of mod migrations, and could be used by the dev team to ease their own programming.
A recent example is how nuclear was split into different researches. If someone made nuclear shotgun ammo, it may have previously been after reactor technology, since that unlocked centrifuges. If instead they could instead specify descends-from-entity-name = "centrifuge" then the mod wouldn't have to change anything as the version updated. Another example is some mods change weapons, and remove the vanilla firearms. A mod I was playing still included recipes which couldn't happen because obviously that item didn't exist anymore. The attributes could also be used to prune technology or recipes that requires items that don't exist, and it would likely be relevant to separate an option for completely removing the tech path, versus only removing the recipe.
An exception would have to be made for multiple recipes that contain the same item, such as the passive provider. To make it at least predictable, the mechanic could require that all technologies including it be prerequisites. Implementation-wise, while searching for technology, build a list of all researches that contain the required thing, and bake it into the master tech list. A little more complicated than the 1:1 that probably exists now, but only a very basic algorithm.
A recent example is how nuclear was split into different researches. If someone made nuclear shotgun ammo, it may have previously been after reactor technology, since that unlocked centrifuges. If instead they could instead specify descends-from-entity-name = "centrifuge" then the mod wouldn't have to change anything as the version updated. Another example is some mods change weapons, and remove the vanilla firearms. A mod I was playing still included recipes which couldn't happen because obviously that item didn't exist anymore. The attributes could also be used to prune technology or recipes that requires items that don't exist, and it would likely be relevant to separate an option for completely removing the tech path, versus only removing the recipe.
An exception would have to be made for multiple recipes that contain the same item, such as the passive provider. To make it at least predictable, the mechanic could require that all technologies including it be prerequisites. Implementation-wise, while searching for technology, build a list of all researches that contain the required thing, and bake it into the master tech list. A little more complicated than the 1:1 that probably exists now, but only a very basic algorithm.