July 2023: Inventories and custom items!
Hey there, old friend!
Don’t worry, we weren’t going to slack and not do a blog post this month! I’ve just been knee-deep in coding our inventory system. Typically, these are insanely trifling to write, but we always have to keep in mind the moddability and World Editor when adding new features like these, so it can get pretty complex.
Originally, we had considered just keeping it simple and baking in the items for now - but what’s the fun in that? Allowing players to make their own custom items and functionality for them will be a key element in making custom stories and events - including the canon one we’re making ourselves.
But I’m already getting carried away here - let’s back up and start from the beginning.
What’s the state of combat?
Our combat system is finally finished! Of course, I’ll still need to program our “combat content,” (attacks, etc), and do the proper bugfixing and testing - but the actual framework, the underlying foundation, is all complete and working finally. That said, before we can show it off, we need to get the inventory system working so that we can equip/customize weapons and equipment to the characters easier so that we can make sure it’s all updating properly and so on. And of course, we want our players to be able to try some varying loadouts in the demo as well, since it’ll be pretty combat centric.
Items and their customization via Lua
So, as we’ve made clear a few times now - we’re big fans of Lua. I think this tends to be the case in a lot of modding-centric games of course, so it’s no different here. Robot Farm is going to be a very customizable game: we’ll be making a lot of different items to fill the world with. So this came with a few requirements:
Every item needs a model
Every item should be able to be placed in the world
Every item needs to have its own custom stats and properties
Easy right? So, what we did was create item archetypes, for example, you can have “Weapons,” “Honing Stones,” “Accessories,” and generic “Items” for things like keys or other miscellaneous stuff. Each of these have their own stats and functionality. They’re defined by Lua you configure the World Editor to recursively load when a World is loaded.
We solved being able to add custom items into the game, but that’s only half of the job here. What makes this complicated in our case is that none of this is hardcoded into the game. Only the item archetypes. And what happens if the user deletes a modded weapon that was inside of their save file? These are all things we had to consider, along with how the game engine will change in the future and how even more flexible we’ll be making modding in Robot Farm down the line. Future proofing your programming is typically the most headache inducing part of designing software.
Fortunately it all got handled! Just make sure not to delete your modded weapons from the game unless you’re ready for the game to yeet it from existence the next time you load into the game lmao! That takes us to next logical thing: inventories.
The inventory system
Next up is the inventory system! Robot Farm is going to be a game centered around the management of supplies and ultimately the manufacturing of items when we get to the actual farming part of Robot Farm. So, that means we’re going to have some robust inventory management. This was a bit different than what we were used to, since both Robot Farm’s old 2D version and We Shall Wake were both games that just had basic list inventories that were bottomless.
It was easy enough - but what makes it complicated of course is that the items aren’t premade. Each inventory is going to have to keep a keen eye on what items do and don’t exist with each subsequent loading of the game.
And of course, finally, this brought us to item tooltips. Robot Farm will be like any good RPG game, having a nice focus on the kind of loot you both find and make, so I had a lot of fun building the item tooltip to show off information dynamically based on the item you’re looking at. Specifically in the case of your Weapon, since it almost acts as a loadout due to the fact you attach items to it and customize it.
Continuing onward!
I think I’ll wrap things up here! That’s what we’ve been working on in July, and of course early August here. We’re about toward the end of developing the inventory system. What the leaves is the following:
Weapon customization and equipping to party members (that will be exciting to talk about)
Dialogue boxes (finally!)
Polishing the game engine and prepping to start working on the content of our first demo
It’s about time to finally get this thing in the hands of some players! We’re really looking forward to seeing what everyone thinks of what we’re cooking. We’ll also try and think of a cool in-game reward to give to our early adopters as well, so be sure to come on by once it’s finally out of the oven!
♥ NOKORIWARE
Stay updated!
Partners: