Page 1 of 4

[Mod] Oil Mod [1.1.2] [oil]

PostPosted: Mon Feb 06, 2012 17:28
by sfan5
This Mod adds Oil.
Oil will be generated under Water.
You can use Pumps to pump Oil and you can use Pipes to transport it.
If you build a Refinery you can convert Oil into Fuel Buckets.
You can use the Fuel Buckets as Furnace Fuel.
License: GPLv2
Dependencies: default
==Download==
1.1.2dev: http://dl.dropbox.com/u/30267315/oil1.1.2dev.zip
1.1dev: http://dl.dropbox.com/u/30267315/oil1.1dev.zip
1.0: http://ubuntuone.com/1eG3mMCC5C9Z8ASglywpOj
==Crafting==
Pump:
Image
Pipe:
Image
Refinery:
Image
==Screenshots==
Oil Deposit under Water:
Image
Pump,Pipes and Refinery:
Image
==TODO-List==
  • Pump Fuel through Pipes | Possible with >= 1.1dev

PostPosted: Mon Feb 06, 2012 17:41
by neko259
I'm waiting for steampunk to come to minetest :D

Can you make oil power plant for mesecons?

PostPosted: Mon Feb 06, 2012 17:48
by Jeija
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Can you make oil power plant for mesecons?

Working on that...
It will use fuel.

PostPosted: Mon Feb 06, 2012 17:50
by neko259
Working on that...
It will use fuel.

You should make separate downloads for the mesecons itself and plugins for using mesecons with different mods (mesecons-gates, mesecons-oil etc).

PostPosted: Mon Feb 06, 2012 18:25
by Jeija
Yeah that is what I am planning. I think I will also make a mesecons-core pack which only contains the core functions (switches, mesecons itself, pistons, meselamps, inverters (later repeaters);
And also mesecon-standard which contains all mesecons functions without dependencies on other mods.

Well, this is not the mesecons mod topic.
Good Job, sfan5! I think pipes should also be able to transport oil up and down...
And Refineries should add the fuel to their inventory (like chests). I am working on a chest-system for my mesecon-oil generators.

PostPosted: Mon Feb 06, 2012 18:33
by sfan5
Jeija wrote:Yeah that is what I am planning. I think I will also make a mesecons-core pack which only contains the core functions (switches, mesecons itself, pistons, meselamps, inverters (later repeaters);
And also mesecon-standard which contains all mesecons functions without dependencies on other mods.

Well, this is not the mesecons mod topic.
Good Job, sfan5! I think pipes should also be able to transport oil up and down...
And Refineries should add the fuel to their inventory (like chests). I am working on a chest-system for my mesecon-oil generators.

[german]
Später soll der Treibstoff noch durch Pipes gepumpt werden
[/german]

PostPosted: Mon Feb 06, 2012 19:17
by sfan5
Oil Mod 1.1 Preview:
Image

PostPosted: Mon Feb 06, 2012 19:24
by Jeija
Can someone help me with the fuel-to-energy-generator?
I am trying to simply create a 1x1 chest you can put fuel in (Or transfer it via pipes);

I'm getting this error when placing the node:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
20:18:28: ERROR[ServerThread]: ERROR: An unhandled exception occurred: LuaError: error: /home/florian/.minetest/usermods/oil/init.lua:536: attempt to call method 'inventory_set_list' (a nil value)


Code:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_node("oil:generator", {
    tile_images = {"default_lava.png"},
    paramtype = "facedir_simple",
    metadata_name = "generic",
    material = minetest.digprop_stonelike(3.0),
})


minetest.register_on_placenode(function(pos, newnode, placer)
    if newnode.name == "oil:generator" then
    local meta = minetest.env:get_meta(pos)
    meta:inventory_set_list("0", {""}) -- THIS LINE SEEMS TO CAUSE THE ERROR
    meta:set_inventory_draw_spec(
        "invsize[8,9;]list[current_name;0;4,4;1,1;]"
        .."list[current_player;main;0,5;8,4;]"
    )
   
    end
end)


Can someone tell me why this doesn't work??? Seems like it cannot get the meta or something like that.
Anyway, Morechests mod works on with the same minetest version and I can't really see any difference.

Are you missing the whole code? Just past the code above behind the oil mod if you want to help finding the bug.

-----------------
Preview looks promising, sfan5!

PostPosted: Mon Feb 06, 2012 20:37
by sfan5
Jeija wrote:Can someone help me with the fuel-to-energy-generator?
I am trying to simply create a 1x1 chest you can put fuel in (Or transfer it via pipes);

I'm getting this error when placing the node:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
20:18:28: ERROR[ServerThread]: ERROR: An unhandled exception occurred: LuaError: error: /home/florian/.minetest/usermods/oil/init.lua:536: attempt to call method 'inventory_set_list' (a nil value)


Code:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_node("oil:generator", {
    tile_images = {"default_lava.png"},
    paramtype = "facedir_simple",
    metadata_name = "generic",
    material = minetest.digprop_stonelike(3.0),
})


minetest.register_on_placenode(function(pos, newnode, placer)
    if newnode.name == "oil:generator" then
    local meta = minetest.env:get_meta(pos)
    meta:inventory_set_list("0", {""}) -- THIS LINE SEEMS TO CAUSE THE ERROR
    meta:set_inventory_draw_spec(
        "invsize[8,9;]list[current_name;0;4,4;1,1;]"
        .."list[current_player;main;0,5;8,4;]"
    )
   
    end
end)


Can someone tell me why this doesn't work??? Seems like it cannot get the meta or something like that.
Anyway, Morechests mod works on with the same minetest version and I can't really see any difference.

Are you missing the whole code? Just past the code above behind the oil mod if you want to help finding the bug.

-----------------
Preview looks promising, sfan5!

Try "... metadata_name: 'chest',"

PostPosted: Mon Feb 06, 2012 22:31
by rahonejm
Really enjoyed this mod!

PostPosted: Mon Feb 06, 2012 23:49
by dannydark
Great mod ^_^ can't wait for the mesecon's support. How long does the oil deposit last? is it infinite or does it run out after some time?

Also I've found a few oil deposits that were just a 1x1 wide above water level and they don't overflow properly (like pictured above) until you build something next to them, is this normal?

EDIT: Nevermind it seems to have just been two of them the rest spread out when I get close ^_^.

PostPosted: Tue Feb 07, 2012 00:14
by IPushButton2653
I absolutely love this mod! It's on my server already :D

PostPosted: Tue Feb 07, 2012 00:50
by dannydark
Would it be possible to add rare oil deposits that can be found on land?

EDIT: maybe something like this: http://minecraftbuildcraft.wikia.com/wiki/Oil

Also just put this live on my server and you made a lot of people very happy ^_^ although....I think 2 people are on the verge of war fighting over an oil deposit haha I think its time I add the gun mod.

PostPosted: Tue Feb 07, 2012 00:55
by IPushButton2653
It is conflicting with a lot of other mods and bugs that are in my minetest >~<
I think I gotta redownload it and filter through what I do and don't want..........

PostPosted: Tue Feb 07, 2012 01:28
by dannydark
IPushButton2653 wrote:It is conflicting with a lot of other mods and bugs that are in my minetest >~<
I think I gotta redownload it and filter through what I do and don't want..........


What mods is it conflicting with? also any errors in your debug log?

PostPosted: Tue Feb 07, 2012 01:42
by IPushButton2653
It has to do with the client I'm using. I downloaded the LoZ Temple of Time thing, and it was the whole client. And it had some weird thing in it that disallowed me to do a lot of normal crafting. Fixed now though

PostPosted: Tue Feb 07, 2012 05:31
by Jeija
Sfan 5:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Try "... metadata_name: 'chest',"


Not working. Morechests and luafurnace also use metadata name 'general' Any other suggestions?

PostPosted: Tue Feb 07, 2012 06:17
by sfan5
dannydark wrote:Great mod ^_^ can't wait for the mesecon's support. How long does the oil deposit last? is it infinite or does it run out after some time?

Also I've found a few oil deposits that were just a 1x1 wide above water level and they don't overflow properly (like pictured above) until you build something next to them, is this normal?

EDIT: Nevermind it seems to have just been two of them the rest spread out when I get close ^_^.

This is normal.

PostPosted: Tue Feb 07, 2012 06:22
by sfan5
dannydark wrote:Would it be possible to add rare oil deposits that can be found on land?

EDIT: maybe something like this: http://minecraftbuildcraft.wikia.com/wiki/Oil

Also just put this live on my server and you made a lot of people very happy ^_^ although....I think 2 people are on the verge of war fighting over an oil deposit haha I think its time I add the gun mod.

I'll probably add this in 1.1

PostPosted: Tue Feb 07, 2012 08:03
by Jordach
can't we just have a oil rush and old western texture pack, so it could be like cowboys looking for black gold.

so it can be themed.

PostPosted: Tue Feb 07, 2012 18:41
by sfan5
New Preview Picture:
Image

PostPosted: Tue Feb 07, 2012 20:27
by dannydark
Ah man I can't wait ^_^

I wish we had the ability to add custom interfaces via lua so we could have a type of generator that would work like a furnace but would have a fuel level gauge :D

PostPosted: Wed Feb 08, 2012 02:28
by RabbiBob

PostPosted: Wed Feb 08, 2012 05:55
by sfan5
Thanks!

PostPosted: Wed Feb 08, 2012 14:58
by rahonejm
New release! Oh man it's going to be awesome!

PostPosted: Wed Feb 08, 2012 16:49
by RAPHAEL
Nice mod but the oil pump doesn't work if you aren't nearby. I did some testing of the mod and it seems if you have a rather long oil pipeline, and wait at the refinery it dries up. If you go over to the pump it begins pumping again. So if that isn't changed, long pipelines won't happen lol.

PostPosted: Wed Feb 08, 2012 17:47
by Jeija
I think this is caused by minetest itself. It only calls the ABM function that pumps the oil if players are nearby.
Btw I created Mesecon Energy Generators, but there still seems to be a bug in the game itself (once again ^^), so that it cannot really produce energy. If someone is interested, this is the bug: Forum Post

PostPosted: Wed Feb 08, 2012 23:36
by IPushButton2653
Jordach wrote:can't we just have a oil rush and old western texture pack, so it could be like cowboys looking for black gold.

so it can be themed.

I could probably easily put a monochrome effect on the textures and it'd look like the west :D
Because I am a fan of old western movies

PostPosted: Fri Feb 17, 2012 19:45
by MirceaKitsune
Wow, awesome mod! Someone linked this in a thread I made, in which I'm looking to start a Buildcraft variant for Minetest. This looks like a basic feature that would be part of such a mod (not sure if what you plan to do next is the same thing). Anyway, I thought you'd like to know... since if you plan to add support engines, item pipes, and machines that build / mine, that pretty becomes what I'm looking for :)

PostPosted: Mon Mar 19, 2012 13:32
by sfan5
Update!
Changelog:
  • Updated for Digging-Time Groups
  • Added Glass Fibre Cable and Energy Converter
Note: I won't update the Main Post with the Crafting Receipes and the Uses, beacause this a Dev-Release