Re: [MOD 0.12.x] The 8L Train Project v1.1.0
Posted: Sat Mar 19, 2016 10:36 pm
Update: I have added support for the More Locomotives mod.
www.factorio.com
https://forums.factorio.com/
This is a problem with the base game too. To test this in the base game set down one locomotive, then seven cargo wagons. The seventh one can't load at the end unless there's a wagon behind it.Zanthras wrote:Doesnt quite work right in .29 it seems. The third cargo wagon wont start loading from its last spot until a 4th wagon is added.
I have fixed that here on the forums and on GitHub.blackjackblk wrote:FYI, the current zipped folder includes a '-' before the version when it should be a '_'. This causes factorio to complain that the mod is not the expected version.
Code: Select all
supported_wagons = {
-- base game
"cargo-wagon",
-- Rail Tanker
"rail-tanker",
-- Bob's mods
"cargo-wagon-2",
"cargo-wagon-3",
"armoured-cargo-wagon",
}
supported_locos = {
-- base game
"diesel-locomotive",
-- FARL
"farl",
-- Bob's mods
"diesel-locomotive-2",
"diesel-locomotive-3",
"armoured-diesel-locomotive",
-- More Locomotives
"cargo-locomotive",
"hs-locomotive",
-- Color-coding colored locos
"diesel-locomotive-red",
"diesel-locomotive-orange",
"diesel-locomotive-yellow",
"diesel-locomotive-green",
"diesel-locomotive-cyan",
"diesel-locomotive-blue",
"diesel-locomotive-purple",
"diesel-locomotive-magenta",
"diesel-locomotive-white",
"diesel-locomotive-black",
}
-- reconfigure all supported cargo wagons for 8L size
for i,name in ipairs(supported_wagons) do
if data.raw["cargo-wagon"][name] then
data.raw["cargo-wagon"][name].collision_box = {{-0.6, -2.7}, {0.6, 2.7}}
data.raw["cargo-wagon"][name].selection_box = {{-1, -4.5}, {1, 3}}
data.raw["cargo-wagon"][name].connection_distance = 3
data.raw["cargo-wagon"][name].joint_distance = 5
data.raw["cargo-wagon"][name].pictures.scale = 1.09
data.raw["cargo-wagon"][name].pictures.shift = {0.79, -0.55}
if name == "rail-tanker" then
-- picture scale and shift need to be overridden with these values for rail tanker
data.raw["cargo-wagon"][name].pictures.scale = 1.08
data.raw["cargo-wagon"][name].pictures.shift = {2.05, -0.60}
end
end
end
-- reconfigure all supported locos for 8L size
for i,name in ipairs(supported_locos) do
if data.raw["locomotive"][name] then
data.raw["locomotive"][name].collision_box = {{-0.6, -2.7}, {0.6, 2.7}}
data.raw["locomotive"][name].selection_box = {{-1, -4.5}, {1, 3}}
data.raw["locomotive"][name].connection_distance = 3
data.raw["locomotive"][name].joint_distance = 5
data.raw["locomotive"][name].pictures.shift = {1.0, -0.5}
end
end
Code: Select all
supported_wagons = {
-- base game
"cargo-wagon",
-- Rail Tanker
"rail-tanker",
-- Bob's mods
"cargo-wagon-2",
"cargo-wagon-3",
"armoured-cargo-wagon",
}
supported_locos = {
-- base game
"diesel-locomotive",
-- FARL
"farl",
-- Bob's mods
"diesel-locomotive-2",
"diesel-locomotive-3",
"armoured-diesel-locomotive",
-- More Locomotives
"cargo-locomotive",
"hs-locomotive",
-- Color-coding colored locos
"diesel-locomotive-red",
"diesel-locomotive-orange",
"diesel-locomotive-yellow",
"diesel-locomotive-green",
"diesel-locomotive-cyan",
"diesel-locomotive-blue",
"diesel-locomotive-purple",
"diesel-locomotive-magenta",
"diesel-locomotive-white",
"diesel-locomotive-black",
}
-- reconfigure all supported cargo wagons for 8L size
for i,name in ipairs(supported_wagons) do
if data.raw["cargo-wagon"][name] then
data.raw["cargo-wagon"][name].collision_box = {{-0.6, -2.7}, {0.6, 2.7}}
data.raw["cargo-wagon"][name].selection_box = {{-1, -4.5}, {1, 3}}
data.raw["cargo-wagon"][name].connection_distance = 3
data.raw["cargo-wagon"][name].joint_distance = 5
data.raw["cargo-wagon"][name].pictures.scale = 1.09
data.raw["cargo-wagon"][name].pictures.shift = {0.76, -0.55}
if name == "rail-tanker" then
-- picture scale and shift need to be overridden with these values for rail tanker
data.raw["cargo-wagon"][name].pictures.scale = 1.08
data.raw["cargo-wagon"][name].pictures.shift = {2.05, -0.60}
end
end
end
-- reconfigure all supported locos for 8L size
for i,name in ipairs(supported_locos) do
if data.raw["locomotive"][name] then
data.raw["locomotive"][name].collision_box = {{-0.6, -2.8}, {0.6, 2.8}}
data.raw["locomotive"][name].selection_box = {{-1, -4.5}, {1, 3}}
data.raw["locomotive"][name].connection_distance = 3
data.raw["locomotive"][name].joint_distance = 5.1
data.raw["locomotive"][name].pictures.shift = {1.0, -0.5}
end
end
That's strange.. the changes don't look like it should break anything at all.Arumba wrote:Hi! I am having some issues getting the newest version of the mod to work. The last version I had that worked was Train-position-and-length-fix_0.2.0
Code: Select all
supported_wagons = {
-- base game
"cargo-wagon",
-- Rail Tanker
"rail-tanker",
-- Bob's mods
"cargo-wagon-2",
"cargo-wagon-3",
"armoured-cargo-wagon",
}
supported_locos = {
-- base game
"diesel-locomotive",
-- FARL
"farl",
-- Bob's mods
"diesel-locomotive-2",
"diesel-locomotive-3",
"armoured-diesel-locomotive",
-- More Locomotives
"cargo-locomotive",
"hs-locomotive",
-- Color-coding colored locos
"diesel-locomotive-red",
"diesel-locomotive-orange",
"diesel-locomotive-yellow",
"diesel-locomotive-green",
"diesel-locomotive-cyan",
"diesel-locomotive-blue",
"diesel-locomotive-purple",
"diesel-locomotive-magenta",
"diesel-locomotive-white",
"diesel-locomotive-black",
}
-- reconfigure all supported cargo wagons for 8L size
for i,name in ipairs(supported_wagons) do
if data.raw["cargo-wagon"][name] then
data.raw["cargo-wagon"][name].collision_box = {{-0.6, -2.7}, {0.6, 2.7}}
data.raw["cargo-wagon"][name].selection_box = {{-1, -4.5}, {1, 3}}
data.raw["cargo-wagon"][name].connection_distance = 3
data.raw["cargo-wagon"][name].joint_distance = 5
data.raw["cargo-wagon"][name].pictures.scale = 1.09
data.raw["cargo-wagon"][name].pictures.shift = {0.76, -0.55}
if name == "rail-tanker" then
-- picture scale and shift need to be overridden with these values for rail tanker
data.raw["cargo-wagon"][name].pictures.scale = 1.08
data.raw["cargo-wagon"][name].pictures.shift = {2.05, -0.60}
end
end
end
-- reconfigure all supported locos for 8L size
for i,name in ipairs(supported_locos) do
if data.raw["locomotive"][name] then
data.raw["locomotive"][name].collision_box = {{-0.6, -2.8}, {0.6, 2.8}}
data.raw["locomotive"][name].selection_box = {{-1, -4.5}, {1, 3}}
data.raw["locomotive"][name].connection_distance = 2.9
data.raw["locomotive"][name].joint_distance = 5.1
data.raw["locomotive"][name].pictures.shift = {1.0, -0.5}
end
end
Choumiko wrote:That's strange.. the changes don't look like it should break anything at all.Arumba wrote:Hi! I am having some issues getting the newest version of the mod to work. The last version I had that worked was Train-position-and-length-fix_0.2.0
Is the mod enabled if you look at mods in Factorio? If you have any of the supported mods ("? FARL >= 0.4.0", "? RailTanker >= 1.1.3", "? boblogistics >= 0.12.0", "? more-locomotives >= 0.3.0", "? color-coding >= 1.0.3"]) their version must also match, else Factorio will disable it without telling you. Did you change anything else?
I forced Steejo to start using it with me in SAR about a month ago, and I've been using it in my latest "Steam Release" campaign on YouTube. I can't play without it now. Stupid trains need to be consistent!Jackielope wrote:Yeah, the train replacement is a pain but I'm not sure how to get it to fix itself. By the way, Arumba, when did you first start using this mod?
Meppi, thank you for testing these numbers and fixing the inserter issue!
I've redone v1.2.1 so now it has included the fix for the inserter problem. Also added a notice at the top of the OP to let people know what they need to do to get the mod working with existing maps.