Time Nick Message 06:05 nore hmmmm, I may know the origin of the entity duplication bug 06:07 sfan5 then fix it 06:07 nore I have not been able to trigger it yet, that is the problem 06:08 sfan5 try placing the entities directly at the chunk border 06:08 nore I tried, and also tried to load and unload that area many times 06:09 nore the items did not duplicate 06:20 nore I have a suggestion: minetest.get_gametime() 06:21 nore returns 0 at the creation of the world, and is the number of seconds since the creation of the world 06:23 celeron55 what would one do with that? 06:25 nore that would be useful to know how many game time happened since a moment 06:25 nore for example, one could change furnace so that they burn items even when unloaded, by simulating that when the block is loaded again 07:10 celeron55 nore: sounds alright then 07:51 nore celeron55, how should it be done? 07:51 thexyz https://github.com/minetest/minetest/pull/908 07:54 nore thexyz, looks good 08:05 nore how should I code that minetest.get_gametime() idea? (i.e. in what file should it go, where should it be stored on shutdown) 08:06 nore and should it be done in Lua or C? 08:10 sfan5 C obviously 08:10 nore and where? 08:12 sfan5 map_meta.txt 08:13 sfan5 wait.. 08:13 sfan5 env_meta.txt 08:13 sfan5 that file also stores the current timeofday 08:14 nore and why in C? one would have to add a lot of code for API calls, while it would be only a few lines long in Lua 08:15 sfan5 what if C and Lua try to write to env_meta.txt at the same time? 08:15 nore idk 08:16 sfan5 in env_meta.txt there is also "game_time = ..." is it that you are searching for? 08:16 nore what is that? 08:16 sfan5 I don't know 8) 08:18 nore it's exactly that... just need to add an API call 08:34 nore https://github.com/minetest/minetest/pull/909 08:51 nore sfan5: what do you think of it? https://github.com/minetest/minetest/pull/909 08:52 sfan5 the "// Do it" comment is not necessary 08:52 sfan5 You need to add it to lua_apt.txt too 08:52 sfan5 *lua_api.txt 08:52 nore I copied the code from get_timeof day() :p 08:54 nore ok, fixed 08:55 thexyz sfan5: https://github.com/minetest/minetest/pull/908 08:56 sfan5 lang_str is not freed 08:56 sfan5 the rest is fine 08:57 nore thexyz, what do you think of https://github.com/minetest/minetest/pull/909 08:57 thexyz sfan5: lang_str is not freed by design 08:58 thexyz sfan5: see man 3 putenv, it requires "char *", not "const char *" 08:58 sfan5 mhm, ok 08:58 thexyz The string pointed to by string becomes part of the environment, so altering the string changes the environment. 08:59 thexyz and freeing it will do some crazy shit, I guess 09:01 thexyz sfan5: so it's ok? 09:01 sfan5 yes 09:02 nore and for me? 09:03 sfan5 have you removed the comment and added it to lua_api.txt ? 09:03 nore yep 09:03 sfan5 thexyz: can I merge #909 ? 09:05 thexyz sfan5: yeah, I don't see any problems with it 09:05 nore sfan5, should I make furnace burn items even when not loaded in minetest_game? 09:06 sfan5 nore: you can do that but it should be configureable 09:06 nore why? is it really a problem? 09:06 sfan5 some people may not like it 09:07 nore if you say so... 09:07 thexyz sfan5: why would you not like it? 09:07 sfan5 I don't know, but there may be people... 09:08 thexyz I can only think of inconsistency 09:08 sfan5 well.. if everybody disagrees with me just don't make it configureable 09:11 nore btw, I am thinking that I could make the furnace function overrideable by mods 09:11 nore would it be good? 09:11 thexyz sfan5: dunno, inconsistency bugs me; you can't fix other mods to use the same technique 09:12 sfan5 nore: why would mods want to override the furnace function 09:13 VanessaE pipeworks does that in order to allow a furnace to send/receive items via tubes 09:13 VanessaE (and to modify the textures to versions that have tube fittings/holes) 09:32 nore sfan5: I don't know, but it is a 6-characters change 09:32 sfan5 well then do it 09:53 nore https://github.com/minetest/minetest_game/pull/200 10:00 nore sfan5: what do you think of that? ^ 10:01 sfan5 seems fine 11:22 PilzAdam nore, it would be better to add a flag to ABMs to "run" when the block is unloaded 11:23 PilzAdam "run" means simulate it when its loaded again 11:23 nore modify that in builtin? 11:23 nore or in C? 11:24 PilzAdam it has to be done in core 11:25 PilzAdam btw, env->getGameTime() returns the time in seconds since the game was started, not since the world was created 11:25 PilzAdam either the docs are wrong or you cant use env->getGameTime() 11:25 nore when you mean started, you mean the server? 11:25 PilzAdam yes 11:26 nore no, it is stored in env_meta.txt 11:26 nore I'm sure of that, I even made tests by restarting the server several times 11:28 PilzAdam the comment in environment.h:369 is wrong then 11:29 nore I didn't see that comment, since I just made my tests and then a grep to find how to access it 11:29 nore yes, I see that, the comment is misleading 14:01 celeron55 PilzAdam: i thought about what you noted and came to the conclusion that we save ourselves from a lot of useless work if we let mods just handle time themselves wherever they please 14:01 celeron55 i mean, before i said it was alright 14:02 celeron55 we'd need to add handling for unloaded time to too many places otherwise 14:27 proller sfan5, "there may be people" produce lot of never changed config options 17:52 Sokomine hi 18:12 Sokomine anyone here? 18:12 Exio4 maybe? 18:12 Sokomine option for flight enabled should i ask to much? :-) 18:13 Sokomine don't know if you've read in the thread about the possible danger to redcrabs server 18:14 Sokomine i'd like to take emergency actions and save of the map what can be saved 18:14 Sokomine in theory, that ought to be possible: the client receives the map chunks it displays. what i need now is the client to store all received map chunks in a sqlite db 18:15 Sokomine https://forum.minetest.net/viewtopic.php?id=1705&p=185 18:15 Sokomine the danger is that the server may be discontinued 18:16 Sokomine with the map possibly lost. and that would be really bad 18:18 nore You should ask PilzAdam or kahrl, but I reckon it should be possible to save almost everything 18:19 Exio4 it would be a nice feature, though 18:19 nore however, if there is nothing ready until then, I think the best you could do would be to save what the network messages, and store that for later 18:19 Sokomine i think so as well. there may be some parts that may not be saved - entities and such - but those are neither particulary intresting nor are they present in huge amounts on the server 18:20 nore Sokomine, I reckon entities will be saved too 18:20 Sokomine i'd be satisfied for now if the raw data received (considering the chunks) would be written to a database 18:20 nore thexyz, do you know if that could be done? 18:20 Sokomine there's a slight difference between what the server stores per chunk and what the client gets, but i don't know it offhand. may not be overly relevant 18:21 Sokomine it *can* be done. it mostly needs the right place to plug into... 18:21 nore the question is, can it be done in one week? 18:21 thexyz does client get node meta? 18:21 nore thexyz: yes, I'm sure of that 18:21 Sokomine and it needs an interface: setup connection to the database (giving one as parameter on the command line would be helpful, but it would be sufficient as well to even compile that directly into the code) 18:22 sfan5 Sokomine: SpeedProg made a client that saves the map when its recieved but that was long time ago 18:22 thexyz nore: wow, really? 18:22 nore yep, I asked that ~1 month ago, and meta is needed for things like infotext or formspec 18:23 sfan5 .... 18:23 nore those are client-side 18:23 thexyz that sucks 18:23 Sokomine the client receives enough to display everything. that's what we need - the buildings as such. i'm pretty sure that metadata is transfered as well...but if content of chests would be lost, that would be way *less* of a loss than all those great buildings 18:23 Sokomine worldedit is no option at all in this case. it could possibly be used for small individual buildings 18:23 thexyz that should be documented in bold red 18:23 Sokomine what sucks? 18:24 nore no, worldedit could not work... it is server-side 18:25 Sokomine yes, even if we had worldedit privs, it would consume too much time to save everything 18:25 thexyz Sokomine: the fact that client gets all the meta 18:25 Exio4 that is how chests are predicted 18:26 Sokomine i'd found that part of the code which receives the server data some time ago and took a look at it (hopefully i'll find it again) - but that's only half of it. i've no experience which the database interface in c/c++ and how it's handled in mt 18:26 thexyz Exio4: but I still don't see the need to get all meta 18:26 Sokomine can someone help there? 18:26 nore I'd don't see the need too, but now it will help greatly 18:26 PilzAdam Sokomine, try SpeedProgs version 18:27 nore 1 week, if I read correctly 18:27 nore PilzAdam, how old is it? 18:27 kahrl keep in mind the whole database interface may change if the leveldb pull request is merged 18:27 Sokomine thexyz: some time ago, locked chests where changed so that they display their content only to their owner. while the intention was well, it actually is extremly annoying since players now have to wait for the server in order to see what's in their chests (an operation regulary needed) 18:27 PilzAdam the only thing it needs is to login, move and recieve mapblocks 18:27 PilzAdam so the age shouldnt matter that much 18:28 Sokomine where can i find that version of speedprog? 18:28 nore hasn't the protocol changed a lot? 18:28 PilzAdam dunno, ask sfan5 18:28 sfan5 ehm 18:28 sfan5 probably on github 18:28 sfan5 but that was pre-0.3.1 IIRC 18:28 Sokomine hmmmm. it needs to be a full client....else how shall it know what to load? 18:29 nore try that: https://github.com/SpeedProg/minetest-delta/tree/saveToLocalMap 18:29 Sokomine that may be too old 18:29 nore it is 2 years old 18:29 sfan5 I'll see if I can write a client that saves the map 18:29 PilzAdam https://github.com/SpeedProg/minetest-delta/tree/saveToLocalMap 18:29 PilzAdam oh 18:29 Sokomine what i'm asking for is not general inclusion of map-saving into the main branch. a hacky solution may be sufficient 18:30 Sokomine but if it's 0.3.x it may not connect to a 0.4.4 server? 18:30 sfan5 0.3 won't connect to a 0.4.4 server 18:30 Sokomine ok :-( 18:30 PilzAdam well, we could just make the client say its 0.4.4 18:31 PilzAdam as I said, the only thing it needs to do is login, move and recieve mapblocks 18:31 sfan5 that won' work 18:31 sfan5 *won't 18:31 Sokomine the code needed would not be much. as i said: it needs to open the database for writing; closing it after disconnecting might be a good feature as well; and it needs to store the chunks in the database. no neat interface needed. not for that 18:31 sfan5 0.3 doesn't have the whole name <-> id mapping stuff 18:31 Sokomine name of the database file can be hardcoded 18:31 sfan5 Sokomine: I'll see if I can do that right now 18:32 OldCoder So Redcrab is gone? 18:32 sfan5 it will base on the leveldb branch (which makes it easier for me to code it) 18:32 Sokomine sfan: that sounds fine! 18:32 Sokomine no. it still lives. it currently has a griefer problem 18:32 sfan5 :( 18:32 Sokomine rollback-check takes more than 10 minutes and mostly does not come up with a result 18:32 sfan5 ^ happens on mine too 18:32 OldCoder Ah. john_minetest said the server is abandoned and he apparently can't be contacted. 18:32 Sokomine the problem is: nobody has heard of redcrab recently 18:32 PilzAdam sfan5, then lets try if dcfac8a19802cea8785667257523cd6ae02286c1 applies to 0.4.4 client 18:33 Sokomine and cactuz is afraid that if the server isn't paid for it will be shut down and deleted 18:33 sfan5 PilzAdam: you can try rebasing if you want 18:33 sfan5 Sokomine: I don't think amazon will just delete the data if it isn't paid for 1 month 18:33 Sokomine it has been like this before. then redcrab returned for some time, even programmed nice webinterfaces, extended the node_ownership mod etc. then he was gone again 18:33 Sokomine he may as well return this time. we don't know 18:34 sfan5 hm 18:34 Sokomine it's not only his server. other servers are shut down sometimes as well. most of those don't have nearly as many and as large buildings 18:34 Sokomine take a recent code 18:34 Sokomine anyone of you familiar with the db-interface as such? 18:34 sfan5 where is the mapblock receiving code? client.cpp? 18:34 * sfan5 shows his hand 18:35 sfan5 the database abstaction leveldb adds makes it much easier 18:35 kahrl TOCLIENT_BLOCKDATA 18:35 kahrl in client.cpp yes 18:35 OldCoder That *would* be nice 18:35 Sokomine oh yes, john_minetest 18:35 Sokomine cactuz asked for that almost a year ago 18:36 Sokomine such a client could of course only download what the player sees. that may be enough - at least important buildings could thus be saved 18:36 Sokomine mines......are...less important (mostly a waste of disk space...) 18:38 PilzAdam sfan5, SpeedProgs client apparently saves in the old folder format, not in a db 18:38 Sokomine in the thread it's suggested to make screenshots, but those cannot even come close to cover the buildings 18:39 Sokomine what's needed to do this is apart from the right place (kahrl already mentioned what to look for) is mostly to put that data into a database. that's not a very difficult algorithmic problem i'd say :-) but you have to know the db-interface for the language. also knowing your way around a bit in the mt code might help 18:40 Sokomine john_minetest: exactly. what's important to save is buildings. people have built on that a long time 18:40 Sokomine saving wyverns angel statue may become difficult even with such a client - it's so huge! 18:41 Sokomine the database structure of mt is pretty simple: index and data, where index codes the position of the chunk (x,y,z - chunks seem to be 16x16x16) - and data is the data received. the exact format is documented 18:42 celeron55 thexyz: there was a plan to filter metadata fields for network transfer, but it hasn't been yet implemented i guess 18:42 Sokomine hm, perhaps not necessary. the old chests that do not require to wait for the server are much better 18:43 Sokomine it takes time to wait for the server to reply. client-side access to metadata is faster. and to take a look and to start moving things around that's very well suited 18:43 celeron55 focus on the actual issue if there is such a one 18:44 Sokomine the actual issue is "please save all mapdata received into a database for later use". anything else for now is optional 18:46 thexyz celeron55: the problem is that it's not documented anywhere 18:47 thexyz example: I don't know about that and make a password-locked chest node with password stored in meta 18:47 celeron55 thexyz: like 99% of details like that? 18:47 thexyz this is very important detail 18:47 celeron55 document it if you please 18:48 thexyz celeron55: while we're at it, can you give me text from http://c55.me/minetest2/wiki/doku.php?id=code:storing_special_data_in_node_metadata 18:49 Sokomine thexyz: and? how much players are out there that are willing to read that information out? admittedly, some may. a player called Foobar aquired fly without priv on the server and wrote himshelf a nyan cat prediction algorithm 18:49 celeron55 thexyz: http://put.p.ht/?q=JM8d 18:50 Sokomine so it does happen. but it is not relevant for general gameplay. there are no real secrets stored there. if players go to that much effort, they don't really play mt anymore but play on a meta level with the code 18:50 celeron55 thexyz: it's just about serialization 18:51 thexyz done, http://dev.minetest.net/NodeMetaRef 18:52 kahrl I would put that email on a separate page or below the example 18:54 thexyz feel free to do that 18:56 kahrl done 19:10 celeron55 (put.p.ht is a pastebin that i made one day for fun because i stumbled upon a free hosting provider) 19:20 sfan5 in case anyone cares about a client that saves the mapblocks it receives from the server to a local map: https://github.com/sfan5/minetest/tree/saveToLocalMap 19:22 OldCoder sfan5, That is great 19:22 celeron55 looks surprisingly elegant 19:22 celeron55 does it work? 19:22 sfan5 it also automatically saves it in leveldb format if you enable leveldb in cmake 19:22 sfan5 yes 19:23 OldCoder So RedCrab's worlds can be saved? 19:23 OldCoder If somebody will clone one or more of them I will host copies 19:24 thexyz sfan5: by the way, leveldb patch should be updated to use stl containers 19:25 sfan5 thexyz: especially code like this shouldn't be there https://github.com/sfan5/minetest/commit/5b6936bd62e772a26a0d094dd63e2619ebcaf223#L5L3374 19:25 thexyz right 19:26 celeron55 Sokomine: take note ^ 19:38 pitriss sfan5: hi, I want to ask, do you have windows build of that local save client? 19:39 sfan5 I'mm make one maybe 19:39 sfan5 s/mm/ll/ 19:40 pitriss sfan5: it would be really appreciated by my friend AspireMint from redcrab server:) 19:43 proller sfan5, can you make it optional, for -next? 19:43 sfan5 wait 19:43 sfan5 maybe 20:13 sfan5 this is weird 20:14 * Prestotron562 and Zeg9 commits to ingame animals(including ponies) 20:16 sfan5 ponies? 20:16 sfan5 could someone look at my code if there is an obvious mistake? 20:16 Prestotron562 [deleted] 20:17 Prestotron562 [deleted] 20:17 Prestotron562 [deleted] 20:17 sfan5 read above 20:18 Prestotron562 [deleted] 20:18 sfan5 the blocks get saved but somehow neither minetest nor thexyz's isometric mapper can load them, SQLiteBrowser works fine however 20:18 sfan5 <sfan5> [...] https://github.com/sfan5/minetest/tree/saveToLocalMap 20:18 proller Prestotron562, better give it to read to your virtual sister 20:18 Prestotron562 [deleted] 20:19 sfan5 stop the offtopic 20:19 Prestotron562 [deleted] 21:23 Sokomine i'm having trouble with that saving client sfan5 wrote. first: i'm very glad that he did. it also saves data in map.db (not terribly much - 3 mb for a relativly large area...) - but once i want to have a look at the world locally, it creates a new map.sqlite and does not use the leveldb-data 21:23 Sokomine any way to convert leveldb to sqlite?