Minetest logo

IRC log for #minetest, 2021-06-09

| Channels | #minetest index | Today | | Google Search | Plaintext

All times shown according to UTC.

Time Nick Message
00:58 emacsomancer joined #minetest
01:38 Hawk777 joined #minetest
01:54 Kimapr joined #minetest
02:12 Kimapr joined #minetest
02:36 Kimapr9 joined #minetest
03:18 ShadowBot joined #minetest
03:23 Supersonic joined #minetest
03:32 sanguine joined #minetest
03:51 Zelic joined #minetest
03:54 Zelic joined #minetest
03:56 Zelic Sorry to jump in and immediately ask questions, but is there anyway to get the groups information of what the player is currently holding? I have looked in the api and couldn't find what i am looking for.
03:56 MTDiscord <Jonathon> you can get the name and call minetest.registered_items[GETNAMEHERE].groups
03:57 MTDiscord <Jonathon> or if you want to check a specific group, minetest.get_item_group(GETNAMEHERE)
03:59 MTDiscord <Jonathon> GETNAMEHERE = player:get_wielded_item():get_name()
03:59 MTDiscord <Jonathon> assuming that you are using something that gives you the player
03:59 MTDiscord <Jonathon> else you can get player by doing minetest.get_player_by_name("username")
03:59 Zelic yes I have tried to use the | minetest.get_item_group() | function but it will only look for what is specifically called on. i am looking for a broad spectrum.
04:00 MTDiscord <Jonathon> i refer you to my inital comment
04:00 MTDiscord <Jonathon> "you can get the name and call minetest.registered_items[GETNAMEHERE].groups"
04:00 Zelic mhmm player:get_wielded_item() might work
04:01 MTDiscord <Jonathon> that gives you a itemstack, you need to name to insert into the above
04:01 Zelic Alright, I will try that. Thanks :)
04:02 MTDiscord <Jonathon> minetest.registered_items[player:get_wielded_item():get_name()].groups if you have a player/user else minetest.registered_items[minetest.get_player_by_name("username"):get_wielded_item():get_name()].groups
04:11 Zelic after ****get_name()].groups, how would you go one step further and look at the value of a specific group for the item? That is ultimately what I am after here. example I am looking to find the value of | crumbly | on the item i hold in my hand?
04:15 MTDiscord <Jonathon> `:get_name()].groups.crumbly
04:15 MTDiscord <Jonathon> or *:get_name()].groups["crumbly"]
04:17 Zelic Okay, that what I thought. Now to try to get this to work lol
04:18 MTDiscord <Jonathon> have fun
04:18 Zelic Ohhh I will, the rabbit whole of errors is so much fun ūüėÖ
04:45 loggingbot_ joined #minetest
04:45 Topic for #minetest is now The official Minetest channel | Latest version: 5.4.1 (2021-04-10) | General, player and modding discussion is on-topic. If in doubt, post here | Responses may take a while, be patient | Rules: https://wiki.minetest.net/IRC#Rules | Development: #minetest-dev | Server list: https://minetest.net/servers | IRC logs: https://irc.minetest.net/minetest
04:53 Extex joined #minetest
05:23 est31 joined #minetest
05:31 independent56 joined #minetest
05:54 Flabb joined #minetest
06:07 reductum joined #minetest
06:31 CWz joined #minetest
07:00 CWz_ joined #minetest
07:13 MrChaos3090 joined #minetest
07:13 logger56 joined #minetest
07:13 independent56 hey yay!
07:15 independent56 finallly, my logger account joins
07:19 CWz_ joined #minetest
07:47 Sven_vB joined #minetest
08:00 ShadowNinja joined #minetest
08:16 m42uko joined #minetest
08:36 wsor4035 joined #minetest
08:38 Noclip[m] joined #minetest
08:40 SwissalpS joined #minetest
09:01 m42uko joined #minetest
09:27 CeeGee joined #minetest
09:34 logger56 joined #minetest
09:53 CWz joined #minetest
10:19 calcul0n__ joined #minetest
10:23 entuland joined #minetest
10:27 erlehmann joined #minetest
10:49 olliy joined #minetest
10:50 Kimapr0 joined #minetest
10:57 thmh joined #minetest
10:58 thmh anyone played exile?  is "Iron and Slag" a step in the right direction, or does that mean I did it wrong?
11:03 entuland_ joined #minetest
11:11 Sven_vB joined #minetest
11:22 jluc joined #minetest
11:27 calcul0n__ thmh, it is, you must smellt it at very high temp to get iron
11:27 calcul0n__ place burning coal blocks around it
11:28 calcul0n__ but i don't exactly how much you need and where is the best place, i just place tons of them :)
11:28 calcul0n__ *don't know
11:32 thmh should have picked a spot with more trees
11:35 calcul0n__ there are very big trees, i needed only one of them for the whole game
11:43 thmh you make it sound like cutting a big part of the tree doesn't influence fruit production
11:52 calcul0n__ ho, i don't use fruits much, but i don't think it does anyway
11:52 calcul0n__ iirc fruits only needs leaves around to regrow
12:12 Helenah joined #minetest
14:02 olliy1or joined #minetest
14:03 Kimapr7 joined #minetest
14:04 bwarden_ joined #minetest
14:05 bdju_ joined #minetest
14:05 thecraigster joined #minetest
14:05 hanetzer1 joined #minetest
14:07 unCork joined #minetest
14:09 book`_ joined #minetest
14:24 kamdard joined #minetest
14:32 est31 joined #minetest
14:38 Fixer joined #minetest
14:42 logger56 joined #minetest
14:48 independent56 joined #minetest
14:52 independent56 joined #minetest
14:55 Alias joined #minetest
15:00 clavii joined #minetest
15:01 clavi joined #minetest
15:04 rubenwardy Zelic:    player:get_wielded_item():get_definition().groups
15:05 rubenwardy warning: get_definition() may return nil
15:05 rubenwardy if the item isn't defined
15:05 rubenwardy `local def = player:get_wielded_item():get_definition()`    then check def and use def.groups
15:06 rubenwardy get_definition is a helper function for getting from registered_items when you have an ItemStack, they're functionally identical
15:06 rubenwardy well, I imagine get_definition would correctly handle aliases but reigstered_items probably doesn't
15:07 SwissalpS joined #minetest
15:15 Conradish006 joined #minetest
15:16 independent_ joined #minetest
15:16 valhalla_ joined #minetest
15:16 MTDiscord joined #minetest
15:17 Edgy134 joined #minetest
15:18 queria joined #minetest
15:18 CWz_ joined #minetest
15:18 logger57 joined #minetest
15:19 ROllerozxa_ joined #minetest
15:21 Hawk777 joined #minetest
15:22 specing_ joined #minetest
15:30 AristotIe joined #minetest
15:32 independent_ hey... who is this "logger57"
15:32 independent_ must be an alt username made automagically
15:36 SwissalpS has same ip as you..
15:47 CeeGee joined #minetest
15:53 Extex joined #minetest
15:57 y5nw joined #minetest
16:01 independent_ joined #minetest
16:01 independent_ must be thunderbird's silly stuff
16:02 independent_ but same IP as //me//? oh wait we use the same router (i was thinking of privat ip :facepalm:)
16:04 sanguine joined #minetest
16:10 jluc joined #minetest
16:11 sanguine joined #minetest
16:22 sanguine26 joined #minetest
16:26 specing_ joined #minetest
16:31 independent_ is registration disabled on mintest wiki, and if so, why?
16:39 MTDiscord <Jonathon> Yes, and read the forum topic
16:52 dzho_ joined #minetest
17:02 y5nw joined #minetest
17:09 independent_ joined #minetest
17:11 independent_ link?
17:13 Zelic joined #minetest
17:14 logger56 joined #minetest
17:17 Talkless joined #minetest
17:30 independent_ are post-jokes allowed in the forum?
17:31 independent_ i was thinking of satirically explaining a mientest feature
17:35 sfan5 in doubt put it in the offtopic section
17:37 independent_ hmm... thanks!
17:37 independent_ what part of the section? they all look the same. should i roll a dice?
17:40 independent_ meh, dice rolled 3, on-topic it is then.
17:43 sanguine joined #minetest
17:46 independent_ are swear words allowed?
17:46 independent_ joined #minetest
17:48 logger56 joined #minetest
17:52 independent_ judge for yourself https://forum.minetest.net/viewtopic.php?f=54&amp;t=26848
18:08 independent_ how do i make adtrains update the interlockig database? i have an error from worldedit-removed TCBs. and i have no ideaof where they are on the megaviaduct
18:11 SwissalpS joined #minetest
18:13 y5nw Well, you should not remove TCBs with WE in the first place ...
18:17 y5nw joined #minetest
18:20 independent_ well.... the map kinda went "kaput" in that area, so i deleteblocks, and built a new viaduct.
18:21 independent_ * logger56 (~Thunderbi@2.26.38.198) has joined
18:21 independent_ * Talkless (~Talkless@mail.dargis.net) has joined
18:21 independent_ <independent_> are post-jokes allowed in the forum?
18:21 independent_ <independent_> i was thinking of satirically explaining a mientest feature
18:21 independent_ https://imgur.com/a/3imenrE
18:21 logger56 joined #minetest
18:26 independent_ i think that worldedit should be more careful, and update stuff. otherwise we end up with broken maps. maybe a seperate command, for those without new machines.
18:28 MTDiscord <Warr1024> That's a responsibility of the mod that's relying on nodes to continue to exist in the world, not worldedit
18:30 MTDiscord <Warr1024> or arguably the responsibility of the server admin who is using non-in-game mechanics to modify the world and bypass the ability of mods to intercept and deal with those changes.
18:32 MTDiscord <IhrFussel> If WE would do all that it would be painfully slow
18:32 y5nw The thing is, you _could_ still set things up if you wanted to mess around with the savefile (or in-memory, since the save function apparently returns references to the DB tables) with advtrains, but that's not really the intended way of doing things.
18:32 MTDiscord <IhrFussel> It is so extremely fast because it doesn't have any checks
18:34 independent_ lol hmm
18:34 independent_ how annoying
18:35 y5nw I mean, you could also play MT with a hex editor (i.e. edit the map with it), but then you are on your own and you can't really get much help. If you don't do things the intended way then it's your fault
18:35 independent_ XD yeah
18:35 independent_ i am such a fucking idiot... but i was thinking, maybe i should get the posistion of these TCBs, place them, and then remove them "the proper way".
18:36 independent_ how would i do this?
18:36 MTDiscord <Warr1024> The best worldedit could do is create some kind of API, like offering hooks that other mods can tap into to do mod-specific checks before WE changes are committed ... but that still leaves the responsibility in the hands of the not-worldedit mods, and they need to be specifically aware of worldedit
18:37 MTDiscord <Warr1024> Doing things the "proper way" would depend on the specific nature of the "kaputtitude" of that section of the map that led you do want to clear it in the first place.
18:37 reductum joined #minetest
18:37 y5nw And that's not easy to support. With advtrains there are also certain cases where you want the user to be aware of (for example, removing the train and track setups along with tracks)
18:38 MTDiscord <Warr1024> Arguably the best approach is a hybrid one where you use special nodes as controllers for performance reasons, but you also have secondary watchdogs to make sure those nodes can be regenerated if they're lost
18:39 independent_ i want to fix the mainline noob express, and i need to find put the pissition of the removed TCBs. how?
18:39 MTDiscord <Warr1024> so if you need like a "controller" node attached to a network of other nodes, the mod should also do a slow scan for networks that have been damaged and are missing their controller and recreate one automatically
18:39 independent_ or maybe i can set routes whilst pretending they exist
18:39 MTDiscord <Warr1024> I don't know much about trains specifically, but the general principle would apply to electricity mods and the sort as well.
18:39 reductum joined #minetest
18:40 y5nw independent_: try something like this: //lua for k in pairs(advtrains.interlocking.db.save().tcbs) do minetest.chat_send_all(k) end
18:40 MTDiscord <Warr1024> Any situation where you have a "network" of nodes that operate together and you need to run some kind of solver over the network, but don't want to have to recurse across the whole network for every node in it, that's sort of a Hard Problem of sorts.
18:40 independent_ i cant understand the format and place to put that code snippet
18:40 y5nw independent_: MT command (assuming you can run Lua code with the WE //lua command)
18:41 independent_ so i have to select a region as well, containf the TCBs?
18:41 y5nw no
18:41 y5nw It operates on the interlocking DB directly (should be safe, at least there isn't any write operations)
18:41 independent_ phew!
18:42 independent_ yay!
18:42 independent_ "code succesfuly executed"
18:43 independent_ next question: is there any downsides to large track sections, apart from large wait times at signals?
18:45 y5nw The thing is that TCBs are not really controller nodes from my knowledge (these are stored in a separate database in advtrains as well), but it marks a place where a track section ends and the next one starts, and while you could mess things up in the world (and I know such cases with "dead" TCBs), they should not really affect gameplay, regardless of whether there or not. (You can't remove them because it would otherwise be hard to find the
18:45 y5nw track section boundaries again, obviously)
18:45 y5nw (^ and that's purely from my knowledge and experience. If anyone knows the interlocking internals better than I do please correct that)
18:47 y5nw independent_: nothing in particular afaik other than that you will have to spend more time if you want to split the track section in the future (to add a junction, for example)
18:48 independent_ haha yeah, it involves placign TCB, dissolving sections, deleting routes, remaking routes, and OH FUCK WHOOPS I DIDNT CANCEL THE ENTRY ROUTES! ahhhrgh! train!!!1!
18:49 y5nw Advtrains does have room for improvement in terms of splitting sections (except apparently nobody has the interest in implementing it yet)
18:49 independent_ i would definately like to see automatic interlocking, where worldedit goes "yeah, i just place TCBs, make signals, set  and make routes, yay!
18:50 independent_ but it would be near to impossible to implement knowing my knowladge of minetest modding
18:51 MTDiscord <Warr1024> in theory the mod could be background-scanning stuff in the world (i.e. just detecting them via ABMs or something) and maintaining a database internally and just doing "solver" type things in there over time, e.g. detecting contiguous track sections and such.
18:51 MTDiscord <Warr1024> could be a hell of a rewrite of the backend logic though
18:52 Conrad joined #minetest
18:53 y5nw Advtrains has a separate node database that it operates on. (And you can sync it using /at_sync_ndb). The problem with ABMs is that it should really be avoided on servers with large rail networks that have developed over years
18:56 independent_ like linuxforks, and (in a year or two) 56i-server.
18:56 independent_ *proud of his horribly lacking server knowladge*
18:56 y5nw If you really don't want to set up routes you should play OpenTTD instead (you would still have to build the tracks though)
18:57 independent_ but... but... i like minetest!
18:57 independent_ and routes are a necessary evil, like area protection
18:58 independent_ https://imgur.com/a/ElCBHI3 <-- ABMs suck
19:02 y5nw The thing about manually setting routes is that it allows greater control over the setup (e.g. having separate tracks for various purposes similar to RL, or manually driving trains), and the fact that you can interact with it using digilines (etc) makes it involve more than just "go to (pass) x and drop/pick up stuff, then leave". (I enjoy OpenTTD as well, but sometimes I want to be able to see more than just the map)
19:02 * independent_ thinks of making "//interlock" work only on straight track
19:05 independent_ aye, https://pastebin.com/Lb3JHf9m
19:05 independent_ fuck!
19:05 independent_ tiem to anylise disk and remove unneded files
19:06 independent_ *thinks of operating server on USB instead*
19:08 * y5nw suggests operating a server off paper tapes
19:09 independent_ XD
19:09 independent_ i mean, USB could have slow write/read speeds
19:10 independent_ main problem... or i could just get a bigger disk and move everything from the first disk to the bgiger one.
19:54 independent_ aghh fuck. i had a botched move job. fucking lost map.sqlite, and had to use local map saving to recover it.
19:57 independent_ and i am trying to get backt he old map... backups! fucking backups! i need to do them daily, yet i fail. what an idiot i am.
20:01 specing joined #minetest
20:04 independent_ aye, i fucking messed up.
20:05 y5nw That's why you need to make backups ...
20:07 independent_ i do! but i didnt check crontab once often enough. so i eneded up missing them. aye, i really fucked up
20:07 independent_ and guess what was taking all the space? old backups in the bin ebcause i didnt manage their size well enough
20:07 MTDiscord <IhrFussel> How do you manage to mess up your maps this much while my map didn't corrupt once in 5 years despite thousands of crashes and lots of huge WE actions...sometimes the server even crashed during such WE actions but all was fine
20:08 y5nw Advtrains does not work well with WE
20:08 independent_ XD
20:08 independent_ i was moving to a usb, but i used cut an paste. then i skipped the file conflict rename process
20:09 y5nw Btw: if you make backups make sure to compress them. There's also the mapcleaner that hopefully reduces the map size as well
20:09 independent_ haha yeah
20:10 MTDiscord <IhrFussel> WE doesn't work well with any mod that requires callbacks in order to function
20:10 independent_ forgot to do "-compress 9" int he command
20:11 y5nw I said advtrains in particular because ... have fun fixing things up programmatically after WE'ing (at least I don't know any mod that fixes broken advtrains setups)
20:11 MTDiscord <Warr1024> Having backups only protects you from certain things; when it's human error that's the threat, you can often human error your backups just about as well as you can human error the thing it's backing up
20:12 MTDiscord <IhrFussel> So their map is  not actually BROKEN just the rails and stuff are wrong after using WE
20:12 MTDiscord <Warr1024> To really have confident backups you need like 3 machines: the server, the separate machine doing the backups, and a 3rd machine that you test restoring the backups onto so that you can know whether you really have backups or just think you do.
20:14 independent_ this is a seperate problem - i can live with fucked up interlocking, but not a missing map.sqlite.
20:15 MTDiscord <Warr1024> you still got the seed, so at least all you have to do is rebuild everything you did by hand :-)
20:19 y5nw joined #minetest
20:20 y5nw (switched to mobile)
20:22 y5nw If you have the advtrains savefiles you _could_ theoretically rebuild part of the system (tracks, some signals, etc), but it is likely not what you expect
20:23 independent_ hmm
20:24 independent_ i fucking hate how minetest treats you: "make a backup of me or i will fuck up because of you"
20:24 independent_ /hj
20:26 y5nw I mean "not what you expect" by the fact that underground tracks likely don't work because you need to re-dig the tunnels, and then you need to figure out where to place TCBs (afaik they are not in the node DB), the auxiliary Ks masts (if you have any, only the signal light itself is in the nodedb) and stuff like that.
20:28 MTDiscord <Warr1024> I mean if you don't want a thing to be destroyed, then not destroying it would be a good first step.
20:29 y5nw Yeah. Also: https://xkcd.com/2083/ :P
20:31 independent_ XDXD
20:36 Extex joined #minetest
20:43 independent_ joined #minetest
20:45 independent_ joined #minetest
20:55 independent_ i love british plugs! if only unpluged ones wouldnt become metal forks of death to step on. it fucking hurts.
21:02 VanessaE never stepped on a LEGO I see ;)
21:06 MTDiscord <Warr1024> https://www.brothers-brick.com/wp-content/uploads/2017/07/battle_strategies.jpg
21:17 independent_ i have, but they are kind, flatty things. not the tall metal prongs of death wich are british plugs.
21:17 independent_ https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fwww.oeelectrics.co.uk%2Fwp-content%2Fuploads%2F2017%2F10%2FUK-Plug.jpg&amp;f=1&amp;nofb=1
21:17 independent_ this is their default way. stepping on it is pain. pain that will have you curse the house down
21:22 MTDiscord <wwar> These are big and noticable never stepped on one, not like lego
21:24 independent_ at night though, when you wake up and need the toilet? you will be in fucking tatters
21:24 MTDiscord <wwar> Nah, never stepped on one
21:26 independent_ joined #minetest
21:26 independent_ well, then you probably have never lived in britan
21:28 MTDiscord <Warr1024> You could, I dunno, just like not leave random plugs lying around on your floor
21:30 MTDiscord <Warr1024> The reason the trope is about legos and not about plugs is probably because the kind of people who do lots of stuff with legos are of an age where they may not be so responsible about cleaning up after themselves, but people who can be trusted to mess with electrical appliances should know better by then
21:35 MTDiscord <wwar> Yeah, when playing with lego we were... younger, but as you said we dont leave plugs on floor
21:37 independent_ joined #minetest
21:38 independent_ imagine this scenario: its night, and you unplug some appliance you are lazy, so you let it lie next to the extension lead. see the problem?
21:46 MTDiscord <Benrob0329> Don't most UK outlets have switched on them?
21:46 MTDiscord <Warr1024> All I see is a valuable learning experience
21:46 MTDiscord <Benrob0329> *swiches
21:46 independent_ yes, they do. but i plug in an extension lead... and i dotn knwo wich one holds the cable to my server
21:47 MTDiscord <Warr1024> I don't think there is any kind of electric plug anywhere in the world that I'd love to step on in the middle of the night.  The little NEMA-15 ones we have in the USA are no joke either.
21:47 MTDiscord <Benrob0329> independent_: Sounds like a problem easily fixed with a sticky note
21:48 Zelic Does anyone have a function to get the item name from what is currently in the players hand? I have tried to come up with it myself but I am new to all this.
21:48 sfan5 name as in the internal name or the displayed description?
21:49 Zelic yes, I am needing it to call on that because I am trying to check against its groups
21:49 Zelic internal name
21:50 Zelic example minetest.get_item_group(get_hand, "snappy") I need the get_hand to check what the player is holding
21:50 sfan5 I doubt you actually want to do that but here goes: player:get_wielded_item():get_name()
21:51 sfan5 ah, yeah that makes sense there
21:52 Zelic i have tried something similar to that but keep getting "player" ( a nil value )
21:52 erlehmann joined #minetest
21:53 sfan5 well, do you have that variable?
21:53 MTDiscord <Warr1024> either you're doing it in an event where you don't have a player, or one where you could have a player but the action is being done by a non-player
21:55 Zelic No but then I add "local player = minetest.get_player_by_name()" to avoid the crash but do not get the desire result.
21:56 MTDiscord <Warr1024> looks like you're not passing a name though
21:57 Zelic okay, so I am missing something then. Like I said i am new to this and learning as I go.
21:57 MTDiscord <Warr1024> How are you finding out which player you need to operate on here?  Normally you'd be given a player by the event your code is running inside.
21:58 MTDiscord <Warr1024> like often you'll have something like an on_use callback that has a "user" parameter that might be a player, an entity, or nil, and if you want it to be only usable by a player you can make sure that you've got a player first and just return immediately if the user is not a player.
21:59 MTDiscord <Warr1024> you generally don't just have code that does something with a player that's not inside some kind of callback context, especially since outside of those contexts, there aren't any players yet.
22:00 Extex joined #minetest
22:00 Zelic Alright I think I understand. I was trying to do the function before where I needed to happen. At least I think that is my current problem then.
22:04 MTDiscord <IhrFussel> Simply define your function as > function dosomething(name) ... end and then inside the code where you actually need it you call dosomething(playername)
22:05 MTDiscord <IhrFussel> Then 'playername' gets passed to dosomething as 'name'
22:05 MTDiscord <Warr1024> Sure but that does still just move the problem because ultimately you still need to know to do something based on some event that gives you a player or a name at least.
22:06 MTDiscord <Warr1024> usually you'll have a player, not a name; the name thing comes into play if a player isn't, or might not be, logged in, or if you want to delay an action and the player could log out during the delay, but those scenarios make things more complicated, so not great if you're just trying to start out.
22:07 MTDiscord <IhrFussel> You pass the name to a function if you need it more than the player object itself
22:07 MTDiscord <IhrFussel> But that was just an example either way
22:08 MTDiscord <Warr1024> Yeah, I think the key thing to remember that's not immediately obvious to new modders is that there isn't a such thing as "the player", it's "a player" and singleplayer even is just a special case.
22:08 Zelic I am simply needing it when the "drops" of a block are being decided. I am assuming that would be "on_drop" correct?
22:08 MTDiscord <IhrFussel> Cause they tried to use 'get_player_by_name()' in their code
22:09 MTDiscord <Warr1024> It's possible to go find an arbitrary player if you want, but usually you have to deal with the possibility that there are multiple players and only one is relevant and you need the event hook to tell you which one.
22:09 MTDiscord <Warr1024> I think "on_drop" is something different
22:09 MTDiscord <Warr1024> I think that's when a player is holding the thing and tries to drop it
22:09 MTDiscord <Warr1024> IIRC there's a "drops" structure for dealing with drops of a node when dug, and you're best off using that to do what you want, if possible
22:10 MTDiscord <Warr1024> as for customizing the "what does a node drop when dug" logic arbitrarily, it is possible, but from what I've seen, may be quite advanced
22:11 MTDiscord <Warr1024> though that MIGHT be a special case for me because I needed to decide on the drops at a certain time and based on information that the hook doesn't directly provide.
22:11 MTDiscord <IhrFussel> If you just need the node to drop as something else use the 'drop' field
22:11 MTDiscord <IhrFussel> Drop when dug*
22:12 MTDiscord <Warr1024> Yeah, where it gets tricky is if you have, say, a chest, and you want the chest to throw its contents (from node metadata) into the drops list when the chest is dug.  MTG didn't even bother doing this, they just disallow you digging the thing until you manually empty it first...
22:12 Zelic Yea I am using the drop structure "drop = drops .. tostring(dropl)" is currently my set up for that which works fine as long as when those variables predefined such as "dropl = minetest.get_item_group(items:stick, "snappy")" but I cant define every single item
22:12 Zelic items : stick...
22:13 MTDiscord <Warr1024> I'm a bit confused, maybe if you explained this at a more high level it'd make more sense
22:13 Zelic okay one sec
22:13 MTDiscord <Warr1024> if you're, say, trying to make something that could drop any item from a particular group, that's a bit trickier, especially if you want to support items added to that group by other mods you don't necessarily depend on .
22:17 Zelic I already have everything that i want dropped predefined as shown here ( https://pastebin.com/0MS0FSuM) I just need the equation to do the math of what the player is holding so that way it knows how many of that item to drop
22:19 MTDiscord <Warr1024> oh boy okay
22:19 Zelic yea lol
22:19 MTDiscord <Warr1024> well, it's not just that your code isn't right for what you want to do
22:19 MTDiscord <Warr1024> it's that this is not an easy thing to do using the "drops" mechanic
22:20 MTDiscord <Warr1024> er, okay, wait
22:20 MTDiscord <Warr1024> you want to, say, have a "coal ore" node but instead of digging it and getting "coal ore" you want to get a separate coal item, right?
22:20 MTDiscord <Warr1024> so it's not based on what the player is wielding, it's just based on what's dug, right?
22:21 MTDiscord <Warr1024> THAT at least is what the drop property is for
22:21 Zelic correct so if the player is digging a default:coal_ore node what is the player using to dig it with
22:21 MTDiscord <Warr1024> you have so many things that are undefined though
22:21 MTDiscord <Warr1024> so you want the drop to happen only if the player is digging with the right tool?
22:21 MTDiscord <Warr1024> so like if they use an iron pick they get the ore but if they use a stone one they get some lesser prize, or nothing at all?
22:22 MTDiscord <Warr1024> arguably the "level" mechanic in the drop property would be the easiest way to achieve this, though obviously it depends on you using the "level" mechanic in your tool defs too
22:22 MTDiscord <Warr1024> If you're defining coal and iron ore then it seems like maybe you're not basing things on MTG so I guess you'd have to determine whether to use the MTG standards for tool definitions or do something less bizarre but also non-standard.
22:23 Zelic well that would work but this is building up to a bigger picture of a complete tool expansion idea. and no This is a complete rewrite of the base MTG
22:24 MTDiscord <Warr1024> as for the code: you in get_item, you take item as a parameter, but use name, which is not defined there, then set item but then don't return anything so setting item is meaningless.  Then when you call get_item() you never pass anything in anyway.
22:24 Zelic sorta like enchantments but instead an endless tool combination where different components add different things like "luck" for how many drops you get
22:25 MTDiscord <Warr1024> So it sounds like you want to have a "luck" property of a tool (like an enchantment maybe but as an item group) and use that to multiply your drops
22:25 Zelic correct
22:26 MTDiscord <Warr1024> Personally the way I'd handle this is by monkey-patching handle_node_drops in builtin, since that would work across all drop scenarios, but I'm torn whether to advise you to look into that
22:26 MTDiscord <Warr1024> on the one hand, it's very tricky, but on the other hand, anything else you do as an alternative would probably involve a fair bit of tedium and wouldn't automatically "just work" with downstream mods that aren't specifically aware of that mechanic
22:27 MTDiscord <Warr1024> also, arguably, enchantments are better put in the item metadata, not in the item definition where the tool groups go, since otherwise you have to make an item definition for each combination of enchantments you want to be possible.
22:27 MTDiscord <Warr1024> None of this is particularly new-modder-friendly though :-)
22:28 MTDiscord <Warr1024> The simplest "not having to hack into weird obscure builtin/API internals" way to do this I can think of is to use an on_dig/after_dig hook and give the player the extra stuff that way...
22:28 Zelic Its fine, I have had this idea for a bit and finally sat down to do it. I am up for the challenge
22:29 MTDiscord <Warr1024> in that hook, you'll get the player, so you can inspect the wield item, and I think you get either the node that was dug or the drops, so figuring out the drops and duplicating them would be easy.
22:30 MTDiscord <Warr1024> (also, instead of straight-up multiplying the drops by a fixed amount, using an exponentially-distributed random value for the multiplier makes it a bit more exciting)
22:31 Zelic Yea. that would be better and I thought about doing that later once I got it to work in the first place lol
22:33 MTDiscord <Warr1024> Even if you're up for a challenge, doing things a weird way before you learn a more basic if not exactly smooth way to do it might teach you some bad habits :-)
22:33 MTDiscord <AntumDeluge> Was the minetest.settings object introduced in version 0.4.16? Browsing through changelog now, but haven't figured out exactly. I'm curious so I can set minimum version for my mod.
22:35 MTDiscord <Jonathon> at this point why even support 4x
22:36 MTDiscord <Warr1024> If it were me and I were still supporting 0.4 for those niche audiences, I'd still probably drop support for anything but the very last 0.4.17 version ever published for that generation.
22:37 MTDiscord <Warr1024> People who can run 0.4.16 but can't run 0.4.17 should be pretty rare, even if people who can run 0.4 but not 5.0 aren't necessarily...
22:37 MTDiscord <AntumDeluge> ContentDB asks for minimum required Minetest version.
22:37 MTDiscord <Warr1024> What is the oldest version that you actually tested the mod on?
22:38 MTDiscord <Warr1024> If you're just guessing that it supports a version that old then maybe you'd be better off just setting the minimum higher and not promising it works that far back.
22:38 MTDiscord <Warr1024> If someone really wants that mod on an older version, then they should be willing to do the testing for you, and then let you know that it's safe to lower the minimum version.
22:39 MTDiscord <Jonathon> This
22:41 MTDiscord <AntumDeluge> I'm not guessing. It's a simple mod that uses the minetest.settings object. There is just nowhere that specifies when that object was introduced. I think it was available in 0.4.16, but don't remember for sure. That's why I wanted to ask if anybody knew. Would probably be a good idea to make a notes in lua_api.txt next to features of what version they were introduced with.
22:44 MTDiscord <Warr1024> you could arguably diff the lua_api.txt file itself across the 2 relevant tags and see if settings is mentioned in that diff.
22:45 MTDiscord <Warr1024> We're sort of lucky when people remember to update lua_api.txt at all, let alone when they put history info in it :-/
22:45 olliy joined #minetest
22:48 MTDiscord <AntumDeluge> Good point. Thank you Links.
22:49 MTDiscord <Warr1024> Heh, I think the discord/IRC bridge uses usernames, not nicknames, anyway.
22:50 MTDiscord <Warr1024> Apparently the current Name Thing in discordland is people naming themselves after browsers...
22:50 Sven_vB joined #minetest
22:50 AristotIe joined #minetest
22:50 MTDiscord <Warr1024> There, I switched to something more obscure.
23:02 olliy1or joined #minetest
23:21 perrier joined #minetest
23:24 Alias2 joined #minetest
23:31 logger56 joined #minetest
23:37 luizsabino joined #minetest
23:39 luizsabino Hello, I was here yesterday asking help to make a server in my laptop. I didn't get yet. I guess there are something at my router, it's a TOTOLINK, do someone knows that?
23:47 specing Now we know which brand to avoid
23:48 luiz joined #minetest
23:52 entuland do we have a bot here with "tell" abilities?
23:52 MTDiscord <Jonathon> yeah
23:53 entuland is it just "!tell someone something"?
23:53 MTDiscord <Jonathon> think so
23:53 MTDiscord <Jonathon> hold on
23:53 entuland k
23:53 wsor4035 !tell entuland test
23:53 MinetestBot wsor4035: I'll pass that on when entuland is around
23:53 entuland nice
23:53 MinetestBot entuland: Jun-09 23:53 UTC <wsor4035> test
23:54 MTDiscord <Jonathon> works
23:54 entuland !tell luizsabino did you check this page already about how to set the server up? https://wiki.minetest.net/Setting_up_a_server
23:54 MinetestBot entuland: I'll pass that on when luizsabino is around
23:54 MTDiscord <Jonathon> and yes, they did
23:55 entuland okay
23:57 entuland !tell luizsabino as it seems you already did, check the totolink website for documents like this (find the one that fits for your model): https://www.totolink.net/data/upload/20181101/6a055f35e275dcad5b705542773acc31.pdf
23:57 MinetestBot entuland: I'll pass that on when luizsabino is around
23:59 luizsabino joined #minetest
23:59 MinetestBot luizsabino: Jun-09 23:54 UTC <entuland> did you check this page already about how to set the server up? https://wiki.minetest.net/Setting_up_a_server
23:59 MinetestBot luizsabino: Jun-09 23:57 UTC <entuland> as it seems you already did, check the totolink website for documents like this (find the one that fits for your model): https://www.totolink.net/data/upload/20181101/6a055f35e275dcad5b705542773acc31.pdf

| Channels | #minetest index | Today | | Google Search | Plaintext