Time Nick Message 00:01 rubenwardy I'm excited to see how this turns out agrecascino, shamoanjac 00:01 rubenwardy When I started writing CTF I wanted to make a city vs city factions mod, where countries fight over territory etc 00:02 shamoanjac we'll do our best ;P 00:02 agrecascino rubenwardy, did you ever figure out the issues witht the firearms mod? 00:02 rubenwardy firearms suck 00:02 rubenwardy shooter is so much better 00:02 agrecascino it's completely broken at this point 00:02 rubenwardy !mod shooter 00:02 MinetestBot rubenwardy: Simple Shooter [shooter] by stu - https://forum.minetest.net/viewtopic.php?t=7846 00:03 agrecascino flans mod for minetest when? 00:03 rubenwardy flans? 00:04 rubenwardy isn't that a body part? 00:04 agrecascino http://flansmod.com/ 00:04 rubenwardy I'm thinking of glans, nevermind 00:05 agrecascino lewd 00:05 shamoanjac my experience with everything fast in /Mine[a-z]+t/ is that the multiplayer experience gets... bad 00:06 agrecascino http://www.walkaboutcrafts.com/freegifts/alphabetimages/a.gif 00:06 agrecascino http://www.walkaboutcrafts.com/freegifts/alphabetimages/u.gif 00:06 agrecascino http://www.walkaboutcrafts.com/freegifts/alphabetimages/t.gif 00:06 shamoanjac :( 00:06 agrecascino http://www.walkaboutcrafts.com/freegifts/alphabetimages/i.gif 00:06 KaadmY sm? 00:06 agrecascino http://www.walkaboutcrafts.com/freegifts/alphabetimages/s.gif 00:06 KaadmY yep 00:07 agrecascino http://www.walkaboutcrafts.com/freegifts/alphabetimages/m.gif 00:07 shamoanjac a classic 00:12 agrecascino also 00:12 agrecascino i came up with another idea for clientside scripting 00:12 agrecascino have scripts on the clientside be distributed by the serve, and then have those scripts communicate to the server via WAMP 00:12 Void7 WAMP? 00:13 agrecascino newagey pub sub rpc protocol 00:13 agrecascino http://wamp-proto.org/ 00:14 agrecascino basically, integrate a wamp client lib into minetest's lua implementation 00:14 agrecascino and have a router run on another thread 00:16 agrecascino i guess the best thing about it is that nothing would need to change, minus running scripts on the client 00:17 Nosrick Wouldn't that be open to abuse, potentially? 00:18 agrecascino Nosrick, as in? 00:18 rubenwardy overkill 00:19 rubenwardy Don't see how that helps 00:19 rubenwardy to get scripts from server to client, you can just use the standard way to transfer media 00:20 agrecascino that's not what i meant 00:20 agrecascino i meant, for client-server communication, WAMP would be used 00:20 Hijiri Nosrick: yes, 50 armor means 50% damage 00:20 rubenwardy why can't you just use UDP packets? 00:20 rubenwardy TCP is not good for games 00:20 Nosrick Couldn't clients execute their own scripts, potentially allowing for unsolicited mods? 00:20 Nosrick Such as wall hacks, etc. 00:21 rubenwardy already possible, Nosrick 00:21 rubenwardy it's already possible to modify the client to walk through walls or fly 00:21 Nosrick Ah, fair enough. 00:22 agrecascino rubenwardy, you could possibly just add a UDP connector to autobahn 00:22 shamoanjac https://forum.minetest.net/viewtopic.php?f=9&t=15305 00:22 shamoanjac :D 00:23 T4im you example flags do look a lot better than what i was able to click together :D 00:24 shamoanjac yeah it was most likely confusing 00:24 shamoanjac now I've added a small color square 00:24 shamoanjac so that you can see which color you've chosen 00:25 T4im you did go very realistical with the patterns; have you considered doing it a bit more "artificial"? like allowing to put a cobble block on it? ;) 00:26 T4im something more minetesty 00:26 shamoanjac yes, I've considered it 00:26 shamoanjac it shouldn't be very hard to do 00:27 shamoanjac though, first, I'd need to find a way to display more flags 00:28 shamoanjac with navigation arrows 00:30 shamoanjac woah I've just seen my posts from 2013 00:30 shamoanjac I was like in 11th grade 00:30 shamoanjac dem memories 00:32 T4im heh 00:32 T4im hmm, maybe instead of sickle and hammer a minetest pickaxe and shovel? :D 00:33 * T4im still ponders what could be done with other political connotated symbols 00:34 shamoanjac the pickaxe and shovel could actually be great 00:36 T4im btw, how many content_id's are you registerin all together? 00:37 T4im ah wait, you use entities 00:37 T4im right 00:38 shamoanjac yeah, banners are pretty much signs 00:39 agrecascino T4im, i'm offended by that 00:40 T4im by what? 00:40 agrecascino you insulting my commie flag 00:41 T4im i did not :o 00:41 T4im I'm just trying to get the political symbols out, generally; it's just that that was the easiest to "minetest"-ize 00:41 T4im stylize to fit better into the game, without targeting any specific symbol 00:42 shamoanjac agrecascino, https://forum.minetest.net/viewtopic.php?f=9&t=14203 00:43 agrecascino ? 00:43 shamoanjac about political symbols, I personally do not wish to take them out, I like historical recreations. I encourage people who do not want them on their server to just disable them 00:43 shamoanjac didn't you want a flan agrecascino 00:44 agrecascino shamoanjac, i was talking about the modding api 00:44 shamoanjac oh 00:45 shamoanjac also check this out 00:45 shamoanjac https://forum.minetest.net/viewtopic.php?f=9&t=14494 00:45 shamoanjac people complained in the thread about a lack of underground diversity 00:49 agrecascino shamoanjac, this reminds me of the underground jungles in terraria 00:50 agrecascino IMO. terraria is a better "game", and minecraft is a better sandbox 00:50 shamoanjac never played terraria 01:18 DonBatman nm0i you there? 01:18 nm0i yup 01:19 DonBatman Didn't mean to upset you 01:19 DonBatman I was just wondering about the weather mod 01:20 nm0i DonBatman: it's just play with timers, that's all 01:20 nm0i DonBatman: http://me0w.net/pit/1470446418 de-git'ed weather (tar.gz) 01:20 DonBatman Thanks 01:23 nm0i transition&forecasts are done as separate mod and suck atm. 01:25 DonBatman fyi env: is depreciated 01:26 DonBatman set_sky is something that I need to do but haven't yet 01:27 DonBatman Been busy with another project 01:27 nm0i .env? 01:27 nm0i ah hm 01:27 DonBatman It use to be that you needed env: but not anymore 01:27 nm0i not sure how it got there 01:28 nm0i Or may be its old version 01:28 nm0i *old mod 01:39 DonBatman nm0i I noticed you are using my doors 01:39 DonBatman What do you think of them? 01:39 nm0i DonBatman: uh uh 01:41 DonBatman nm0i? 01:41 nm0i DonBatman: is_protected everything please 01:43 DonBatman Good point 01:43 DonBatman Anything else? 01:43 DonBatman The forum does not give much feedback 01:43 nm0i DonBatman: aside of darage-door-griefing problem I had before its ok. On previvous servers I just stole textures though. 01:44 DonBatman Never hear or that issue before 01:49 nm0i You can place garage door in protected areas, that's all. 02:01 DonBatman I will go through it and see what needs protected 02:02 DonBatman I think the future doors need the same 02:04 nm0i Japanese doors, and some others 02:06 hisforever nm0i, Did you search mods in google? 02:07 nm0i hisforever: eh? 02:07 nm0i Can you provide context for your question please. 02:08 hisforever search for door mod on hoogle 02:08 hisforever you asked for Japanese doore so I said search google for mod 02:09 nm0i Sorry, I don't see joins/parts/quits on freenode. I'm telling D*nBatman which of his doors have no is_protected in on_place 02:10 hisforever ok 02:10 nm0i There are japanese doors in xdecor 02:10 nm0i js 02:10 hisforever I know I have that mod 07:37 nm0i Soooo 07:37 nm0i SadieXXXX adapted 07:39 nm0i Now they are RandomnameXXXX 08:18 Krock nm0i, they're evolving 08:56 shamoanjac who's that person? 10:37 dabbill Hi, after the latest update i am getting this error Item "doors:door_wood_t_2" not defined 10:40 Krock dabbill, what version did you have before? 10:43 dabbill Krock: pretty sure is was 0.4.12 but not 100% sure 10:44 dabbill Krock: might have been 0.4.13 10:49 Krock open minetest_game/mods/doors/init.lua and add ' minetest.register_alias("doors:door_wood_t_2", "doors:hidden") ' on the very bottom of the file 10:49 Krock I hope this works :3 10:49 Krock other doors might be affected by this too 10:50 dabbill hurm, ~/.minetest/mods/doors does not exist 10:51 dabbill wonder if the folder got deleted somehow 10:52 Krock egem 10:52 Krock it's the games/minetest_game/ directory 10:54 Krock either it's in ~/.minetest/games/ or the other directory path that I can't remember 10:54 dabbill all my mods are in ~/.minetest/mods 10:54 dabbill but no doors directory there 10:55 Krock I'm not talking about the mods in your /mods/ directory 10:55 Krock minetest_game is a subgame - a collectino of basic mods 10:55 Krock *collection 10:55 dabbill ah 10:56 Krock that's why you can use the doors, beds and creative stuff without having the mod in your mods directory 10:57 dabbill found it 10:57 dabbill /usr/share/minetest/games/minetest_game/mods/doors 10:57 Krock bingo 11:05 dabbill lol now i am getting Item "doors:door_wood_t_1" not defined and Item "doors:door_wood_b_1" not defined 11:05 dabbill guess i just need delete those items and recreate them 11:16 Krock ehm.. but that's an unfixed bug in the minetest_game code 11:16 dabbill i might of had a mod that defined those doors, and no longer have that mod 11:17 dabbill I havnt been on minetest in almost 6 months heh 11:17 Krock no, these are the default doors 11:17 dabbill ah 11:17 Krock but the API and the names of them changed 11:17 Krock (slightly) 11:17 dabbill ah 12:18 Krock 42 processed meshes with two players.. that's kinda much IMO 12:18 Krock (peak value of the profiler) 12:40 Fixer Krock: probably liquid moving 12:41 Krock hmm.. there are no liquids around 12:41 Krock but bees! Maybe they're the reason for that 12:43 T4im aren't they particles? 12:45 T4im (which shouldn't be as much meshes as some complex meshnode) 12:46 T4im eh nvm, braincobble 12:53 Krock lol 12:59 T4im hey ruben 12:59 rubenwardy hi T4im 12:59 T4im btw, i think you lost the linter-warning fixes on that rebase correction 13:03 rubenwardy ok, i see 13:03 rubenwardy btw, dump() is a valid global variable 13:03 rubenwardy mods/sfinv/api.lua:77:56: accessing undefined variable dump 13:03 T4im yea, that just didn't appear before 13:03 T4im the luacheckrc is filled on demand, not with everything possible 13:04 T4im but I'll add it to the pr 13:06 rubenwardy T4im, https://github.com/minetest/minetest_game/pull/1179/commits/01fe3ccf0767aaf132ff33466139de7e726be0d5 13:07 rubenwardy lol, the capture the flag subgame has 169 warnings 13:08 aix how am i meant o use global exchange? 13:08 T4im wouldn't renaming the other variable be less invasive? "owner" as in inventory-owner or something? 13:08 T4im :D 13:08 aix i can't sell things if nobody has any money 13:08 T4im but this works, thanks 13:11 linushsao It's about who currency work,aix. 13:13 linushsao I have to think about this, wnr do some experience in my game server 13:14 linushsao At the same time to prevent inflation 13:17 rubenwardy T4im, turns out I didn't install the submodule correctly - only 103 warnings 13:17 rubenwardy and not all of them are my fault 13:18 T4im well, you'll need to adapt the luacheckrc to each project, copying alone isn't really a good idea imo 13:18 rubenwardy T4im, already found a bug: https://github.com/rubenwardy/ctf_pvp_engine/blob/ae9c820e03e0b89955ad0701149d374a2ef3f906/ctf/core.lua#L122 13:19 T4im hah 13:19 T4im that's a golden one 13:20 T4im but yea, at least for so typo introduced syntax errors it's really helpful 13:20 T4im such* 13:21 rubenwardy if this was C++, I would have got 10 pages of errors complaining about that typo 13:21 rubenwardy but because it's lua, it'll only crash if it runs it 13:24 rubenwardy found another bug: https://github.com/rubenwardy/ctf_pvp_engine/blob/master/ctf_chat/init.lua#L213 13:39 aix linushsao: what 13:41 DraggonFantasy Hello 13:44 aix can someone explain how global_exchange works? 13:44 aix everyone's money balance is empty at first right 13:44 aix and if nobody has any money it's damn pointless 13:45 aix it looks like there's some sort of citizen's income though 13:45 Krock btw, aix, why "UNIX geeks"? I'm a windows geek 13:47 * shamoanjac icks 14:32 ElectronLibre Auth file corrupted on MFF's skyblock.. Too bad, he lost the monthly bonus on the server list 16:03 IhrFussel My game server has constant lags (eg. 2-3 chat messages appearing after a few secs at the same time) but the CPU load is LESS than 20% O.O Also RAM usage is ~ 50% ... what is causing this? 16:04 T4im probably mapgen 16:04 T4im people mining in areas not generated yet, will cause mapgen to start up 16:05 T4im or explorers :) 16:05 IhrFussel T4im, can WorldEdit be a cause for that too? 16:05 T4im if you worldedit a lot at once, yes 16:05 IhrFussel T4im, and if i WE only a small area but a lot of them? 16:06 T4im well, only for the time that you are actually editing 16:06 T4im you have lag spikes or constant high lag? 16:06 T4im you could start up the ingame profiler and take a look if any mods stand out 16:07 T4im profiler.load = true 16:08 T4im and after a while you can check /profiler print in game 16:09 IhrFussel Judging by the chat log the game seems to lag 2-3 x per minute meaning chat messages appear suddenly at the same sec 16:10 IhrFussel I will try that thanks 16:11 IhrFussel I simply add "profilder.load = true" to minetest.conf? 16:11 IhrFussel profiler* 16:12 T4im yea, or in the advanced settings dialog 16:12 T4im ah wait, server, not settings dialog 16:12 T4im yes, minetest.conf then 16:13 IhrFussel T4im, will it slow the server down a lot? 16:13 T4im no, instrumentation overhead is pretty small 16:13 T4im only 3µs here 16:13 IhrFussel Okay just making sure, else I'd have to inform my players about that xP 16:16 T4im you'll need a semi-recent git build though, that profiler isn't in there for too long 16:17 T4im added 25days ago 16:19 Void7 minetest still crashes :( 16:22 Void7 ok, commented out draw_wielded_item and it works 16:31 IhrFussel I can't use it then...my build is 0.4.13-dev from May 16:34 Void7 aaandd.. crashed again 16:42 IhrFussel Seems like I need to find out the bad mod without the help of the profiler, oh well 17:22 IhrFussel I just read in the forums that the amount of player files can cause laggy servers...is this still true?? I have over 19,000 17:41 Hijiri aix: yeah, the only source of inflation is the citizen's income 17:41 aix Hijiri: I don't seem to be getting anything 17:42 Hijiri It's every 20 minutes if I remember correctly 17:42 aix I read the code, but it doesn't give any cash 17:42 aix does it exempt people with particular privileges? 17:42 Hijiri what do you mean by cash? 17:42 Hijiri the credit? 17:43 aix yes 17:44 Hijiri not sure what code you are looking at, but there's a give_credits at line 33 of init.lua 17:44 aix yeah 17:44 aix i see the line 17:45 aix don't appear to be getting anything though 17:45 Hijiri you're not getting the message? 17:45 Hijiri Or you don't see your balance increasing? 17:50 Hijiri you can shorten the income interval in your configuration file if you want to be able to test more quickly 17:50 Hijiri oh wait, no you can't 17:50 Hijiri you can shorten it in the code though 18:15 aix Hirato: alright, i'll test it 18:18 agrecascino shamoanjac, you there? 18:26 KaadmY does minetest support a joystick for looking around? 18:26 * KaadmY wonders if support for a seperate head angle and crosshair is possible 18:26 thePalindrome iirc you'd need something like joy2key 18:26 Krock ther's a joystick support, yes 18:26 * thePalindrome shouldn't be listened to at this time of day :P 18:27 * KaadmY smiles at the thought of looking around while digging 18:27 Krock that head stuff can be done (with some haxx) in Lua 18:27 thePalindrome It'd be better to have that in the C side, mainly because it's graphical manipulation 18:27 KaadmY lua would be slow and server-side probably 18:28 thePalindrome lua is only server side right now 18:29 KaadmY lua would be slow and server-side probably 18:29 KaadmY yeah that's what i said :P 18:30 thePalindrome not probably, for sure :P 18:30 shamoanjac agrecascino, I am here 18:37 agrecascino shamoanjac, want to work on the integration with me? 19:06 shamoanjac yes agrecascino 19:08 agrecascino shamoanjac, alright 19:09 shamoanjac I have started writing a couple node definitions for the integration 19:09 shamoanjac namely a power banner 19:09 shamoanjac made of gold 19:09 shamoanjac and silver 19:10 agrecascino should i create a function for modifying power, or should you just directly modify the value? 19:10 shamoanjac expose me a comprehensible API 19:11 shamoanjac so that I can do stuff like 19:11 shamoanjac local faction = factions.get_player_faction("playername") 19:11 shamoanjac and then 19:11 shamoanjac faction:increase_power(value) 19:12 shamoanjac (with something like faction:player_has_privilege("player", "claiming") 19:14 agrecascino shamoanjac, factions aren't objects 19:14 shamoanjac uhm 19:14 agrecascino they're just structs, with no functions 19:14 shamoanjac it'd be great if you gave them a couple methods 19:15 agrecascino oh maybe just make a function like factionsmod.change_power(name,change) 19:15 shamoanjac that could work, too 19:15 shamoanjac not my favourite, but it'd work 19:16 agrecascino shamoanjac, yeah, the mod isn't very clean anyway 19:16 agrecascino i'll get to cleaning it up eventually 19:17 thePalindrome Oh? 19:17 Hijiri If you clean it later it will take more work than cleaning it now 19:17 Hijiri because you will be building more code that needs to be cleaned since you're building on a base that needs to be cleaned 19:18 thePalindrome ^ 19:18 Hijiri agrecascino: method syntax blah:stuff(...) is just syntax sugar for blah.stuff(blah, ...) 19:19 Hijiri you can put the functions directly in the faction or use a metatable 19:19 Hijiri if you are using minetest.serialize on them you will probably want to go metatables so you don't try to serialize the functions 19:20 Hijiri If a table's metatable has an "__index" key with the value of another table, that table will be used to look up things not in the original table 19:20 agrecascino Hijiri, i'm not sure if i hate myself enough to clean this up\ 19:20 Hijiri if you love yourself you should clean it up 19:20 Hijiri otherwise you will be working with an unclean API until you clean it 19:21 thePalindrome Which might break 19:21 thePalindrome *break other things 19:21 shamoanjac how many loc in your file agrecascino ? 19:21 agrecascino shamoanjac, 945 for the actual factions mod 19:21 agrecascino 500 for chat commands 19:22 agrecascino last i checked 19:23 shamoanjac woah 19:30 thePalindrome Is anybody here working on a mod that has a "network" in it? Along the lines of technic/ic2? 19:32 T4im if you have a clever solution to the issue behind them, let us know :P 19:32 thePalindrome ? 19:33 shamoanjac agrecascino, you didn't post the factions mod on the forum, did you? 19:33 T4im well the cable network in technic for example causes a lot of forceloading and iterating through the networks, which can be quite large on a multiplayer server 19:33 shamoanjac tfw no GitHub stars on my GitHub banners repo :( 19:34 shamoanjac I only code for social reputation 19:34 agrecascino shamoanjac, no, and i wouldn't, since it's such a smess 19:34 T4im lies there is a star 19:34 agrecascino mess* 19:34 shamoanjac agrecascino, fork'd 19:36 agaran T4im: heh.. 19:36 T4im i just didn't star it yet, because i still had it open in a tab! 19:36 agrecascino shamoanjac, i added the function 19:37 thePalindrome Ah darn, I was wondering if anybody had any ideas :P I'm thinking there might need to be another hook in the engine 19:37 shamoanjac factionsmod.data.factionsmod[name] 19:38 shamoanjac I personally find this way of writing stuff inconvenient :P 19:38 T4im thePalindrome: yea networks are a conundrum in minetest 19:39 agrecascino well 19:39 agrecascino it was factions.data.factions 19:39 agrecascino but since mobf would try to access factions 19:39 agrecascino i had to change the baseclass name 19:40 agrecascino and find and replace doesn't care about you feeling 19:40 agaran T4im: for my cabling I am trying to make it work mostly without querying map, but it is slooow work with that code.. I don't know lua really 19:40 agrecascino feelings* 19:40 T4im shamoanjac: rawget(_G["actionsmod"]["data"].factionsmod, name) is inconvenient :P 19:40 * T4im calms down again 19:40 shamoanjac lel 19:41 thePalindrome Yeah, I'm considering taking a look at buildcraft et al. to see if there are any algorithmic changes I can make 19:41 T4im agaran: the lua is not the issue, there are plenty lua-firm people that might have an interest in such a thing, it really just needs a clever solution 19:43 agaran T4im: I gather topology at node-placing time then during running of stuff it does not need map at all.. thats my goal at least 19:43 T4im yea, but then when someone digs a node in the mid of the network, you have to split that network and inform every consumer 19:43 agaran not a problem.. 19:44 T4im and eventually merge networks in another situation 19:44 thePalindrome Heck, I wrote some code to re-arrange some blocks relative to their neighbors, but the detection can take quite some time 19:44 thePalindrome Also, the Windows timer is useless 19:44 agaran because if one -digs- node, then given block is actually loaded.. 19:44 thePalindrome It has a 10 millisecond precision! 19:44 agaran thePalindrome: who said that windows has anything accurate.. ? 19:44 thePalindrome touche 19:44 thePalindrome I pity my friend :P 19:44 T4im agaran: loaded yes, but you still have to update the datastructure representing the network without being able to iterate every node 19:44 * agaran is not a windows fan 19:45 agaran T4im: yep, true, modifications are done less often than actual operation so still even if on update you have to do forceloading/anyloading, still it is more efficient imo 19:46 T4im well, technic already caches the network for example, the issue is when you start changing it, then the cache invalidates and it has to iterate through *everthing*, that's when things get laggy, and people build one node after the other, so that happens a lot 19:46 agaran T4im: yup, I solved so far that by if you remove node belonging to net-1, only net-1 need be rescanned 19:46 agaran not -whole- all world of nets 19:47 thePalindrome Aye, I profiled my code, and the network iteration is the most intensive 19:47 T4im yea, an improvement, not quite the solution i think could be possible with some really clever datastructures :D 19:48 T4im might need going through some graph theoretical stuff to find something that might already be around :D 19:48 agaran I wanted to avoid caching whole topology.. 19:49 agaran which could give one side benefit but I am not going to simulate whole kirchof's law and conductor current overload.. 19:49 T4im but for example, when you merge two medium networks, agaran, don't you have to change the nodemetadata of all the networks nodes? 19:49 T4im that might for example be even worse than just iterating them :P 19:50 agaran hmm.. for one of them only, other is intact.. I know it is not perfect but I wanted to avoid making it complex 19:50 agaran I cache list of active pieces in net (not list of wiring) because thats only important part for run-net code 19:52 agaran but true, plan was to visit every node of one of two merged networks and update metadata for them 19:52 aix Hijiri: are you 100% sure that the income system works? 19:52 aix what did you test it on? 19:52 Hijiri I ran a server with global_exchange on it for a while 19:52 Hijiri not anymore though 19:52 T4im each time you change node metadata the entire block is resend to the client iirc 19:53 Hijiri maybe something changed since them, let me review the commit log 19:53 Hijiri I pulled some cosmetic changes from someone else 19:53 Hijiri hmm, maybe it's not creating an account for you? 19:54 Hijiri This is a recent version, right? 19:54 agaran T4im: oh, thats good to know, so it pays to postpone metadata update and do it in chunks.. 19:54 Hijiri it was changed at some point to automatically make accounts, let me check to see if it should work 19:55 agaran T4im: I'll test that when I get working most of code.. 19:55 agaran when you test at 127.0.0.1 timing for network is non-issue 19:56 Hijiri aix: If it's an old version it will require making an account at the ATM though 19:56 Hijiri I looked and there doesn't seem to be anything wrong, let me see if it works for me 19:56 aix Hijiri: it's the latest git 19:56 aix Hijiri: would a database from an old version cause citizens to not get paid? 19:57 Hijiri I don't think so, I didn't change the schema or anything between versions 19:57 Hijiri I'm getting paid 19:57 Hijiri so are you missing both the message and the balance increase? 19:58 Hijiri aix: did it work for you at some point in the past? 19:58 agaran T4im: hmm.. I wonder if reading metadata also causes reloads but I guess not so I can cache metadata updates just query/update module memory and on last step in batch updating metadata for nodes.. 19:59 shamoanjac agrecascino, what is "reputation"? 19:59 aix Hijiri: I can't recall citizens ever getting paid 20:00 thePalindrome *gasp* That's slave labor! 20:01 agaran thePalindrome: Hmm? 20:01 Hijiri aix: just to be extra sure, the atm has no registration button, right? 20:01 shamoanjac lel @ the six levels of indentation 20:01 aix no button, nope 20:02 thePalindrome aix | Hijiri: I can't recall citizens ever getting paid 20:02 aix lol 20:02 agrecascino shamoanjac, a mechanic that isn't used 20:02 Hijiri aix: alright 20:03 Hijiri I can't tell what the issue is though, since it's working on my computer 20:05 aix what minetest version are you using? 20:05 Hijiri 0.4.14 20:05 Hijiri This was written for 0.4.13 originally though 20:06 Hijiri aix: can you change line 33 "local succ" to "local succ err", and then do print(succ, err) on line 35? 20:06 Hijiri then set the income interval to something low and see if it prints anything 20:07 Hijiri line 33 and 35 of init.lua 20:09 aix nil true 20:09 aix i think thats bad right 20:09 aix wait 20:09 Hijiri nil true and not true nil? 20:09 aix it works 20:09 aix ... 20:10 aix okay the only thing i changed is the map 20:10 shamoanjac agrecascino, I've written a factions "class" for easy API 20:10 shamoanjac with permissions/groups mechanism 20:10 shamoanjac http://pastebin.com/srisz0i1 20:10 shamoanjac tell me what you think 20:10 agrecascino fuckin' magic 20:11 Hijiri is the place it wasn't working originally a server? 20:11 shamoanjac ?? 20:11 agrecascino shamoanjac, sensible 20:11 shamoanjac I'm not sure what you mean by that 20:11 Hijiri actually nevermind, you said that earlier 20:11 shamoanjac the goal is to get rid of the 4 levels of members you've created 20:11 shamoanjac and instead call stuff such as 20:12 shamoanjac factionsmod.get_faction("Normandy"):decrease_power(5.) 20:12 Hijiri if possible you should try to test on the same place it wasn't working, but that might be hard if your players expect not to have a sudden reset 20:12 Hijiri maybe you can clone the server and run it separately 20:12 agrecascino shamoanjac, i like it 20:12 Hijiri see what happens if you log in as an existing user or a new user 20:12 shamoanjac of course, admins would be allowed to create their own ranks 20:12 shamoanjac ok, I'll adapt the rest of the code 20:13 aix now it doesn't work again 20:13 aix which files does this read/write? 20:14 Hijiri worldpath/global_exchange.db 20:14 Hijiri I think that is the only one, other than script files 20:15 aix would settings in the bitchange file affect it? 20:15 Hijiri I don't think so, global_exchange doesn't do anything with bitchange 20:16 Krock I can confirm that bitchange does not support global_exchange itself 20:16 shamoanjac as a tip, agrecascino, instead of returning true/false on creation functions, return the object 20:16 shamoanjac or nil 20:17 shamoanjac so that you can still use the if syntax but also you don't have to call another method to get the object 20:17 Hijiri if only lua had references so you could do output arguments :P 20:18 Krock use tables for that 20:18 Krock they have a reference 20:18 Hijiri it's not pass-by-reference though 20:18 T4im it is 20:18 Hijiri it's not 20:18 shamoanjac it is 20:18 T4im tables, even functions are 20:18 Hijiri a pointer is a value 20:19 Hijiri not a reference 20:19 shamoanjac :^( 20:19 Hijiri I mean, it's not pass by reference 20:19 Hijiri you are passing a pointer by value 20:19 shamoanjac a reference is a pointer 20:19 shamoanjac just with some syntactic sugar 20:19 Hijiri pass-by-reference means the variable itself gets passed, not a pointer 20:19 Void7 when i rename a mod, the world complains that it can't find the mod with the old name 20:19 shamoanjac and a bit more rules 20:19 Void7 but i can't disable that mod 20:19 Void7 because it's not in the configure menu 20:19 Hijiri this is what pass by reference would do: 20:19 shamoanjac no, pass-by-reference means the variable doesn't get passed 20:20 shamoanjac but rather a reference to the variable (which is usually a pointer at the low-level) 20:20 T4im "Tables, functions, threads, and (full) userdata values are objects: variables do not actually contain these values, only references to them." 20:20 T4im for the full list of references objects 20:20 Hijiri "reference" as a value is different from "pass by reference" 20:20 T4im referencable* 20:20 Hijiri yes, tables and functions, threads etc. are references 20:20 Hijiri but they are not passed by reference 20:20 Krock referen cable 20:21 T4im the references to those values are passed 20:21 Hijiri yes references are passed 20:21 Hijiri but "pass by reference" doesn't just mean "pass a reference value" 20:21 shamoanjac is a copy of the object created in the scope of the function? 20:21 shamoanjac yes -> pass by value 20:21 shamoanjac no -> pass by reference 20:21 Hijiri It is a name for a particular way of passing arguments 20:21 agaran T4im: so wrapping common code in function and calling it when needed is faster way? 20:21 Hijiri shamoanjac: Then passing tables is of course not pass by reference 20:21 Hijiri because it copies the pointer 20:21 aix Hirato: alright, cloning the world 20:21 shamoanjac the pointer is the reference 20:21 Hijiri yes 20:21 Hijiri it's a value 20:22 Hijiri it is not the table itself 20:22 shamoanjac of course not 20:22 shamoanjac that's why it's passed by reference 20:22 Krock ##c++ 20:22 Hijiri it is not passed by reference, because it already *is* the reference 20:22 shamoanjac I think you should try to do some C 20:22 Hijiri C doesn't have pass-by-reference 20:22 shamoanjac you'd understand better the concept 20:22 Hijiri You should do some C++ 20:22 Hijiri The difference is obvious there 20:22 Krock there are only pointers in C 20:23 shamoanjac I have done a lot of C++ 20:23 Krock and Lua is C 20:23 shamoanjac no, Lua is Lua 20:23 shamoanjac the common implementation of the interpreter might be in C 20:23 Krock no, it can't reproduce itself 20:23 agaran Krock: yet ;) 20:23 Hijiri shamoanjac: then you should be able to tell the difference between a pointer argument and a reference argument (semantically, not implementation-wise) 20:24 Krock agaran, that doesn't sound good :< 20:24 shamoanjac semantically, there are next to none in C++, beside the syntactic sugar and the fact that references cannot be NULL and are constants 20:24 agaran Krock: I mean, you can write lua interpreter in lua.. will be just slow.. 20:24 Hijiri syntax sugar is just an implementation detail for references 20:24 Hijiri The point is that the thing assigned to the name you pass in is changed 20:25 Krock agaran, right. it could be done in Lua.. somehow 20:25 shamoanjac not necessarily 20:25 Hijiri the same way "let" can be implemented as syntax sugar for lambdas in scheme 20:25 agaran Krock: for sure 'slowly' ;) 20:25 Krock then let's run it with LuaJIT 20:25 T4im only for those mentioned objects, strings are interned and only a reference (which is the same over all same strings) is passed, floats are being copied, i.e. they are passed by value 20:26 Hijiri If lua's tables were passed by reference, it would look like this happens: http://lpaste.net/174725 20:26 Hijiri T4im: I didn't contradict that 20:26 Hijiri I am saying "passing a reference" is not "pass-by-reference" 20:27 T4im i do 20:27 shamoanjac what it prints depends on what "==" does in Lua 20:27 T4im this is the first time i see somoene calling passing values "pass by reference" and passing references "pass by value", it seems odd to me 20:27 Hijiri https://en.wikipedia.org/wiki/Evaluation_strategy#Call_by_reference 20:28 Hijiri "Call by reference can be simulated in languages that use call by value and don't exactly support call by reference, by making use of references " 20:28 shamoanjac so, Hijiri 20:28 Hijiri "It is not a separate evaluation strategy—the language calls by value—but sometimes it is referred to as call by address (also referred to as pass by address)." 20:28 shamoanjac do you think tables are copied? 20:28 shamoanjac they're not 20:28 Hijiri shamoanjac: No, but the table reference is copied 20:28 Hijiri I said this already 20:28 Krock tables asren't copied unless you use table.copy 20:28 shamoanjac well, that'it 20:28 T4im yes, the reference is copied, but not the table itself 20:28 shamoanjac then it's pass by reference 20:28 T4im ^^ 20:28 Hijiri It's passing the reference by value 20:28 Hijiri please read wikipedia 20:29 T4im yes, but the table by reference 20:29 Hijiri tables aren't values in lua 20:29 Hijiri it is meaningless to say that the table is passed at all 20:29 Hijiri only table references are values in lua 20:29 shamoanjac Hijiri, this stuff is programming languages theory 101 20:30 Hijiri shamoanjac: I guess you would fail it then 20:30 shamoanjac learned it in first year, then formally in second year 20:30 shamoanjac not at all 20:30 Hijiri Are you saying those wikipedia editors failed it? 20:30 shamoanjac the wikipedia editors agree with me 20:30 Hijiri "It is not a separate evaluation strategy—the language calls by value—but sometimes it is referred to as call by address (also referred to as pass by address)." 20:30 shamoanjac you're talking about the implementation 20:31 T4im wikipedia says "Tables are always passed by reference (See Call by sharing):" 20:31 Hijiri I'm talking about language semantics 20:31 T4im i think they are right 20:31 thePalindrome Yeah, they are 20:31 shamoanjac 3>a function receives an implicit reference to a variable used as argument, rather than a copy of its value 20:31 Hijiri T4im: on the evaluation strategy page? 20:31 thePalindrome That one bit me 20:31 T4im no, from the lua page 20:31 shamoanjac which is exactly what happens with tables 20:31 T4im :P 20:31 Hijiri shamoanjac: Tables aren't an implicit reference 20:31 shamoanjac of course, when you go at the lowest level, references don't exist 20:31 Hijiri They're an explicit reference 20:31 thePalindrome Okay, now we're nitpicking :P 20:31 Hijiri shamoanjac: I'm talking about on the language level 20:31 T4im pass by electrons! 20:31 thePalindrome tl;dr everything except tables are passed by value 20:31 Hijiri "reference to a table" is part of the language, not an implementation 20:32 * thePalindrome absconds 20:32 shamoanjac on the language level, by all means and definitions, tables are not passed by value 20:32 Hijiri Because otherwise, table variable copies wouldn't point to the same table 20:32 agaran T4im: well electrons are already reused;) 20:32 shamoanjac note that when you quote what you quoted 20:32 Hijiri shamoanjac: If by "table", you mean "reference to a table", then it is passed by value. If you mean "the thing holding the values itself", then that is not a lua value 20:32 aix Hijiri: it only works if i leave the print line 20:33 shamoanjac they clearly say 20:33 Hijiri aix: that is strange 20:33 shamoanjac 3>Languages such as C and ML use this technique [of simulating call by reference]. It is not a separate evaluation strategy [...] 20:33 Hijiri It is not an implementation detail to make this distinction, it is important to the language semantics 20:33 Hijiri yes, of simulating 20:33 Hijiri The language itself doesn't pass by reference 20:33 shamoanjac god 20:33 shamoanjac when you do a function call 20:34 shamoanjac foo(table) 20:34 Hijiri It's a workaround to get behavior similar to call-by-reference 20:34 shamoanjac what you mean, as a programmer, is that you pass "table" to foo() 20:34 shamoanjac of course you know it's actually a reference 20:34 shamoanjac but that's not how you read it 20:34 Hijiri this isn't about intuitions 20:34 Hijiri It's about language semantics 20:34 shamoanjac it's not intuitions 20:34 T4im the call by reference page seems to be correct too, when you do local sometable = {}, table.insert(sometable, "asd") the function will reiceive "an implicit reference to a variable used as argument, rather than a copy of its value.", it does not get a copy of that table, just an implicit reference to it 20:34 shamoanjac it's formal mathematics 20:35 Hijiri T4im: That's not an implicit reference 20:35 Hijiri it's an explicit reference 20:35 Hijiri That's part of the language semantics, and is required to have two things refer to "the same table" 20:35 Hijiri shamoanjac: it's formal mathematics if the language is specified formally 20:35 Hijiri I don't think Lua is, it just has a reference (ha ha) implementation 20:36 shamoanjac the reference is already a mathematic model 20:36 shamoanjac which is formal 20:36 Hijiri it's not 20:36 T4im wouldn't an explicit reference be if i gave it the address in memory? 20:36 aix okay now it doesn't work at all 20:36 Hijiri It doesn't have to be an address, it just has to semantically be a reference 20:36 shamoanjac of course it is, even a custom brainfuck interpreter would constitute a formal mathematic model 20:36 Hijiri shamoanjac: It can't unless the implementation language itself is specified formally 20:37 T4im either way, explicit or implicit doesn't make a difference that it's the reference, not the value that is passed 20:37 shamoanjac programming it is a way of specifying it formally 20:37 shamoanjac that it's readable or not is another thing 20:37 Hijiri T4im: You were just saying that the reason it is correct is because it is implicit 20:37 Hijiri That is what the call by reference page is saying, either way 20:37 T4im then strike the implicit, it was the least important part of that :p 20:38 Hijiri It is the most important part of that 20:38 T4im still not sure it's not implicit, but it doesn't matter 20:38 Hijiri it's what distinguishes it from passing pointers 20:38 Hijiri (or less dangerous pointers like table references) 20:38 Hijiri This is the behavior you would get if tables were passed by reference: http://lpaste.net/174725 20:38 T4im yea, but both is still passing by reference 20:39 Hijiri The function can modify the *variable*, not only the thing the pointer in the variable is pointing to 20:39 shamoanjac no 20:39 shamoanjac the function cannot modify the reference you give it with respect to the higher function scope 20:40 Hijiri It could if it was pass-by-reference 20:40 shamoanjac no, it couldn't 20:40 shamoanjac Java has pass-by-reference, you can't 20:40 shamoanjac C++ has pass-by-reference, you can't 20:40 Hijiri Java doesn't, that's a common misunderstanding 20:40 Hijiri you can do it in C++ though 20:40 shamoanjac how? 20:41 shamoanjac afaik foo(int& ref) cannot modify the reference 20:41 Hijiri you can have void swap(int &a, int &b) { int temp = a; a = b; b = temp; } 20:41 agrecascino java has pass-by-and-dont-use-this-language 20:41 Hijiri Maybe I am misunderstanding what you are saying 20:41 shamoanjac that switches the values 20:41 shamoanjac not the references 20:41 shamoanjac the references cannot be altered within a function 20:41 Hijiri Ok, I did misunderstand what you said, then 20:42 shamoanjac sounds like it yes 20:42 Hijiri But if you have int c = 1, int d = 2, you can call swap(c, d) and have c = 2, d = 1 20:42 Hijiri Do you agree with that, at least? 20:44 shamoanjac yes 20:45 shamoanjac that modifies the values, though 20:45 Hijiri Ok 20:45 Hijiri And suppose Lua passed tables by reference 20:46 agaran Hijiri: but for C you would pass c/d as &c and &d I think.. 20:46 shamoanjac yes 20:46 Hijiri agaran: That wouldn't be pass by reference 20:46 T4im "the terminology is inconsistent across different sources." now, that seems to be someone i start to feel comfortable getting behind 20:46 Hijiri that would be passing the pointers by value 20:46 T4im something* 20:46 shamoanjac and the prototype would be swap(int* a, int* b); 20:47 agaran yep, 20:47 Hijiri shamoanjac: and those would be explicit references, not implicit ones 20:47 shamoanjac passing pointers by value is the same as passing objects by reference 20:47 Hijiri semantically it's not 20:47 shamoanjac it depends on whether you consider the arguments to be pointers or objects 20:48 shamoanjac or references or objects 20:48 Hijiri informally, the semantics of a referenced-passed argument should be "like" the variable passed into the functionn 20:49 Hijiri Suppose Lua passed tables by reference, and you had a similar swap function. If you had a = { "john" } and b = { "bob" }, swap(a, b) would leave you with a = { "bob" } and b = { "john" } 20:49 Hijiri With swap having a similar body to the C++ version 20:49 Nosrick How would I go about boosting the player's damage? 20:49 Hijiri Without having to wrap a and b in yet another table to do the swapping, of course 20:50 Hijiri Nosrick: across everything? 20:50 Nosrick Yeah. 20:50 shamoanjac depends on how swap is implemented 20:50 Hijiri Against players: Use custom damage calculations in register_on_punchplayer, Against entities: Make a damage frameworks that mobs hook into 20:50 Hijiri shamoanjac: I said that the body of the function would be similar to the C++ one 20:50 Hijiri so function swap(a, b) temp = a, a = b, b = a end 20:50 shamoanjac so, using the '=' operator? 20:50 Hijiri yes 20:51 shamoanjac then the references would change *in* the function 20:51 Hijiri Nosrick: There is nothing in the base API for boosting damage 20:51 shamoanjac not out of it 20:51 Nosrick Ah, damn. 20:51 Hijiri shamoanjac: yes, because Lua does not have call by reference 20:51 Hijiri that is my point 20:51 shamoanjac if you go by that, no language ever has call by reference 20:51 Hijiri C++ does 20:52 T4im the use is inconsistent, so calm down :P 20:52 shamoanjac if you have an std::vector, the same happens 20:52 Hijiri If the use is inconsistent, we can argue which definition is the most useful 20:52 T4im people mean different things when saying pass-by-value/reference 20:52 T4im depending where they come from 20:52 Hijiri shamoanjac: I omitted the & in Lua, because it doesn't have anything to mark an argument as a reference 20:52 shamoanjac well not because references are immutable 20:52 T4im had to check up on that claim, but it indeed seems to be just inconsistently used 20:52 Hijiri In C++ you would still have it 20:53 Hijiri T4im: It's more useful to use "pass-by-reference" in the sense I am using, because otherwise there isn't another way to call that evaluation strategy 20:53 Hijiri passing pointers already can be called passing pointers by value 20:55 Hijiri shamoanjac: do you mean if I had void swap(std::vector &a, std::vector &b) { /* swappy stuff like I did with ints */ } 20:55 Hijiri then have a = some first vector, b = some second vector, swap(a,b), then it wouldn't turn out as b = some first vector, a = some second vector? 21:00 Hijiri T4im: the "inconsistent across different sources" is for Call by Sharing, not call by reference 21:01 Hijiri The Lua page links to Call by Sharing, which says "The semantics of call by sharing differ from call by reference in that assignments to function arguments within the function aren't visible to the caller" 21:01 shamoanjac yes that's what I mean if I understand correctly 21:02 Nosrick I am not sure how to go about creating a framework for boosting damage. 21:02 Hijiri Nosrick: You can recreate the default damage mechanics, but add in a damage multiplier 21:02 Hijiri you could use a monoid as an API for the damage multiplier 21:02 T4im Hijiri: i think the confusion extends way behind that 21:03 shamoanjac agrecascino, do you remember your 6-levels-of-indent function to check whether a player can build or not? 21:03 shamoanjac look at this 21:03 Hijiri T4im: rereading, I guess so, since some of the inconsistency it mentions is calling "call by sharing" "call by reference" 21:03 shamoanjac http://pastebin.com/8vdnDU5w 21:03 agrecascino remove pos.y > 21:03 Nosrick Hijiri: Would I look for the code for that in minetest or minetest_game? 21:03 T4im i guess in the end it's much more important, that we know what happens, even if everyone calls it differently x) 21:03 shamoanjac no vertical limitation for claiming? 21:03 agrecascino yes 21:04 shamoanjac ok 21:04 agrecascino imagine someone goin 512 up 21:04 Hijiri Nosrick: It's either in builtin or in the engine, I think 21:04 Hijiri so in minetest 21:04 agrecascino and building a bae above theirs 21:04 agrecascino just to jump into their base 21:06 shamoanjac I'd assume they'd die upon falling 21:06 shamoanjac you can use whatever you want as a table key in Lua, right? 21:06 T4im i think nil doesn't work 21:06 T4im as key :) 21:06 shamoanjac I'm not foolish enough to do table[nil] 21:07 T4im heh 21:07 shamoanjac imagine I'd open an interdimensional portal or something 21:07 T4im but yes, you can use other tables or even functions as keys 21:07 shamoanjac that's cool 21:07 Nosrick I'm not even sure where to begin with this... 21:10 agrecascino shamoanjac, pouring water from the base above? 21:12 shamoanjac ah yeah 21:15 shamoanjac factionsmod.takeover() changes the faction's owner, right? 21:15 agrecascino does that function exist? 21:15 agrecascino i didn't implement that feature yet 21:15 shamoanjac yes 21:15 agrecascino oh wait 21:15 agrecascino no 21:15 agrecascino takeover takes a cynk 21:15 shamoanjac just below the member_add documenation lel 21:15 agrecascino chunk* 21:16 agrecascino takeover takes a a single chunk claim, and claims it for your faction 21:16 agrecascino taking the land over 21:16 shamoanjac okay 21:16 agrecascino that _IS_ implemented 21:17 Nosrick How would I write a function to intercept/hook into the vanilla on_punch method? 21:20 shamoanjac the vanilla function is minetest.on_punch, I believe 21:20 shamoanjac you could do 21:21 shamoanjac on_punch = function(whatever) 21:21 shamoanjac my_function() 21:21 shamoanjac minetest.on_punch(whatever) 21:21 shamoanjac end 21:21 shamoanjac I think 21:21 Nosrick Ah, thank you! 21:22 Nosrick Hey PilzAdam! 21:22 shamoanjac does Lua shit itself if I do table.remove(myTable, value) and value isn't in table? 21:22 shamoanjac or can I call it safely without checks? 21:22 Hijiri I don't see any minetest.on_punch (or core.on_punch) 21:23 Hijiri with grep 21:23 T4im table.remove doesn't take a value there, but a position 21:23 T4im it's just for lists 21:23 shamoanjac ah right 21:23 T4im you want to set a value to nil 21:23 T4im eh an entry 21:24 * T4im will avoid the term value all day 21:24 T4im :D 21:24 Nosrick Damn, so I can't override any on_punch stuff? 21:24 T4im hm? 21:24 shamoanjac so, if I have a list, I have to first check the position of the element in the list, and then call table.remove()? 21:24 agaran Nosrick: well I am sure you can 21:24 shamoanjac you can override, that's for sure 21:25 Nosrick How would I do that? 21:25 shamoanjac just set on_punch = function [...] in your entity/node definition 21:25 agaran Nosrick: fetch like dirt node (default:dirt), get registered_nodes['default:dirt'].on_punch, save in var inside your module.. use as generic on punch? 21:25 shamoanjac I thought you wanted to extend the existing on_punch 21:25 agaran that is if you want to run default one aside of your code 21:25 Nosrick No, I think I need to replace the original. 21:26 shamoanjac if you want to replace it completely, you're fine with just setting on_punch 21:26 shamoanjac and then writing the function you want 21:26 Nosrick So how would I make the player take less damage from certain enemies? Override their on_punch? 21:27 T4im you can call the default with minetest.nodedef_default.on_punch for example, which usually should be minetest..node_punch, well at least for nodes; what are you punching ? 21:27 T4im ah entities 21:28 agaran T4im: another thing I did not know about, minetest.nodedef_default :) 21:28 T4im there's also such a table for other types of definitions 21:30 agaran somehow I feel that when I eventually publish my cables code I'll get a lot of comments that I did it wrong... 21:30 * T4im wonders if there is even a default on_punch for entities 21:30 Hijiri It might be worth having a separate damage framework that mobs can hook into 21:30 Nosrick Should I perhaps hook into on_hpchange? 21:30 Hijiri since entities in general are not mobs 21:30 shamoanjac I wouldn't go to on_hpchange 21:30 Hijiri on_hpchange doesn't tell you what caused the damage, like poison 21:31 shamoanjac since I assume that callback is called after dealing damage 21:31 Nosrick Ah, it's just the raw damage. 21:31 shamoanjac also that 21:31 Hijiri only problem is people would have to actually use the framework 21:32 Nosrick I've never written a framework before. 21:32 Hijiri shamoanjac: Here's some code that contradicts what you said (if I communicated what I meant to say well earlier): http://lpaste.net/174730 21:32 Nosrick So that'd be a challenge. 21:32 Hijiri I have to eat but I'll be back in a bit 21:33 Hijiri Nosrick: It helps to come up with the API before writing the code 21:33 Hijiri it can be comfy, sort of like theorycrafting 21:33 shamoanjac use pen and paper 21:33 Nosrick I'm terrible at theorycrafting. 21:34 Hijiri I need to eat but I'll be back 21:34 Nosrick See you in a bit. 21:35 agrecascino can minetest decode videos? 21:36 Calinou agrecascino: no 21:36 agrecascino that's disappointing 21:36 agrecascino i'd like to see https://a.pomf.cat/cwvxhp.webm play when you turn on a computer in-game 21:37 shamoanjac 9>anime background 21:37 shamoanjac 9>anime intro song 21:37 Nosrick >this does greentext 21:37 shamoanjac but yeah I'd like to see it 21:37 Nosrick Hoooo dayyum 21:37 shamoanjac hehe Nosrick I have the sikrit power 21:38 T4im you can do animated textures though 21:38 agrecascino and stream music separately? 21:38 Calinou music streaming is not possible 21:38 shamoanjac you can play an ogg 21:38 agrecascino shamoanjac, good enough 21:38 agrecascino also 21:38 agrecascino sauce was https://www.youtube.com/watch?v=aI0KmPebU2g 21:38 shamoanjac pls add weeb computer 21:40 shamoanjac agrecascino, what is "get_factionsmod(object)"? 21:40 agaran I am glad it can't open stream as texture/sound.. it would require lot more bandwidth to play then.. 21:40 shamoanjac only if you download it on the fly 21:40 Nosrick I'm looking at the punch method in ObjectRef. Is there a way to globally override that? 21:41 agrecascino shamoanjac, gets a list of factions a player is in 21:41 shamoanjac a Quake-like system for mods would be goat 21:41 agaran shamoanjac: or you would need nearly infinite cache.. you know how it ends.. ppl start to stream things off youtube.. etc 21:41 shamoanjac so a player can be in several factions? 21:41 shamoanjac okay 21:41 agrecascino shamoanjac, no 21:41 agrecascino shamoanjac, nononononono 21:42 shamoanjac ? 21:42 agrecascino it used to be that way, but i changed it 21:42 agrecascino since that makes no sense 21:42 shamoanjac I'm quite confused by the function 21:42 shamoanjac it's a get_*, yet it calls table.insert() 21:42 shamoanjac oh right 21:43 shamoanjac it builds a table 21:43 shamoanjac a table of... objects? 21:43 shamoanjac what kind of objects? 21:45 shamoanjac btw factionsmod.lua now has 419 loc 21:45 shamoanjac and will get less when I rewrite save() and load() 21:45 shamoanjac a lot saner! :^) 21:45 agrecascino shamoanjac, is factionsmod.lua done yet? 21:45 agrecascino shamoanjac, oh shit 21:45 agrecascino we have to make a converter, for the old factionsmod.conf 21:46 shamoanjac I have also removed without looking at them all the reputation stuff 21:46 agrecascino shamoanjac, good 21:47 agrecascino also 21:47 agrecascino might do an ally system 21:47 shamoanjac yes 21:47 shamoanjac fields allies and enemies in factions 21:47 agrecascino i was thinking you could ally whole factions 21:47 shamoanjac allies["faction"] = true 21:48 shamoanjac allies["faction"] = nil 21:48 agrecascino yeah 21:48 shamoanjac same for enemies 21:48 shamoanjac it's also the system I've used for invites 21:55 agrecascino agrecascino, how are we going to convert factionsmod.conf to the new and improved factionsmod.conf 21:56 shamoanjac I suppose you meant to highlight me 21:56 shamoanjac first of all we don't call it .conf 21:56 shamoanjac secondly, I guess a Lua function would do the trick 21:57 shamoanjac though I'd rather scrap the old way 21:57 agrecascino shamoanjac, i mean, like a function to take the old conf 21:57 agrecascino and write the new one 21:58 shamoanjac yeah I understood 21:58 shamoanjac I personally wouldn't bother with it since nobody is using the mod atm 21:58 shamoanjac and the only faction created on the server is Finland with three people 22:00 agrecascino what 22:01 agrecascino shamoanjac, you're sort of wrong 22:01 agrecascino actually 22:02 agrecascino let me rephrase that to describe the extent to which you are wrong 22:02 agrecascino "what" 22:02 Laster Hi everyone 22:03 shamoanjac hi Laster 22:03 Laster I'm writing an article on wikipedia about minetest 22:03 agrecascino https://pastebin.com/yBg1CuaZ 22:03 agrecascino shamoanjac, there's a lot of people using it 22:03 shamoanjac alright 22:03 Laster so i am looking for some sources, for example about the history and popularity of minetest 22:03 shamoanjac well we'll write one 22:04 shamoanjac 3>xXWeedGoku420Xx 22:04 shamoanjac pls ban 22:04 agrecascino it's popular with /v/irgins 22:04 agrecascino and people that have way to much time on their hands 22:04 Laster Maybe somebody does know some sources? 22:05 shamoanjac I suppose minetest.net is a good way to start :P 22:05 Nosrick GUYS 22:05 Nosrick I THINK I GOT IT 22:05 agrecascino ? 22:05 agrecascino what 22:05 Nosrick Wait... it might not work on entities. 22:05 Nosrick I overrode core.nodedef_default.on_punch 22:06 agrecascino erm 22:06 agrecascino couldn't you just register a callback 22:06 Nosrick Can I register my own custom callbacks? 22:06 shamoanjac of course 22:06 Laster @shamoanjac are you sure there is some historical information one minetest.net? 22:07 agrecascino use magic and archive.org 22:07 Nosrick So, will that allow me to override what happens when someone gets punched? 22:07 agrecascino yes 22:07 shamoanjac but only for the entity whose callback you are setting 22:08 Nosrick Damn it. 22:08 shamoanjac agrecascino, 22:08 shamoanjac factionsmod.dbg_lvl3 = function() end 22:09 shamoanjac ¿¿¿ 22:11 shamoanjac btw, I'm not sure what the "dynamic data" was supposed to be 22:11 shamoanjac I've restructured the mod to use three tables 22:12 Nosrick Looks like there's a register_on_punchplayer. 22:12 shamoanjac a players table (factions.players[player] = "factionname") 22:12 shamoanjac a chunks table (same as above) 22:12 shamoanjac and a factions table (factionsmod.factions["faction_name"] = faction) 22:12 shamoanjac I think these three ought to be saved 22:13 shamoanjac well, the players function can be reconstructed easily 22:13 shamoanjac s/function/table 22:13 shamoanjac and now that I think about it, the chunks table too 22:13 shamoanjac so I guess it'd be enough with saving factionsmod.factions 22:24 shamoanjac ok I think I'm done rewriting factionsmod.lua 22:26 shamoanjac from 940 loc to 320 22:27 Hijiri backj 22:29 agrecascino shamoanjac, i feel like every time i write something, someone rewrites it better 22:29 agrecascino to be fair, this was mostly sapier's code though 22:30 shamoanjac someone could come and rewrite my code even better 22:31 shamoanjac especially for the banners mod 22:31 * shamoanjac has an ick at the thought of his init.lua 22:31 * agrecascino becomes an hero thinking about his game engine 22:33 shamoanjac lel 22:34 agrecascino https://youtu.be/VdiAUSbOR1g 22:34 agrecascino oops 22:35 agrecascino meant https://youtu.be/VdiAUSbOR1g?t=7m29s 22:38 Nosrick Looks like I'm just going to have to write my own damn framework. 22:38 agrecascino Nosrick, why 22:39 Nosrick So I can have various damage types, as well as damage boosts. 22:40 agrecascino Nosrick, pretty much anything damage related in minetest is completely fucked 22:40 Nosrick Yeah, so I've seen. 22:43 Hijiri Nosrick: a damage type framework exists in armor_monoid 22:43 Hijiri no damage boosts though 22:43 Nosrick Ah, I need damage boosts. 22:44 Hijiri Also you should be aware that if you use register_on_punchplayer and cancel normal damage things, I think that also cancels other puncplayer callbacks 22:44 Hijiri so you may want to provide your own global callback registrations for the new damage system 22:44 Nosrick Yeah, it also doesn't work on entities/mobs. 22:44 Nosrick Only on players, as far as I can tell. 22:44 Hijiri people would have to write their mobs to use the damage framework 22:44 Hijiri and you would have to write it in a way that it's easy to hook into 22:45 Nosrick I'm going to write my own on_punch method, that can be hooked in to. 22:45 Hijiri method for what? 22:45 Nosrick To handle damage and such. 22:45 Hijiri method as in something you call with blah:method()? 22:46 Nosrick Yeah. 22:46 Hijiri what is the blah? 22:46 Nosrick momtest. 22:46 Hijiri why do you need a method for that, as opposed to just a function? 22:46 Nosrick Eh, guess I could do that. 22:47 Hijiri : is just syntax sugar for call using normal indexing, I think it just wastes arguments 22:47 Hijiri it also makes it harder to do local blah = momtest.blah 22:47 Nosrick Ah, I see. 22:47 Nosrick Wait. 22:48 Nosrick I might be using a global function table. 22:48 Hijiri Nosrick: You shouldn't just have a global momtest.on_punch that people overwrite, because then people have to do the boilerplate of local old_on_punch = momtest.on_punch, momtest.on_punch = ... 22:48 Nosrick I think I am. 22:48 Nosrick Ah, shit. 22:48 Hijiri you can eliminate the boilerplate by providing something similar to the current on_punchplayer callbacks 22:48 Hijiri just using your damage system 22:49 Hijiri it could support both entities and players, though 22:49 Nosrick So how would I write a callback? 22:49 Hijiri momtest.on_punch_callbacks = {}, function momtest.register_on_punch(func) ... end 22:50 agrecascino what should the hostname for my sparc64 machine be 22:50 Hijiri momtest.on_punch_callbacks = {}, function momtest.register_on_punch(func) table.insert(momtest.on_punch_callbacks, func) end 22:50 Hijiri and then in your punching function you call all the callbacks like you would have called on_punch 22:50 Hijiri the main problem I think is getting other people to adopt your framework 22:51 Hijiri if you don't need that then you can write custom code without a framework 22:51 Nosrick I'm not too fussed about it, to be honest. 22:51 Nosrick I mostly want it to work with my mod(s) 22:51 Hijiri alright 22:51 Hijiri but for it to work with mobs they will need to be modified to use it 22:51 Hijiri or you can write your own mobs 22:52 Hijiri there's no override_entity but you can modify the definition in the minetest.registered_entities table 22:52 Nosrick Beat me to it :) 22:52 Nosrick That's exactly what I was going to do. 22:52 Hijiri ok, good luck 22:53 agrecascino shamoanjac, what should the hostname for my sparc64 machine be 22:53 Hijiri Nosrick: though if you are using multiple mods you will probably want a nice API for yourself anyway 22:53 Nosrick Yeah, I think I will. 22:53 shamoanjac uhm 22:53 Hijiri just not focused on compatibility 22:54 shamoanjac intels-nightmare 22:55 thePalindrome Passion maybe? 22:56 * thePalindrome continues making really bad puns 22:56 Calinou fluttershy 22:57 Calinou because every decent developer gives pony names to their machines, that's known 22:57 Nosrick Decent pone 22:57 Nosrick At least not worst pone 22:57 agrecascino where is an │ 22:57 agrecascino │ username, like 'imurdock' or 'rms' 22:57 agrecascino rip imurdock 22:57 thePalindrome Hey 22:57 thePalindrome I resent that statement 22:58 thePalindrome I'd have to count again, but I think I have some 7 pony machines 22:58 Calinou :] 22:58 thePalindrome Okay 8 22:58 * thePalindrome can count 22:58 Calinou unlike PHP developers! 22:59 thePalindrome No wait 10 22:59 * thePalindrome is proud as he digs a deeper hole 22:59 Calinou Minetest runs so much smoother on Linux than on Windows :| 22:59 Calinou with the same hardware 23:00 shamoanjac agrecascino, what's the "leave" function supposed to do? 23:00 shamoanjac I see it can take several arguments 23:00 agrecascino ? 23:00 Fixer_ Calinou: better threading? videocard drivers? 23:00 agrecascino give me the entire definition? 23:00 Calinou Fixer_: drivers are the same (NVIDIA proprietary) 23:00 shamoanjac apparently I can do 23:00 thePalindrome Calinou: Well duh, Windows does everything worse 23:00 Nosrick Calinou: where do I know you from? 23:00 Calinou other games on Windows give me same performance 23:00 shamoanjac /functionsmod leave param1 param2 23:00 thePalindrome I can run Skyrim better on linux than windows 23:00 Calinou Nosrick: no idea 23:01 shamoanjac oh I see 23:01 shamoanjac it can be used to kick 23:01 agrecascino it makes a user leave a faction 23:01 Fixer_ Calinou: do you have drawtime jitter in singleplayer when map is generated? 23:01 shamoanjac I'll split it into "leave" and "kick" 23:02 Calinou Fixer_: yes 23:02 Calinou but I also have stuttering on multiplayer 23:02 Fixer_ i mean stuttering, yes 23:02 Fixer_ it is both in sp and mp 23:02 Fixer_ but more in sp 23:03 Nosrick Calinou: Have I seen you kicking around the Godot forums/issue tracker? 23:04 Calinou oh, yes 23:04 Calinou I'm a Godot contributor 23:04 Calinou and I maintain Godot builds 23:04 Nosrick Ah-ha! 23:05 Nosrick That's where I know you from. 23:23 Nosrick Okay, so I'm stepping through the table of callbacks. Do I just go local func = tableValue, then do func(parameters)? 23:24 agrecascino i find it sort of sad that debian has less support for sparc64 than hppa 23:26 Hijiri Nosrick: what does the surrounding code look like? 23:26 Hijiri what is tableValue? 23:36 shamoanjac are there table slices in Lua? 23:42 Hijiri no 23:43 Hijiri well, no special syntax for them 23:43 Hijiri you could write a function that did slices hypothetically 23:43 shamoanjac :( 23:43 shamoanjac sometimes this language feel barebones when you come from Python as a scripting language 23:44 shamoanjac at least it's not Haskell 23:54 agrecascino shamoanjac, puuuuuuureeeeeeee 23:59 shamoanjac wat 23:59 agrecascino haskell is pure