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

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

by Bas080 » Sat Apr 13, 2013 05:00

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

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

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 » Sat Apr 13, 2013 13:07

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 » Sun Apr 14, 2013 00:58

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

by Bas080 » Sun Apr 14, 2013 11:26

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

by Bas080 » Sun Apr 14, 2013 14:14

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 » Sun Apr 14, 2013 21:22

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?pid=53715#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

by Bas080 » Mon Apr 15, 2013 14:21

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

by Dan Duncombe » Sun May 12, 2013 17:56

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 » Tue May 21, 2013 20:23

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: 1718
Joined: Fri May 18, 2012 20:27

by Topywo » Tue May 21, 2013 21:00

 

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

by aldobr » Wed May 22, 2013 07:32

Something wrong with the version you posted..
 

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

by Topywo » Wed May 22, 2013 12:08

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 » Thu May 23, 2013 03:45

the lua script is incomplete
 

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

by basilgohar » Thu May 23, 2013 18:37

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

by Bas080 » Thu May 23, 2013 18:42

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 » Thu May 23, 2013 19:14

Thanks, I'll try it out.
 

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

by basilgohar » Thu May 23, 2013 19:22

It's working great, Bas80. Thanks!
 

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

by basilgohar » Fri May 24, 2013 04:06

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

by Bas080 » Fri May 24, 2013 10:56

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 » Fri May 24, 2013 14:14

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

Max1EY
New member
 
Posts: 1
Joined: Wed Jun 26, 2013 16:24

by Max1EY » Wed Jun 26, 2013 16:26

Download is down :(
 

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

by Topywo » Wed Jun 26, 2013 16:59

Max1EY wrote:Download is down :(


Here is a link to a post with Bas080's version:
http://forum.minetest.net/viewtopic.php?pid=91496#p91496

But note te 2 possible errors mentioned in post 48:
http://forum.minetest.net/viewtopic.php?pid=91535#p91535
 

UOAbigail
Member
 
Posts: 19
Joined: Mon Feb 24, 2014 13:07

by UOAbigail » Wed Mar 05, 2014 15:39

Greetings. I am using the version of this mod re-linked by Topywo above. Nice mod, BTW.

I am posting this message because I also use several other mods, including the GloopTest modpack which includes Kalite as a coal substitute and Kalite Torches. For my personal singleplayer use, I cloned the init file for the tbm and modified it to use kalite lumps and kalite torches instead of coal. This does not replace your work.. instread it adds a second tbm machine (tbm:kbm instead of tbm:tbm) to the crafting menu.

If you are interested, I can post the modified file.

I also have plans on making other configurations with different behaviors... which I will be more than willing to post as well when they are done.

Thank you for your work on this mod.

Peace
UOAbigail
 

User avatar
balthazariv
Member
 
Posts: 214
Joined: Mon Apr 07, 2014 15:48

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

by balthazariv » Fri Aug 15, 2014 20:43

Hello,

I tested Bas080's version but I have this error. (Minetest 0.4.10)

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
22:35:31: ACTION[ServerThread]:  tried to dig default:stone at protected position (-56,4,-238)
22:35:31: ACTION[ServerThread]:  tried to dig default:stone at protected position (-56,4,-237)
22:35:31: ACTION[ServerThread]:  tried to dig default:stone at protected position (-56,4,-236)
22:35:31: ACTION[ServerThread]:  tried to dig default:stone at protected position (-56,3,-238)
22:35:31: ACTION[ServerThread]:  tried to dig default:stone at protected position (-56,3,-237)
22:35:31: ACTION[ServerThread]:  tried to dig default:stone at protected position (-56,3,-236)
22:35:31: ACTION[ServerThread]:  tried to dig default:stone at protected position (-56,2,-238)
22:35:31: ACTION[ServerThread]:  tried to dig default:stone at protected position (-56,2,-237)
22:35:31: ACTION[ServerThread]:  tried to dig default:stone at protected position (-56,2,-236)

And Minetest crashes.
 

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

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

by aldobr » Sun Aug 17, 2014 20:54

protected position. Arent you using an area protection mod ?
 

User avatar
balthazariv
Member
 
Posts: 214
Joined: Mon Apr 07, 2014 15:48

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

by balthazariv » Sun Aug 17, 2014 22:07

Hello,

aldobr wrote:protected position. Arent you using an area protection mod ?


In testing I found that it was with the mod simple_protection.

Too bad only cobblestones are used in your mod but i like it because you have a small machine compared at [Mod] TBM Reloaded! [0.5][tbm]

Maybe you can join and make one mod with your 2 machine.

Thanks

PS : Can you refresh your post header with a valid link and screenshot
 

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

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

by aldobr » Sun Aug 17, 2014 23:43

The basic logic in both mods is the same. Don added a way better visual model to the machine. Honestly my skills are lacking in that area.
 

User avatar
balthazariv
Member
 
Posts: 214
Joined: Mon Apr 07, 2014 15:48

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

by balthazariv » Mon Aug 18, 2014 17:31

You already know more than me. I'm just a tester.
 

Previous

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 24 guests

cron