Luanti logo

IRC log for #luanti, 2025-06-28

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

All times shown according to UTC.

Time Nick Message
01:18 FileX joined #luanti
02:20 diceLibrarian joined #luanti
02:20 FileX joined #luanti
02:22 Bombo joined #luanti
02:23 Bombo joined #luanti
02:40 FileX joined #luanti
02:45 aliasalreadytake joined #luanti
03:03 FileX joined #luanti
03:11 SFENCE joined #luanti
04:00 MTDiscord joined #luanti
04:04 fluxionary joined #luanti
04:06 sys4 joined #luanti
04:24 Guest61 joined #luanti
04:34 FileX joined #luanti
05:03 Helenah So far so good with LuantiRPG! https://files.catbox.moe/uct5w1.png https://files.catbox.moe/8lwwrl.png https://files.catbox.moe/cttwjb.png https://files.catbox.moe/u0ks2o.png
05:40 Helenah I was told that since Luanti v5.10, there's an option to prevent formspec's from being closed by the player, however, I have added "allow_close[false]" to my formspec and yet when I hit the Esc key, the formspec closes.
05:41 SFENCE joined #luanti
05:41 Helenah According to https://api.luanti.org/formspec/, it should not close.
05:41 [MatrxMT] <Blockhead256> that was 5.12
05:42 qqe joined #luanti
05:42 Helenah Ah, then that explains things (5.11), okay, so erm... in that case, I'm going to just kick the player off if they do that, or... perhaps I could attempt re-opening the formspec on them, what would you say best approach is? Maybe there is something I am naive about.
05:43 Helenah I mean... I am thinking of this solution in combination with the new one because 5.12 is very recent.
05:45 Helenah I do have some measures in place for things, for example, I freeze the player in place when they first log in by setting their walk speed and jump physics to 0.
05:59 SFENCE joined #luanti
05:59 Helenah Okay, I actually want to avoid using the kick option, that seems brutal, but yeah, re-opening the formspec sounds like a good idea.
06:00 gregon joined #luanti
06:04 fluxionary joined #luanti
06:15 SFENCE joined #luanti
06:17 FileX joined #luanti
06:19 MTDiscord <celeron55> If it isn't just a single game but a more universal thing and open to contributions, then that name seems fine. If it's a solo game project, then it needs a different name
06:23 shinbet joined #luanti
06:28 Helenah celeron55: If ever becomes a solo project, I'll change the name, though I never plan on doing that, I intend for it to be and always be a mod for Luanti.
06:29 Helenah It is open to contributions, yes, the licensing is GPL 3.
07:14 YuGiOhJCJ joined #luanti
07:14 MTDiscord joined #luanti
07:14 v-rob joined #luanti
07:20 fluxionary joined #luanti
07:28 jaca122 joined #luanti
07:31 ttyyls joined #luanti
07:49 Helenah celeron55: Can a github repository be set up for open collaboration and is that a good idea?
07:56 MTDiscord <celeron55> Github works mainly via pull requests. If you want people to be able to commit directly into your repo, you need to add access for each individually
07:57 MTDiscord <celeron55> Probably doesn't matter at that stage in a project anyway. Best to just keep on coding and worry about it later
08:10 MTDiscord1 joined #luanti
08:47 SFENCE joined #luanti
08:47 mrkubax10 joined #luanti
08:47 Helenah celeron55, it prevents trolls messing up the code too, right? I've seen what happens on Wikipedia...
08:48 Helenah I'm liking this function: rpg.register_welcome_message("Your character has been created!\nWelcome to the world, {player_name}, your race is {race} and your class is {class}!\nCharacter Statistics:")
08:50 Helenah That message would dispaly in the in-game cat right after character creation form has been filled in by the player.
08:50 Helenah *display
08:50 Helenah *chat
08:51 [MatrxMT] <y5nw> Helenah: If you are worried about vandalism you can (and arguably it is a good idea to) start by having everyone submit PRs and slowly giving others (if you trust them sufficiently) write access to the repo
08:52 Helenah hmm
08:52 Helenah I think this is the furthest I've ever got with a Luanti mod...
08:53 Helenah And I suck at Lua... someone even ran the comment "You are coding in Lua like someone who does not know Lua", I said "That is because I don't know Lua, but I know coding theory."
08:56 Helenah Would the Luanti API ever have a function exposed that allows for mod writers to code in some things to be done before the world is loaded and the player spawned into it? I think this would be a good idea personally.
08:58 Helenah Because right now I'm having to freeze the player until they've completed the character creation form.
09:13 oneeyedalien joined #luanti
09:21 fluxionary joined #luanti
09:35 oneeyedalien joined #luanti
09:37 jaca122 joined #luanti
09:40 FileX joined #luanti
10:11 FileX joined #luanti
10:31 MTDiscord <the4spaceconstants2181> plural² (technically "people" is singular but use as plural means iterating over contents) -# what am I talking about
10:34 [MatrxMT] <Blockhead256> `for person in pairs(people) do ... end`
10:54 turtleman joined #luanti
11:43 FileX joined #luanti
12:12 fluxionary joined #luanti
12:19 Sharpman joined #luanti
12:20 ttyyls joined #luanti
12:21 SFENCE joined #luanti
12:29 cheek_pain joined #luanti
12:31 Sharpman joined #luanti
14:34 bwarden joined #luanti
14:36 silverwolf73828 joined #luanti
15:54 Leopold joined #luanti
16:31 SFENCE joined #luanti
16:43 Kimapr i've been puzzled by a very strange networking heisenbug with Luanti and my own proxy ( https://git.kimapr.net/kimapr/confiltermon ) for several days and i'm not even sure which is to blame here because i really can't see what i'm doing wrong with the proxy
16:45 SFENCE joined #luanti
16:45 Kimapr the outward appearance of this bug is that luanti gets into a state where server-sent updates arrive and get processed by the client, but nothing the client does except disconnects is processed by the server
16:47 Kimapr i looked into one client trace-log of this, and it seems that the reliables channel 0 got stuck on packet seqnum 1499 specifically, and it keeps trying to resend it but never receives an ACK for it, but other channels work fine and next packets on the channel also get ACK'd
16:49 ineva joined #luanti
16:51 Helenah Looking through the API, I'm not finding a way to check player walk speed.
16:52 ShadowBot joined #luanti
16:52 ShadowNinja joined #luanti
16:53 SFENCE joined #luanti
16:53 Kimapr https://home.kimapr.net/lappy/uploads/767d972689c809726a4bf898f73d0440/log.html last 33 seconds of the log and also the entire log: https://home.kimapr.net/lappy/uploads/aa52abebea4c7f6bf597b3ce35ce60fc/strangemt.txt
16:56 cheapie Helenah: player:get_physics_override().speed
16:56 cheapie (untested)
17:04 Kimapr the bug only seems to happen when multiple luanti servers are running at the same time and only to the first player who joins, even if they rejoin
17:04 Helenah Kimapr: Multiple entirely separate luanti servers or multiple instances of the same luanti servers, the former is fine to do, the latter is foolish.
17:05 Helenah cheapie: Thanks
17:05 Kimapr Helenah: multiple entirely separate luanti servers! they run on different worlds and different modsets
17:05 Kimapr but they're on the same machine
17:06 Kimapr also all in docker, and their startup and shutdown is controlled by the proxy software i wrote and linked
17:20 orwell96 joined #luanti
17:26 SFENCE joined #luanti
17:28 bwarden joined #luanti
17:30 SFENCE joined #luanti
17:34 Kimapr what's really frustrating is that whenever i'm trying to specifically reproduce the bug it simply doesn't happen at all, it only happens when i'm trying to play nodecore w/ wife
17:40 bwarden joined #luanti
18:36 gregon joined #luanti
18:37 v-rob joined #luanti
18:40 Helenah Kimapr: I tried playing nodecore, it felt a bit weird, interesting, but weird.
18:40 Helenah Like a totally different way of playing something like minetest_game or something.
18:44 imi joined #luanti
18:50 turtleman joined #luanti
18:56 SFENCE joined #luanti
19:22 ireallyhateirc joined #luanti
19:38 cheapie Came across an interesting machine room layout in Neustadt, gives a bit of an unusual perspective: https://cheapiesystems.com/media/2025-06-28%2014-36-08.webm
19:41 tzenfore joined #luanti
20:00 the_sea_peoples joined #luanti
20:24 SFENCE joined #luanti
20:28 Helenah I'm getting pretty confused, what declares the "player" variable?
20:29 Helenah I have stuff like "local player_name = player:get_player_name()" throughout my code, it seems I can't use it in other parts though.
20:29 Helenah Some points, I can get player name, other parts, I can't.
20:30 MTDiscord <greenxenith> You have to obtain the player from an engine method. Callbacks often provide a player object. You can get_player_by_name, you could select from get_connected_players(),, you could grab it from register_on_joinplayer(), etc
20:35 Helenah What about register_on_player_receive_fields()?
20:36 Helenah I'm sure that's to do with receiving fields of my formspecs though...
20:36 Helenah All I can say is player:get_player_name(), I can also do things like player:get_player_physics(), etc
20:38 MTDiscord <greenxenith> If the function passes you a player object, then you have a player object
20:39 MTDiscord <greenxenith> Registered callbacks requires you to define the function, then that function will be called with the paramaters defined in the API. receive fields passes player, formname, fields.
20:40 Helenah In lua, how do I check what objects a function passes? Also, what is the best way to say pass player name to another mod? My mod is to be an API for other mods, in other mods, I want to pass player along with attributes to do with that player that's also to do with the API.
20:40 Helenah Like I'm trying to write a function called rpg.get_player_attributes()
20:42 Helenah I'll be honest, I come from python, c and C++
20:42 MTDiscord <greenxenith> Have you read the API documentation? https://github.com/luanti-org/luanti/blob/master/doc/lua_api.md
20:43 MTDiscord <greenxenith> That will outline the parameters a callback will expect to pass
20:43 Helenah Yes
20:44 MTDiscord <redundantcc> type (ref) can be used to directly determine what data type you have a reference to.
20:44 MTDiscord <greenxenith> It will not be useful for engine objects though
20:44 MTDiscord <greenxenith> And is not relevant to your usecase
20:44 MTDiscord <redundantcc> Whether or not that will always be the case when passed from the function is a matter of implementation and documentation though, and you shouldn't rely on it always being true.
20:44 MTDiscord <greenxenith> As for passing things around, API mods usually define a global table with methods that other mods can access
20:46 MTDiscord <redundantcc> Don't engine objects get passed to Lua as userdata or something? When trying to identify a function signature I could still be useful to probe it using helper functions like dump or type?
20:47 MTDiscord <greenxenith> Sure, you could do that. Once again, not helpful or relevant to the question
20:48 MTDiscord <greenxenith> there is also core.is_player() in particular
20:48 MTDiscord <greenxenith> Rather than trying to heuristic the results from dump2 or whatever
20:49 MTDiscord <greenxenith> Anyway, when you pass a player object around, keep in mind that they dont stay valid forever (players disconnect). Usually not a problem unless you have any delayed methods. Some people also try to guard against API users passing invalid player objects. Or pass names and get a new ref every time (yuck)
20:54 SwissalpS joined #luanti
21:11 fluxionary joined #luanti
21:24 repetitivestrai- joined #luanti
22:05 orwell96 joined #luanti
22:33 panwolfram joined #luanti
23:05 Eragon joined #luanti
23:31 orwell96 joined #luanti
23:44 swee joined #luanti
23:54 tzenfore joined #luanti

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