Goldsword44's JunkRails


Adds weak tier 0 trains with much lower tech requirements, but more limits. Graphics by kaueNP and d3x0r!

Content
6 years ago
0.13 - 0.16
8
Trains

b Just a few issues I noticed

7 years ago
  1. Rails are called "Curved Scrap Rail", even though they function as straight rails (and of course, curve with the rail planner)
  2. Recipe for Junk Trains has no icon.
  3. Recipe for Portable Chest has no icon
7 years ago

since the mod and its graphics look nice, i finally looked at the files in the mod. I am no lua/factorio programmer, but i noticed that the icons pointed to wrong pictures, eg "JunkTrain/graphics/train.png" is a big picture and no icon, and "JunkTrain/graphics/cargo-wagon.png" is the spritesheet of wagons.
i have no idea why it still showed no icons after i replaced those two filenames with the correct names of existing files (locomotive-icon-to-use-in-mod.png and icon06.png), or even the default for diesel engines (copied from vanilla prototypes).

but at least i could solve the other BIG problem of these trains and wagons not being compatible with all other trains and wagons: the connection/joint points on locomotives and wagons were reduced from 4 and 3 (total length of 7 tiles) to 3.4 and 3.2 (total length of 6.6) for locomotive and 3.4 and 3.4 (total 6.8) for wagons. by just copying the original values for those two (and also the collision_box, the selection_box and the vertical_selection_shift) from the original vanilla prototype, they now seem to be compatible to other trains, with standard length of 7. it's only some small change in the mod, please update it !!!

unzip the mod and edit prototypes/entity.lua
when done you don't even need to zip it again, or to remove the original zip file.
i only just noticed that factorio will prefer the unzipped version when both (directory and zip) are in the mods directory

for the locomotive, replace these lines:
connection_distance = 3, -- old incompatible value = 3.4
joint_distance = 4, -- old incompatible value = 3.2
collision_box = {{-0.6, -2.6}, {0.6, 2.6}},
selection_box = {{-1, -3}, {1, 3}},
vertical_selection_shift = -0.5, -- working identical value

for the wagon, replace these lines:
connection_distance = 3, -- old incompatible value = 3.4
joint_distance = 4, -- old incompatible value = 3.4
collision_box = {{-0.6, -2.4}, {0.6, 2.4}},
selection_box = {{-1, -2.703125}, {1, 3.296875}},
vertical_selection_shift = -0.796875,

there still might be glitches like wheels 1 pixel next to the rails, but the trains length will be correct and thus be usable together with vanilla trains and trains from other mods.

New response