Hi Longren,
Thank you for the suggestion. Being able to select Mini Trains locomotives and wagons would be useful, especially because their dimensions differ from vanilla rolling stock.
Unfortunately, this would be much larger than simply adding a few selection boxes. Railwright currently assumes vanilla-sized trains throughout its generator. For example:
function Common.train_length(settings)
return Common.total_cars(settings) * 7
end
Train placement also uses that fixed seven-tile spacing:
builder:add("locomotive", -1, 1.5 + index * 7, {
orientation = 0
})
local wagon_name = fluid and "fluid-wagon" or "cargo-wagon"
The same assumption is used when positioning inserters, loaders, belts and pumps:
local cargo_start = settings.locomotives * 7 - 3
local wagon_position = cargo_start + wagon * 7
TL;DR: This is not a small compatibility option. Supporting differently sized trains properly would require redesigning a large part of Railwright’s station-generation geometry. As the mod is still effectively in an alpha stage, my current priority is fixing major bugs and making the existing functionality reliable.
Vanilla locomotives and wagons are approximately 6×2 entities, while Mini Trains uses 2×2 locomotives and 4×2 cargo wagons. Simply replacing the entity names would therefore produce incorrectly positioned trains, inserters, pumps, belts and stackers.
Supporting this properly would require a substantial rewrite of the train-dependent geometry. Railwright would need to calculate the dimensions and position of every selected rolling-stock prototype and then use those calculated positions throughout the item-station, fluid-station and stacker generators. Capacity calculations and locomotive refuelling would also need to use the selected prototypes.
Although Railwright is publicly available on the Mod Portal, I still consider it an alpha-stage mod. It is usable, but parts of its internal architecture are still based on fixed assumptions and are being stabilised as people test it. Publishing it means people can use it and help find problems; it does not mean every planned feature or compatibility layer is already ready.
I am also not a particularly prolific coder, and Railwright is already quite a large project for me. At the moment, most of my available development time is focused on fixing significant bugs and making sure the functionality that is already present works reliably in general.
This is also why I have not yet added integrations for train-management mods such as Cybersyn, Cybersyn 2, LTN, and similar systems. These mods can require different station entities, combinators, wiring and configuration logic. Each integration adds another set of layouts and combinations that must be generated and tested correctly. I first want the existing vanilla station generators to provide a stable foundation before adding several different compatibility layers on top.
I do not want to add a selector that appears to support Mini Trains but generates broken blueprints. I would rather implement support properly if and when the underlying generator is ready for arbitrary rolling-stock sizes. I will keep the suggestion in mind, but I cannot promise it in the near future.
The source code is available on GitHub. Anyone who wants to study the code, contribute this functionality, or create their own version of the mod is welcome to do so, provided they respect the repository’s licence and preserve appropriate credit for both the original author who created the old Factorio 1.0 version and me for the current version and continued development.
Version 0.3.9, containing the fix for the second-opening crash you reported, has now been released. Thank you again for finding and clearly explaining that issue.
For now, though, I’m going to sleep. 🙂