Build Express deprecated


Build stuff with trains and spider-infested trains.

Utilities
1 year, 1 month ago
1.1
20
Logistics Trains Logistic network Blueprints
Owner:
GAGAMURAGAMIR
Source:
https://github.com/Nowow/build-express
Homepage:
N/A
License:
MIT
Created:
1 year, 1 month ago
Latest Version:
0.0.2 (1 year, 1 month ago)
Factorio version:
1.1
Downloaded by:
20 users

ATTENTION!!!!!

Delisted until further improvments, playtesting reveals a lot of bugs
mod is WIP and largely untested in a real playthrough, it may (and probably will) cause crashes - that means all unsaved progress will be lost. Use with caution
Any suggestions on improvements and contributions are welcome, particularly on the GUI part
Currently logging and debug visuals drawn on map are turned on, later will add a setting option


This mod is a system of train-assisted execution of construction tasks (placed blueprints, deconstructions etc). Best suited for building a megabase with continuous rail grid. Frees player from having to rely on a single construction network covering whole base or having to walk around yourself.

Rationale

rambling (how do i do markdown spoilers???)

I like playing my Factorio, and the way I like it is building an ever-expanding megabase to capture as much land as possible, all while myself doing as little as possible (automation, right?). Usually I approached this task by creating a single giant logistic network, where poor little construction robots were carrying out all construction themselves. At large base scales the sight of flocks of thousands of robots flying across the map to build a new tile looks pitiful to say the least. And not to mention that it is not ideal ups-wise.
I tried looking for an altrenative and came across Constructron(-continued). I was really looking forward to relegating all construction work in my megabase to a fleet of those guys, but quickly realised that even at current scale base game spidertrons are just too slow moving (slower even than robots) and I didnt have a great time with how mods cogs moved internally, particluarly with job batching - constructrons were mostly busy strolling across the base for 5 minutes to lag around deconsturcting a single tree. I dont know what were the reasons for this behaviour, Im guessing that was due to very high UPS loads already present, I was running at around 30.
If only I could have a spider catch a ride in a train, that would make it much more viable and also very neat - I thought. So I decided to have a go at it myself


Code reuse and dependencies disclosure

  • First and foremost this mod was inspired by Consturctron by Apollo314 and its successor Constructron-Continued by ILLISIS. I dont think I ended up using any code from those mods, though I definitely studied them and learned a ton, particularly about pathing. Should be compatible with Build Express
  • Construction Train by SyncViews - I completely rely on it for a worker type, Construction Train. It just works and Im loving it
  • Ghost On Water by KeinNIemand to deal with The Water Problem. I considered using this mod as a depedency, but was unable to do it without having to add things to it, so I just made an internal minimalistic port. I am very grateful that this mod exists and I didnt have to work out a solution myself from scratch. Should be compatible with Build Express, but didnt test

Thesaurus

  • Task, or construction task - a single instance of what Build Express would oversee. Each time you place a blueprint or select things with deconstruction planner (after pressing a hotkey signalling Build Express that you are ready to create a task) you create a new task
  • Depot - a new train stop, Build Express searches workers among trains parked at them
  • Worker - a train that Build Express commands around, the main workhorse. Can be of two types - Consturction Train or Express Construction Unit. Why call them so? IDK

Features

  • Currently supports only blueprints and deconstruction planners, upgrade planners are planned (lol)

Set up a Build Express depot (new train stop entity, though right now visually identical to regular train stop), pick up a blueprint, press a hotkey and place a blueprint - Build Express would choose a worker (parked trains) across depos meeting requirements to do the build, dispath it and oversee the construction process. Mod comes with two types of workers (each requires a technology) - I call them Construction Train and Express Construction Unit.

  1. Construction Train - it is simply a train that has a carriage with personal roboports in equipment grid.
  2. Express Construction Unit - a train with a special Spider Carrier wagon (new entity). It parks somewhere near to the construction site (parking spot search area is adjustable in mod's settings), spawns a spidertron loaded with goodies enough for the build that does the job on its own.
  • Can place blueprints on water - i did a copycat of Ghost On Water by KeinNIemand, more on that in a dedicated section
  • Has a minimalistic GUI where you can track consturction task status

How it works

After you create a task, Build Express calculates its construiction area (a rectangle on the map), divides it into subtasks. Subtasks are smaller quadrants that could be covered by the worker's construction area from any spot on said rectangle + some offset. Build Express navigates worker to each subtask subsequently until all of them are completed, and then terminates the task and sends worker back to depot.


How to use

  • Research tech
  • Set up a Build Express depot - a new kind of train stop. Train stop name is irrelevant
  • Park a train at it. Train should meet requirements of a task type (more on it below) and have enough resources to actually complete task. That includes landfill cost that is calculated after you place the blueprint. ATTENTION - currently it is required that worker has 2x the resources, because if your task are adjacent you may end up in a situation when your worker spends his cargo on a neighbouring task, thus unable to complete its own. This cost modifier is adjustable in settings
  • Pick up a blueprint/deconstruction planner - it should be in your cursor.
  • Press a hotkey to activate Build Express and tell it which worker type you want - "ALT + Left Mouse Button" for Express Construction Unit or "ALT + Right Mouse Button" for Construction Train
  • Place your blueprint/select area with deconstruction planner

After that, a train meeting requirements should automatically dispatch and do the construction on its own, and then come back to depot.


Worker types and requirments

Constuction Train

This type of worker is dependent on the Construction Train mod. I will probably get around to writing my own replacement, but for now I find it very suitable for the task
A train is considered a Constuction Train if its SECOND carriage is a Construction Wagon from the aforementioned mod, and this wagon should have construction area - means it should have personal roboports in its grid, otherwise it will not be able to build anything.

Express Construction Unit

A train is considered a Express Construction Unit if it has at least one Spider Carrier wagon - a new entity with only one inventory slot, where you should put a Spidertron. Spidertron should have a construction area - means it has roboports in its grid, otherwise it will not be able to build anything.