Phazorknight / Cogito

Immersive Sim Template Project for GODOT 4
MIT License
865 stars 98 forks source link

Making a Grid Inventory #186

Closed PeterD23 closed 5 months ago

PeterD23 commented 5 months ago

Hi, so I've been thinking about the inventory system and how I'd like to have a grid done similar to Deus Ex, but it seems this supports 1x1 items only.

I tried using GLoot initially to see if I could retrofit the existing system in and adapter GLoots classes to be compatible with Cogitos, but I was unable to get anything to work there.

I've since been trying to modify the existing system but with how its designed it doesn't seem like it would be possible without having to completely redo the inventory system from scratch. Its probably not helped by my inexperience as a programmer in understanding the systems so I guess in order to make such a system work, where should I start?

Phazorknight commented 5 months ago

Hey, this seems to be a topic for a discussion, rather than an issue.

Multiple people have asked about a grid-type inventory where items can occupy multiple spaces, but as you've said, the current system isn't designed to support this. There are currently no plans from my end to implement a system like this.

With a bit of work, you can definitely implement your own system. If you want to make it Cogito compatible, you'd probably need to update the InventoryPD script to have all the logic related to how slots work (unless you substitute your own system, but then you'd have to change a lot of other scripts), and also adapt the InventoryItemPD base class to include information of the "inventory shape" of each item.

PeterD23 commented 5 months ago

Ah apologies, I didn't realise there was a discussions board on github for this project.