Factsim - A Factorio combinator simulator

Enhance Your Overall Game-Play.
Mod-Database, Calculators, Cheatsheets, Multiplayer, Scripts, Libs and Other Useful Stuff.

Factsim - A Factorio combinator simulator

Postby cid0rz » Tue May 02, 2017 6:05 pm

Hello guys. I was just wiring too much in Factorio ^^, after doing my train delivery system and testing it under many circumstances i wanted to improve it in some ways. The problem is developing complex systems in Factorio directly has some inconveniences. So as I have some basic skills in python programming I came up (yes, i know) with the crazy idea of doing a simulator where you can test the circuits and debug your systems. So Then I started to work, reading, thinking etc. I came across really nice information. I was able to decode a blueprint string with the old format (I'm struggling with the new one still) and then i found a library for creating flowcharts (pyDrawing) that was old but looked good. Then I came here for the blueprint string code after asking DaveMc. I saw some things I didn't know about, I was not aware of this subforum, I should have checked before ^^.

Now that the intro is done, what do you think about the idea? This would be my first open source project so be patient with me :roll: but I was just watching if it was possible and playing with the idea. I think It won't be easy but it can be fun, I'd like to learn better programming so that's what I was doing this for originally. In the pyDrawing library there is an example editor program that I'm using as base. I changed the left toolbar and customized the created entities (just the text for now) and here you can see an screenshot:

old image
Capture.JPG
Capture.JPG (253.7 KiB) Viewed 1423 times


So for now none of the behavior (that has been extended in 0.15) has been implemented. In fact now I was planning to change the connections since the library has some way of connecting entitites and keeping them connected but not enough control to implement green and red wire and signal transfer etc. The idea is to once drawn or imported, the circuit can be run tick by tick, getting the output in certain points. I don't know how far will I be able to go with my poor skills but it would be nice to have something flexible and easy to use. A configuration window for the entitites is needed and maybe also a new entity, called network or circuit to store and propagate the signals.

If you have comments, suggestions, if you want to help or even to lead this project, you are welcomed as long as I can bother you a bit xD. For now as I say alsoo one of may main concerns is not being able to decode the blueprints. I'm trying since the error says incorrect padding for the base64 encoding to pad it but doesn't work.
cid0rz
Inserter
Inserter
 
Posts: 48
Joined: Sun Jul 31, 2016 5:52 pm

Re: Factsim - A Factorio combinator simulator

Postby cid0rz » Mon May 29, 2017 7:13 pm

Hello all, after trying a bit I spent too much time learning stuff about GUI's and at some point I got a bit bored since it was not my main objective for this project. Also using a library that is not mantained or updated is not a good idea. I found some bugs on the library and i didn't finally liked how it all worked. Also I'm quite noob programmer as stated so I decided to star programming the simulator and just make like a command line old style program :shock: My plan is to ddevelop a bit the interface just by pure scripting and printing or with some tool like urwid or a command line suite.

For now I've tested it with simple circuits and there is a lot I have to test with special cases.

first one is a simple clock a constant combinator outputting 1 signal A and a decider looped that will output A<20

blueprint 0.15version
Code: Select all
0eNqVU9tqwzAM/Rc9OyMJbaFmL/uOUUIuaidI7ODIpaH43ycnXSm97yUgWTrnSEc5QtV67B0ZBn0Eqq0ZQH8fYaCdKduY47FH0ECMHSgwZRejBmtq0CW17SoyJVsHQQGZBg+gs6BeAkQiLg3fR8jDRgEaJiac9UzBWBjfVeiE4pkSBb0dpNWaSC9wqYIRdJJ+LIVCmNnZtqjwp9yTlEvNCaSQt2ZqHGJ2S27g4maQPTn2kjlLmCuSL5jRp7lkhjRGXV+6SZSGT+mwnnv/f8x+FGnecLF1tivICAZodh7DTGmwPqvO4sdhc7k2ak473TlEc/0iy6zJ1Z74r1BQ8wjzTnkm5SE6fmVR/tTrG4+SbDIpe+DQllpG9+A2X2zPRzuyi/PcvL+1u8PKIqdr1hd/j4K96JvmWS0W+TJdr/PVIoRfDbAoEw==



second one is sort of a special switch that stores negative values from a constant combinator but only one tick and untill you turn off the constant combinator the cell will be blocked. I added the upmost decider to make a backwards counter :mrgreen:

images
20170529210608_1.jpg
20170529210608_1.jpg (558.09 KiB) Viewed 1165 times
20170529210549_1.jpg
20170529210549_1.jpg (592.96 KiB) Viewed 1165 times


blueprint 0.15version
Code: Select all
0eNq9V9uOmzAQ/Rc/VlDZQFZa1P7DvlcrRGCSjAQGGRMVRfx7x3ib5rKhDGr6EsV4bj7nzBhOYlv10BrUVqQngUWjO5H+OIkO9zqv3DM7tCBSgRZqEQid125VQoElmLBo6i3q3DZGjIFAXcJPkarxPRCgLVoEH21aDJnu6y0YMpiLE4i26ci10S47hQvl100gBvoTUY4SDRR+NwoE1WtNU2VbOORHJG9y+YiZ0V45xenc0x2azmZ3xzqisT09OVfkLULIi4M7kgPE5g4d6RZ1m5upylR8I5+mt22/Kmo7UH29ttnONHWGmsKIdJdXHYw+q/annGpX7mdvAPQlmlh6CNAUPVq/HN/JO3LmBsq/GBNNIyW7YydayY66Zuflv7ITqufTY03/kJ1P4Fa33ARX2/EddQGX4yXm6iatmt9OlmkkPkOXG7SHGiwWszKRk0ZIK+PnsvgT5t8oowMXZrnfm3NqWiD5TEWLL6v1w5DI5iHpyRMaO+E1trqg7KKvk2f29RHMYA+o9/Oz9/sKct7WDl4Wb8xmjZcxtzkf5jcmS6iLHvTaDisLZtE9T3hRT4SNAY9e72etvL7rsctcbo/iYhDjFZOIklmsPt4qbk8d+XsoHi/RKgxYV/xD84hnrljmkmXNi80rfCkqigei4oGoeCAqFoiKBaJigag4IEoWhpIFoWQhKDkASg5+kgOf5KDHUyBPgDz9seTHUh9LfDPac8PXDez04jsuEHSLdv4dPEmijXx9jV6ScfwFxRyoJg==


You can find the outputs as .txt attached. You'll need notepad++ or similar to be able to see until tick 30. Notepad cuts it at 19 or so.

I'm very happy so far to have something that at least works xD. My idea is to put it on github soon :D
Attachments
outputswitch.txt
(22.72 KiB) Downloaded 31 times
outputclock.txt
(10.05 KiB) Downloaded 27 times
cid0rz
Inserter
Inserter
 
Posts: 48
Joined: Sun Jul 31, 2016 5:52 pm

Re: Factsim - A Factorio combinator simulator

Postby cid0rz » Wed Jul 19, 2017 7:22 pm

So here is the github link that the factsimguru gave me:

https://github.com/Factsimguru/Factsim
cid0rz
Inserter
Inserter
 
Posts: 48
Joined: Sun Jul 31, 2016 5:52 pm


Return to Tools

Who is online

Users browsing this forum: No registered users and 1 guest