Time Nick Message 00:00 MTDiscord coughs in ?remindme 00:00 MTDiscord I guess I can do that now, it won't touch my current file 00:02 MTDiscord once again, Github's preview won't respect the include but the VSC extension does 00:04 MTDiscord Any objections to #9? 00:05 MTDiscord @wsor 00:05 MTDiscord yes yes, im getting there patience 00:05 MTDiscord done 00:06 MTDiscord ? 00:17 MTDiscord I'm starting to doubt that grouping is of any use 00:18 MTDiscord hmm, well it probably is 00:18 MTDiscord but the current example sucks 00:21 MTDiscord Assigning things to groups is useful for recipes that accept any type of wool for example. 00:21 MTDiscord lol I'm speaking of texmod grouping 00:21 MTDiscord Ah. 00:22 MTDiscord Very WIP: https://github.com/minetest/minetest_docs/pull/10 00:23 MTDiscord Texture Modifiers are a hot mess as I have said 00:25 MTDiscord I'll take a look at that after I finish vector 00:26 MTDiscord take only a brief look / glance, as said, very WIP 09:57 MTDiscord morning 10:30 MTDiscord good morning 10:30 MTDiscord is there anything (relatively)simple that i could start documenting? 11:09 MTDiscord btw, given the license, are we allowed to copypasta phrases from lua_api.txt ? 11:15 MTDiscord No copypasta, don't even bother reading lua_api.txt 11:16 MTDiscord The plan is to read the source code directly and document that. Plus then it'll be documented better ? 11:16 MTDiscord If we read from source, then our documentation is a transformative work, and therefore not subject to copyleft derivative issues 11:27 MTDiscord ^ 11:36 MTDiscord am i correct in saying all the things in https://github.com/minetest/minetest/blob/master/src/object_properties.h#L31-67 are in the lua api? 11:55 MTDiscord adoc == Storage options === Key-value store ==== Configuration files The `Settings` object allows you to operate on configuration files, getting & setting key-value entries and saving the file. The main `Settings` object `minetest.settings` can be used to persist a few settings "globally" - bleeding everywhere. This is horribly abused by the mainmenu to store stuff like the last selected game. Don't be like the mainmenu. 11:55 MTDiscord Configuration files are presumably easy to edit for users, but so is Lua. slightly opinionated :trollface: 11:55 MTDiscord :trollface: 12:10 MTDiscord i have been reading the source code for a while and i already regret signing up to this 12:17 MTDiscord hmmm https://github.com/minetest/minetest/blob/master/src/script/common/c_content.cpp#L196-L204 isnt hp_max only meant to be for players? 12:39 MTDiscord well, yes, but both players and objects have it 12:39 MTDiscord objects just don't care 12:39 MTDiscord ahh i see 13:09 MTDiscord "automatic_face_movement_max_rotation_per_sec" lmao why is that so long 13:52 MTDiscord Also document the overall format (table that is indexed; additional keys don't matter; __index metamethod is supported) 13:53 MTDiscord Sure thing 13:55 MTDiscord It is nice that you are documenting the value ranges 14:25 MTDiscord I did read the API file to enumerate field names, which I can then use as keywords for searching engine code quickly. The problem would be if there are fields that aren't documented at all, but I kind of doubt it. 14:27 MTDiscord j45 if you want to work together on whatever you started on I'd be interested, since I don't mind reading engine code and it sounds like you don't particularly savor it. 14:27 MTDiscord sure 14:27 MTDiscord Just edit https://github.com/minetest/minetest_docs/pull/12 14:27 MTDiscord ^ 14:28 MTDiscord I will get started as soon as I get back from church. 14:29 MTDiscord also i completely forgot about examples so we will need to add those, and, as luatic mentioned, how to format the table overall 14:42 ROllerozxa asciidoc tables are really cool and more advanced than markdown, but the source text still ends up a mess... :/ 14:43 ROllerozxa I've been writing a page about the file formats (images and models mostly) the engine supports and structured it as a table 14:45 MTDiscord ooh nice 14:48 ROllerozxa so the table contains, for instance with images, if they can be programmatically encoded/decoded by the engine either built-in or with a third-party library, and then there's a list of libraries below categorized by format below the table 14:49 MTDiscord sounds nice, waiting for your PR - are you classifying how much of a file format is supported? 14:49 MTDiscord we only support part of obj, for instance (no mtl or curved surfaces) 14:51 ROllerozxa hm, yeah, I was thinking that for models there should be two columns for whether it supports static or animated models of said format, but there maybe should be more in addition to that 14:51 ROllerozxa wait is it models or meshes? not much of a modeler, haven't dabbled much in it 14:52 ROllerozxa a model can have several meshes right 14:57 MTDiscord We use "model" and "mesh" interchangeably here AFAIK 14:57 MTDiscord How can I link a section in AsciiDoc? 15:22 ROllerozxa like, linking to headers in the same document? 15:22 MTDiscord yeah 15:41 ROllerozxa looks to be done with anchors. invisible element denoted with [[square-brackets]] using an ID you then reference with <> from what I can tell in the asciidoc cheatsheet 15:42 ROllerozxa https://powerman.name/doc/asciidoc#anchor-1 some more info 15:47 MTDiscord BTW the AsciiDoc docs use Antora too 15:50 MTDiscord https://docs.asciidoctor.org/asciidoc/latest/macros/inter-document-xref/ 15:52 MTDiscord @Benbob0329 could you finish up the vector PR? 15:54 MTDiscord I can later today, I'll be busy throughout the afternoon though. 15:55 MTDiscord alright 17:11 MTDiscord https://github.com/minetest/minetest/pull/11918 17:44 appguru Alright, we should open a "document facedir" issue? 17:44 appguru Although I consider it rather intuitive... 17:45 appguru You have an axis and an angle. The angle must be a multiple of 90°, the axis must be +/-XYZ 17:53 MTDiscord Back. 18:25 MTDiscord oh my thanks for pointing this out i need to start drinking coffee 18:25 MTDiscord https://cdn.discordapp.com/attachments/926231483155378176/927266298692505700/unknown.png 18:25 MTDiscord I'm making some fairly large changes to the doc BTW. 18:25 MTDiscord So expect merge conflicts might show up if anything changes. 18:26 MTDiscord are you fixing the things appguru pointed out in my PR? 18:26 MTDiscord Does anyone know whether I can use an attribute as part of another attribute? I'm trying to sequentially "build" URLs and the way I'm doing it isn't working. 18:26 MTDiscord i am too but if u are, ill leave it 18:26 MTDiscord No, j45, I'm changing the way data types are documented, and I included the header so that INFO blocks show up correctly etc. 18:27 MTDiscord @j45 why don't you review https://github.com/minetest/minetest_docs/pull/14 so I can hit the shiny merge button? 18:28 MTDiscord I have for example :new-url: {base-url}/something/extra and then I do {new-url}/more-extra, but the result doesn't display as expected. 18:28 MTDiscord i had a quick look at it earlier 18:28 MTDiscord i dont know much about VoxelArea but LGTM 18:28 MTDiscord ill say that in the pr to avoid confusion later on 18:29 MTDiscord you want to hit it or should i? 18:29 MTDiscord hmm, maybe wait, I want to elaborate a bit 18:30 MTDiscord sure 18:32 MTDiscord alright, done 18:33 MTDiscord now you can hit the merge button 18:33 MTDiscord ok 18:34 MTDiscord our docs are growing steadily :) 18:35 MTDiscord maybe the pomegranate example should include a "WARNING: if you do not have to use WARNING:, you're doing something wrong, or the engine is surprisingly doing something right" 18:37 MTDiscord https://github.com/minetest/minetest_docs/pull/12#discussion_r777213272 do you mean when another object (player???) looks at it? 18:38 MTDiscord when a player points at it, they will be shown the infotext 18:38 MTDiscord ok ty 18:38 MTDiscord pointing != looking though 18:38 MTDiscord pointing uses selection boxes and is limited in range through the current tool 18:40 MTDiscord I wonder when the docs team will notice that I have been sneaking in tiny fixes without opening PRs 18:46 MTDiscord lol 18:46 MTDiscord anyways, time to monospace all properties welp 18:58 MTDiscord https://github.com/minetest/minetest_docs/pull/12#discussion_r777243048 19:00 MTDiscord I had to eat lunch. Time to resume work. 19:00 MTDiscord Whoops, hobby*, it's Sunday. ? 19:01 MTDiscord xD 19:02 MTDiscord Are you monospacing the properties? I'll avoid changing that then. 19:02 MTDiscord yea i have pushed that already 19:06 MTDiscord OK, hopefully I don't have merge conflicts.xD 19:06 MTDiscord yea those will be annoying lmao 19:12 MTDiscord OK, my only issue now is the URLs. 19:13 MTDiscord Aand merge conflicts! 19:13 MTDiscord I warned you. ?‍♂️ 19:14 MTDiscord I have to merge every single property now. 19:14 MTDiscord Every single one. 19:15 MTDiscord I'm also confused about where these blocks are supposed to start and stop. 19:16 MTDiscord What's the purpose of the ======= blocks? 19:17 MTDiscord @j45 19:17 MTDiscord Well bruh, some stuff is even out of order. 19:17 MTDiscord IDK if this is worth merging. I might just redo my work. 19:19 MTDiscord Ohh the ==== stuff was put in by git. 19:19 MTDiscord A block delimited by ==== on the top and bottom is an example block 19:19 MTDiscord Yeah, everything here is out of order. 19:19 MTDiscord And I do not know how to copy paste in vim. 19:20 MTDiscord d == delete/cut, y == yank/copy, p == paste iirc 19:21 MTDiscord Again, I use kak these days (except now I'm finding VSC's preview plugin really nice) so my Vim knowledge is a bit faded 19:22 MTDiscord ? 19:22 MTDiscord Ohh I remember now, I can yank a specific amount. 19:23 MTDiscord You can also double tap to get the current line, or use visual mode 19:23 MTDiscord This isn't a very powerful computer, and I feel very at home on the command line. 19:24 MTDiscord IDEs have a lot of setup required that I haven't learned. 19:24 MTDiscord I get that, I might add a save hook to generate an asciidoc in /tmp to make previewing easier 19:26 MTDiscord Then again, I like having a file tree and git overview 19:28 MTDiscord https://github.com/minetest/minetest/pull/11919 19:28 MTDiscord We're helping ? 19:35 MTDiscord OK, finally pushed. 19:37 MTDiscord @Benbob0329 If you look at the very top of the properties documentation you can see that one of the links is bad. 19:37 MTDiscord Any idea how I can fix it? 19:38 MTDiscord Don't make it a URL macro? 19:38 MTDiscord ie, remove the trailing [] 19:39 MTDiscord That was accidentally left in, but it didn't work without that either. 19:39 MTDiscord Also don't expect GitHub to make any preprocessor stuff work right 19:39 MTDiscord GitHub previews are pretty much as-is and nothing more 19:40 MTDiscord I ain't lookin' at GitHub sir. 19:40 MTDiscord I'm testing all of this in my browser during development. 19:40 MTDiscord So I see exactly how it renders. 19:40 MTDiscord Browser plugin or running asciidoctor? 19:40 MTDiscord AsciiDoctor. 19:41 MTDiscord Alright, well I'm on my phone right now so I'll take a closer look later 19:41 MTDiscord Back to moving snow for now 19:41 MTDiscord https://cdn.discordapp.com/attachments/926231483155378176/927285509313658961/unknown.png 19:41 MTDiscord OK, talk later then. 19:43 MTDiscord Ugh, I had messed something up with the config lol. 19:43 MTDiscord Sorry about that. 19:47 MTDiscord I also notice that there's no table of contents. 19:49 MTDiscord Fixed. 19:49 MTDiscord I'm going to take a break. ? I'll load up the engine code though so I'm ready to read through it. 19:50 MTDiscord Hehehe, default max HP is 0. ? 20:49 MTDiscord *is ? 20:53 MTDiscord ignore aboce 20:54 MTDiscord what is our policy on csm documentation? do we include it, dont, seperate files, etc? 20:55 MTDiscord IMO for now we dont document as we have so many other things to do but possibly in the future 20:55 MTDiscord i think its easier to include it in the respective topics 20:57 MTDiscord Luatic mentioned things that weren't in the client API for the environment doc 20:58 MTDiscord so mentioning csm specifics is ok? 21:00 MTDiscord Sure, we can always decide to separate it out later 21:00 MTDiscord i mean im documenting modchannels, so its kinda stupid in my opinion to not include it 21:02 MTDiscord also @Luatic https://github.com/wsor4035/minetest_docs/blob/modchannels/doc/environment.adoc?plain=1#L244 is broken in github rendering at least 21:03 MTDiscord GitHub is just being stupid 21:03 MTDiscord It won't apply the preprocessor macros properly 21:04 MTDiscord Someone should probably make an issue about allowing in-repo include:: macros 21:12 MTDiscord alright, I'm free for a bit now 21:13 MTDiscord Sidenote, we should probably link to the appropriate source file(s) in the docs 21:20 MTDiscord im gonna stop for today, #12 is somewhat near done (i hope i can finish it tmr :D) 21:20 MTDiscord *near completion 21:21 MTDiscord isnt this supposed to be more api documentation for game/mod creators than engine documentation? 21:22 MTDiscord Yes, but linking the relevant source code can still be helpful. 21:42 MTDiscord ^Yea, i think we should link the relevant lua_api.txt line and engine code either at the top or bottom of each page 21:43 MTDiscord I don't know about lua_api.txt (if we're doing our job right we're providing better info than it) but a github link at the top pointing to the relevant file is simple enough 21:50 MTDiscord I think it would be good to link lua_api.txt untill later on, when this is more complete and reliable 21:51 MTDiscord lua api.txt is a moving target, source files not so much 22:06 MTDiscord @Luatic This would be the "correct" way to write the vector length equation in AsciiMath? tan^-1(|bar a xx bar b|, bar a * bar b) 22:09 MTDiscord what 22:09 MTDiscord whis there an atan 22:09 MTDiscord why is* 22:09 MTDiscord lua function vector.angle(a, b) local dotp = vector.dot(a, b) local cp = vector.cross(a, b) local crossplen = vector.length(cp) return math.atan2(crossplen, dotp) end 22:10 MTDiscord I probably shouldn't assume the implementation is equivalent when I don't know the formula off the dop of my head 22:10 MTDiscord what the cinnamon toast fuck 22:10 MTDiscord angles are usually implemented over only the dot product 22:11 MTDiscord because that is dot(a, b) = cos(angle between a and b) |a| |b| 22:11 MTDiscord so you have dot(a, b) / |a| / |b| = cos(angle between a and b) 22:11 MTDiscord then you just do acos to obtain angle = acos(dot(a, b) / |a| / |b|) 22:12 MTDiscord this looks like a different, less efficient formula 22:12 MTDiscord Remind me to watch that kahn academy video on trig sometime so that I can suck less at it 22:12 MTDiscord instead of computing the length of both vectors, it uses the cross product? 22:12 MTDiscord anyways, do I put in the normal formula, none, or the one the engine actually uses? 22:13 MTDiscord hmm, put in the engine formula 22:13 MTDiscord I do wonder why it was chosen though, I believe it is slower 22:14 MTDiscord OFC the cross product can be used, as it contains the angle as well (in a sin) 22:15 MTDiscord https://stackoverflow.com/questions/21483999/using-atan2-to-find-angle-between-two-vectors 22:49 MTDiscord Lol, so if you don't specify a breath_max it gets set to 0. 22:49 MTDiscord Does that automatically kill you, or does a value of 0 disable breath or something? 22:49 MTDiscord those have default settings somewhere I'm pretty sure 22:50 MTDiscord Which override the internal defaults? 22:50 MTDiscord I wouldn't be supprised 22:50 MTDiscord Aren't there objects with these properties that the settings wouldn't apply to? 22:50 MTDiscord It'd make sense if the settings applied to the player, ofc. 22:51 MTDiscord Like, what happens if I make a mob with a breath_max of 0? 22:51 MTDiscord What portion of the API are you looking at? The internal object handling, the Lua functions, or the registration? 22:51 MTDiscord I'm looking at object properties. 22:51 MTDiscord RN I'm looking at the internal C struct. 22:52 MTDiscord make sure that the part exposed to Lua for the registration functions doesn't have it's own defaults 22:52 MTDiscord I'm doing that at the same time. 22:52 MTDiscord ? 22:52 MTDiscord It's basically "If the field exists overwrite the struct field otherwise leave it be." 22:53 MTDiscord So the internal struct defaults end up being the actual defaults for the properties. 22:53 MTDiscord Which might... be bad, but what can we do about that hehe. 22:53 MTDiscord There could be another place where they're initialized to defaults or something. 22:53 MTDiscord Finding that will be a pain. 22:54 MTDiscord Does it make sense to you to order the fields the same way they're ordered in the source code? Or is that not really helpful. 22:55 MTDiscord I suppose that depends, are they ordered in a logical order in the source code? 22:56 MTDiscord I would say so. Related properties appear to be grouped together. 22:57 MTDiscord And the properties are handled by the API in the same order. 22:58 MTDiscord then I'd say keep the source code order 22:58 MTDiscord Ah, we already have them in that order actually. 22:58 MTDiscord Ours is just a little different because we listed player-only properties separately. ? 22:58 MTDiscord I wonder whether that's the best way to do it. 22:59 MTDiscord Lol this is hilarious. 23:00 MTDiscord I guess it's so that it's enabled if physical is turned on. 23:00 MTDiscord Yeah, nevermind. 23:06 MTDiscord Oh, stuff is nil by default in Lua. 23:06 MTDiscord What does nil end up as in C++? 23:06 MTDiscord The defaults in the struct are going to be overwritten by nil I think. 23:06 MTDiscord probably null or 0 23:08 MTDiscord I'll need to look into this more. I'm not sure either of these functions are actually responsible for setting the properties. 23:08 MTDiscord They're just utility functions for once the properties are set. 23:16 MTDiscord I'm sorry about the git messup I made, I guess this is why the engine repo squashes commits before merging. 23:16 MTDiscord They don't always, it depends 23:17 MTDiscord I was messing around with vim and accidentally duplicated the entire file without realizing it. 23:17 MTDiscord Honestly I didn't quite catch the whole git snafoo that happened, so I have no idea how much of a pain it was to fix. 23:18 MTDiscord I just had to revert a commit and redo it. It's annoying to have that stuff in the commit history, though. 23:18 MTDiscord ¯_(ツ)_/¯ 23:18 MTDiscord reverts happen 23:19 MTDiscord I'll check more carefully in the future before committing, even for what I believe to be small changes. Just in case. 23:21 MTDiscord Where are you committing to? Should only be into your own fork, and then we merge via PR so that we can catch these things. 23:21 MTDiscord I'm committing to j45's branch. 23:21 MTDiscord ahh 23:21 MTDiscord https://github.com/minetest/minetest_docs/pull/12 23:22 MTDiscord if it's on a branch you can always rebase and drop faulty commits 23:22 MTDiscord Just don't push until you've made sure it's right ? 23:22 MTDiscord True. Maybe we'll do that, I just need to talk to him before doing anything massive. 23:22 MTDiscord I would normally just have amended, but I know he's working on the same branch, so I don't want to footshoot us both. 23:23 MTDiscord git is the best and worst thing sometimes, having a visual of your changes is super helpful 23:23 MTDiscord Anyways, back to documenting vector