[Mod] Digtron tunnel boring/building machine [digtron]

Chem871
Member
 
Posts: 937
Joined: Sat Aug 19, 2017 21:49
Location: SCP-2935
GitHub: Chemguy99
In-game: Dwaba_Kukai

Re: [Mod] Modular tunnel boring/building machine [digtron][0

by Chem871 » Sat Oct 14, 2017 21:49

Digtron is like a steerable HV quarry from Technic :P
What is SCP-055 again? I forgot.
 

FaceDeer
Member
 
Posts: 352
Joined: Sat Aug 29, 2015 19:01
GitHub: FaceDeer

Re: [Mod] Modular tunnel boring/building machine [digtron][0

by FaceDeer » Sun Oct 15, 2017 06:56

Just submitted a few fixes to some regressions that the recent updates caused.

* Due to some changes that were made to trigger Technic power network updates Digtron was triggering sand and gravel to fall too early in its cycle, which was breaking Digtrons under certain circumstances and making it impossible to build ceilings before stuff fell through into tunnels.

* It was no longer possible to right-click on a running auto-controller to make it stop cycling (ie, the "emergency abort" feature was no longer working).

Both were pretty annoying bugs when I ran into them while testing, so anyone who's using the new item ejector and Technic support should probably update again. Sorry about that.
 

FaceDeer
Member
 
Posts: 352
Joined: Sat Aug 29, 2015 19:01
GitHub: FaceDeer

Re: [Mod] Modular tunnel boring/building machine [digtron][0

by FaceDeer » Sun Oct 15, 2017 18:14

I think I've finally managed to enable seed-planting for Digtron.

The technical version: Digtron now calls a node's on_place method if on_place is defined for that node, inventing a pointed_thing parameter that should cause it to place the node with roughly the correct facedir (after which Digtron *forces* the correct facedir on the placed node). This means that some nodes are now behaving "correctly" when placed by Digtron, such as seeds and torches, because they use on_place to do some fancy things (I previously hard-coded some torch-placing behaviour into Digtron as a special case, which was always kind of ick but worked okay).

However, it's possible that some node out there has an on_place defined that will cause it to do weird things now. And there's a possibility that I won't be able to fix it without more special-case hackery like I used to do with torches, because once Digtron hands execution off to an item's on_place code it can't control what happens and can be lied to by that item's code with impunity. You'll note, for example, that if you're in creative mode Digtron will not consume seeds or torches as it places them any more even if you've set Digtron to consume resources in creative mode. That's because the torch and seed on_place methods check for creative mode and if it's enabled they report that they haven't actually placed an item even if they have done so successfully. I decided that the hacks necessary to correct this behaviour would be worse than leaving it be in this case, but let me know if any mods produce more damaging behaviour than this when used with Digtron and I'll see what I can do.

The non-technical version: potatoes are virtue.

Large-scale farming operations using Digtrons for planting as well as harvesting should now be possible. Let me know if I ruined something else in the process.

Edit: hold off on updating, it looks like this has broken building stuff in mid-air.

Edit2: I think I fixed it. There was a default on_place function Minetest added to all node definitions that was screwing up block placement.

Edit3: the [stairs] mod's "slab" nodes also have an on_place that screws up Digtron's attempts to place them. I've added a blacklist function so that I can easily exclude specific nodes in the future, so please report any situations where a Digtron builder places nodes incorrectly.

If it turns out that more nodes get broken by this new approach to placement than get fixed I might switch over to a whitelist instead of a blacklist. So far the score is that torches and seeds are "fixed" by the new on_place handling and slabs get "broken". Unfortunately, there's not really any way I can think of to programmatically vet whether an on_place function will work well with Digtron or not, it'll be up to human judgement.
 

FaceDeer
Member
 
Posts: 352
Joined: Sat Aug 29, 2015 19:01
GitHub: FaceDeer

Re: [Mod] Modular tunnel boring/building machine [digtron][0

by FaceDeer » Tue Oct 17, 2017 04:04

Fun bugs that are not really my fault but that I have to deal with anyway, harrumph. :)

I got an interesting issue filed over on Github, it turns out that the changes I made to support Technic now cause at least one hunger mod to count all of Digtron's digging and building activities as something that the triggering player is doing. Trigger a big Digtron and you can quickly starve to death as it saps your vitality thinking that you're digging and building hundreds of nodes.

I've submitted a fix for this that causes Digtron to generate a fake player object to hand off to the on_placenode and on_dignode callbacks. The fake player object returns a player name of "" (an empty string) which the documentation says should indicate a non-player object to the calling code. So mods that try to do things to a player based on those callbacks will not have any way of finding the player who triggered Digtron. I can easily imagine this causing a not-robustly-programmed mod to crash, unfortunately. Such crashes are not exactly my fault - a well-crafted mod should be written to handle unsanitized inputs and the documentation *does* say that "" is a possible return value - but at the same time it's likely that this is an unusual edge case that even a good modder might not think to account for or encounter in testing. So by all means, if anyone encounters a crash in another mod while operating Digtron let me know and I'll investigate.

In related news, I decided that it really wasn't safe using a blacklist for on_place calls. Digtron's default placement code puts nodes in a well-characterized state, the worst that can happen when skipping calling a node definition's on_place function is that the node gets put in the correct place but is nonfunctional or the node is not placed at all - both pretty safe outcomes. So I've switched to a whitelist for on_place.

This means that I will probably need to explicitly support all the popular farming mods. It's not hard to add new entries to the whitelist, but I need to know what I need to do in order to do it. So if anyone tries using a Digtron to do planting with other farming mods that rely on on_place, or for that matter if any other mods behave strangely when a Digtron places their nodes, let me know and I'll try adding them to the whitelist.

For modders: adding the group "digtron_on_place" to a node definition will cause Digtron to trigger its on_place code when it builds it in-world. That way you don't have to worry about updating Digtron's code whenever you want to make changes to your own mod.
 

hajo
Member
 
Posts: 597
Joined: Thu Oct 13, 2016 10:45
Location: DE

Re: [Mod] Modular tunnel boring/building machine [digtron][0

by hajo » Tue Oct 17, 2017 08:49

FaceDeer wrote:I will probably need to explicitly support all the popular farming mods.

Is it possible to plant random flowers/plants/trees with a builder,
or cycle thru a list of stuff to place?

Currently, I think it can only be done with (at least) one builder per type,
and varying their activation-period.
 

FaceDeer
Member
 
Posts: 352
Joined: Sat Aug 29, 2015 19:01
GitHub: FaceDeer

Re: [Mod] Modular tunnel boring/building machine [digtron][0

by FaceDeer » Tue Oct 17, 2017 15:33

hajo wrote:
FaceDeer wrote:I will probably need to explicitly support all the popular farming mods.

Is it possible to plant random flowers/plants/trees with a builder,
or cycle thru a list of stuff to place?

Currently, I think it can only be done with (at least) one builder per type,
and varying their activation-period.


Indeed, that's the only way I can think of doing it currently. Give each plant builder a different period (use prime numbers to make the overall pattern repeat less frequently) and you'll get a staggered pattern. Have a couple of builders for each plant and that'll make the repetition less obvious, too.

I suppose I could make a builder variant that's probabilistic - you'd set it to build 10% of the time, for example. But that'll be a to-do for another day, I'm now in clean-up mode after the last set of big changes and then I've got a major bit of work on simplecrafting_lib waiting in my queue after that (I'm going to finally try replacing the player crafting interface and will basically need to reimplement [unified_inventory] in the process). I'll make a note for when I get back to adding new features to Digtron.
 

FaceDeer
Member
 
Posts: 352
Joined: Sat Aug 29, 2015 19:01
GitHub: FaceDeer

Re: [Mod] Digtron tunnel boring/building machine [digtron][0

by FaceDeer » Mon Oct 23, 2017 01:56

Just added a new Digtron management tool: a Digtron duplicator.

Build the duplicator adjacent to an existing Digtron, place an empty Digtron crate at the duplicator's output face (the one with the black "+" similar to a builder's output face), and then place sufficient Digtron components into the duplicator's inventory to build a complete copy of the adjacent Digtron. With all these conditions satisfied, click the "Duplicate" button in the duplicator's UI and a copy of the Digtron will be placed in the crate without affecting the original. The components for the duplicate Digtron will be deducted from the duplicator's inventory.

The programming of the Digtron is copied (all the various numeric fields, the item for builders to build, etc.) but the inventory of the Digtron is not copied - when you uncrate the new Digtron all of its inventories and fuel stores will be empty.

Hope this will be handy.
 

Chem871
Member
 
Posts: 937
Joined: Sat Aug 19, 2017 21:49
Location: SCP-2935
GitHub: Chemguy99
In-game: Dwaba_Kukai

Re: [Mod] Digtron tunnel boring/building machine [digtron][0

by Chem871 » Mon Oct 23, 2017 13:41

#Whenyoureallylikeamodbutthecreatorkeepsupdatingitsoyouhavetokeepdownloadingit:/
What is SCP-055 again? I forgot.
 

User avatar
azekill_DIABLO
Member
 
Posts: 7489
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

FaceDeer
Member
 
Posts: 352
Joined: Sat Aug 29, 2015 19:01
GitHub: FaceDeer

Re: [Mod] Digtron tunnel boring/building machine [digtron][0

by FaceDeer » Mon Oct 23, 2017 23:33

Sorry. I'll try to have fewer ideas for a while. :) (also I'll be doing some major work on simplecrafting_lib soon, that'll keep me busy)
 

Chem871
Member
 
Posts: 937
Joined: Sat Aug 19, 2017 21:49
Location: SCP-2935
GitHub: Chemguy99
In-game: Dwaba_Kukai

Re: [Mod] Digtron tunnel boring/building machine [digtron][0

by Chem871 » Tue Oct 24, 2017 00:32

Maybe add a protector block that's unique to the digtron; it only protects digtron parts. So you can leave your machine anywhere, nice and safe.
What is SCP-055 again? I forgot.
 

FaceDeer
Member
 
Posts: 352
Joined: Sat Aug 29, 2015 19:01
GitHub: FaceDeer

Re: [Mod] Digtron tunnel boring/building machine [digtron][0

by FaceDeer » Wed Oct 25, 2017 03:29

Chem871 wrote:Maybe add a protector block that's unique to the digtron; it only protects digtron parts. So you can leave your machine anywhere, nice and safe.


Poked around a bit and while it looked like adding protection to the Digtron as a whole would be complicated, it was fairly straightforward adding a "locked" version of the Digtron crate to the mod. So if you want to stop a Digtron and leave it securely in place, put a locked crate next to it and crate it up. Leave the crate in place. Then when you're ready to resume, uncrate it and it'll be put back exactly where it came from.

Note that I haven't actually tested this in a multiplayer environment yet. It *should* work, but I'm out of time tonight and I'm going to be busy over the next few days so not sure when I'll have time to play around a bit. Also, the duplicator currently only works with unlocked crates. That's a known issue, I'll get to it eventually.
 

Chem871
Member
 
Posts: 937
Joined: Sat Aug 19, 2017 21:49
Location: SCP-2935
GitHub: Chemguy99
In-game: Dwaba_Kukai
 

User avatar
ChimneySwift
Member
 
Posts: 320
Joined: Fri Sep 22, 2017 06:46
Location: 127.0.0.1
GitHub: ChimneySwift
IRC: ChimneySwift
In-game: ChimneySwift

Re: [Mod] Digtron tunnel boring/building machine [digtron][0

by ChimneySwift » Thu Nov 02, 2017 09:39

Just wanted to say, this mod is sick, I've been messing with it for ages, it's a ton of fun :D
A spoon is basically a tiny bowl with a stick on it
 

morganb21
New member
 
Posts: 3
Joined: Mon Dec 11, 2017 06:12

Re: [Mod] Digtron tunnel boring/building machine [digtron][0

by morganb21 » Mon Dec 11, 2017 06:18

The Builder Module doesn't place torches anywhere.
Edit: I hadn't set the block orientation
Last edited by morganb21 on Mon Dec 11, 2017 07:05, edited 1 time in total.
 

morganb21
New member
 
Posts: 3
Joined: Mon Dec 11, 2017 06:12

Re: [Mod] Digtron tunnel boring/building machine [digtron][0

by morganb21 » Mon Dec 11, 2017 06:25

When I crate a digtron, the save title and show blocks buttons have swapped labels
 

User avatar
BronzDragonClara
Member
 
Posts: 14
Joined: Sun Dec 31, 2017 17:25
In-game: BronzDragonClara

Re: [Mod] Digtron tunnel boring/building machine [digtron][0

by BronzDragonClara » Sun Dec 31, 2017 17:28

So I was wondering if the digtron builder module could plant wheat or cotton seeds? I am trying to build an automatic wheat farm but can't seem to figure out how to get it to place seeds.

Edit: Never mind, I found the answer on GITHub and you need to set the builder module's facing to 1 for it to plant seeds.
Today is a wonderful day to make a good yesterday for tomorrow
 

User avatar
KatzEyez
Member
 
Posts: 36
Joined: Tue Aug 08, 2017 18:24
Location: (IG: Depends) (RL: USA)
GitHub: LadyK
IRC: LadyK
In-game: LadyK

Re: [Mod] Digtron tunnel boring/building machine [digtron][0

by KatzEyez » Sat Feb 10, 2018 22:04

I really love this mod! I just have a couple of suggestions based on what I've witnessed while using the Digtrons.

Locked Digtron Storage
Playing on servers with other players who will randomly come to you while you have out your digtron and help themselves to your storage when it stops is a pain, especially when PVP is off and you can't kill them to get your items returned.

Digtron Ownership
The digtron parts should not be able to be moved or picked up by anyone other than the owner. I feel this is important in case of unavoidable deaths, server crashes or time outs where you weren't able to secure or protect your digtron it in time.

Sorry for possibly creating extra work for someone, however, I think the mod would greatly benefit from adding them. Thank you for reading this.
Hiya everyone! ^_^ Got Discord? I'm LadyK#3914 if you want to add me. You can find me on Tunnelers' Abyss! See you in game!
 

User avatar
ChimneySwift
Member
 
Posts: 320
Joined: Fri Sep 22, 2017 06:46
Location: 127.0.0.1
GitHub: ChimneySwift
IRC: ChimneySwift
In-game: ChimneySwift

Re: [Mod] Digtron tunnel boring/building machine [digtron][0

by ChimneySwift » Sun Feb 11, 2018 23:13

KatzEyez wrote:Digtron Ownership
The digtron parts should not be able to be moved or picked up by anyone other than the owner. I feel this is important in case of unavoidable deaths, server crashes or time outs where you weren't able to secure or protect your digtron it in time.


You could possibly have a locked automatic digtron controller (maybe with a text field to add players) and no digtron parts can be moved, taken from or modified by players not on the controller itself. It would also have to treat other digtrons with a different owners as obstacles, so that there are no issues with 2 digtrons owned by different people connecting. Players should also not be able to place a digtron part so it connects to another player's digtron.
A spoon is basically a tiny bowl with a stick on it
 

dman810
New member
 
Posts: 1
Joined: Tue Feb 13, 2018 13:56
IRC: Dennis_Kelley
In-game: dkelley810

Re: [Mod] Digtron tunnel boring/building machine [digtron][0

by dman810 » Tue Feb 13, 2018 13:59

I was wondering if there is a way to charge the Battery Holder while in the machine? Is the only way to charge batteries is to remove them?
 

Billr
New member
 
Posts: 1
Joined: Mon Feb 26, 2018 14:22

Re: [Mod] Digtron tunnel boring/building machine [digtron][0

by Billr » Mon Feb 26, 2018 14:32

dman810 wrote:I was wondering if there is a way to charge the Battery Holder while in the machine? Is the only way to charge batteries is to remove them?


I would like this too. I tried using the HV Power Connector for this but it didn't work. Maybe I missed something but, as it is, HV Power Connector is next to useless as it requires stringing an expensive HV cable behind the digger and it doesn't allow battery charging.
 

Miner123/Miner12
New member
 
Posts: 3
Joined: Tue Feb 27, 2018 06:51
IRC: Miner123
In-game: Miner123 Miner12

Re: [Mod] A modular tunnel boring/construction machine [digt

by Miner123/Miner12 » Tue Feb 27, 2018 07:29

FaceDeer wrote:I'd also considered having the digger heads require picks to be inserted into them and adding wear to the picks as they're used, but given how inaccessible the digger heads can be and how annoying it would be to check each one of them whenever the machine stopped I figured that would just be cruel.


The quote here is from an early comment so maybe it's already been discussed but I though I'd add something which may be helpful.

If you added wear to digger heads maybe a stock of head material be kept in the digtron inventory (e.g. diamonds for the digger heads and iron ingots for the soft digger heads and used automatically to refresh the heads when worn.

If you could insert a pick into the head (two for a dual head) it could override head wear (the pick would wear instead). Then if you place picks into digger inventory They could automatically be inserted into the heads.

To calculate head wear you could make it comparable to the wear of a diamond pick. A digger head of course uses 4 diamonds where a diamond pick uses 3. I guess there would be a choice as to whether the head should thus wear at 0.75 (3/4) times the rate of a pick (or of a pick inserted into the head if one of these wears at a different rate to a hand held pick.

As the soft head would not be digging hard materials I'm not sure if that would make a difference in how wear is calculated. If I remember right heads are affected in some way depending how hard or soft the material they dig (maybe using more or less fuel). I suppose wear could be affected in the same way though I'm not offering my coding services :D.

Shew. All said I think :)
 

Miner123/Miner12
New member
 
Posts: 3
Joined: Tue Feb 27, 2018 06:51
IRC: Miner123
In-game: Miner123 Miner12

Re: [Mod] Modular tunnel boring/building machine [digtron][0

by Miner123/Miner12 » Tue Feb 27, 2018 09:49

FaceDeer wrote:Just submitted a few fixes to some regressions that the recent updates caused.

* Due to some changes that were made to trigger Technic power network updates Digtron was triggering sand and gravel to fall too early in its cycle, which was breaking Digtrons under certain circumstances and making it impossible to build ceilings before stuff fell through into tunnels.


I just activated commit 9cc5288 (https://github.com/minetest-mods/digtron) on an offline world of mine but it just seems to have made the problem a lot worse. This may just be because of more sand in the game or something so I can't be sure.

Also a note. I'm new to the forum so I may be overlooking things :)
 

imcasper
Member
 
Posts: 16
Joined: Wed May 30, 2018 21:49
 

FaceDeer
Member
 
Posts: 352
Joined: Sat Aug 29, 2015 19:01
GitHub: FaceDeer

Re: [Mod] Digtron tunnel boring/building machine [digtron]

by FaceDeer » Tue Jun 19, 2018 02:30

imcasper wrote:Can I place ref (digtron don't place rail from advtrains)?


Hm. It appears that the way advtrains works is that it registers a "track placer" craftitem and then when you right-click on the ground with the track placer it triggers some code that creates the appropriate track node and removes a track placer from the stack.

Digtron normally doesn't allow craftitems to be placed in the builder's inventory slot because normally it doesn't make sense - you wouldn't build a pile of dye, for example. But there's an API that should allow advtrains to tell Digtron to go ahead and try anyway for specific nodes. I'll see if I can put together a pull request for advtrains to fix this.
 

PreviousNext

Return to Mod Releases



Who is online

Users browsing this forum: Norore and 4 guests