Luanti logo

IRC log for #luanti, 2026-02-06

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

All times shown according to UTC.

Time Nick Message
03:32 vampirefrog joined #luanti
03:45 amfl joined #luanti
04:37 aliasreadytaken joined #luanti
05:00 MTDiscord joined #luanti
05:58 rubenwardy joined #luanti
06:00 burgeresque joined #luanti
07:18 FeXoR joined #luanti
07:31 mrcheese !puzzle
07:31 mrcheese wait wrong channel
07:31 mrcheese xd
09:14 whosit is there an API for checking when code is evaluated? like during mod load time, or when game is running...
09:15 whosit ah, there's INIT, but it's not documented?
09:15 whosit so, should not be used?
09:16 whosit also, does not allow to distinguish mod load time...
09:22 SwissalpS what is your goal whosit? maybe there is another way to achieve what you are looking for.
09:25 SwissalpS when a mod is being loaded its init.lua is run, you can set a flag there and then either with a core.after() event or core.register_on_mods_loaded() clear the flag again.
09:25 whosit yeah, I usually have to have mod.initialized flag...
09:26 whosit I have /reload_file command, wanted to conditionally execute part of file (registration) during mod load, but not when I manually /reload_file it...
09:26 whosit I guess `if initialized` is basically same :p
09:27 SwissalpS you can't execute any /<command> unless everything is loaded....afaik
09:28 whosit it's a separate snippet for reloading arbitrary files...
09:28 SwissalpS sounds like you only need a local variable 'first_run' in your mod.
09:28 whosit yes, but I'm in a mood to do things in weird ways :p
09:28 SwissalpS good luck :D
09:33 whosit still, there must be a way (and having an official would not hurt :p)
09:34 MinetestBot [git] Emojigit -> luanti-org/luanti: Add support for JPEG mod screenshots (#16911) 6dd22dd https://github.com/luanti-org/luanti/commit/6dd22ddac3a0997156697033febd6764bf1ac57b (2026-02-06T09:34:34Z)
09:34 MinetestBot [git] appgurueu -> luanti-org/luanti: Document different visual size default for players 08f9439 https://github.com/luanti-org/luanti/commit/08f943902e4342628de4c0ca9e59ef8915744638 (2026-02-06T09:34:43Z)
09:34 MinetestBot [git] sfan5 -> luanti-org/luanti: Report fatal client startup errors via message box ef36023 https://github.com/luanti-org/luanti/commit/ef360231707558e318c7989e3c52c9879fd79377 (2026-02-06T09:34:52Z)
09:34 MinetestBot [git] sfan5 -> luanti-org/luanti: Handle unified GL driver init errors correctly b1ed8f2 https://github.com/luanti-org/luanti/commit/b1ed8f25cefbf96e29519fc516f2f92b64ed4d24 (2026-02-06T09:34:52Z)
10:47 Juri joined #luanti
10:47 Niklp joined #luanti
12:13 sfan5 joined #luanti
12:14 mrkubax10 joined #luanti
12:20 ireallyhateirc joined #luanti
12:51 kimapr joined #luanti
13:37 user333_ joined #luanti
13:38 user333_8 joined #luanti
13:42 user333_2 joined #luanti
13:49 PoochInquisitor joined #luanti
13:50 user333_2 joined #luanti
14:03 jaca122 joined #luanti
14:16 ireallyhateirc Are block updates for far away blocks less frequent?
14:17 [MatrxMT] <Blockhead256> anything that's actually loaded should be running ABMs at the same rate, but clients can easily render further than the simulation
14:18 ireallyhateirc no I don't mean the active block area, I mean all loaded blocks
14:18 ireallyhateirc up to the horizon
14:19 celeron55 the set of loaded blocks is different for the server vs. the client
14:19 [MatrxMT] <Blockhead256> the only ones that can be loaded by the server are within the server settings for client view distance and the forceloads
14:20 [MatrxMT] <Blockhead256> when you can see a long way away on a client, most of that isn't being simulated, only what's close
14:20 sfan5 you might be seeing block updates to the client come in later
14:20 [MatrxMT] <Blockhead256> with the zoom-in control, you can load terrain that's far away
14:21 ireallyhateirc my problem is that I'm writing a mod which modifies blocks with VMs and I want all loaded blocks to be changed and visible to the client
14:21 celeron55 yeah and the game obviously doesn't stop to synchronize blocks between the client and the server, ever. block updates are always done in a best-effort manner
14:22 ireallyhateirc but it seems that far away blocks get updated with delay
14:22 celeron55 s/game/engine/
14:23 sfan5 you can use core.send_mapblock
14:23 ireallyhateirc okay, I'll try this
14:29 ireallyhateirc I thought I was playing 5d chess but it was checkers against a pigeon
14:34 ireallyhateirc sfan5, I think you mean player:send_mapblock ?
14:35 ireallyhateirc yeah seems like there's no core.send_mapblock
14:38 sfan5 i guess
14:51 ireallyhateirc could it be that blocks emerge, get cached by the client and then get unloaded?
14:52 celeron55 of course
14:54 ireallyhateirc this is what I see: https://files.catbox.moe/q4v8lc.png
14:54 ireallyhateirc dark soil, close to the player: correctly changed
14:55 ireallyhateirc bright soil, far away: not changed
14:56 ireallyhateirc to detect loaded/active blocks I use my AI slop branch for mapblock callbacks: https://github.com/luanti-org/luanti/pull/16910
14:56 ireallyhateirc VMs are spawned for each mapblock that just got loaded
15:09 cheapie I'm sure there's something I'm supposed to be looking at with the map but I'm too distracted by whatever's going on with that hand
15:16 [MatrxMT] <Blockhead256> that hand looks amazing
15:22 ireallyhateirc Blockhead256, you mean the block callbacks thing or the unfinished landscape?
15:25 [MatrxMT] <Blockhead256> the picture o the landscape with a very high res hand
15:48 ireallyhateirc is it possible that blocks could emerge, get sent to client but not be loaded?
15:48 ireallyhateirc as in never loaded
15:56 sfan5 only loaded blocks can be sent to the client
16:03 ireallyhateirc I'll recheck my AI slop code then, maybe it actually doesn't fetch all loaded blocks
16:56 rubenwardy We gave out 1,500 Luanti stickers, 300 Lua stickers, and 200 Luanti pride stickers at FOSDEM
16:57 ireallyhateirc we had a FOSDEM again? great
16:58 ireallyhateirc I'm too lazy/greedy to attend but are people having fun there?
17:13 crazylad joined #luanti
17:17 MTDiscord <the4spaceconstants2181> "stingy" may work in place of "greedy", or "cheap"
18:01 user333_ joined #luanti
18:01 user333_2 joined #luanti
18:02 user333_ joined #luanti
18:06 user333_8 joined #luanti
18:06 user333_8 joined #luanti
18:07 jaca122 joined #luanti
18:07 Guest389 joined #luanti
18:18 Guest389 joined #luanti
18:20 user333_ joined #luanti
18:24 user333_ joined #luanti
18:24 user333_ joined #luanti
18:27 mrcheese joined #luanti
18:33 mrcheese joined #luanti
18:55 qqq joined #luanti
19:06 whosit sometimes static_save=true entities go "missing": they don't load with mapblock, but after mapblock is unloaded and loaded again, they appear where they should be.
19:07 whosit how to debug this?..
19:17 celeron55 i would augmentate the mapblock saving and loading code to log the entity data, and then go from there, trying to track what's happening in the log - maybe filter by specific data to get rid of noise. the most important thing is to build a reproducible test case. figure out how to make it happen consistently. if you can do that, then you should post an issue on github because i bet many people are
19:17 celeron55 interested in figuring it out
19:24 whosit well, it's a static entity that loads/unloads many times per day on a server, it can disappear like once per week
19:24 whosit I don't even know what can be logged about it on lua side...
19:26 whosit I know for sure that reloading block brings it back, because while it was missing, I placed a "canary" there. It printed a message in on_deactivate, and when I came back - missing entity was there
19:27 whosit when it's missing, it's just not anywhere either (and if was moved, it would not appear back where it should be)
19:28 whosit I guess adding some debug to C side would help, but kinda not ideal on an active server :p
19:29 whosit people notice it because it's a missing NPC, but I think different entities from different mods were missing too...
19:34 whosit I think that it's missing while mapblock is active, but reappears on reactivation should be a big hint, but I don't know luanti internals ;p
19:35 whosit I see "failed to create active object from static object" in the source...
19:35 whosit I'll ask to check logs for that...
19:36 sfan5 i mean that sounds like cause of "entity doesn't reappear"
19:37 whosit " If couldn't create object, store static data back."
19:37 whosit https://github.com/luanti-org/luanti/blob/b1ed8f25cefbf96e29519fc516f2f92b64ed4d24/src/serverenvironment.cpp#L1595
19:58 whosit corrupted data would not make sense... since it would not be able to just load next time normally...
20:20 mrkubax10 joined #luanti
23:13 mrkubax10 joined #luanti
23:33 panwolfram joined #luanti
23:43 user333_ i'm open-sourcing my PVP game in ~15min, after that you can insult me for the terrible codebase
23:45 sfan5 is it slop-free?
23:45 user333_ yes
23:45 user333_ i wrote a lot of it, two friends contributed as well
23:48 mrcheese i've constantly advised we burn the codebase down yet it hasnt happened xd
23:50 user333_ "who needs namespacing if we can just make everything a global?"
23:50 user333_ > ^^^ how it was partially written
23:50 mrcheese *internal screaming*
23:56 user333_ okay, here we go...
23:57 user333_ done
23:58 user333_ https://github.com/a-bad-dev/simple-shooter-game
23:58 ireallyhateirc Speaking of slop, my PR is ready #16910
23:58 ShadowBot https://github.com/luanti-org/luanti/issues/16910 -- Add mapblock callbacks and tracking tables by kromka-chleba

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