[Mod] Tunnel Boring Machine [0.4 beta] [tbm]

User avatar
Likwid H-Craft
Member
Posts: 1113
Joined: Sun Jan 06, 2013 14:20
Location: Lost in Crypt

by Likwid H-Craft » Post

tbillon2003 wrote:Image

working on a real texture for it, this is just the basic i am gonna jump off the web here at the library for the day wanted to post what i got so far. textures for this cube is harder than spriting. JMHO
Hmm, Not bad if you get the, node the right size I think it will go.

This may help:
http://forum.minetest.net/viewtopic.php?id=5395
My Domain's/others:
http://likwidtest.hj.cx/ (Not Done)

Silencer
New member
Posts: 4
Joined: Wed Apr 03, 2013 13:56
Location: Black Mesa facility

by Silencer » Post

12Me21 wrote:It does not work at all. it just sits there and does nothing.
Maybe it's because of your laggy computer or maybe the mod just don't really work well with your minetest

User avatar
aldobr
Member
Posts: 316
Joined: Sun Nov 25, 2012 05:46

by aldobr » Post

and i know you said you dont want to maintain the mod but it also has some sort of glitch where every few blocks it leavs and arch see attached image.
This is because ABMs are disabled when they are far from players. This decreases server load, but generates this kind of artifact.

I never found a work around that, maybe the ABM needs an "Before disable" callback. Something like that can only be implemented in the C++ side of things...

User avatar
Bas080
Member
Posts: 398
Joined: Mon May 21, 2012 15:54
GitHub: bas080
IRC: bas080
In-game: bas080
Location: Netherlands

by Bas080 » Post

aldobr wrote:I never found a work around that, maybe the ABM needs an "Before disable" callback. Something like that can only be implemented in the C++ side of things...
minetest.after(time, func, ...) in lua doc will explain that it can be done without an abm.

User avatar
aldobr
Member
Posts: 316
Joined: Sun Nov 25, 2012 05:46

by aldobr » Post

you cannot replace an ABM with a timer simple because an ABM has the position information, while the timer dont.

User avatar
Bas080
Member
Posts: 398
Joined: Mon May 21, 2012 15:54
GitHub: bas080
IRC: bas080
In-game: bas080
Location: Netherlands

by Bas080 » Post

aldobr, you can use the on_construct function for getting the position. Something like

Code: Select all


on_construct = function(pos,node)
      --regenerate plant only if exact location is not compromized
      minetest.after(1, function()
        local p = {x=pos.x,y-1=pos.y,z=pos.z}
        local b = minetest.env:get_node(p).name
        if (b ~= "air") then
          minetest.env:add_node(p, node)
        end
        
      end)
    end,


User avatar
aldobr
Member
Posts: 316
Joined: Sun Nov 25, 2012 05:46

by aldobr » Post

Bas80 i know that i can get the position information from the on_construct.

But i cant pass that information to a timer...

Do a simple test, try implementing this with a timer and figure the complexity by yourself.

User avatar
aldobr
Member
Posts: 316
Joined: Sun Nov 25, 2012 05:46

by aldobr » Post

Nice work with the textures and nodebox...

It needs the facedir parameter to decide in wich direction to dig...

I can fake the facedir parameter with a metastring... pls upload your work somewhere so i can see it

User avatar
Bas080
Member
Posts: 398
Joined: Mon May 21, 2012 15:54
GitHub: bas080
IRC: bas080
In-game: bas080
Location: Netherlands

by Bas080 » Post

aldobr, i have a working example of the tbm using minetest.after()

That means that you are not required to stand near the tbm in order for it to keep on digging. Big win for large mining operations! With some changes to the formspec and placing items not on ground but in a chest this should improve performance and functionality. I will work on this today.

EDIT:
init.lua using the minetest.after

Image

What is the essence of this mod? Should it place rails, torches and cobble floor or should this be configurable? What if i want to make a wood floor and no rail. I think this needs a formspec where one can determine the nodes that should be used and in how many cycles it should spawn.
Last edited by Bas080 on Sun Apr 14, 2013 13:18, edited 1 time in total.

User avatar
Bas080
Member
Posts: 398
Joined: Mon May 21, 2012 15:54
GitHub: bas080
IRC: bas080
In-game: bas080
Location: Netherlands

by Bas080 » Post

Hybrid Dog, Ignore my offtopic pm. It's part of my plants mod that supports PilzAdam's farming mod.

I am changing the formspec to support an inventory where the digged nodes will be placed. Also working on supporting nodes that do not have a drop defined.

Anyways, I like the nodebox. however would be nice to have one that span almost all three blocks that the tbm digs.

edit:typo
Last edited by Bas080 on Sun Apr 14, 2013 14:55, edited 1 time in total.

User avatar
aldobr
Member
Posts: 316
Joined: Sun Nov 25, 2012 05:46

by aldobr » Post

Bas080 what happens when the TBM is outside player radius ?

It goes on indefinitely ?

What happens if it touches a unloaded map chunk ?

Player position information is lost, thats why i used an ABM.
What is the essence of this mod? Should it place rails, torches and cobble floor or should this be configurable? What if i want to make a wood floor and no rail. I think this needs a formspec where one can determine the nodes that should be used and in how many cycles it should spawn.
The essence is here : http://forum.minetest.net/viewtopic.php ... 715#p53715
Last edited by aldobr on Sun Apr 14, 2013 21:25, edited 1 time in total.

User avatar
Bas080
Member
Posts: 398
Joined: Mon May 21, 2012 15:54
GitHub: bas080
IRC: bas080
In-game: bas080
Location: Netherlands

by Bas080 » Post

aldobr, the distance to which it digs is limited by the resources that are required to dig. Rails. cobble, torches and coal. I have edited the formspec to allow only one slot per resource and the rest an inventory to which the digged nodes are moved. THey are no longer dropped on the ground

http://paste.ubuntu.com/5710452/

Image
Last edited by Bas080 on Mon Apr 15, 2013 14:22, edited 1 time in total.

User avatar
Dan Duncombe
Member
Posts: 904
Joined: Thu May 09, 2013 21:11
Location: In the unknown depths of Earth

by Dan Duncombe » Post

I haven't got a download because it'sso simple but if you have pushable_blocks installed then you can get it to place monorails instead of normal rails. pushable_blocks adds 2 carts, 4 tracks and a couple of other things.Try it!
Some Mods: Castles Prefab Camouflage
My Games: Nostalgia Realtest Revamped
Servers: See above games.

basilgohar
New member
Posts: 6
Joined: Tue May 21, 2013 20:22

by basilgohar » Post

Does anyone have the code for the latest version of this mod? I tried the original link but it appears the site is down. Thanks.

User avatar
Topywo
Member
Posts: 1721
Joined: Fri May 18, 2012 20:27

by Topywo » Post


User avatar
aldobr
Member
Posts: 316
Joined: Sun Nov 25, 2012 05:46

by aldobr » Post

Something wrong with the version you posted..

User avatar
Topywo
Member
Posts: 1721
Joined: Fri May 18, 2012 20:27

by Topywo » Post

aldobr wrote:Something wrong with the version you posted..
The link or running the mod?

I downloaded it when you posted it but did not change it.

User avatar
aldobr
Member
Posts: 316
Joined: Sun Nov 25, 2012 05:46

by aldobr » Post

the lua script is incomplete

basilgohar
New member
Posts: 6
Joined: Tue May 21, 2013 20:22

by basilgohar » Post

Does anyone have a copy of Bas80's init.lua file? The link to the Ubuntu pastebin has apparently expired. I can craft the tbm block, but attempting to click on it to load it with it's starting materials causes a lua error and Minetest crashes to the startup screen. I am using Minetest from git as of today.

User avatar
Bas080
Member
Posts: 398
Joined: Mon May 21, 2012 15:54
GitHub: bas080
IRC: bas080
In-game: bas080
Location: Netherlands

by Bas080 » Post

basilgohar wrote:Does anyone have a copy of Bas80's init.lua file? The link to the Ubuntu pastebin has apparently expired. I can craft the tbm block, but attempting to click on it to load it with it's starting materials causes a lua error and Minetest crashes to the startup screen. I am using Minetest from git as of today.
Here it is:
https://dl.dropboxusercontent.com/u/419967/tbm.zip

basilgohar
New member
Posts: 6
Joined: Tue May 21, 2013 20:22

by basilgohar » Post

Thanks, I'll try it out.

basilgohar
New member
Posts: 6
Joined: Tue May 21, 2013 20:22

by basilgohar » Post

It's working great, Bas80. Thanks!

basilgohar
New member
Posts: 6
Joined: Tue May 21, 2013 20:22

by basilgohar » Post

Okay, in the version I got from Bas80, I've observed two bugs, at least one of which I saw elsewhere in this thread.

The first bug is the one where sometimes the machine only bores a single node, instead of nine, when going forward. Someone else commented that that seemed to be the case when the player was not near the machine while it was working. My observation somewhat confirms this, though I haven't sat there watching it long enough to rule out the possibility of it happening even when close-by and watching.

The second bug I've observed is that periodically, the machine will just change direction, for a reason I cannot yet determine. This can be either a 90 degree or a 180 degree turn (though I cannot rule-out 270, there's not really a way to tell that apart from a 90 degree turn). When the machines are placed next to each other, such that they clear our a contiguous area, then the "turn" happens the same time for both, and it's always 90 degrees. If they are spaced out such that they is a 1-node gap between the cleared areas, then the turn is always 180 degrees.

I haven't delved deeply into the code yet, as I've very little experience with lua, but I plan to take a closer look as I get more time. I just thought I'd bring up these issues first in case anyone knows of them and/or has a version that has them fixed.

Moving forward, is anyone interested in hosting this on Github? If no one else, then I will consider doing it, but I might just make a new version in that case, since I don't know who owns which parts of the code at this point.

User avatar
Bas080
Member
Posts: 398
Joined: Mon May 21, 2012 15:54
GitHub: bas080
IRC: bas080
In-game: bas080
Location: Netherlands

by Bas080 » Post

basilgohar, i don't mind if you host. Don't forget to say who made what. The nodebox/textures and those who contributed to the code.

basilgohar
New member
Posts: 6
Joined: Tue May 21, 2013 20:22

by basilgohar » Post

Bas080 wrote:basilgohar, i don't mind if you host. Don't forget to say who made what. The nodebox/textures and those who contributed to the code.
Yeah, I guess the "who made what" part is what may be confusing. I might get a chance to look at it this weekend, since it's longer than usual. Alternatively, if I'm feeling ambitious, I might just write-up my own version, as I have a different idea that I might like to pursue. Assuming I don't have too much difficulty figuring-out lua. :)

Post Reply

Who is online

Users browsing this forum: Amazon [Bot] and 22 guests