Submissions by Papiertig0r tagged inventory

A submission for Daily Gamedev

I am now the unquestioned leader of the gamedev streak!
Kneel before me! /maniacal laughter

Anyhow, it is now possible to take out items of containers :)

See the changes:
https://github.com/Papiertig0r/Alchemy/commit/79a39fa5ee95054129e1713a3e2380b115736eca

So today I spent only some time with cleaning up my code for the inventory UI system. I removed a lot of redundancies, so there is no visual change so there is no gif or screenshot, but: there are changes!

Cleaning up is so satisfactory, I should do it in my flat more often xD

see them here:
https://github.com/Papiertig0r/Alchemy/commit/07997371658374feb9ca4ad77e36088156f3b4a4

I added a list of active ui elements. inventory uis now register with that ui and you can switch between active ui elements with RB and LB. Soon you can take things out of a container or put them back :D

I really really really should rework the inventory and inventory ui system - sooner or later it will crash on me if I don't

anyhow, container can now be prefilled with items and these get displayed, yay!

I decided to rework UI and inventory systems before spending any more time with containers (it is just so cumbersome to agonize over so shitty code xD)

At a later point I want to link the infos you are shown to how much of the effect you know. At stage one it will only show "?". At stage two it will show the name of the effect. At concurrent stages there will be more info available up until the last stage where you can see all the info.

Now with actual consuming!

Today I implemented some string conversions for a later stage and then finally some connection between UI and logic. The result is, you can now consume items from within the inventory!

I should really implement mixing xD
also, I want the submenu to be shown on the item slot it is called upon, that shouldn't be too hard.

changes:
https://github.com/Papiertig0r/Alchemy/commit/59c40642e9dc00f05b94b7c8385801c3600049a9

I'm not proud of today, I got way less done that I could have but hey, that's shitty architecture xD

Now you can grey stuff out, if it is not compatible with the ingredient you want to mix it with.

I now need to connect the mixing logic with the actual mixing ui. Then I need to abstract it to be able to use the same system with e.g. applying poison to a blade or buffs to an armor.

Inventory submenu is really coming along.

I added a singleton for the inventory because it is easier instead of typing PlayerController.player.inventory all the time.

It is possible to discard items but only one at a time, I want to implement a long button press to discard a whole stack.

Next up is applying effects to weapons and armor and mixing ingredients

changes:
https://github.com/Papiertig0r/Alchemy/commit/b8255c36f3a3086301048330e5143a50731f7486

I added some further info when the inventory is open. As you clearly can see in the gif, I ain't no UI designer, but it does the job.

Next up would be showing effects and buffs too.

There are quite some kinks to work out, but I'm sure I can do it :)
(e.g. when inventory is open you can still throw things, but you throw the thing you last selected in the hotbar, not the current selected thing - same goes for consuming items. I want an additional menu shown for when inventory is open so I have to implement that too)

I just thought of something I should probably address soon:
Currently when you process an ingredient and pick it back up, it will get stacked with other unprocessed ingredients, thus removing your progress. You can also pick up unprocessed ingredients and they magically get processed when you already have one processed one in your inventory, I need a custom comparation operator to fix this.

Now after implementing the inventory I recognized two bugs I'm going to fix tomorrow:

  • wrong items are thrown (it's a legacy field from the system used before)
  • item slot selectors don't merge when they're both in the hotbar

hopefully, I can implement more functionalites than just fixing two bugs :)
I wan't information on screen for Items as well as a submenu when accessing items from inventory instead of hotbar

Literally. That's what I implemented today :D

First I adapted my inventory, now it feels really good (code base side, still no UI yet). You can pick up things and they get neatly organised into stacks. I have to create some items so I can test with them, but I think it's working fine.

Also you can now throw things! huzzar! Throwing things has no effect right now, but that is the next step! (Throw healing paste at your enemies to restore their health! xD)

See changes here:

https://github.com/Papiertig0r/Alchemy/commit/8c2f...

I implemented a simple Inventory with UI

it might be a bit hacky, but it does the trick :D

current latest commit:

https://github.com/Papiertig0r/Alchemy/commit/4fed...