Escape From Hell

Inventory System

Viewing 2 reply threads
  • Author
    Posts
    • #63
      Zenith
      Participant

      Would there be any interest in creating a general inventory system? Items from the shop and item drops would go into it, from where they could be equipped. It would also hold items that aren’t weapons or armor, like healing/mana potions and quest items.

      If so, I’ll probably brainstorm some implementation details here.

    • #85
      Benjamin
      Participant

      Yea, I would love to have an inventory. That would be cool.

    • #90
      Whizbang
      Keymaster

      I have some thoughts on this.

      So, Bags will be for sale at the Item Shop. Each bag can hold one item. Each bag will cost double the previous bag.

      Notes to self (and anyone else interested):
      How this will work in the back-end is that there will be a Bags field added to the Users table. This will be an integer value indicating the number of bags owned. Then there will be a Bags (or maybe BagItems or something), table added to the DB. This will contain the fields; UserID, ItemName, and ItemIDString (mirroring the Users Table). I will then add one-time use items to the ItemBase table using the SlotNumber 6. I will also have to add some functions to the fightmods.php file for healing and mana regeneration stuff.

      Adding an item to the Bag is straightforward, just write the values into the BagItems table much like currently done for the Users table, only there will be a count done of existing items in your bag and compare that to the Bags field in the Users table (to check if bag is full).

      Equipping an item from the bag is the same as equipping from a drop, but with the added task of removing it from the bag. When equipping an item, an option will be given to Sell, Add to Bag, or Drop the current item. The Sell option is only available in Town. If your bag is full, you will be prompted to Drop or Sell the item (I suppose there should be an option to view the bag and drop an existing item, but that seems like work, because then you’d have to offer to drop or sell the other item, and then you’re juggling two items and meh. It probably should be that way, though. Fine. You talked me into it.)

      The “View Bag” link will be placed next to your equipped items in the bottom. The “View Bags” page will be simple and mirror the look of the Items Shop, but with only your items (obviously). Each item will have options to Equip, Sell, or Drop. Sell is only available in Town.

      Also, lets not forget a Bags purchasing function added to the Item Shop.

Viewing 2 reply threads
  • You must be logged in to reply to this topic.