Market System Malfunction


Author: Christian Romo

Posted On: 2/1/2024

The biggest issue that came with the merchant and blacksmith NPC's was that their shops proved to be a problem to implement and tie into our inventory system. The inventory system itself was already set up and worked with ground items but when making the UI I mainly focused on looks. So when it came to combining the two I had problems with getting the player's inventory slot itself. I ran into multiple problems of either just not being able to access it or that the UI would not be able to read the NPC's items. 

The solution that eventually ended up working was that I first had to sort out the Data Table. The original problem was that the conversion for the ID was a integer to a name. Now this normally wouldn't have been a problem since it could have just been solved by converting the integer to a string then into a name, but the problem came with how the ID's for the items were made. So to fix that I had to go through each row name and make it into some sort numerical ID. Once the change was made the problem of making sure I could get the player's correct inventory slot was fixed and then the player's inventory knew which Item was needed from the NPC shop.

Leave a comment

Log in with itch.io to leave a comment.