Basic modding support and more new gameplay

Nov, 08

KeeperRL has always had all its data defined in the source code, which is not a great design – it slows down development and doesn’t allow any modifications without recompiling the code. On the other hand, moving data into text files requires quite a bit of effort, like writing a parser and reorganizing a lot of code, which is why I kept putting it off.

On a whim, I finally decided to give it a try, and moved some basic data structures into text files. I started with campaign villain lists, which have a very simple form, and moved on to more complex things, like the building menu, workshop menu, immigrant definitions and technology. I developed a handy algorithm that can read the game’s internal data structures directly from the files without any extra effort. There is still a lot more data that’s defined in the source code, like furniture, creature and villain definitions, and I’ll move them in later updates.

When it comes to modding, there are a few more things necessary to make it easy: being able to add mods by simply dropping in new files as opposed to editing existing ones, managing mods from the game’s menus, and ultimately hosting mods on the servers, and possibly on Steam Workshop. (I don’t promise the last two yet, because they’re quite a bit of work).

If you’re interested, you can check out the current data definitions here.

Now let’s talk about gameplay. Something that’s always been on my mind are outdoor buildings. Because not every Keeper likes to dwell in a cave! It was quite an easy addition, the hardest part being how to define indoor/outdoor areas after the player has built some walls (you are only allowed to build most furniture indoors). You can go wild and build a castle. 🙂

Yes, and you can play as the knight faction now :). It was also added on a whim and is quite basic for now, but it’s a great start to adding more factions and more differentiated gameplay. Below are your current Keeper options. Of course with the new modding support one can actualy easily add more.

With the new leveling system, which I described in the previous update, Artur and I added a small touch to the Keepers that makes them upgrade their avatar as you advance. Initially, you start with the young girl or guy on the left. 🙂

Finally, some minor esthetic improvements include a rock cracking animation as you dig and candelabra as a new room decoration.

This sums up all the new changes coming in Alpha 26, and at this point I’m going to work hard testing the game, fixing all remaining issues and releasing the update as soon as possible. If you’re curious and would like to help with testing, you can try out the testing build by opting into the ‘dev’ branch on Steam.

COMMENTS