Get a list of all possible SignalIDs

Place to get help with not working mods / modding interface.
Alfred0110
Burner Inserter
Burner Inserter
Posts: 7
Joined: Mon May 29, 2017 3:05 pm
Contact:

Get a list of all possible SignalIDs

Post by Alfred0110 »

I want to make a tool that can generate circuits, and for this I would like a list of all possible SignalIDs that can be on a circuit network. Currently I am doing the following: I then export this as a JSON file. This seems to get me most of the way there, but there are still some edge cases left such as "curved-rail-a", which is not removed through the above procedure. Does anyone know the exact logic the game uses to determine what can be used as a signal? Is there something in the API that I am missing that would allow me to get this data?
User avatar
<NO_NAME>
Filter Inserter
Filter Inserter
Posts: 298
Joined: Tue Aug 02, 2016 9:52 am
Contact:

Re: Get a list of all possible SignalIDs

Post by <NO_NAME> »

I'm also looking for something like that but so far I'm not aware of a better procedure that yours.

I tried to look at the prototype of "curved-rail-a" to see what may be the criteria that the game uses to decide whether it should be a signal.
There are two things that comes to mind:
- "icon" - because a signal must have an icon to be shown in the GUI. This prototype has an icon, however.
- "factoriopedia_alternative" - This is a stretch but maybe it uses as signals only the prototypes that don't have this?
Nothing else in this prototype got my attention.

Edit:
OK, here's an idea:
Maybe only the prototypes with the attribute "subgroup" are used for signals, since it's used on the list of signals?

Edit 2:
I've just noticed that the type of "curved-rail-a" is "curved-rail-a", which is not on the list SignalIDType. Are you sure your filters are correct?
I am a translator. And what did you do for Factorio?
Check out my mod "Realistic Ores" and my other mods!
Alfred0110
Burner Inserter
Burner Inserter
Posts: 7
Joined: Mon May 29, 2017 3:05 pm
Contact:

Re: Get a list of all possible SignalIDs

Post by Alfred0110 »

Thanks for your reply! I checked out some of the things you mentioned.
  • I checked out "factoriopedia_alternative", though I doubt this is it. For example, each filled barrel (e.g. "water-barrel") has this set to "barrel", but they are still all available as signals.
  • As for "subgroup", when querying for this through the API, all rail pieces including "curved-rail-a" seem to have it set to "train-transport", although I was unable to find where this is defined in the lua files.
  • As for the "type" being wrong, there are lots of items where this does not match the SignalIDType, but which are still valid signals, for example every module has type = "module". I'm not actually filtering by this currently, I'm getting the prototypes straight from LuaPrototypes.
In short, I'm still a bit stuck. One idea is to write a mod that actually tries to add each signal to a constant combinator, and seeing if the game complains. This is probably what I'll end up doing if I can't find an easier way.
Post Reply

Return to “Modding help”