Train Station Blueprint Creator
ABANDONED: This mod is no longer in development and I've stopped updating it.
Instead, I have made a web version of the mod which is available here.
The source code for the web version can be found here.
A small mod to save your time by creating a train station for your needs. It will create a train station trains based on several settings:
- Train length (double or single headed trains) up to 1000 cargo wagons (L-C or L-C-L train types)
- Load / unload station (for liquids and non-liquids)
- Variable inserter- / belt- / chest-types (use logistic chests for bot loading/unloading)
- Chest limiting
- Use of filter inserters (only one resource type per train station)
- Automatic lamps, poles and signal placement
- Requester chests for fuel near locomotives with choice of fuel type (in vanilla, uranium fuel cell doesn't work though)
- MadZuri's smart evenly chest loading/unloading (read the ingame tooltip)
- Connect all chests / storage tanks with green wire
- Beltflow towards the front or back of the station
- Choice if you want to only use one side of the train station or both
- Stackers (variable train length, variable stacker lanes count, 4 layouts + rotation)
How to use (there are tooltips on the GUI):
The mod menu button will show up as soon as you researched "Construction Robots".
Click the buttons, the checkboxes and insert the number of locomotives / cargo wagons your train has. Pick up an empty blueprint into your mouse cursor and click "CREATE BLUEPRINT". Now, the blueprint in your cursor has the new train station layout.
I recommend this mod to be used together with belt balancers:
http://imgur.com/a/oaTnf
http://i.imgur.com/HbyImUo.png
http://i.imgur.com/vQeo63x.png
http://imgur.com/n4zxyMr
Please help me by reporting bugs / crashes / desyncs (multiplayer), as I have tried to fix every bug I could find.
You can also request features, and if that is in my power, I will attempt to implement it. Please bear in mind that said feature should be able to scale with station size / train length.
Requested features:
(IMPLEMENTED) Instead of clicking through item types, use a "chooser" menu from which you can choose any item type (like in the normal build menu)
-Change main menu button to a smaller image button (changed it to a "B" now to make it smaller; no idea how to implement an image instead of text)
TODO list:
-Fix the "200 local variables used" issue
-Change the design when using "stack inserters" and "blue belts" and "one side" to this one, although this would take up more space ... however, at the moment 6 stack inserters for 1 belt is overkill by 50%: https://www.reddit.com/r/factorio/comments/6d2qgs/compact_3_compressed_blue_belts_train_unloader/
-Adding sequential train stations: e.g. 5 stations in a row while disabling the next station until the previous station is either full or busy (see here: https://www.reddit.com/r/factorio/comments/67xuyq/apologies_if_im_late_the_new_train_stop_interface/ )
-Add more layouts (message me your design ideas / screenshots!)
Low priority:
-Add compatibility to other mods (like for mods that add chests, inserters, belts; mod support for "loader" mod doesn't make much sense to me, sorry!)
-Add better multiplayer compatibility (so far no issues have been reported and in my alpha test it worked fine)
-Add support for other languages
Version history:
Since factorio v0.17 is out and I haven't intensively tested the mod for bugs introduced by v0.17, feel free to report bugs!
v0.1.6 Bumped version to make it compatible with Factorio 0.18
v0.1.5 Added a formatted changelog.txt made by Pi-C
v0.1.4 Edited info.json to make it compatible for factorio v 0.17 (Thanks to smoopmeister)
v0.1.3 Changed Uranium Fuel Cells to Nuclear Fuel when requesting fuel, bug reported by thitar
Added logistic buffer chest to the list of available chests
v0.1.2 Edited the info.json to make it compatible for factorio v 0.16
v0.1.1: Added a prevention mechanic from factorio crashing if the user enters invalid entries in the textboxes.
v0.1.0: Added loading and unloading stations for liquids with a liquid station design that I find compact and "fast" when loading/unloading. Only left or right side is allowed here because I found using "both" sides only decreases loading/unloading time by 33% while it is already very fast when using 2 pumps per wagon.
Added a "stacker" so that you can build stackers for variable train length much faster now. Have tested it for trains of length 1-5 with each rotation; so there can still be hidden bugs but I doubt it. The signals are placed exactly so that trains will fit in the space between signals. For now, the blueprint center is focused around the front end of the stacker. I might add an option of centering the blueprint to the rear of the stacker, or in the middle of it. Limit for stackers is train_length * lanes < 16384 (higher values result in 0.1 ingame fps)
The option "green wire connection" now connects chests / storage tanks with the train stop (but the train stop will have no circuit condition set, for now). This way you can instantly set conditions to the train stop to "only be enabled when X amount of items is in chest / storage tank". Also, using "both" sides with chests now connects the left and right side with a wire.
Changed default values of some settings: fuel requester chests=on, fuel type=solid fuel normal chest limit=7 (cargo wagon has 40 slots, if you use one-side loading you have 42 chest slots, so inserters will only pick up enough items in the chest to fill one cargo wagon), inserter type=fast inserter, belt type=fast belts, chest type=iron chest, connect everything with green wire=on, use filter inserter=off
Fixed an issue when using "loading" together with belt direction: "back"
v0.0.9: Fixed a bug when using a single side together with "connect with green wires" option as reported by Joey2241 and emre
v0.0.8: Features added: players can choose if they only want to use one side of the train station (left/right/both), fuel can now be selected for the refuel requester chest, smart loading/unloading now works when no item was chosen (next to "use filter inserters?"), the main mod button was made smaller, tooltips were changed and rewritten
v0.0.7: Fixed an issue introduced by v0.15 that didn't allow chest limit to be put to negative numbers (thanks to Nikey646 for pointing that out)
v0.0.6: Made mod compatible with v0.15, the technology requirements for the button to show up changed to: when thechnology "construction robots" is researched
v0.0.5: Fixed missing pole and signal when using single headed trains; Added features: filtered item can now be set to any item (mods with new items included) - click the button with empty mouse cursor to remove filter (useful for when using requester chests and want to request several different items); new checkbox to link all chests with green wire (so you can easily check the circuit-network for item count)
v0.0.4: Fixed a bug with the refuel-requester chests, fixed a tooltip
v0.0.3: Fixed the evenly train (un-)loader (removed the 2nd arithmetic combinator; a variable was spelled wrong, the output of the first arithmetic combinator was missing). Increased chest-imbalance tolerance for the inserters (so that they keep working when inserter capacity bonus +x is researched).
v0.0.2: Optimized code, added MadZuri's evenly train (un-)loader circuit network
v0.0.1: First working version