[MOD 0.15|0.14] Rail Tanker - Liquid transport 1.4.1

Topics and discussion about specific mods
Post Reply
dyf123
Inserter
Inserter
Posts: 37
Joined: Wed Sep 10, 2014 9:28 am
Contact:

Re: [Mod 0.11.x] Rail Tanker - Liquid transport

Post by dyf123 » Tue Jan 06, 2015 11:39 am

I hope that it can upload a copy on here because I can't link to google drive easily.

User avatar
UntouchedWagons
Long Handed Inserter
Long Handed Inserter
Posts: 60
Joined: Thu Jan 01, 2015 6:16 pm
Contact:

Re: [Mod 0.11.x] Rail Tanker - Liquid transport

Post by UntouchedWagons » Mon Jan 12, 2015 11:52 pm

Can you give the tanker more health? 1HP isn't enough. Nice mod, this should be in vanilla.

User avatar
Narc
Filter Inserter
Filter Inserter
Posts: 278
Joined: Mon Feb 11, 2013 7:25 am
Contact:

Re: Request for interface

Post by Narc » Tue Jan 13, 2015 5:24 pm

JamesOFarrell wrote:
Narc wrote:I noticed v0.0.7 restored the tiny size of the invisible tank -- problem is, I rather liked the larger one, as it made it easier to check on the tanker car's contents.
You can change this by editing prototypes\entity\entities.lua. Lines 59 and 119 need to be uncommentated and you need to comment line 60 and 118
That works for me, thank you.
JamesOFarrell wrote:
Narc wrote:Also, is there any way to force the invisible tank to align to grid? I haven't looked into Factorio modding at all, but it really should be feasible.
Nothing good comes from aligning the thing to the grid, as trains can move less than a tiles space things go funky. There are better solutions than the one I've chosen and I'll eventually change it but for the moment it works.
All right, thanks.

JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

Re: [Mod 0.11.x] Rail Tanker - Liquid transport

Post by JamesOFarrell » Fri Jan 16, 2015 9:57 pm

dyf123 wrote:I hope that it can upload a copy on here because I can't link to google drive easily.
The sprites raise the mod over the forums attachment limit, sorry.
UntouchedWagons wrote:Can you give the tanker more health? 1HP isn't enough.
The rail tanker should have 600HP. If that's not the case try using the latest version. Unless you are talking about the invisible storage tank, that has 1HP but nothing should be able to interact with it.

User avatar
UntouchedWagons
Long Handed Inserter
Long Handed Inserter
Posts: 60
Joined: Thu Jan 01, 2015 6:16 pm
Contact:

Re: [Mod 0.11.x] Rail Tanker - Liquid transport

Post by UntouchedWagons » Sat Jan 17, 2015 3:06 am

JamesOFarrell wrote:The rail tanker should have 600HP. If that's not the case try using the latest version. Unless you are talking about the invisible storage tank, that has 1HP but nothing should be able to interact with it.
Yeah well I've lost two full tanker cars from bumping into them to connect them to my train.

JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

Re: [Mod 0.11.x] Rail Tanker - Liquid transport

Post by JamesOFarrell » Sat Jan 17, 2015 3:12 am

UntouchedWagons wrote:Yeah well I've lost two full tanker cars from bumping into them to connect them to my train.
Are you using 0.0.8? If you build a new one what is its health set to?

User avatar
UntouchedWagons
Long Handed Inserter
Long Handed Inserter
Posts: 60
Joined: Thu Jan 01, 2015 6:16 pm
Contact:

Re: [Mod 0.11.x] Rail Tanker - Liquid transport

Post by UntouchedWagons » Sat Jan 17, 2015 3:43 am

Yeah I'm using 0.0.8. When I place a tanker down, the bit that holds the fluid has 1HP.

Andrea88
Inserter
Inserter
Posts: 30
Joined: Mon Mar 04, 2013 6:15 pm
Contact:

Re: [Mod 0.11.x] Rail Tanker - Liquid transport

Post by Andrea88 » Fri Jan 30, 2015 2:10 pm

Hello everyone!

I'm enjoying this mod so much! But... I was thinking to carry other liquids too. So i setted up rails etc but only then i realized that the fluid wagon can only carry crude oil. lol
So i had a look to the mod's files but i cant figure it out how i can allow the fluid tank to transport other liquids :oops:
I also had a look to game's files (entities and items.lua), looking for "storage tank" to see how it's configured but even cant understand how to allow transportation of other liquids.

Any ideas?

ps. i already googled for this, but nothing seems to help me.

Any help will be appreciated.
Thanks.

pps. i'm using 0.11.10 experimental version of the game.




---------EDIT-----------

I committed a mistake. Nothing above is true. The rail tanks are able to carry other liquids.
Sorry again for my error. I thought the fluids could be pumped even if the rail tank was in a turn rail segment. Instead not. lol

Hope this helps who will commit my mistake :)

delfiler
Inserter
Inserter
Posts: 20
Joined: Tue Feb 10, 2015 1:38 pm
Contact:

Re: [Mod 0.11.x] Rail Tanker - Liquid transport

Post by delfiler » Fri Feb 13, 2015 11:07 am

can i add your mod to a modpack?

JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

Re: [Mod 0.11.x] Rail Tanker - Liquid transport

Post by JamesOFarrell » Fri Feb 13, 2015 11:11 am

delfiler wrote:can i add your mod to a modpack?
Sure, all my mods are licensed under the MIT license so do with them as you wish.

Also, if you want the blender files so you can extend the mod let me know and I'll upload them somewhere

delfiler
Inserter
Inserter
Posts: 20
Joined: Tue Feb 10, 2015 1:38 pm
Contact:

Re: [Mod 0.11.x] Rail Tanker - Liquid transport

Post by delfiler » Fri Feb 13, 2015 11:14 am

JamesOFarrell wrote:Sure, all my mods are licensed under the MIT license so do with them as you wish.

Also, if you want the blender files so you can extend the mod let me know and I'll upload them somewhere
oh that won't be needed just gonna add it to my mod pack of handy mods

Kane
Filter Inserter
Filter Inserter
Posts: 654
Joined: Fri Sep 05, 2014 7:34 pm
Contact:

Re: [Mod 0.11.x] Rail Tanker - Liquid transport

Post by Kane » Fri Feb 20, 2015 3:11 am

This is amazing. I remember a lot of people wanting this before. Thanks a ton for this :)

Kane
Filter Inserter
Filter Inserter
Posts: 654
Joined: Fri Sep 05, 2014 7:34 pm
Contact:

Re: Request for interface

Post by Kane » Sun Mar 01, 2015 8:46 pm

Choumiko wrote:Could you add an interface for other mods to get the stored liquid when the train is stopped? I managed to get the following to work: (added at the end of control.lua)

Code: Select all

remote.addinterface("railtanker",
{
  getLiquidByWagon = function(wagon)
    local tanker = getTankerFromEntity(glob.tankers, wagon)
    local res = nil
    reattachProxy(tanker)
    if tanker.entity.name == "rail-tanker" then
        if tanker.proxy ~= nil then
            if tanker.proxy.fluidbox[1] ~= nil then
                res = {amount = tanker.proxy.fluidbox[1].amount, type = tanker.proxy.fluidbox[1].type}
            else
                res = {amount = 0, type = nil}
            end
        else
            if tanker.fluidbox ~= nil then
                res = {amount = tanker.fluidbox.amount, type = tanker.fluidbox.type}
            else
                res = {amount = 0, type = nil}
            end
        end
    end
    return res
  end
}
Should even work when the train is moving, not sure though, i simply tried until it worked
While looking at your code i think i found a typo: Line 42 is tanker.proxy = bil should be nil i guess ;)
Does this work with the The Fat Controller? I have both the latest of the 2 but I can't see anything data wise from the liquids.

Kane
Filter Inserter
Filter Inserter
Posts: 654
Joined: Fri Sep 05, 2014 7:34 pm
Contact:

Re: [Mod 0.11.x] Rail Tanker - Liquid transport

Post by Kane » Sun Mar 15, 2015 1:04 pm

Just wondering if there was or is going to be some sort of tool tip to see how much liquid is inside the tanker. Someone said they thought it had in the past but now is broken. They said you had to sort of find the "right spot" to see it's liquid amount.

Thanks,
Kane

Choumiko
Smart Inserter
Smart Inserter
Posts: 1277
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: Request for interface

Post by Choumiko » Sun Mar 15, 2015 1:23 pm

Kane wrote:Does this work with the The Fat Controller? I have both the latest of the 2 but I can't see anything data wise from the liquids.
You would need to find the function in FAT controller where it gathers the data and tweak it to use the interface for railtanker wagons
Kane wrote:Just wondering if there was or is going to be some sort of tool tip to see how much liquid is inside the tanker. Someone said they thought it had in the past but now is broken. They said you had to sort of find the "right spot" to see it's liquid amount.
I changed the selectionbox in prototypes/entity/entities.lua to the one that has been commented out
~line 59-60

Code: Select all

selection_box = {{-1.0, -1.0}, {1.0, 1.0}},
--selection_box = {{-0.5, -0.5}, {0.5, 0.5}},
It's still a matter of finding the right spot (south of the liquid icon when horizontal, west for vertical) but better than nothing ;)

Kane
Filter Inserter
Filter Inserter
Posts: 654
Joined: Fri Sep 05, 2014 7:34 pm
Contact:

Re: [Mod 0.11.x] Rail Tanker - Liquid transport

Post by Kane » Sun Mar 15, 2015 5:24 pm

Thanks haha. I have such bad luck finding the sweet spot though.

Mion
Long Handed Inserter
Long Handed Inserter
Posts: 62
Joined: Thu Dec 04, 2014 7:38 am
Contact:

Re: Request for interface

Post by Mion » Sat Apr 11, 2015 2:48 pm

Choumiko wrote: I changed the selectionbox in prototypes/entity/entities.lua to the one that has been commented out
~line 59-60

Code: Select all

selection_box = {{-1.0, -1.0}, {1.0, 1.0}},
--selection_box = {{-0.5, -0.5}, {0.5, 0.5}},
It's still a matter of finding the right spot (south of the liquid icon when horizontal, west for vertical) but better than nothing ;)
I don't exactly understand the situation, but:

1) current entity.lua in 0.0.8 version conteins this text on lines 59-60:

Code: Select all

--selection_box = {{-1.0, -1.0}, {1.0, 1.0}},
   selection_box = {{-0.5, -0.5}, {0.5, 0.5}},
and there is NO information about how much oil in storage, wherever I led my mouse around railtanker.

2) I changed this text on next:

Code: Select all

   selection_box = {{-1.0, -1.0}, {1.0, 1.0}},
--selection_box = {{-0.5, -0.5}, {0.5, 0.5}},
in other words, I changed "comment flag" on other line.
Aaaand... it works! Information about how much oil there is in the railtanker shows up!

3) BUT. This information shows up ONLY when railtanker is near small pump in the middle of railtanker. In other words, when railtanker is in the process of pumping.
Here are some screenshots
I don't know lua language, so sorry if my post looks a bit stupid.

Am I wrong somewhere?
Last edited by Mion on Sat Apr 11, 2015 2:56 pm, edited 1 time in total.

Choumiko
Smart Inserter
Smart Inserter
Posts: 1277
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: Request for interface

Post by Choumiko » Sat Apr 11, 2015 2:54 pm

Mion wrote: 3) BUT. This information shows up ONLY when railtanker is near small pump in the middle of railtanker. In other words, when railtanker is in the process of pumping.
Am I wrong somewhere?
If i remember correctly, this has always been the case. The fake/proxy tanks get removed when a train moves

Mion
Long Handed Inserter
Long Handed Inserter
Posts: 62
Joined: Thu Dec 04, 2014 7:38 am
Contact:

Re: Request for interface

Post by Mion » Sat Apr 11, 2015 2:59 pm

Choumiko wrote:
Mion wrote: 3) BUT. This information shows up ONLY when railtanker is near small pump in the middle of railtanker. In other words, when railtanker is in the process of pumping.
Am I wrong somewhere?
If i remember correctly, this has always been the case. The fake/proxy tanks get removed when a train moves
Ok, thanks. I didn't know mechanics of this mod :), but now I understood.
Sooo, what about lines in the code? Am I did it right?

*I just correct load screenshots now.

ZTStrike
Inserter
Inserter
Posts: 20
Joined: Mon Apr 27, 2015 2:02 am
Contact:

Re: [Mod 0.11.x] Rail Tanker - Liquid transport

Post by ZTStrike » Mon Apr 27, 2015 6:53 pm

Hello OP, I was wondering if you would permit me to take this tanker mod and integrate it into my mod. I don't like to claim other people's work for my own.

Post Reply

Return to “Mods”

Who is online

Users browsing this forum: No registered users