Page 5 of 19

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

Posted: Tue Jan 06, 2015 11:39 am
by dyf123
I hope that it can upload a copy on here because I can't link to google drive easily.

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

Posted: Mon Jan 12, 2015 11:52 pm
by UntouchedWagons
Can you give the tanker more health? 1HP isn't enough. Nice mod, this should be in vanilla.

Re: Request for interface

Posted: Tue Jan 13, 2015 5:24 pm
by Narc
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.

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

Posted: Fri Jan 16, 2015 9:57 pm
by JamesOFarrell
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.

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

Posted: Sat Jan 17, 2015 3:06 am
by UntouchedWagons
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.

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

Posted: Sat Jan 17, 2015 3:12 am
by JamesOFarrell
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?

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

Posted: Sat Jan 17, 2015 3:43 am
by UntouchedWagons
Yeah I'm using 0.0.8. When I place a tanker down, the bit that holds the fluid has 1HP.

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

Posted: Fri Jan 30, 2015 2:10 pm
by Andrea88
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 :)

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

Posted: Fri Feb 13, 2015 11:07 am
by delfiler
can i add your mod to a modpack?

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

Posted: Fri Feb 13, 2015 11:11 am
by JamesOFarrell
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

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

Posted: Fri Feb 13, 2015 11:14 am
by delfiler
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

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

Posted: Fri Feb 20, 2015 3:11 am
by Kane
This is amazing. I remember a lot of people wanting this before. Thanks a ton for this :)

Re: Request for interface

Posted: Sun Mar 01, 2015 8:46 pm
by Kane
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.

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

Posted: Sun Mar 15, 2015 1:04 pm
by Kane
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

Re: Request for interface

Posted: Sun Mar 15, 2015 1:23 pm
by Choumiko
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 ;)

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

Posted: Sun Mar 15, 2015 5:24 pm
by Kane
Thanks haha. I have such bad luck finding the sweet spot though.

Re: Request for interface

Posted: Sat Apr 11, 2015 2:48 pm
by Mion
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?

Re: Request for interface

Posted: Sat Apr 11, 2015 2:54 pm
by Choumiko
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

Re: Request for interface

Posted: Sat Apr 11, 2015 2:59 pm
by Mion
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.

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

Posted: Mon Apr 27, 2015 6:53 pm
by ZTStrike
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.