gordon-david / 2DGame

0 stars 0 forks source link

Items, General #1

Closed gordon-david closed 5 years ago

gordon-david commented 5 years ago

I'd like to build out the inventory system. The bigger question is, how much do we want to add to items?

That rpgbackend I built (it's on a branch called RPGBackend) could deal with equipment pretty easily, adding and removing stat bonuses when equipping and unequiping. It's probably more complex than we need, but I can simplify it waaaay down and port it over to work with PlayerController.cs .

Health potions would be nice to add, and fairly simple. If the players health is less than the maximum, add up to the maximum.

I'm working out a UI for this, it could just have two panes: one for listing what's currently held, one for showing what equipslots are used (helmet, armor, weapon, boots).

icons could be annoying, but probably just stubbed in as colored squares for now.

I wanted to bring these up before I started writing code.

gordon-david commented 5 years ago

Just to keep everyone updated, I'm working on an Inventory UI and an Items update, it will have changes to how items work, but I think it will be a bit nicer to work with. It also has some changes to the player's data, I moved most of that into it's own class so it can coordinate between items and player's abilities. I'm trying to limit how much I change, I'm not altering any encounter logic, just adding in item and ability logic.

I'm just going to use some open source sprites for armor/weapons/etc. in the InventoryUI.

I'm keeping everything I'm working on in the InventoryUIAndItems branch if you want to see what I'm changing. I can work with any merge issues we have when I'm done with these.

gordon-david commented 5 years ago

inUI

Here's a rough update on what the inventory UI looks like so far. You can pull up the inventory by pressing 'i'. It just looks in the player's inventory, and updates the grid to the left with equipment that isn't being worn, to the right are the equip slots. The icons and the grid are populating at run time, I'm loading icon sprites in from a resources folder (they are open source RPG icons).

The items get linked to their icons in an xml document, called Data.xml. I probably could have linked these in the editor somehow, but I'm just more comfortable doing in text.

Still a bit rough, but I should have it finished by tomorrow.

gordon-david commented 5 years ago

invupdate

Icons are linked in. Equipping when clicking in the left panel works.

I just need to finish un-equiping, and using potions (potions will appear on the right, with the number of potions in inventory).