Composition Encoding
Posted: Mon Mar 19, 2018 8:19 pm
I did not want to create a forum account at first however I discovered you do not receive any notifications through the mods panel so here is the repost of this link https://mods.factorio.com/mod/LogisticT ... 0009793b2d
While scouting for mods I stumbled upon this one, after reading about your encoding issue I came up with the following; Instead of bit masking.
Add a set of virtual signals for example L1 - LnMax and C1 - CnMax to represent a chain of similar types in a row, where nMax is the maximum number of sections in a pattern like: LCCCCCCLLLCCCCCLLLCCCCLLLLLLCCCCCLL. A pattern like that only needs nMax to be 9 to produce the signals C2=6, C4=5, C6=4, C8=5, L1=1, L3=3, L5=3, L7=6, L9=2.
Virtual-signal sprites could display Loco n, Cargo n, Fluid n, H-oil n, L-oil n, Petrol n, ETC n where n is the section number. The value of the signal returned to the circuit network is the total amount of that type in that section.
This will provide a somewhat more human readable interface and it means you don't have to deal with bit masking with combinators during gameplay. You can have (2^31)-1 entities of the same type grouped in a section and, unless factorio internals are less restricting than the circuit network, also (2^31)-1 sections if you are willing to create that many sprites per type or ignore the idea of individual sprites after a certain number. If that's not enough you can also include negative integer values to double that but it will reduce readability significantly again.
Preferably nMax should be tune-able ingame and virtual-signals generated as needed, if a sprite exists use that, otherwise a default.
If you need assistance creating images in bulk, there is a powerfull plugin for GIMP that will allow you to do bulk operations through a GUI:
https://alessandrofrancesconi.it/projects/bimp/
""With BIMP you can apply a set of manipulations to an entire group of images! It provides an easy to use interface and a lot of batch functions""
I hope this will help you a bit!
wak
While scouting for mods I stumbled upon this one, after reading about your encoding issue I came up with the following; Instead of bit masking.
Add a set of virtual signals for example L1 - LnMax and C1 - CnMax to represent a chain of similar types in a row, where nMax is the maximum number of sections in a pattern like: LCCCCCCLLLCCCCCLLLCCCCLLLLLLCCCCCLL. A pattern like that only needs nMax to be 9 to produce the signals C2=6, C4=5, C6=4, C8=5, L1=1, L3=3, L5=3, L7=6, L9=2.
Virtual-signal sprites could display Loco n, Cargo n, Fluid n, H-oil n, L-oil n, Petrol n, ETC n where n is the section number. The value of the signal returned to the circuit network is the total amount of that type in that section.
This will provide a somewhat more human readable interface and it means you don't have to deal with bit masking with combinators during gameplay. You can have (2^31)-1 entities of the same type grouped in a section and, unless factorio internals are less restricting than the circuit network, also (2^31)-1 sections if you are willing to create that many sprites per type or ignore the idea of individual sprites after a certain number. If that's not enough you can also include negative integer values to double that but it will reduce readability significantly again.
Preferably nMax should be tune-able ingame and virtual-signals generated as needed, if a sprite exists use that, otherwise a default.
If you need assistance creating images in bulk, there is a powerfull plugin for GIMP that will allow you to do bulk operations through a GUI:
https://alessandrofrancesconi.it/projects/bimp/
""With BIMP you can apply a set of manipulations to an entire group of images! It provides an easy to use interface and a lot of batch functions""
I hope this will help you a bit!
wak