Time Nick Message 01:43 p_gimeno is the first return value of the register_chatcommand function used for anything? 02:28 kaeza It seems it's completely ignored in code. Haven't looked at what Lua API says. 02:29 kaeza https://github.com/minetest/minetest/blob/master/builtin/game/chatcommands.lua#L30 02:48 p_gimeno thanks 07:15 OtakuKent hello 07:16 norkle moah ctf pls! 13:47 JDCodeIt galaxie: there is no growth abm for default:grass_1,2,3,4,5. there is only a spread ABM in functions.lua. default:grass_1 etc. are given a random length when placed. 13:48 JDCodeIt Because of the spread function, placing grass on a bunch of default:dirt will eventually cause that dirt to change to default:dirt_with_grass 18:04 galaxie Is there a good mod or two I can look at that shows Lua.. emulating OOP classes? 18:05 rubenwardy galaxie: https://github.com/CapitalismGame/capitalism_game/tree/master/mods/capitalism 18:05 rubenwardy https://github.com/CapitalismGame/capitalism_game/blob/master/mods/capitalism/company/company.lua 18:05 rubenwardy includes unit tests and documentation 18:05 galaxie Fancy. 18:05 rubenwardy https://capitalismgame.rubenwardy.com/ldoc/ 18:06 rubenwardy eg: https://capitalismgame.rubenwardy.com/ldoc/modules/company.html 18:07 MinetestBot DoyleChris: Mar-10 15:12 UTC infrared part was intended to be disabled by default (too cheaty), it was fixed before 5.0 release (aka off by default) 18:09 DoyleChris I have a question for mapgen 18:09 galaxie What's the company.Company = company line for? "Register" the class? 18:10 DoyleChris im trying to add a diamond block below -5000 like the mese block but im getting a error 18:10 DoyleChris this is the coding 18:10 DoyleChris function default.register_ores() minetest.register_ore({ ore_type = "scatter", ore = "default:dimondblock", wherein = "default:stone", clust_scarcity = 20 * 20 * 20, clust_num_ores = 5, clust_size = 3, y_max = -5000, y_min = -31000, }) 18:11 DoyleChris https://pastebin.com/qWwtgiQz 18:12 p_gimeno DoyleChris: dimond -> diamond 18:13 p_gimeno galaxie: I think you want to learn how to set up OOP before you watch examples on how it's used 18:13 DoyleChris i got it 18:14 DoyleChris i named it diamond.lua instead of init.lua 18:14 p_gimeno well, you still have dimondblock instead of diamondblock 18:15 DoyleChris i changed that now im getting something elase 18:15 DoyleChris else 18:16 galaxie p_gimeno: I hate Lua. Can you recommend a resource for OOP? I've found a few articles online. 18:16 DoyleChris https://pastebin.com/YaVgLLkv 18:16 DoyleChris attempt to index global 'default' (a nil value) 18:16 p_gimeno galaxie: https://www.lua.org/pil/16.html goes through the basics 18:17 p_gimeno DoyleChris: remove the function 18:18 p_gimeno just start with minetest.register_ore... 18:20 rubenwardy galaxie: Company is a local 18:20 rubenwardy it only appears in the file 18:21 rubenwardy company.Company = Company puts the class into the company global 18:21 rubenwardy so other mods can do this: local mycomp = company.Company:new() 18:21 rubenwardy you should not make any globals other than a table which is the same as your mod name 18:23 galaxie Good to know, thanks. Is the Programming in Lua online manual fairly up-to-date? It says it's different from the 5.3, which you'd have to buy. 18:24 p_gimeno the manual is for 5.0, standard Lua used in Minetest is 5.1, there are very few differences though 18:29 p_gimeno there are a few more metamethods in Lua 5.1, a new syntax for multi-parameter functions, and additional syntax for comment and string literal delimiters. Also there's a new # operator for length (it was a function in 5.0). I don't think you'll run into any other differences. 18:30 DoyleChris i dont know if it worked, i enabled it went to 8000,-8000,8000 on my map, never been there so it had to generate the blocks but i dont see any. 18:31 p_gimeno 20x20x20 is a very very low chance 18:31 DoyleChris so raising that up to 30x30x30 ill have more chance 18:31 p_gimeno no, the opposite 18:32 p_gimeno 20x20x20 means that you get 1 ore in each 20x20x20 cube 18:32 p_gimeno (on average) 18:33 DoyleChris how does that work with clust_num_ores and clust_size 18:36 p_gimeno maybe you get 1 cluster, not 1 ore, not sure, but I know that it's rare to find stuff at these scarcity levels 18:40 galaxie Just turned my single mod into a game. It's claiming it can't find meshes and images. Where are they supposed to be located? I'm placing them in media/models and media/textures but even in media it's not finding them?? 18:41 galaxie Also, there are no nodes and I start off falling, even though mapgen is set to flat. 18:47 p_gimeno galaxie: if your game does not have the default mod, you won't have any dirt_with_grass or anything else, and you'll need to register the elements with the mapgen yourself 18:50 galaxie p_gimeno: Oh, how would I include it and keep it up-to-date? 18:53 p_gimeno well, you need to copy it from minetest_game, add the credits, and manually update it... or you could fork minetest_game and add your mod to it... but I'd reconsider making your mod a game 18:54 p_gimeno minetest_game is what makes minetest a survival game 18:54 galaxie Hmmm, I suppose so. 18:55 p_gimeno if you want to make a game, you need to implement all the survival features and the blocks 18:56 p_gimeno try the Tutorial game by Wuzzy, it shows a lot of what can be done. I've always thought it's a good tutorial on the engine for modders (not nearly as good as an introduction to survival) 18:56 p_gimeno *not nearly as good an introduction... 19:19 galaxie What's the largest number of concurrent users a server has seen without crashing? 19:23 galaxie Also, I assume there isn't any real horizontal scalability to MT servers? 19:27 rubenwardy probably 80-ish 19:27 rubenwardy and there isn't, unfortunately 19:28 rubenwardy there's this: https://github.com/andrewvy/knot 19:31 galaxie How WIP is it? I'd be interested in that cross-server plugin communication.. 19:31 rubenwardy very WIP 19:32 p_gimeno looks like it was developed for about a week, then abandoned - https://github.com/andrewvy/knot/commits/master 19:32 rubenwardy :( 19:33 rubenwardy Minetest doesn't tend to get many users anyway 19:33 galaxie It's a pity, isn't it? I wouldn't dare install MineCraft on my personal laptop. 19:34 rubenwardy yeah 23:03 makayabou If I use minetest.Settings to create a specific con file, do I need to request an insecure env ? 23:03 makayabou *conf file 23:10 makayabou Rubenwardy: In ctf mod, you create .conf files per map, then you save them in worldpath. How do you copy them in mods/ctf/ctf_maps/maps ? 23:10 rubenwardy Settings(minetest.get_modpath("mymod") .. "/file.conf") 23:10 rubenwardy local map = Settings(minetest.get_modpath("mymod") .. "/file.conf") 23:10 rubenwardy map:get("key") 23:10 rubenwardy no need for insecure env 23:11 makayabou I thought that I needed insecure env each time I want to write something outside of worldpath 23:12 rubenwardy you can write to your own mod's path 23:12 rubenwardy s/write/read 23:12 rubenwardy and you can write to your own mod's path if you obtain a handle on load 23:12 rubenwardy ie: call settings on load 23:12 makayabou ah ok... I did not understand this.. 23:13 makayabou So insecure env is only if I want to write files outside of worldpath and modpath ! 23:13 MinetestBot 02[git] 04paramat -> 03minetest/minetest_game: Fix beds being undiggable after laying down 13e3cd961 https://git.io/fjJrJ (152019-03-23T23:12:44Z) 23:14 makayabou Just to be sure I understood everything well, could you point me to the part of your code in ctf that write in modpath? 23:17 MinetestBot 02[git] 04paramat -> 03minetest/minetest_game: Dungeon loot: Avoid empty 'if' branch to satisfy lua check 138b5e0a9 https://git.io/fjJrk (152019-03-23T23:16:41Z)