Minetest logo

IRC log for #minetest, 2021-08-24

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

All times shown according to UTC.

Time Nick Message
00:00 Noclip[m] Mhh, how does something like minetest.after work without multithreading? Wouldn't you need a seperate thread to run the timer or does this work without a timer?
00:00 MTDiscord <Warr1024> minetest.after is actually in builtin, written entirely in lua, you can see the code
00:01 MTDiscord <Warr1024> lua is of course itself not simultaneous-multithreading
00:01 proller joined #minetest
00:02 MTDiscord <Warr1024> The single-threaded behavior of Lua is actually really convenient for dispatch work, which is what these sorts of HLL's are mostly employed for, since it means you don't have to worry about memory safety.
00:03 Noclip[m] Warr1024: Are you already using Emacs then? xDD
00:03 MTDiscord <Warr1024> Ha, nah, I've actually never written in a lisp I didn't write myself :-)
00:04 MTDiscord <Warr1024> lisps are like one of the easiest construct to use to whip up a domain-specific language
00:05 MTDiscord <Warr1024> they're great for stuff like expression trees and you can strictly limit even the most primitive operations, such as loops, so you can purposefully make them turing incomplete so that you don't have to worry about the halting problem.
00:05 Noclip[m] Warr1024: That's why the Guix package manager uses the lisp dialect Scheme.
00:05 MTDiscord <Warr1024> So I use them as a language to enter stuff like math formulas, boolean expressions and such.
00:06 MTDiscord <Warr1024> Lua and Javascript are both heavily inspired by Scheme.
00:06 MTDiscord <Warr1024> Scheme is a language few use, but many use its descendants
00:06 Noclip[m] Is Javascript also a minimalistic language (like Scheme and Lua)?
00:07 Noclip[m] Scheme is often described as a language to to create itself.
00:07 MTDiscord <Warr1024> JS is a lot more hairy than Lua, but it's also a lot sugarier, e.g. with async/await and arrow functions.  Like Lua, it has some hacks to make imperative/OOP styles work better, but it's functional at its deepest level.
00:08 MTDiscord <Warr1024> Scheme is more pure functional, though, I think, while JS and Lua are much more hybrid.
00:08 MTDiscord <Warr1024> Ha, I'm getting a little tempted now to try to add actual macros to my next lisp dialect :-)
00:09 Noclip[m] Why do many people hate JavaScript?
00:09 MTDiscord <Warr1024> For me, macros are the one thing about lisp that I miss in other languages, and ironically I've never even used them.  I just know what they are and what they can do enough that I'm aware of the pain of not having them now.
00:09 MTDiscord <Warr1024> People mostly hate javascript because of web browsers
00:10 Noclip[m] Is JS somehow less secure than other languages?
00:10 Noclip[m] * Is JS somehow less secure than other scripting languages?
00:11 MTDiscord <Warr1024> For most of its early life JS was just used to write shitty code to try to add mouse hover effects to all the "under construction" gifs that everybody's website basically was during the 90's and every browser had a different API so you had to do all this BS to figure out what dialect you needed to speak to each browser, but you generally had to write all of this into a single program for all of them.
00:12 MTDiscord <Warr1024> I don't see much reason why JS should be less secure than other languages of its level.  You don't have the constant buffer overrun threats and such that you get with stuff like C, so it's a little easier to write secure code, but of course, people will always find new ways to make mistakes.
00:12 Noclip[m] So it's mainly the browser implementations which cause the issues and not the language itself?
00:13 MTDiscord <Warr1024> The language hasn't always been great, but it's always had good bones.  For a while it was being held back by browsers using it as a battleground to try to control standards, but it seems like now the dust has mostly settled and it's actually moving forward now.
00:18 Noclip[m] Warr1024: Why do you do this:... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/6429bf06ef79d281c767f76e95fa9853d06714a0)
00:18 Noclip[m] Instead of just this?:
00:18 Noclip[m] minetest.registered_chatcommands.gm = minetest.registered_chatcommands.gm
00:18 MTDiscord <Warr1024> I wanted /gm to be an alias for /givemenu, but only if something else wasn't already using /gm
00:19 MTDiscord <Warr1024> A = A or B basically means "if A is truthy then leave it alone, but if not then assign B to it"
00:19 Noclip[m] Correction:
00:19 Noclip[m] minetest.registered_chatcommands.gm = minetest.registered_chatcommands.givemenu
00:19 MTDiscord <Warr1024> If I just do gm = givemenu basically then it will overwrite any other gm command
00:19 MTDiscord <Warr1024> If someone installs the General Motors mod that uses a chatcommand or something, I'd want to respect that by default.
00:19 Noclip[m] Ahh I see, I didn't consider that something else could already use /gm ...
00:20 Noclip[m] Warr1024: And why the minetest.after(0, ?
00:21 Noclip[m] Isn't that pointless?
00:21 MTDiscord <Warr1024> ah, right, because if something else is using /gm, it might load after my mod
00:21 MTDiscord <Warr1024> "after 0" basically pushes something onto the "after" queue to run at the next tick
00:22 MTDiscord <Warr1024> "after X" means "run this thing after at least X time has passed", since there's no way to guarantee it runs at EXACLTY that time.
00:22 Noclip[m] Is that a feature of minetest.after or rather a trick?
00:23 MTDiscord <Warr1024> Yeah, it's a feature
00:23 independent56 joined #minetest
00:23 Noclip[m] Where do I find the builtin code for minetest.after?
00:23 MTDiscord <Warr1024> minetest.after is designed specifically not to run stuff that's scheduled during its run in the same tick, so you can't get the game stuck in an infinite loop with after(0) calls
00:24 MTDiscord <Warr1024> https://github.com/minetest/minetest/blob/master/builtin/common/after.lua
00:25 Noclip[m] How can I make a player execute a command from within the lua api?
00:26 MTDiscord <Warr1024> you mean simulate it as if the player entered the command?
00:26 independent56 joined #minetest
00:26 Noclip[m] Yea
00:35 independent56 joined #minetest
00:36 MTDiscord <Warr1024> something like minetest.registered_chatcommands[commandname].func(playername, optionstring)
00:36 MTDiscord <Warr1024> I think I actually do that in givemenu, don't I?
00:39 riff_IRC joined #minetest
00:42 independent56 joined #minetest
00:43 Noclip[m] Warr1024: Yes, you do:
00:43 Noclip[m] return givecmd.func(pname, table_concat({ fields.whom, name, def.stack_max}, " "))
00:43 Noclip[m] At at the beginning you define:
00:43 Noclip[m] local givecmd = minetest.registered_chatcommands.give
00:44 MTDiscord <Warr1024> ah, sounds about right
00:56 Noclip[m] "<Warr1024> https://github.com/minetest/minetest/blob/master/builtin/common/after.lua"
00:56 Noclip[m] -> Uff, this calls a lot of functions which I don't know.
01:00 MTDiscord <Warr1024> The Programming in Lua book is quite thin, so while there's a lot of library funcs to memorize, it's less than half as bad as any other general-purpose programming language I've ever seen.
01:02 Noclip[m] But not something that I could understand in 10 minutes to then understand minetest.after xD
01:03 Noclip[m] Warr1024: Also the functions called seem to be minetest functions and not functions from lua itself.
01:03 MTDiscord <Warr1024> Oh, hmm
01:04 MTDiscord <Warr1024> The only MT stuff I see that stands out is register_globalstep, set_last_run_mod and get_last_run_mod, which seem pretty self-explanatory
01:04 Noclip[m] This one's name sounds interesting: "function core.after(after, func, ...)"
01:05 MTDiscord <Jonathon> core = minetest
01:06 Noclip[m] I guess "core" functions aren't written in lua?
01:06 MTDiscord <Jonathon> you literally are reading one that is written in lua
01:08 Noclip[m] Ohh wait, it's a function definition and not a call ... me being dumb ...
01:17 MTDiscord <Warr1024> Some core functions are supplied by the C++ code, many are added in builtin
01:19 Noclip[m] Warr1024: They don't seem to show up in the official API documentation. Should they be avoided inside of mods?
01:20 MTDiscord <Warr1024> If anything is not mentioned in the official docs then it may change at any time between MT releases, which means if you decide to use them, you may need to be prepared to change things if they break later
01:20 MTDiscord <Warr1024> I accept a certain amount of risk because my dev process is fairly agile, but ymmv
01:21 MTDiscord <Jonathon> lua_api.txt does mention core in a few places
01:22 MTDiscord <Jonathon> i mean, worse case mte drops core.x(very unlikely) at the top of your mod you can just do local core = minetest to fix it
01:23 Noclip[m] $ zgrep -E 'core\.' lua_api.txt.gz
01:23 Noclip[m] (main menu: `core.explode_textlist_event`).
01:23 Noclip[m] (main menu: `core.explode_scrollbar_event`).
01:23 Noclip[m] (main menu: `core.explode_table_event`).
01:24 Noclip[m] Jonathon: Is that what you mean with "a few places"?
01:24 MTDiscord <Jonathon> yes
01:25 Noclip[m] How "stable" is the official lua API?
01:25 Noclip[m] How often do I have to expect breaking changes?
01:26 MTDiscord <Jonathon> in theory rarely, depreciation warnings, seems like something every release, not that hard to fix though
01:28 Noclip[m] Are there parts of the API which are more likely to be changed than others?
01:29 MTDiscord <Jonathon> the ones more likely to be changed are the ones people submit prs on
01:29 Noclip[m] "prs"?
01:29 Noclip[m] pull requests?
01:29 MTDiscord <Jonathon> yes
01:30 Noclip[m] Ah
01:32 Noclip[m] What's a good and short prefix for private/local mods which shouldn't conflict with public mods? "my_"?
01:33 Noclip[m] Warr1024: You are using "my_" your private NCC mods, right?
01:33 MTDiscord <Jonathon> the game is namespaced
01:33 MTDiscord <Warr1024> Those are actually my private server mods
01:34 Noclip[m] "<Jonathon> the game is namespaced" -> What does that mean for me?
01:35 MTDiscord <Jonathon> prefix_modname
01:35 MTDiscord <Warr1024> It means that mods starting with nc_ are basically reserved by me
01:35 MTDiscord <Warr1024> though obviously enforcement is a bit lax atm
01:36 Noclip[m] nc = noclip (obviously) xDD
01:37 Noclip[m] Is there anything my name can't be abused for? lol
01:37 MTDiscord <Jonathon> in theory, no, in practicality, probably
01:38 Noclip[m] "enforcement is a bit lax atm" -> Should I read this as "there is no enforcement"?
01:39 MTDiscord <Jonathon> enforcement is contentdb staff and warr1024 beating people into submission that use it
01:40 Noclip[m] lol
01:40 MTDiscord <Jonathon> scratch the first, i though cdb had namespace docs
01:41 MTDiscord <Ronoaldo> I would like to give something to the player when it joins the server, once per day. Does anyone knows of an easy to setup way to achieve this?
01:42 MTDiscord <Jonathon> get time, last login, if last login + 24h > current time give item
01:42 MTDiscord <Jonathon> assuming you dont want to play catch up
01:43 Noclip[m] No
01:43 Noclip[m] not last login
01:43 Noclip[m] last time you gave it to them.
01:44 MTDiscord <Jonathon> well, i assume a player could play for 24h straight
01:44 MTDiscord <Jonathon> and defeat my simple idea
01:44 MTDiscord <Ronoaldo> I do this check as a join event code right?
01:44 MTDiscord <Jonathon> you would have to log the last time given and then compare
01:45 MTDiscord <Ronoaldo> if the player has the nos space in the inventory, will the item drop or I will not be able to give them?
01:45 MTDiscord <Ronoaldo> sorry, typo: "has no space in the inventoy"
01:45 Noclip[m] With last login someone who would never be offline for 24h straight would never get the gift, would they?
01:46 Hawk777 joined #minetest
01:46 MTDiscord <Jonathon> correct
01:46 MTDiscord <Jonathon> how many players do you know that play 5+ hours tho?
01:47 MTDiscord <Jonathon> not to mention if a server owner has a active playerbase, doesnt cherry pick mod comiits/fix stuff find a server with 24h+ uptime
01:48 MTDiscord <Jonathon> the correct way is to log last time, join hook, and globalstep
01:48 MTDiscord <GreenXenith> globalstep? absolutely not
01:48 MTDiscord <Ronoaldo> I have around 10 unique players daily, with around 60-70 unique logins over 15 days
01:48 MTDiscord <Jonathon> or minetest.after 1m loop
01:48 Noclip[m] Jonathon: You could also just login everyday at the same time and leave after 1 minute and you would never get anything because you are only ever 23h and 59m offline ...
01:48 MTDiscord <Ronoaldo> I tought there were a callback for when someone joins the server?
01:48 MTDiscord <Jonathon> yes
01:49 MTDiscord <Jonathon> minetest.register_on_joinplayer(function(ObjectRef, last_login))
01:49 Noclip[m] How do you log something in a persistent way?
01:49 MTDiscord <GreenXenith> on_joinplayer -> get last gift timestamp from metadata -> if no stamp, or now - last > 24h, give gift and set stamp in metadata
01:50 Noclip[m] Yea, that's how you should do it.
01:50 MTDiscord <Jonathon> that means if there only greater than 24h they wont get the next gift till relog
01:51 MTDiscord <GreenXenith> if a player plays for 24 hours straight, a logout is warranted
01:51 Noclip[m] Can you somehow create persistent variables or do you need to write the metadata into a seperate file here?
01:51 Pexin enticing players to login every day just to get daily gift smells way too much like an MMO. are we drug dealers now?
01:51 MTDiscord <Ronoaldo> what?
01:51 MTDiscord <GreenXenith> People can make MMOs if they wish
01:51 MTDiscord <Jonathon> player metadata
01:51 MTDiscord <GreenXenith> Noclip^
01:52 MTDiscord <GreenXenith> players have metadata stored in the player db
01:52 Noclip[m] "<Jonathon> that means if there only greater than 24h they wont get the next gift till relog"
01:52 Noclip[m] -> True but that was what they were asking for.
01:52 MTDiscord <Ronoaldo> @GreenXenith  and @wsor I guess I figued by you examples how to make the on_joinplaye, also the timestamp (I'm leaning towards last_login to avoid storing metadata in my first attempt)... how do I handle the give the item to player part properly?
01:52 MTDiscord <GreenXenith> last_login is useless
01:52 MTDiscord <Jonathon> i mean, if you want this data for some reason outside of when the player is online then use mo storage
01:52 MTDiscord <Ronoaldo> oh, ok, so I will need to set the metadata then right
01:52 MTDiscord <Jonathon> this
01:52 Pexin gifts could theoretically accumulate for weeks spent offline..
01:52 MTDiscord <GreenXenith> yes, you need to set metadata
01:53 MTDiscord <GreenXenith> Pexin: Not with this method
01:53 MTDiscord <Jonathon> no, there is no catch up in this code pexin
01:53 MTDiscord <Ronoaldo> cool, I set this on player metadata (just making sure I'm getting it right)
01:53 Sven_vB_ joined #minetest
01:53 Pexin @GreenXenith I mean the gift mechanism can count how many 24h cycles have passed and dump 20 gifts
01:53 MTDiscord <Ronoaldo> Pexin: I just have a server sponsorship to conver hosting costs, and I'm going to give a on-login daily reward to those helping keep the server running... no drugs intended
01:54 Noclip[m] "<GreenXenith> players have metadata stored in the player db"
01:54 Noclip[m] -> And I can add whatever custom metadata to it via the API? Nice!
01:54 MTDiscord <Ronoaldo> (sorry for the typos, hope I'm being understood)
01:54 MTDiscord <Jonathon>  minetest.register_on_joinplayer(function(ObjectRef, last_login) if not meta key then give gift, set meta key return end if metatime > 24h give gift return else set new time in meta end end)
01:55 Pexin orrrr. players can get an ingame dropbox where their gifts are dumped
01:55 wsor4035 lol, got that ping on matrix
01:55 Noclip[m] "gifts could theoretically accumulate for weeks spent offline.."
01:55 Noclip[m] -> Nahh, better add loot boxes ...
01:56 MTDiscord <Jonathon> noclip: already been done
01:56 MTDiscord <Ronoaldo> Amazing! Thanks. I'll try coding that.
01:56 MTDiscord <Ronoaldo> the "give gift" needs to mess up with the player inventory?
01:56 MTDiscord <Jonathon> yes
01:56 MTDiscord <Jonathon> else i would drop it at the players feet
01:57 MTDiscord <Ronoaldo> cool if the inventory is full there could be a message and a command for player to claim rewards right?
01:57 Noclip[m] "orrrr. players can get an ingame dropbox where their gifts are dumped"
01:57 Noclip[m] -> Makes them pay for keys to open the box!
01:58 MTDiscord <Jonathon> more complicated, but yes
01:58 MTDiscord <MisterE> for mobs_redo's custom_attack, lua custom_attack = function( self , to_attack )
01:58 MTDiscord <MisterE> w
01:58 MTDiscord <Jonathon> just a key for claimable, toggle it on off when claimed
01:58 MTDiscord <Ronoaldo> the idea of having a mailbox would also work.. I already have the mailbox but I found no way to "search" for that one in the server
01:59 MTDiscord <MisterE> sorry
02:00 MTDiscord <MisterE> for mobs_redo's custom_attack,  custom_attack = function( self , to_attack )  what is to_attack ? is it an objectref? and how do I get the pos of self, and how do I get the position of the object to attack?
02:00 MTDiscord <Jonathon> why use mobs_redo, just use mobkit
02:00 MTDiscord <MisterE> I will discuss that after someone has answered my q, if they will
02:01 MTDiscord <MisterE> or can I do pm?
02:01 MTDiscord <MisterE> oh Ill join by irc
02:02 MTDiscord <Jonathon> i assume the mobs redo api has some attack paramaters, and it does a default one unless a custom is defined
02:02 MTDiscord <MisterE> oh so I should go look at that
02:03 MTDiscord <MisterE> and see how they get the pos
02:04 MTDiscord <MisterE> whats the irc connection info?
02:04 MTDiscord <Jonathon> https://notabug.org/TenPlus1/mobs_redo/src/master/api.lua#L2662-L2663
02:04 MTDiscord <MisterE> thx!
02:04 Noclip[m] Jonathon: mobs_redo vs mobkit?
02:04 MTDiscord <MisterE> so abt that... I love mobkit, but I have tried to write mobs for it and its still a bit beyond me
02:05 Noclip[m] Which one is better for which purpose?
02:05 MTDiscord <MisterE> also, I am trying to adapt balrog to my serverand just want to get it done, balrog is already set up for mobs
02:06 MTDiscord <MisterE> if you want to teach me to write mobkit mobs wsor, im eager to lear!
02:06 MTDiscord <MisterE> n
02:06 MTDiscord <Jonathon> mobs_redo * a grandma can write mobs for it * laggy *bloated *overhead you dont need *not very customizable mobkit * not dead simple as filling out fields to get lame basic mobs * basically complete control * minimal overhead
02:07 MTDiscord <MisterE> so im right in between the two: i dont have great coding skills so writing mobkit mobs is hard and they are buggy, but I want custom behavior. So I am trying to squeeze some of that from mobs
02:08 MTDiscord <Ronoaldo> I'm using this node here https://i.imgur.com/oUphqoD.png - it seems to have an inventory attached, and already has an owner (i.e., only the player can get it) - would it be easier to "send the item to that box"? or more complicated?
02:08 MTDiscord <MisterE> I hope to eventually convert all mobs on my server over to mobkit if I get the skills to do so, but I dont have them and I dont have the time atm to painfully figure it out with trial and error atm
02:08 MTDiscord <Jonathon> TLDR mobkit is essentially bare metal with a simple framework on top of it for convince mobs_redo is a google forum sheet to fill out with the whole top of the line kitchen(with dead weight in the cabnits) overhead used even if you dont need it
02:09 Noclip[m] Ronoaldo that probably depends on the mod?!
02:09 MTDiscord <Jonathon> the node is irrelevant, the mod it comes from is relevant
02:09 MTDiscord <Jonathon> you could be using your own fork, custom mod with same textures/model, etc
02:09 MTDiscord <MisterE> wsor: are you willing to teach me to write mobkit mobs?
02:09 MTDiscord <Ronoaldo> makes sense
02:10 MTDiscord <MisterE> I already have the basic understanding of how it works, kinda
02:10 MTDiscord <Ronoaldo> thanks for the pointers everyone, I really appreciate them ?
02:10 MTDiscord <Jonathon> MisterE: best i can do is tell you to read the manual and follow the example mods termos has made, there decently simple
02:11 MTDiscord <Jonathon> i dont have the time, sorry
02:11 Noclip[m] MisterE: Maybe you should take a look at some existing mods which use mobkit?
02:11 MTDiscord <Jonathon> ronoaldo: if your lucky the mod has a api for droping the item in the mail
02:11 MTDiscord <MisterE> I have done that and had some decentish results but they were often laggy and crashed... so im not great at it...
02:11 MTDiscord <MisterE> understand wsor
02:12 MTDiscord <MisterE> so anyhow thats why im using reso
02:12 MTDiscord <MisterE> redo
02:12 MTDiscord <Jonathon> crashing is good, you get tracebacks, lag, not doing what you expect is more annoying to track down
02:12 Noclip[m] Wait, Jonathon is wsor?
02:12 MTDiscord <MisterE> well chrashes and not doing what iexpect so yeah
02:12 wsor4035 perhaps
02:12 wsor4035 you know this
02:13 wsor4035 bridge doesnt carry discord nicks or matrix nicks
02:13 MTDiscord <Ronoaldo> @wsor this is the one I have installed: https://gitlab.com/VanessaE/homedecor_modpack/-/blob/master/inbox/init.lua
02:13 wsor4035 also, i need tomute this bloddy channel from cross pings lol
02:13 Noclip[m] Well some memories come up in my head, I think I knew it once but somewhat forget it over time ...
02:14 Noclip[m] *forgot
02:14 MTDiscord <MisterE> weirdly, to_attack is a position
02:14 MTDiscord <MisterE> it should be an objectref
02:15 MTDiscord <Jonathon> ronoaldo: no api, lame, you could override the item to log where the mailbox is placed, however it seems a player can have many mailboxes
02:15 Noclip[m] Maybe an attack doesn't have to hit the entity which was supposed to be attacked?
02:15 MTDiscord <MisterE> could be
02:15 MTDiscord <MisterE> yeah that makes a lot of sense
02:16 MTDiscord <MisterE> thx guys!
02:16 MTDiscord <Jonathon> ronoaldo: if you want to go crazy, just override the whole mailbox to use a detached inventory that every mailbox placed by that player access thus linking them all
02:16 Noclip[m] Or a dumb mob just attacks random possitions around it in the hopes to hit anything by chance.
02:16 MTDiscord <MisterE> if I want the objref i can use self.attack
02:16 MTDiscord <Ronoaldo> hmm, that seems interesting wsor!
02:17 MTDiscord <Jonathon> however i take it your already using this mod, so migrating players with multiple mailboxes full of stuff would be interesting
02:17 MTDiscord <Ronoaldo> so when the player join, I just add to that detached inventory right? it will be accesible via any player mailbox then, am I correct?
02:17 MTDiscord <Ronoaldo> yeah.. the migration would be a problem
02:18 MTDiscord <Jonathon> no, no, you would need to override the mailbox, essentially rewriting it, then yes, yes
02:18 MTDiscord <Ronoaldo> ok got it
02:18 MTDiscord <Jonathon> but your back at square one if there mail is full ?
02:18 MTDiscord <Jonathon> i say a chat command to claim if you dont want to drop it at there feet is best idea
02:18 Noclip[m] Ronoaldo: Maybe you should just implement a command or formspec which lets the player take their gift?
02:19 MTDiscord <MisterE> use an abm to convert old boxes to a new node, then remove the old node and alias it
02:19 MTDiscord <Ronoaldo> oh, you are right, the mailbox can be full lol
02:19 MTDiscord <MisterE> in the abm transfer the contents
02:19 MTDiscord <Jonathon> bloat, just make the right click event update it
02:19 MTDiscord <MisterE> true
02:19 MTDiscord <Ronoaldo> yeah, I guess the command to give if not take last 24hs seems the best route indeed, so I have less weird stuff to handle lol
02:19 MTDiscord <Jonathon> only disadvantage is they all wouldnt be synced at once
02:19 MTDiscord <Jonathon> then again, abms only work if they where all loaded at once anyways
02:20 MTDiscord <Jonathon> so no difference
02:20 MTDiscord <MisterE> well then you have to tell players to click their boxes before you can remove the old nodes
02:20 MTDiscord <MisterE> with abm you will get more coverage
02:20 MTDiscord <Ronoaldo> the only mod I ever done was this, and it was even based on another one so I'm lame at coding for the game still lol - https://github.com/ronoaldo/minenews
02:20 MTDiscord <Jonathon> you do not remove the old nodes, you override them to be the new functionality
02:20 MTDiscord <Jonathon> minetest.override_item exists
02:21 MTDiscord <MisterE> that works on nodes too?
02:21 MTDiscord <Jonathon> items is craftitems, nodes, tools, etc
02:21 MTDiscord <Jonathon> everything
02:21 MTDiscord <MisterE> not ents I guess
02:21 MTDiscord <Jonathon> correct, i think
02:22 MTDiscord <MisterE> how do I get the pos of the self of an entity?
02:22 MTDiscord <Jonathon> ent you can just overwrite, or overwrite the specific ones
02:22 MTDiscord <MisterE> self.object?
02:23 MTDiscord <Jonathon> self.object:get_pos() i think?
02:23 MTDiscord <MisterE> thx
02:26 Pexin do technic buttons know who pushed them?
02:27 MTDiscord <Jonathon> technic buttons?
02:28 MTDiscord <MisterE> I think that digilines buttonscan
02:28 queria joined #minetest
02:30 Noclip[m] Mhh, I would like to implement something fairly simple, stupid and funny as mod into mintest, I just don't know what.
02:30 Noclip[m] Any good ideas?
02:30 MTDiscord <MisterE> hmm
02:30 MTDiscord <Jonathon> hello world command that blows you up?
02:30 MTDiscord <MisterE> lol
02:30 MTDiscord <MisterE> likes explosions...
02:30 Noclip[m] Explosions goes already in the right direction.
02:30 MTDiscord <Jonathon> rather easy if depending on the tnt mod as you can call tnt.boom
02:31 Noclip[m] "<MisterE> likes explosions..." -> Exactly! xD
02:31 MTDiscord <MisterE> you could have a mod that checks chat for certian phrases or words and blows ppl up
02:31 MTDiscord <MisterE> with a tnt blst
02:32 MTDiscord <MisterE> you could have a severity tag to determine the size of the blast
02:32 MTDiscord <Jonathon> fliter mod but instead of muting, blow people up
02:32 MTDiscord <MisterE> yea!
02:32 MTDiscord <Jonathon> and turn off item save
02:32 MTDiscord <Jonathon> thats not really a new mod so much as a fork tho
02:33 MTDiscord <Jonathon> you could be lame and make yet another armor/tool set mod
02:33 queria joined #minetest
02:34 MTDiscord <MisterE> you could make something fun: FOr one of my early mods I made concrete that is in a bucket that you can place liquid concrete and it flows and then hardens
02:34 MTDiscord <Jonathon> anyways, i guess while people are around, anyone knowledgeable on gennotify around? specifically relating to cave events as im not having much luck and it doesnt seem that anyone has used them (on github via search)
02:35 Noclip[m] Mhh, I might just do a weapon.
02:35 MTDiscord <MisterE> do a special one
02:35 Noclip[m] Of course one with lots of explosions ...
02:35 MTDiscord <MisterE> do a weapon that adds a tank of water on top of a player (replacing air, and after 2 min it dissapears
02:35 MTDiscord <MisterE> leaving air
02:36 MTDiscord <MisterE> or do one of water and one of lava
02:37 MTDiscord <MisterE> you could do a weapon that teleports the opponent to the nether
02:37 MTDiscord <MisterE> you could do an antigrav gun that sets the opponent's grav to 0 and then adds upwards accelleration
02:38 MTDiscord <MisterE> which then wears off after 10 sec
02:38 MTDiscord <MisterE> or 5
02:39 MTDiscord <MisterE> you could make a mod that adds laughing gas...
02:39 MTDiscord <MisterE> which is a bottle of gas you can eat
02:39 Noclip[m] Is there a way to rotate the view?
02:39 Noclip[m] (I guess no)
02:39 MTDiscord <MisterE> which when you eat is, sounds of laghter eminate from you and you slowly float upwards
02:39 MTDiscord <MisterE> yes
02:39 MTDiscord <MisterE> there is
02:40 MTDiscord <GreenXenith> You can set the camera yaw and pitch
02:40 Noclip[m] Can I rotate it sideways?
02:40 MTDiscord <MisterE> no
02:40 MTDiscord <MisterE> ?
02:40 Noclip[m] Ohh that's sad.
02:40 MTDiscord <MisterE> you could use voxelmanip to rotate the entire mapblock sideways
02:41 MTDiscord <Jonathon> >begginer mod >voxelmanip >internal screaming
02:41 MTDiscord <GreenXenith> (disclaimer: that was a joke)
02:41 Noclip[m] Cause I was thinking about this: https://youtu.be/_aAqz0fVpCk
02:42 MTDiscord <GreenXenith> That can almost be done without needing to roll the camera
02:42 MTDiscord <Jonathon> if you want to make your own mapgen
02:43 MTDiscord <Jonathon> be much simplier tho if the camera wasnt as limited
02:43 MTDiscord <MisterE> you can play that with minetest right now
02:43 Noclip[m] "<MisterE> you could use voxelmanip to rotate the entire mapblock sideways"
02:43 Noclip[m] -> Is this even possible with the built-in mapgens or would I need a custom lua mapgen for that?
02:43 MTDiscord <MisterE> there is a fork of minetest or a mod, i forget which adds worlds planets which are 3d, and have sides
02:44 MTDiscord <MisterE> and on the sides of the planets they are like that
02:44 MTDiscord <GreenXenith> It is technically possible to use builtin mapgens if you do some seriously janky on_generated hooks
02:44 Noclip[m] Interesting!
02:44 MTDiscord <MisterE> lol
02:44 MTDiscord <MisterE> this would be weird, but it would be a fun experiment
02:45 Noclip[m] GreenXenith: How much work would that be?
02:45 MTDiscord <GreenXenith> If you know what youre doing, its pretty simple
02:45 Noclip[m] "Interesting!" -> This was referring to the planets mod.
02:45 MTDiscord <MisterE> if you dont it would be a fairly long learing experience which you would come out the better for
02:46 Noclip[m] GreenXenith: And if I have absolutely no idea what I'm doing? ... xDDD
02:46 MTDiscord <GreenXenith> Well, good luck
02:46 MTDiscord <MisterE> probably best to start with adding nodes that do something intseresting
02:46 MTDiscord <MisterE> maybe make nodes for making a minigame ore something
02:47 MTDiscord <GreenXenith> Catch the current chunk position on_generate, rotate the position from sideways to normal to figure out which chunk it should be, save whatever exists at this new position, delete the new chunk, force load it, copy and rotate it, restore the chunk, and paste the data to the original chunk.
02:48 MTDiscord <Warr1024> how would you handle falling_node and entity code?
02:48 MTDiscord <MisterE> programming question: I have 2 points, p1 and p2 I want to add velocity to the obj at p2 towards the obj at point 1  I had:
02:48 MTDiscord <MisterE> self.attack:add_velocity(6*vector.normalize(vector.direction(a_pos, s_pos)))
02:48 MTDiscord <Warr1024> if you have gravity wrong universally, not just for the player, then sandy beaches become a crash hazard
02:48 MTDiscord <GreenXenith> anything physicsy or watery would need some new handling
02:48 Noclip[m] Mhh, if I want to stick with the video I shouldn't rotate the whole world because in the Minecraft video only the player is sideways, everything else stays normal.
02:49 MTDiscord <GreenXenith> the point is that the only way to do the Minecraft thing is to do the inverse
02:49 MTDiscord <MisterE> but that doesnt work and Im thinking that my math ideas are wrong here anyways
02:49 MTDiscord <GreenXenith> if you cant rotate the camera, rotate the entire world
02:49 MTDiscord <Warr1024> pretty sure gravity direction cannot be changed on the player, MT's physics controls for player are entirely different than for ents and much more limited
02:49 MTDiscord <GreenXenith> yeah that oo
02:50 MTDiscord <GreenXenith> its currently more feasible to rotate the entire world and every entity than it is to rotate the player
02:50 MTDiscord <GreenXenith> too*
02:50 MTDiscord <Warr1024> MisterE: is vector.direction different from vector.normalize(vector.subtract())?  Because the latter is what I usually use...
02:50 Noclip[m] This is important because I wouldn't want all mobs to fall from the world. Also textures (like the one of grass) would cause issues with a rotated world.
02:50 MTDiscord <GreenXenith> Nah, everything can be rotated
02:50 MTDiscord <GreenXenith> textures can be swapped automatically
02:50 jadzia joined #minetest
02:50 MTDiscord <Warr1024> Everything can be rotated, it just won't necessarily be easy
02:51 MTDiscord <GreenXenith> mobs would be overriden to swap x or z with y
02:51 MTDiscord <Warr1024> There are a lot of tedious corner cases to dig out
02:51 MTDiscord <GreenXenith> well, s/mobs/entities
02:51 MTDiscord <MisterE> Warr Im open to suggestions.... im kinda fuzzy on vectors
02:52 MTDiscord <Warr1024> I'm pretty sure that vector.multiply(vector.normalize(vector.subtract(destination, source)), speed) should work
02:52 Noclip[m] "<GreenXenith> Catch the current chunk position on_generate [...]"
02:52 Noclip[m] -> This sounds like it could cause serious ressource issues.
02:52 MTDiscord <MisterE> could you explain what vector.normalize does here?
02:52 MTDiscord <Warr1024> If you don't normalize the vector then instead of "heat seeking missile" you can get an "attached with a rubber band" hook's law effect :-)
02:53 MTDiscord <MisterE> oh!
02:53 MTDiscord <Warr1024> vector.normalize should basically set the magnitude of the vector to 1
02:53 MTDiscord <MisterE> that could be useful
02:53 Noclip[m] "<Warr1024> how would you handle falling_node and entity code?"
02:53 Noclip[m] -> Mhh, those would fall sideways too then. Also we shouldn't forget water ...
02:53 MTDiscord <Warr1024> i.e. divide it by its length
02:53 Pexin this sounds terrible for multiplayer planescape acheron world
02:53 MTDiscord <MisterE> thx texting the new code
02:53 MTDiscord <Warr1024> Best thing to do is setup a test rig or something and just try it out
02:54 MTDiscord <GreenXenith> Water is the one thing that would be hard to change
02:54 MTDiscord <MisterE> I mean testing
02:54 MTDiscord <GreenXenith> and by hard I mean, not really possible
02:54 MTDiscord <Warr1024> you'd have to limboarriaify the water, probably, and then do any water mechanics on your own
02:54 MTDiscord <MisterE> nono just remove the flowing water
02:54 MTDiscord <GreenXenith> Also, the chunk juggling is pretty fast since its done all during map generation
02:54 MTDiscord <GreenXenith> and you also dont need to do much vmanip processing
02:55 MTDiscord <GreenXenith> rotating is a very simple operation
02:55 MTDiscord <GreenXenith> the rest is just overwriting data
02:55 MTDiscord <Warr1024> no, rotating within a mapchunk is simple
02:55 MTDiscord <Warr1024> rotating between them though...
02:55 MTDiscord <Jonathon> any custom mapgen mods would obviously not work
02:55 MTDiscord <GreenXenith> Bold of you to assume I didnt mean rotating within a mapchunk
02:55 MTDiscord <GreenXenith> You also seem to have missed my explanation for how to do it
02:55 Noclip[m] "<GreenXenith> the point is that the only way to do the Minecraft thing is to do the inverse"
02:55 Noclip[m] -> Maybe we should assume that the player has some sort of crippled neck and can only look sideways while being also affected by weird gravity?
02:55 MTDiscord <GreenXenith> hah
02:56 MTDiscord <GreenXenith> Honestly, probably less work to make a PR to allow rolling the camera
02:56 MTDiscord <Jonathon> yeah
02:56 MTDiscord <Warr1024> Hmm, shit, I did miss the explanation, not that it actually clarified anything
02:56 MTDiscord <Jonathon> there is a issue for it
02:56 MTDiscord <Warr1024> seems like even more of a mess...
02:56 MTDiscord <GreenXenith> you dont rotate "between chunks"
02:57 MTDiscord <GreenXenith> you rotate the chunk position to figure out which one you need to get data from, then rotate the content separately
02:57 Noclip[m] "<Warr1024> pretty sure gravity direction cannot be changed on the player, MT's physics controls for player are entirely different than for ents and much more limited"
02:57 Noclip[m] -> So I cannot implement sideways gravity? Could I make the player get accelerated sideways in some other way?
02:57 MTDiscord <Jonathon> https://github.com/minetest/minetest/issues/11554
02:57 MTDiscord <Warr1024> if you're at y=80 then you'll have to trick the game into generating x=80, then pull that data into the current y=80 mapblock and then somehow save the x=80 data to be swapped back
02:57 MTDiscord <GreenXenith> Yes, thats what the explanation went over
02:57 MTDiscord <GreenXenith> Im failing to see how I didnt explain it
02:58 MTDiscord <Warr1024> Well, you explained what you intended to do, you just didn't make it sound like a thing that's going to work
02:58 MTDiscord <Warr1024> I suppose it could function, and the lag could be livable, though it'd be callback hell to actually code up.
02:59 MTDiscord <MisterE> you could add accelleration to players every serverstep
02:59 MTDiscord <Warr1024> I guess I'll have to see the implementation
02:59 MTDiscord <Warr1024> adding velocity to player once per tick could very-theoretically work but I think the jank would kill it alone, let alone the fact that you don't get walking traction on side surfaces.
03:00 MTDiscord <MisterE> youd have to keep track of acc from other sources too
03:00 MTDiscord <MisterE> you caould implement walking traction yourself
03:00 MTDiscord <Warr1024> Yeah, I guess player control is a thing
03:00 MTDiscord <MisterE> Id like to see a spacewars minigame
03:01 MTDiscord <MisterE> with 0 grav and thrusters to move and fuel  and latching onto nodes
03:01 MTDiscord <Warr1024> I have tbh never yet seen a solid example of full server-side player physics yet.  I couldn't really say for sure how bad the jank would be in practice.
03:01 MTDiscord <Warr1024> It's often assumed it would be unlivable but that depends a lot on the kind of action in the game itself.
03:01 MTDiscord <GreenXenith> You start with a chunk position. This needs to be filled in with sideways world, so this position is effectively the chunk after the world has been rotated. Step 1: Rotate the position as if you were rotating it back into place to give you your source chunk. Step 2: Save whatever is at the source chunk using vmanip (dirt-simple read). Step 3: minetest.delete_area(source pos) Step 4: minetest.emerge_area(source pos) Step 5: save this
03:01 MTDiscord new data (see step 2) Step 6: Put back what you saved in step 2 (vmanip again). Step 6: Rotate your saved source chunk. This will require some simple math. Step 7: Paste the saved source chunk.
03:01 MTDiscord <MisterE> you could do a node confined game, and have gravity be whatever you want
03:02 MTDiscord <MisterE> where you are a node
03:02 MTDiscord <Warr1024> Green, I think the spatial manipulations you're talking about are beyond words, it may need pictures or something to show where everything goes when
03:02 MTDiscord <GreenXenith> I can do that
03:03 Noclip[m] "<Warr1024> rotating between them though..."
03:03 Noclip[m] -> Wouldn't this requre generating chunks very far away to then copy/map them to the current position and then map the chunk which would be at the current position to another chunk which is super far away and repeat that until you got a full rotation (do it 4 times)?
03:03 Noclip[m] Is that even possible?
03:03 MTDiscord <Warr1024> yeah, that's what Green's trying to explain
03:03 MTDiscord <Warr1024> it IS possible, using emerge_area and such, to force remote areas to load
03:03 MTDiscord <Warr1024> then it's just a matter of swapping out the guts
03:03 MTDiscord <Warr1024> but I think there are a couple of pitfalls to it
03:04 MTDiscord <Warr1024> one of course is that emerge_area is async, and you can't wait for a callback inside on_generated
03:04 MTDiscord <Warr1024> another is making sure that your generation hack is reentrant
03:04 MTDiscord <Warr1024> another will be dealing with the momentary jank when the current location is generated with all air or stone while you're waiting for the other area to emerge
03:05 MTDiscord <Warr1024> hmm, I suppose the last one SHOULD be okay as long as the player can't catch up wit hth egenerted boundary
03:05 MTDiscord <GreenXenith> I feel like you get what im saying just fine, you're just worried about callback issues ?
03:05 MTDiscord <Warr1024> I mean I get the underlying principles
03:05 MTDiscord <Warr1024> I just worry that getting the specific sequence is going to be hard
03:06 MTDiscord <Warr1024> This is one of those kinds of things where in principle it should work, but the problem is nobody wants to pay it in principle, they want to play it in minetest, and we know how things work in minetest :-|
03:06 MTDiscord <Warr1024> If you think it will take 3 ugly hacks to make it work, it will probably take 5
03:07 MTDiscord <GreenXenith> Well, I could drop what im working on to whip up a PoC
03:07 MTDiscord <Warr1024> Haha, what you're working on is like 60% likely a PoC for something else :-D
03:07 MTDiscord <GreenXenith> Well, what im working on is waffles
03:07 MTDiscord <GreenXenith> and im kinda tired of it atm
03:07 MTDiscord <Warr1024> haha, I was gonna put 30% on that.
03:07 MTDiscord <MisterE> yummy waffles or ingame?
03:08 MTDiscord <Warr1024> I would hope both
03:08 MTDiscord <GreenXenith> yummy ingame waffles
03:08 MTDiscord <Warr1024> I mean, if you're updating a waffle mod for MT then that's as good a reason as any to go eat some research material.
03:08 MTDiscord <GreenXenith> I dont follow
03:08 MTDiscord <GreenXenith> oh
03:08 MTDiscord <GreenXenith> Now I follow
03:08 MTDiscord <Warr1024> Yes, following is normally done on a delay :-)
03:11 Noclip[m] Okay, let's just summarize that my first serious mod shouldn't try to rotate every single thing that exists within minetest (except for the player) ...
03:12 Noclip[m] I mean it would probably be litterally everything except for the player that would need to be rotatet.
03:12 MTDiscord <Warr1024> don't get too ambitious all at once or you'll just make yourself ragequit
03:13 MTDiscord <Warr1024> Start with something pretty simple, like adding a node or a tool or an item
03:13 MTDiscord <Warr1024> then you'll have a "comfort area" and can target your future projects to stretch a certain % beyond your comfort area
03:14 Noclip[m] Warr1024: That was already the idea:
03:14 Noclip[m] "Mhh, I would like to implement something fairly simple, stupid and funny as mod into mintest, I just don't know what."
03:14 MTDiscord <Warr1024> A good project probably involves something you're not sure if you can do, but backed by a bunch of other stuff that you know you can do to tie it all together if that part works out.
03:14 Noclip[m] Something simple which is somewhat funny and stupid at the same time.
03:14 MTDiscord <Warr1024> Hmm, simple, funny, and stupid... I feel like I should have a lot of ideas, but most of mine are just funny and stupid, while simple is a bit trickier...
03:15 Noclip[m] I might just go with something explosive ...
03:15 MTDiscord <Warr1024> Oh, one thing I always wanted was a mod that sort of made fun of MT's obsession with food mods by making food into building materials
03:15 Noclip[m] Explosions in computer games are always a good thing xD
03:16 MTDiscord <Warr1024> heh, I already did a parody of explosions :-D
03:16 Noclip[m] Your doomsday mod?
03:16 MTDiscord <Warr1024> Yep
03:16 MTDiscord <Warr1024> a bomb as poweful as vacuum decay
03:16 Noclip[m] Honestly I never tried that so far ... didn't really see a point in it xD
03:16 MTDiscord <Warr1024> actual real in-game explosions can be surprisingly complicated
03:17 MTDiscord <Warr1024> there's the tnt mod you can use to cheat off of, but IIRC I never liked how it does explosions
03:17 MTDiscord <Warr1024> The point in the doomsday mod was purely satire
03:17 MTDiscord <Ronoaldo> do i have a way to check the count from an itemstring after I "cast" it with ItemStack(itemstring)?
03:18 MTDiscord <Warr1024> I will never choose the serious option of there's an alternative; even in a very serious game I've got eggcorns and pumwater.
03:18 MTDiscord <Warr1024> ItemStacks have get_name, get_count, etc.
03:18 MTDiscord <Ronoaldo> thanks!
03:18 MTDiscord <Warr1024> In fact converting an itemstring to an ItemStack and using get_count is the canonical way to get the count out of it
03:19 MTDiscord <Warr1024> itemstrings cannot be as safely and easily parsed as most people probably think they can
03:19 MTDiscord <Ronoaldo> perfect
03:19 Noclip[m] When I started playing Minetest Mineclone's TNT was really weird and quite different from Minecraft. Looks like they fixed that by now, that's awesome!
03:20 MTDiscord <Warr1024> MTG's TNT last I saw just destroyed nodes within a certain radius of the TNT.  That meant it could "tunnel" through non-explodable nodes.  Dunno if they've fixed that yet.
03:20 MTDiscord <Warr1024> MCL2 would have to fix it for sure to be MC-like, while MTG, I guess, could just choose not to.
03:21 MTDiscord <Warr1024> MC's TNT actually made sense, even if it was computationally very costly.
03:23 Noclip[m] Obsidian seems to work as expected with MCL2's TNT so I guess they fixed that.
03:25 Noclip[m] One thing that is still not perfect are upwards towers. MCL2's TNT still has a minimal delay if fused by another explosion which is too high for it to reliably fuse TNT over it while it's falling.
03:28 MTDiscord <Warr1024> I don't think I want to mess with detonation in mods again, so I don't see myself adding TNT to anything.
03:28 MTDiscord <Warr1024> I have messed with deflagration and it was a bit fun though.
03:46 MTDiscord <Ronoaldo> I'm on the right direction here? (Trying to implement a simple daily reward for players who contributed): https://gist.github.com/ronoaldo/348eea9db83c2d16fe04fc7960321958
03:48 MTDiscord <Jonathon> yes, but actually no
03:48 MTDiscord <Jonathon> your not using player meta, and your current solution has no persistence thus is worthless
03:49 MTDiscord <Jonathon> actually, hold on
03:49 MTDiscord <Warr1024> code I'm looking at is using player meta
03:49 MTDiscord <Ronoaldo> I just made two edits for a typo (playe -> player) and to return true at the end of can_claim()
03:49 MTDiscord <Jonathon> i read the variable wrong, sorry
03:50 MTDiscord <Warr1024> A block of diamond and a block of mese sounded like they'd be a hell of a big reward just for showing up, but then I realized that the value of those commodities would probably tank if you flooded the market with them, so I guess it'd balance out ?
03:50 MTDiscord <Ronoaldo> I'm quite verbose just to make sure I'm understanding... zero experience with Lua itself or Minetest apis...
03:50 Noclip[m] "<Warr1024> code I'm looking at is using player meta"
03:50 Noclip[m] -> One of you got man in the middled.
03:50 MTDiscord <Jonathon> you dont have anything for new players tho?
03:50 MTDiscord <Warr1024> Actually it sounds like it was Jonathon's eyeballs in the middle.
03:51 Noclip[m] lol
03:51 Noclip[m] based
03:51 MTDiscord <Ronoaldo> @Warr1024 the reward will be granted for the players who are supporting with real cash the server hosting (I'll add perhaps some sort of permission maybe?)
03:51 MTDiscord <Jonathon> and shouldnt it be meta:get_int
03:52 MTDiscord <Warr1024> last_claim + now < 86400 ... this feels wrong to me.
03:52 MTDiscord <Ronoaldo> I have the default initial stuff from minetest_game
03:52 MTDiscord <Warr1024> should be if now - last_claim < 86400 then return false?
03:52 MTDiscord <Ronoaldo> 1 day in seconds since last time you claimed (my attempt)
03:52 MTDiscord <Ronoaldo> It's 52 past midnight so I'm sure my math is wrong
03:52 MTDiscord <Jonathon> the player can never claim if they dont have the meta key
03:52 MTDiscord <Warr1024> last_claim + now will never be < 86400
03:53 MTDiscord <Ronoaldo> yes, you are right.
03:53 MTDiscord <Warr1024> no, get_int I'm pretty sure returns 0
03:53 MTDiscord <Warr1024> if there's no key
03:53 MTDiscord <Ronoaldo> yep
03:53 MTDiscord <Ronoaldo> this one I checked from docs
03:53 MTDiscord <Warr1024> but os.time() will make it huge anyway
03:53 MTDiscord <Jonathon> : not .
03:53 MTDiscord <Warr1024> 0 + now will always be way > 86400
03:53 Noclip[m] Can you access any os. functions within the sandbox?
03:54 MTDiscord <Warr1024> yeah, if you call meta.get_int() it'll crash
03:54 MTDiscord <Warr1024> You can access some selected OS functions IIRC
03:54 MTDiscord <Jonathon> not to mention this will never work
03:54 MTDiscord <Jonathon> because no player will have the meta key by default
03:54 MTDiscord <Ronoaldo> changed from meta. -> meta: get_int()
03:54 MTDiscord <Jonathon> and there is nothing to add it?
03:55 MTDiscord <Ronoaldo> but meta:get_int() returns zero so last time it was used was a long time ago (epoch - ...) now() - 0 > 1 day no?
03:55 MTDiscord <Warr1024> I mean, once the typos are fixed and that math issue, it ougtta work okay
03:55 MTDiscord <Ronoaldo> did an update now
03:55 Noclip[m] "<Warr1024> You can access some selected OS functions IIRC"
03:55 Noclip[m] -> The api doesn't seem say anything about that but maybe that would also not be the right place for it?!
03:55 MTDiscord <Warr1024> the fact that players don't have the meta keys to start out will not be a problem
03:55 MTDiscord <Jonathon> true, get_init returns 0, not nil
03:55 MTDiscord <Jonathon> get(key) is nil
03:55 MTDiscord <Jonathon> i should sleep
03:55 MTDiscord <Warr1024> It wouldn't not work, it'd crash entirely
03:56 MTDiscord <Warr1024> crashing at least would let you know there's a bug :-)
03:56 MTDiscord <Ronoaldo> gotta love stack traces ?
03:56 MTDiscord <Ronoaldo> thanks for the late night peer review! learned a bunch of new things today
03:56 MTDiscord <Jonathon> i really wasnt that much help
03:57 MTDiscord <Warr1024> Yeah, the problem is when the stack trace tells you the place where data was read and found to be in an unexpected state, but not necessarily the place where data was put into a wrong state to begin with...
03:57 Noclip[m] "<Jonathon> i should sleep" -> Sleep is overrated, just wait another 24 hours with it.
03:57 MTDiscord <Warr1024> you don't have to think you're a lot of help to actually help a lot, sometimes it's enough to be a rubber ducky
03:57 Noclip[m] lol
03:57 MTDiscord <Jonathon> noclip: maybe ronoaldo should add that as a gift to his mod ?
03:58 MTDiscord <Ronoaldo> ? )
03:58 Noclip[m] What, sleep?
03:58 MTDiscord <Ronoaldo> ok, going to finish for today - again thanks for the review and ideas and pointers and rubber duckery
03:59 MTDiscord <Ronoaldo> I'm not very good at English but perhaps that final part sounded weird - sorry
03:59 Noclip[m] No, I don't think so.
04:00 MTDiscord joined #minetest
04:00 Noclip[m] Ronoaldo: Mabe you will dream tonight about being a rubber duck.
04:00 Noclip[m] But a real one, with real quark sounds.
04:17 * Pexin steals rubber duckery
04:32 Noclip[m] Pexin joins Ronoaldo's dream to steal them?
04:32 Noclip[m] You're doing it as they did it in inception xD
04:33 Noclip[m] With several nested dreams.
04:38 MTDiscord <GreenXenith> So, re: Sideways world: Minetest really wasnt built for this. I've managed to produce at least 5 different fatal errors. One of which was Minetest detecting  18446744073530593281 objects in on mapblock ... I suspect NaN or something. Lots of grab failures and not found errors too.
04:39 MTDiscord <GreenXenith> in one*
04:40 jadzia joined #minetest
04:43 MTDiscord <Warr1024> That DOES sort of validate what I was saying insofar as the basic principles are sound but the devil is in the details...
04:44 MTDiscord <Warr1024> This will probably turn out to be something surreal like an emerge area triggered inside a mapgen callback triggering non-reentrant mapgen code and going bonkers
04:44 MTDiscord <Warr1024> you're lucky you didn't have demons fly out your nose or some shit.
04:46 MTDiscord <GreenXenith> Here's the code if anyone wants to mess with it https://gist.github.com/GreenXenith/76e22d52d33e2f085c5cad893b8fe556
04:52 Thomas-S joined #minetest
04:52 Thomas-S joined #minetest
04:52 dabbill joined #minetest
04:55 Noclip[m] I took a short look at the original Minecraft mod and it makes it super obvious that not using an API comes at a high price, too:
04:55 Noclip[m] "This mod is no longer being developed and there is no support being offered. Its newest version is for 1.12.2 only and is known to be incompatible with VanillaFix, Surge, ChiseledMe and LagGoggles."
04:55 Noclip[m] (https://github.com/Mysteryem/Up_And_Down_And_All_Around)
04:58 Noclip[m] Also that mod doesn't seem too small either (from looking at file sizes and the Readme) so I guess doing that in Minecraft is very very hacky, too.
04:59 Noclip[m] It's probably not something special for MC mods to be hacky.
05:00 Noclip[m] Does the Minetest API offer something like nightvision?
05:01 Noclip[m] (I guess the answer is no ...)
05:01 riff-IRC joined #minetest
05:02 MTDiscord <Jonathon> yes
05:13 Noclip[m] Yes to "the API offers something like that" or to "the answer is no"?
05:15 dabbill joined #minetest
05:15 MTDiscord <Jonathon> the first
05:15 MTDiscord <Jonathon> see ptime mod
05:35 Noclip[m] wsor: I'm mainly interested in nightvision for things like caves.
05:35 Noclip[m] Daylight doesn't help me there.
05:36 MTDiscord <Jonathon> see https://github.com/minetest/minetest/pull/11499 then
05:37 Noclip[m] Can I bind the jump key to another function?
05:47 Noclip[m] How do I make jumping trigger a speicfic event?
05:55 independent56 joined #minetest
06:06 Flabb joined #minetest
06:09 CWz joined #minetest
06:42 independent56 joined #minetest
06:45 independent56 joined #minetest
07:01 proller joined #minetest
07:08 independent56 joined #minetest
07:12 independent56 joined #minetest
07:37 Noclip[m] "minetest.register_globalstep" sounds like a good call to crash a server.
07:43 Norkle joined #minetest
07:48 Talkless joined #minetest
08:00 specing joined #minetest
08:01 reumeth joined #minetest
08:18 Fixer joined #minetest
08:18 independent56 joined #minetest
08:20 independent56 joined #minetest
08:22 independent56 Does rollback use minetest server uptime or real life time for the limit of 24 hours?
08:47 independent56 Ugh, my server time is 09:47:49, and here it is :13
08:47 independent56 seconds out of sync
08:54 independent56 joined #minetest
08:56 independent56 joined #minetest
09:08 calcul0n joined #minetest
09:16 independent56 joined #minetest
09:29 independent56 joined #minetest
09:41 MTDiscord joined #minetest
09:44 Taoki joined #minetest
09:47 specing joined #minetest
10:35 riff-IRC joined #minetest
11:28 Talkless joined #minetest
11:47 Talkless joined #minetest
11:49 MiniontobyPI Hey
11:51 MiniontobyPI at Protector mod (Idk who it is owning actualy, but i can search it up if needed) I get the following: https://termbin.com/vwo1
11:52 MiniontobyPI seems like the translation is messed up
11:52 sfan5 the mod author made a mistake and is printing a translation to the console
11:52 sfan5 but they don't work in the console
11:52 sfan5 hence the messed up text
11:52 MiniontobyPI oh..
11:53 MiniontobyPI I will remove the S() from the string
11:53 MiniontobyPI print (S("[MOD] Protector Redo loaded"))
11:53 MiniontobyPI so it will be
11:53 MiniontobyPI print ("[MOD] Protector Redo loaded")
11:54 AndrewYu Yup
11:54 MiniontobyPI restarting server....
11:54 MiniontobyPI I will make a issue on github
11:54 MiniontobyPI yes the message now shows up correct
11:54 MiniontobyPI 2021-08-24 05:54:22: ERROR[Main]: Failed to get paths by executable location, trying cwd
11:54 MiniontobyPI 2021-08-24 05:54:22: WARNING[Main]: Undeclared global variable "QoS" accessed at /home/minetest/minetest/mods/monitoring/init.lua:18
11:54 MiniontobyPI [monitoring] sampling: 100000 calls took 89713 us
11:54 MiniontobyPI [monitoring] registering builtin metrics
11:54 MiniontobyPI [monitoring] enabling prometheus push
11:54 MiniontobyPI [MOD] Protector Redo loaded
11:54 MiniontobyPI was kicked by ShadowBot: Message flood detected. Use a pastebin like paste.ubuntu.com.
11:54 MiniontobyPI joined #minetest
11:56 MiniontobyPI guys, how to get the original .git url from a cloned github directory
11:56 sfan5 cat .git/config
11:57 MiniontobyPI cat .git/config | grep url
11:57 MiniontobyPI works fine
11:57 MiniontobyPI thanks
11:58 sfan5 you don't have to manually dig in the files of course, git remote -v will also show you
12:00 MiniontobyPI oh thankx
12:05 MiniontobyPI sfan5: how to do a pull request from commandline
12:06 sfan5 uh, the github UI should be simpler for what you're doing
12:06 MiniontobyPI https://termbin.com/2d65
12:06 MiniontobyPI I cannot seem to make a pr from the notabug site
12:06 MiniontobyPI so i want to use cmd
12:06 MiniontobyPI so i want to use cmdline
12:07 MiniontobyPI check https://termbin.com/2d65
12:07 sfan5 ¯\_(ツ)_/¯
12:07 MiniontobyPI warn: refs/heads/master found at . but points to a different object
12:07 MiniontobyPI warn: Are you sure you pushed 'HEAD' there?
12:08 MiniontobyPI minetest$ git push . HEAD
12:08 MiniontobyPI Everything up-to-date
12:08 MiniontobyPI minetest$
12:10 riff-IRC joined #minetest
12:10 MiniontobyPI https://termbin.com/0ofdy
12:21 proller joined #minetest
12:24 kamdard_ joined #minetest
12:31 Verticen joined #minetest
12:46 MTDiscord <IhrFussel> So is it OFFICIALLY allowed to push your own server using alt accounts? I'm asking cause I feel there is at least 1 server right now that uses that method to rank higher in the server list
12:52 MinetestBot [git] nerzhul -> minetest/minetest: fix: update to alpine 3.14 (#11570) ff3aa18 https://git.io/JEnk6 (2021-08-24T12:52:05Z)
12:54 TomTom joined #minetest
13:04 kamdard joined #minetest
13:15 MTDiscord <MisterE> so, minetest gurus, I have a curious crash error that keeps occuring: the game just crashs with "bus error (core dumped)"
13:16 MTDiscord <MisterE> and ideas for how to get started fixing this? thers no filepash so I dont know what mod it is
13:17 BuckarooBanzai MisterE: remove one mod after another until the error disappears but it is most likely an engine issue, did you (re-)compile recently?
13:18 sfan5 run minetest under a debugger
13:18 MTDiscord <MisterE> sfan, how do I do that?
13:18 sfan5 OS?
13:18 MTDiscord <MisterE> Openbsd
13:18 MTDiscord <MisterE> 6.7
13:18 MiniontobyPI hey mistere
13:19 MTDiscord <MisterE> hey Miniontoby
13:19 MiniontobyPI minetestserver --debug
13:19 MiniontobyPI and all the orther params you use
13:19 MTDiscord <MisterE> thx!
13:19 BuckarooBanzai MiniontobyPI: thats not a debugger :P
13:19 MiniontobyPI oh...
13:19 MTDiscord <MisterE> oh...
13:19 MiniontobyPI and check logs
13:19 sfan5 gdb -batch -ex r -ex 'bt full' --args <the usual command line>
13:19 MTDiscord <MisterE> lol, IK that much there is no error msg
13:20 MiniontobyPI oh right it was in the core it self...
13:20 MTDiscord <MisterE> sfan5, ok and what should that do?
13:20 MTDiscord <MisterE> how will i get the debug
13:20 sfan5 it'll print the information to the console
13:21 MTDiscord <MisterE> ok, and when the crash occcors I will have some clues
13:21 MTDiscord <MisterE> Also I can recomplile
13:21 sfan5 you might not get any useful info unless you recompile as a debug build
13:21 MTDiscord <MisterE> no i have not recompliled recently and i am using the 5.5 dev
13:22 MTDiscord <MisterE> huh ok...   I will come ask how to do that when I have the time to tackle that
13:28 Pokey joined #minetest
13:28 lumidify_ joined #minetest
13:28 mmuller_ joined #minetest
13:28 x_ joined #minetest
13:28 rymiel joined #minetest
13:28 hmmmm joined #minetest
13:28 search_social joined #minetest
13:28 shredder joined #minetest
13:28 Cork joined #minetest
13:28 jfred joined #minetest
13:28 nuala joined #minetest
13:31 MiniontobyPI why is making pull-requests SOO DIFFICULT
13:32 YuGiOhJCJ joined #minetest
14:54 Extex joined #minetest
14:58 independent56 joined #minetest
15:37 Flabb joined #minetest
16:03 independent56 joined #minetest
16:14 Conrad joined #minetest
16:24 Verticen joined #minetest
16:40 longerstaff13 joined #minetest
17:16 garywhite joined #minetest
17:16 garywhite joined #minetest
18:15 independent56 Does rollback use minetest server uptime or real life time for the limit of 24 hours?
18:17 independent56 joined #minetest
18:20 independent56 And what about my hiking infastructure (cross-city walking? http://56i.duckdns.org/dokuwiki/lib/exe/fetch.php?media=hp1_3.png http://56i.duckdns.org/dokuwiki/lib/exe/fetch.php?media=hp1_1.png
18:21 independent56 More info: http://56i.duckdns.org/dokuwiki/doku.php?id=proposals:hiking
18:26 Krock independent56: when can I edit this wiki again?
18:26 independent56 `When i make account registration work... not that i will want you editing again
18:27 Krock can I still upload random files?
18:27 independent56 Hopefully not
18:28 Krock > Sorry, you don't have enough rights to upload files.
18:28 Krock why not?
18:28 independent56 No account
18:29 Krock make the registration to work
18:29 jonadab Oh, is someone working on the MT wiki?  I was assuming it was abandoned, with the certificate being more than a week expired.
18:29 Krock jonadab: works for me
18:30 independent56 joined #minetest
18:30 Krock oh wait. I accepted the invalid cert
18:30 jonadab I can work around it with an exception, yes; but the cert expired on the 10th.
18:30 jonadab Granted, recently-expired certs are not usually an actual security risk.
18:31 independent56 My own personal wiki for  my own server, with no links to mtwiki
18:31 jonadab But browsers give Big Scary Warnings for them.
18:31 jonadab independent56: Oh, nevermind then.
18:33 independent56 joined #minetest
18:38 Pexin irssi protocol module for MT. ever attempted?
18:48 jonadab You mean irc?
18:48 jonadab Yeah, the VanessaE servers have that installed.
18:49 jonadab The chat for all of her various servers (creative, survival, etc.) are gated together through a single channel on Libera.chat.
18:49 Pexin I mean the inverse, using irssi to connect directly to MT
18:50 Pexin only for chat obviously
18:51 jonadab Ah.
18:51 jonadab That I don't know.
18:52 Pexin yeah, very niche. it would just be nice to ssh -> screen -> irssi -> MTchat without running the client. I plan to look into it but figured I'd ask first if anyone is already as crazy as me
18:54 jonadab I mean, in _principle_ it's not conceptually hard.  Just yank out the talk-to-server code from the MT client, rewrite it in Perl, put in "just stand there" stub code for the player's actual activity, and hook up the chat to the irssi UI.
18:54 riff-IRC joined #minetest
18:55 Pexin ye. principle can kill though   :]
18:55 jonadab There might be some slight differences between the chat protocols to work around (in terms of max message length and/or which characters are acceptable or need escaping), but the irc mod for MT probably has info about all that in it.
18:55 jonadab Pexin: All that's left is the Implementation Details.
18:55 jonadab See also "small matter of programming".
18:56 Pexin "oh yeah it's nearly done, all I need to do is write the whole thing"
18:56 jonadab Yes.
18:56 jonadab You've already finished visualizing the conceptualization process.  That's the hard part.
18:58 independent56 Why won't mods load when i am running a minetest server using a service? is there an example service config i can take from
18:59 sfan5 you're probably running it with different flags than usual
18:59 sfan5 if it was the same it'd act the same too and load your mods (assuming it works if you start it manually)
19:00 independent56 I use the command i use every time, placed in a sh script, and then run that using absh in the servic ecommand thing.
19:00 independent56 I am sure nothing has changed. But it is running from root user.
19:00 sfan5 what about the working directory?
19:01 sfan5 in any case your service manager should provide you with a way to access the logs, those might have a clue
19:01 independent56 Good idea. I will add a cd /home/independent56 when i can
19:04 independent56 Would starting a server be quicker then running the command using ssh? i assume services are closer to the OS
19:06 sfan5 possibly, but that's the wrong concern
19:06 sfan5 your concern should be that ssh'ing in if something you have to manually, starting services isn't
19:07 sfan5 is something*
19:08 independent56 I know, but i am a control freak and a ilike to be online when my server is, The command is no difficulty to me.
19:08 independent56 I would make autostart true, if i wasn't so parsanoid,
19:09 independent56 My service won't work, judge foryourself please:   Process: 23400 ExecStart=/bin/bash cd /home/independent56; bash ./minetest.bash (code=exited, status=12
19:09 jonadab independent56: Are the mods in the correct location on the filesystem?
19:09 independent56 ~/.minetest/mods
19:09 jonadab independent56: In the ~ for the user the service is running as?
19:10 independent56 No, it is telling you my locatyion of mods, and isn't used in commands due to ambiguity
19:10 sfan5 if you have the data under your user running it as root is going to introduce various problems anyway
19:10 sfan5 run it under your user
19:11 independent56 Thanks for the tip
19:11 jonadab If the service is running as root, it's going to look for mods in /root/.minetest/mods or wherever.
19:11 jonadab NOT in /home/independent56/.minetest/mods
19:11 independent56 I know that.
19:11 independent56 Oh wait i didn't
19:12 jonadab If you want it to use data from your user's home directory, then it probably needs to run as your user.
19:12 jonadab (WHich on *nix does not necessarily preclude running it as a service.)
19:12 independent56 I'm trying that right now, and hpefuly it works
19:14 Pexin running MT as root is not something that should ever be considered  x_x
19:15 independent56 Why not?
19:16 Pexin shouldn't run _anything_ as root if it's not necessary
19:17 jonadab Services are often run under a run-as-root wrapper, and then drop privs after forking.  Though the main reason for doing this (ability to use low-numbered ports) shouldn't be relevant for MT, whose default port is well over the line into user territory.
19:17 independent56 Makes sense
19:18 Pexin yeah, there's no need to think about low numbered ports
19:18 Pexin this isn't apache
19:18 jonadab But sometimes people forget that that's *why* services are started as root, and just remember that services are usually started as root.
19:19 independent56 joined #minetest
19:21 independent56 joined #minetest
19:22 jonadab There's also xinetd, but I'm not at all sure you'd want to run MT that way.
19:22 jonadab I can imagine all sorts of things going wrong with that.
20:01 specing joined #minetest
20:12 longerstaff13 joined #minetest
20:13 proller joined #minetest
20:35 proller joined #minetest
20:38 independent56 joined #minetest
20:40 independent56 joined #minetest
21:21 Elzington joined #minetest
21:21 Verticen joined #minetest
21:46 jadzia joined #minetest
22:27 Extex joined #minetest
22:43 Extex joined #minetest
22:49 independent56 I still can't belive i only have 62 Km^2 to play with. London is 1.5 K Km^2, and i can't build a london wihout making muliple worlds.
22:56 Pexin what lunatic would want to makHEYOOOO
22:56 proller joined #minetest
22:59 specing independent56: by the time you finish filling those 62km^2, minetest will already have that limit lifted
22:59 independent56 haha yeah
23:00 independent56 I do hope. My server is very rural, tiny villages 1 K nodes away from  each other.
23:00 independent56 I am eating up land.
23:00 MTDiscord <Jonathon> if you got topgraphical info and wrote a mapgen, you would only be limited by how long it takes to emerge it
23:01 * Pexin watches disk space implode
23:01 MTDiscord <Jonathon> lol, yeah
23:02 MTDiscord <Jonathon> i mean, take whatever skyscraper size to nodes, say 200 for example, add another hundred for subways if you build those, you only need 30k*300*30k so you could save some disk there
23:02 MTDiscord <Jonathon> wasnt shad or someone on the forums emerging full maps for custom mapgen testing, could ask them how big they get
23:06 MTDiscord <Warr1024> it's not 62km^2, it's (62km)^2, i.e. 62^2 * km^2, or 3844 km^2
23:07 independent56 I man ^2 as in the visual square Symbol.
23:08 MTDiscord <Warr1024> I mean that the Minetest mapgen world surface is 3844 square kilometers (theoretically more because it's not flat)
23:09 independent56 I mean, looking at a cube with a slanted cut fromabive looks the same as a regualr, straight cut. That is the 62 Km.
23:09 MTDiscord <Warr1024> square kilometer and kilometers, squared are not quite the same thing, so if you look up figures for comparison, make sure you are comparing the right thing...
23:10 independent56 hmm'
23:14 * Pexin kyuubiks ur skware
23:14 olliy1or joined #minetest
23:17 AliasAlreadyTake joined #minetest
23:27 proller joined #minetest
23:48 Elzington joined #minetest

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