[MOD 0.12.x] The 8L Train Project v1.2.3 (Updated '16-05-01)

Topics and discussion about specific mods
User avatar
Jackalope_Gaming
Fast Inserter
Fast Inserter
Posts: 230
Joined: Wed Oct 07, 2015 10:11 pm
Contact:

Re: [MOD 0.12.x] The 8L Train Project v1.1.0

Post by Jackalope_Gaming »

Update: I have added support for the More Locomotives mod.
Trev_lite
Inserter
Inserter
Posts: 43
Joined: Sat Mar 28, 2015 9:20 pm
Contact:

Re: [MOD 0.12.x] The 8L Train Project v1.1.0

Post by Trev_lite »

the info.json and folder name have not been updated to 1.1.0
to get it to work for now you can just rename the mod to 1.0.0
User avatar
Jackalope_Gaming
Fast Inserter
Fast Inserter
Posts: 230
Joined: Wed Oct 07, 2015 10:11 pm
Contact:

Re: [MOD 0.12.x] The 8L Train Project v1.1.0

Post by Jackalope_Gaming »

It's fixed now to be 1.1.0, and I've made a note to myself that it might not be the best thing to do two updates the same day. If I had remembered the More Locomotives mod existed before or while adding in support for the others this would be 1.0.0, but since I didn't and I want to go with the semantic versioning where the middle number is minor content updates it is now 1.1.0.
Blackraz0r
Inserter
Inserter
Posts: 49
Joined: Sun Dec 28, 2014 1:03 pm
Contact:

Re: [MOD 0.12.x] The 8L Train Project v1.1.0

Post by Blackraz0r »

This should be vanilla...
Zanthras
Manual Inserter
Manual Inserter
Posts: 1
Joined: Thu Mar 24, 2016 2:51 am
Contact:

Re: [MOD 0.12.x] The 8L Train Project v1.1.0

Post by Zanthras »

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.

copper sitting in chest not loading

4th car placed, copper loads
blackjackblk
Manual Inserter
Manual Inserter
Posts: 1
Joined: Thu Mar 24, 2016 3:24 am
Contact:

Re: [MOD 0.12.x] The 8L Train Project v1.1.0

Post by blackjackblk »

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.
User avatar
Jackalope_Gaming
Fast Inserter
Fast Inserter
Posts: 230
Joined: Wed Oct 07, 2015 10:11 pm
Contact:

Re: [MOD 0.12.x] The 8L Train Project v1.1.0

Post by Jackalope_Gaming »

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.
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.

It looks like it's a problem when the wagon ends on a whole number tile so to speak. Since that's the entire point of this mod, I don't know if it's possible for me to change it.

It might have been a change in .27 that caused this to be more pronounced. See viewtopic.php?f=3&t=21789 and viewtopic.php?t=19604.
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.
I have fixed that here on the forums and on GitHub.
User avatar
Jackalope_Gaming
Fast Inserter
Fast Inserter
Posts: 230
Joined: Wed Oct 07, 2015 10:11 pm
Contact:

Re: [MOD 0.12.x] The 8L Train Project v1.1.0

Post by Jackalope_Gaming »

Good news everyon! In the latest Friday Facts the devs wrote this:

These are to be finished:
...
* Redo of the train graphics and fixing the train distances, so they are whole tiles and vertical and horizontal distances are the same.


This will make my mod obsolete, which was actually one of my goals since the hope was the devs would make the trains be full tile lengths in the base game. Not only that, I didn't even dream that they'd decide to revisit their previous design choices about vertical train length being equal to horizontal train length. Wube Software, you guys are awesome!
User avatar
Jackalope_Gaming
Fast Inserter
Fast Inserter
Posts: 230
Joined: Wed Oct 07, 2015 10:11 pm
Contact:

Re: [MOD 0.12.x] The 8L Train Project v1.1.0

Post by Jackalope_Gaming »

I have updated the mod to 1.2.0. The programming has once again been revamped, and support for Color Coding has been added.

This is likely to be the final version for this mod due to not finding other train mods I can support and the upcoming 0.13 train fixes in the official Factorio release that will incorporate the effects of my mod.
Meppi
Inserter
Inserter
Posts: 29
Joined: Thu Apr 07, 2016 2:57 pm
Contact:

Re: [MOD 0.12.x] The 8L Train Project v1.2.0 (Updated '16-03-26)

Post by Meppi »

Hey, i noticed the position of the cargo wagons is still a little off. I found out it is due to the position where the train stops at the station,
which is with a distance of 0.5 between the frontal joint and the center of the station.

If you change joint_distance to 5 and connection_distance to 3, on both locomotive and wagon, the wagons line up with the grid perfectly.
(connection_distance on the locomotive doesn't seem to do anything though)
You then also have to increase the collision_box to (-2.7 , 2.7) to fit the joints inside.


Here is the changed entities.lua:

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
User avatar
Jackalope_Gaming
Fast Inserter
Fast Inserter
Posts: 230
Joined: Wed Oct 07, 2015 10:11 pm
Contact:

Re: [MOD 0.12.x] The 8L Train Project v1.2.0 (Updated '16-03-26)

Post by Jackalope_Gaming »

I was wondering about that interaction at viewtopic.php?f=25&t=20670. I'm glad to see there is more information known now. Meppi, I will add your changes. Thanks!

Alas, this still doesn't fix the issue of inserters not being able to input on the last tile of a wagon if there's no locomotive or wagon behind it. I'll put in a formal bug report on that.
Meppi
Inserter
Inserter
Posts: 29
Joined: Thu Apr 07, 2016 2:57 pm
Contact:

Re: [MOD 0.12.x] The 8L Train Project v1.2.1 (Updated '16-04-08)

Post by Meppi »

You're right, i haven't noticed the problem with the inserters before.
Increasing joint_distance on the locomotive by 0.1 fixes this.
It moves all the wagons back by a constant offset, while the wagons still stay length 8.
I ajusted pictures.shift on the wagons to compensate for it.

entities.lua:

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
User avatar
Jackalope_Gaming
Fast Inserter
Fast Inserter
Posts: 230
Joined: Wed Oct 07, 2015 10:11 pm
Contact:

Re: [MOD 0.12.x] The 8L Train Project v1.2.1 (Updated '16-04-08)

Post by Jackalope_Gaming »

The problem with adding that extra joint distance is it then makes locomotives 8.1 tiles long. This means trains with several locomotives at the start might need to have different station setups. Granted, I don't expect anyone to seriously use 4 or more locomotives in front, but I won't be changing the exact 8.0 length.

Of note is the inserter problem also happens in the base game if the cargo wagon ends on a whole tile. The shortest setup that causes this is 3 locomotives and 1 cargo wagon, and then 2 locomotives and 4 cargo wagons. More likely to happen is the 2-4 scenario.

It is a bug in the base game and should be addressed as such.
Meppi
Inserter
Inserter
Posts: 29
Joined: Thu Apr 07, 2016 2:57 pm
Contact:

Re: [MOD 0.12.x] The 8L Train Project v1.2.1 (Updated '16-04-08)

Post by Meppi »

Sorry, I didn't think this through. It should be connection_distance = 2.9 and joint_distance = 5.1 on the locomotive to keep it 8 tiles long and only move the wagons back by 0.1 tiles.
Anyway, this is just a workaround and the defs should take a look at that bug, since it might even carry over to their implementation in 1.13.
Arumba
Long Handed Inserter
Long Handed Inserter
Posts: 62
Joined: Sat Aug 29, 2015 6:46 pm
Contact:

Re: [MOD 0.12.x] The 8L Train Project v1.2.1 (Updated '16-04-08)

Post by Arumba »

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

I deleted this mod, downloaded v1.2.1 and put it in the mod folder like normal, but now the trains are all normal length. When I hover over any cargo wagons in the game it doesn't show that they are being affected by any mods, it just looks like a vanilla unmodded wagon. Going back to the previous version updates my trains to the *nearly* correct length, albeit without being able to use the last inserter on the last wagon for loading a train (oddly though you can still *unload* the last train with the last inserter).

Why is it that the newer version of the mod isn't doing anything?

Seeing that last inserter not work is driving me insane.

Please help.
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.12.x] The 8L Train Project v1.2.1 (Updated '16-04-08)

Post by Choumiko »

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
That's strange.. the changes don't look like it should break anything at all.
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?
Meppi
Inserter
Inserter
Posts: 29
Joined: Thu Apr 07, 2016 2:57 pm
Contact:

Re: [MOD 0.12.x] The 8L Train Project v1.2.1 (Updated '16-04-08)

Post by Meppi »

Hi Arumba,
the mod is working for me and it shows up in the tooltip as base->8L-Train-Project.
I'm using it together with FARL 0.5.20 and RailTanker 1.1.3.

However, activating the mod does not update the existing trains correctly. It can even cause the collision boxes to clip into each other, getting them stuck.
You'd have to pick up the existing trains and put them back down. Crafting new ones is not necessary though.

I managed to make the last inserters work by moving the cargo wagons back a bit, as I mentioned in my last posts.
That change is not in v1.2.1.
Here is my ajusted v1.2.1 entitities.lua:

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
Arumba
Long Handed Inserter
Long Handed Inserter
Posts: 62
Joined: Sat Aug 29, 2015 6:46 pm
Contact:

Re: [MOD 0.12.x] The 8L Train Project v1.2.1 (Updated '16-04-08)

Post by Arumba »

Choumiko wrote:
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
That's strange.. the changes don't look like it should break anything at all.
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?

Ahh! Got it thank you, I had RailTanker 1.1.2 installed. Now I have to replace all of my damn trains though. Thank you!
User avatar
Jackalope_Gaming
Fast Inserter
Fast Inserter
Posts: 230
Joined: Wed Oct 07, 2015 10:11 pm
Contact:

Re: [MOD 0.12.x] The 8L Train Project v1.2.1 (Updated '16-04-09)

Post by Jackalope_Gaming »

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.
Arumba
Long Handed Inserter
Long Handed Inserter
Posts: 62
Joined: Sat Aug 29, 2015 6:46 pm
Contact:

Re: [MOD 0.12.x] The 8L Train Project v1.2.1 (Updated '16-04-09)

Post by Arumba »

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.
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!

Of course all of this might not be necessary if they would just give us the "Loader" already. I can't believe how slow 0.13 is to be released compared to their normal speed.
Post Reply

Return to “Mods”