wpRPG Shops and Items indevelopment

So if you have a look under https://github.com/uaktags/wordpress-RPG/tree/development-2 you’ll see that I’ve been working on adding a Shop and Items module to wpRPG. The idea is simple.

  • Name: Name of the Shop (Joe’s Swords)
  • Description: Description to help distiguish the shops Not Seen By Players(Sword shop over the medow)
  • ID : Unique Database ID


  • Title: What’s the Item called (Wooden Sword)
  • Price: How much it costs in Gold
  • Level Required: Lowest Level required to Use or Equip item
  • CategoryID : Database Id relating to the Item’s Category

Item Categories

  • Name: Name of the Category (Swords / Shields)
  • Description: Short description to tell the user the difference of each categories (Defensive Weapons)
  • Equippable: True/False defining if the Items herein are Equippable or 1Time Use

Item Actions

  • ItemID: ID relating to the Item (5 for SuperPowerfulShield)
  • ActionID will be changed to MetaID: Relates to the Player Meta that the item can affect (3 for Defense)
  • Value: The amount the meta will be affected by (1900)
  • Increase/Decrease: Whether it’s affected by increasing or decreasing

Shop’s Item Inventory

  • ShopId : ID relating to specific Shop
  • ItemID: Id relating to specific Item to be sold in the shop
  • ItemCount: If it’s a limited sale item, set a number, otherwise set to -1 for unlimited
  • Item-Cost Bonus: If the price should be different than the Item’s base price add by how much (if a 130$ item should be 10$ more just put 10, NOT 140. Default is 0)
  • Item-Cost Increase: True or False if you should Increase or Decrease (Default is 0 or Decrease)

So with all that nonsense in there. Lets look at an example

Say you have a
Wooden Sword and a Steel Shield.

You’d create 2 categories: Offense Weapons and Defense Weapons.

-Both of these categories are Equipable Items (so you’d make that True)

-The Wooden Sword needs a minimum level of 3 to use because it’s such a basic item in your world, but the Steel Shield needs level 10 because it’s so heavy and needs a skilled warrior.

-The Wooden Sword is so basic all it does is Increase the players Offense Meta by 5pts, but the Steel Shield increases the player’s Defense by 20pts and increases their Offense by another 5pts (because it’s so good in battle). So the Wooden Sword has only 1 Item Action, but the Shield has 2 Item Actions.

-Joe’s Swords shop is a simple little store, they only sell wooden weapons and some (unmade) potions. So you’d add the Wooden Sword to Joe’s Shop, and since he’s a small time shop owner, his prices are cheaper by 4$. You’d update the Cost bonus for 4$ and make the “Increase” to be False to decrease it.

Later when I create a City module, you’ll add into the ShortCode what shops you want in there.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

2 thoughts on “wpRPG Shops and Items indevelopment”