rudzik8

my first Luanti mod

and why you shouldn't sweat making mistakes (and poor design choices)


it was the hot summer of 2021. I was sitting at home, occasionally playing Luanti and chatting online. I was using Windows, yet I had this sudden enthusiasm for free and open-source software that introduced me to all kinds of new tools, some of which I use to this very day. I was first trying out Linux distros on USBs, then I made a dual-boot partition, but ultimately ran into a lot of NVIDIA driver issues (even though it was on X11), and so was stuck on the OS I was too familiar with.

just by the paragraph above you should've already noticed that this post is not just about my first Luanti mod, but I'll get to that very soon, I promise!

the way I discovered Luanti, and got so enthusiastic about FOSS in the first place, was through videos of a Belorussian YouTuber named Alexey Leschenko, who sadly passed away in September of that very same year. for me, and for many others I know, he was a true hero.

and so I was playing what was at the time called Minetest, version 5.4.1 to be exact. and both in the content browser and on the multiplayer servers I saw a plethora of different mods and modpacks, all transforming the rather blunt and dusk "gameplay" of the default built-in game (which got later de-bundled from the engine BTW) into something completely new, overloaded with all kinds of new content, and especially the kinds that oftentimes conflict with eachother. but I'd be lying if I didn't say it was fun playing around with it. I wrote handy tutorials on Luanti in Russian for my friends and everybody else to see, sending them to whoever was interested in what I was playing.

and so I grew more and more invested in Luanti. as I researched and read forum and blog posts, I noticed the amount of praise it got for it's scripting system based on Lua. and I remembered my humble attempts at trying to make mods for Minecraft, which all unsurprisingly stayed as humble as they began. Java is tough, all the tools I had found sucked, and I eventually got tired of trying.

attempt #1

but it's not like I knew Lua already. but for some reason, I wasn't afraid of trying. and with all of that considered, I still decided to find ways around it first. (please never do this to yourself)

after a few Google searches I stumbled upon Simple Minetest Mod Maker by rubenwardy. it didn't feature anything fancy, nor does it feature anything fancy now. and right after getting familiar with the tool, I "made" "my" "very own" "first" "mod": "Greenscreen". it introduced a single new node (unsurprisingly named "Greenscreen") that had a bright green 1x1 pixel as its texture and emitted light. I felt pretty proud of myself, and so I went with it to ContentDB, wanting to get it published.

the review process on ContentDB usually consists of 2 checks:

  1. checking that your mod doesn't blow up, and
  2. checking that your mod meets the licensing requirements,

...but it depends on who your reviewer turns out to be. this time, I got a pretty strict one, who rejected the mod because of how many greenscreen mods were already out there. and I'm grateful they did, because it made me come back to the drawing board and realize the fact that this tool is ridiculously insufficient, and that I, indeed, needed to learn how to mod, actually.

luckily, even back then the learning infrastructure for Luanti was pretty good, and I myself had already gotten pretty good at finding information (remember: that's the most important skill on the Internet; learn how to know before learning how to do). I found 4 main resources that largely helped me out, 3 in text and 1 in video form:

  1. Luanti Modding Book by rubenwardy, which remains an extremely useful and insightful walkthrough of the process of creating... anything for Luanti! yes, this is the second mention of Andrew in this post, because he built just so much for Luanti, including ContentDB. his work is awesome and I highly encourage you to check it out.
  2. Minetest Modding Course by NathanS, was also extremely helpful, albeit somewhat outdated. having something audiovisual to go from is always nice, and the more advanced tutorials included there were great and are still mostly actual.
  3. Programming in Lua by Ierusalimschy is obviously a great resource for anybody to begin writing and understanding Lua. keep in mind that Luanti targets Lua 5.1, and so should you to avoid unforeseen consequences. I would very much like to praise this book, but the truth is, I mostly learnt Lua the hard way, just by reading the code other people wrote and occasionally looking stuff up. don't repeat my mistakes, at least skim through the first 7 chapters of it and play around with bare Lua before you commit to your Luanti modding journey.
  4. Luanti API Documentation is made by the Luanti contributors, and is the obvious place to find documentation for things you can't find tutorials or guides for. the language there isn't the simplest (as a B1 English speaker at the time, I had quite some issues understanding it), but it's the most comprehensive you could find, and is also official.

attempt #2

and so I sat down to think of a mod idea. I adored Minecraft's golden age at the time (and to be honest still do), and especially liked the "alternative timeline" mods, implementing rejected ideas and re-introducing previously cut content. one of the common themes amongst them was... glowshrooms. glowing mushrooms. shiny fungi. you get it. grows in caves, usually green for some reason, mostly exists purely for ambience.

this time, I followed NathanS's Minetest Modding Course to word. it led to me adding some unnecessary 0.4 support to my mod, but hey, I didn't even know about that. I recolored the mushroom textures from MTG, wrote some.. ehh code and ended up having to fix a lot of crashes caused by my own inexperience and complete lack of Lua knowledge, but it worked.

and thus, with bodge, sweat and lack of texture attribution, glowshrooms was born. if you look at the commit history, it becomes pretty obvious that I didn't know how to use console git. the best defense I can give myself is that... well, at least I didn't use the web interface for this. GitHub Desktop still sucked, and I ended up making quite a lot of errors with it before finally opting to learn git instead.

but I genuinely had fun making that mod. as frustrating as the process was, the result was extremely rewarding.

screenshot of the natural glowshroom generation, at night

another screenshot of the natural glowshroom generation, at night

it quickly got approved on ContentDB, marking my first really-real mod there.

it wasn't perfect.

but it was what I wanted, what I did, and what I was happy with back then.

the morale...

...is that there really is none. I told you my story in hopes that it will motivate you. no matter how terrible what you're building will be and how bad the choices you'll make will turn out to be, build. it will get better. you'll build more. but that will only happen if you build.

and even then, I ended up removing that mod from ContentDB and archiving it on GitHub (back when I wasn't shadowbanned there). after some time I just lost interest, grew past that point and didn't really want to bother maintaining it. and that's okay! I wouldn't be where I am now if I didn't go through that.

don't let other people gatekeep you out of building what you want, and don't gatekeep others. Luanti modding field was an open one for me back in 2021, and I sure as hell hope it remains that way for the years to come.