currently, a technology can be unlocked by building a specific entity. This leads to problems if e.g. the unlock is by building a roboport but some mod have changed the available roboport types (and removed the default game roboport).
It should be possible to unlock a technology by building specific type of entity. E.g. by adding a "type" attribute to the EntityIDFilter and make the "name" optional if a type is present or by adding a new "BuildEntityTypeTechnologyTrigger" that matches on an entity type (not an entity name).
[2.1.17] Add type to BuildEntityTechnologyTrigger
Re: [2.1.17] Add type to BuildEntityTechnologyTrigger
This request feels too specific putting extra pressure on game itself having full set of locale for each type of entity, like if a mod would create a trigger for building "linked belt" would need a built in locale or trigger for building "loader". I am not sure we have locale for each type of entity so this would require mod itself to specify what should be put into trigger description and provide the locale... and we already have a ScriptedTechnologyTrigger which takes trigger_description, you just need to provide some tiny amount of scripting to trigger it once a roboport is built.
Because of that i am going to close this request as being too specific, causing broad class of locale to be needed and is already doable with minimal scripting using existing features.
Because of that i am going to close this request as being too specific, causing broad class of locale to be needed and is already doable with minimal scripting using existing features.
Re: [2.1.17] Add type to BuildEntityTechnologyTrigger
It took me a bit to understand how this jumped to locale. If I understand you correctly, this is because there can be "hidden" entities of a specific type and if they get built, you would need the locale to display the "technology researched" message, right?
Anyway, thanks for explaining; the script trigger might be the way to go, I will investigate this.
Anyway, thanks for explaining; the script trigger might be the way to go, I will investigate this.
Re: [2.1.17] Add type to BuildEntityTechnologyTrigger
It jumped to locale because triggers need a description and BuildEntityTechnologyTrigger does not take any LocalisedStrings while having to produce description just from what is given on the prototype. Each entity in game gets a localised string so this trigger can easily build a description, like "Build Oil refinery" (using `technology-trigger.build-entity` and `entity-name.oil-refinery`) however we have no locale for whole class of entities, and it would be too ambiguous when used. If a technology trigger would say "Build Furnace", which furnace would be relevant, and why would such trigger trip when building a recycler.

