I’m currently working on both the equipment and inventory systems for my WiP title. While doing so, my way of implementing inventory will truthfully create quite a large file. Right now, the actual items themselves are stored within the choicescript_stats file.
What I’m seeking to do instead (as I have many other functionalities built in my stats file) would be to create a separate file for the inventory. I would like it to still be linked to the Stats page, so my theory (I haven’t implemented it yet) would be to use this secondary file as a subroutine. Upon selecting a section of the inventory such as weapons, it would go to the subroutine file and read that weapons list. This would allow me to clean it up, use less dragdown code on the stats page itself, and work with a bit less stress.
My question would be if anyone has attempted something of this nature, and if you perceive that this could cause a later issue. I’d appreciate any insight/feedback.
You can code a system that allows the player to replace an item in the inventory if it becomes full. You will also need a way to figure out what item the player has equipped so it changes the MC stats.
This allows for a very compact inventory, but a subroutine for checking if the item are in the inventory and equipped will take a lot of coding. Edit: Don’t forget to add another variable to keep track of what the player equipped so they cant equip more than one type of equipment at a time.