Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[RESOLVED] Raising Prices (XP)

In RMXP:

I would like to raise the prices for goods (items) in a certain town, and I'm wondering if there is a way to do this.  Of course, I could just create a new higher-priced entry for each item in the database, the problem with that is that those items wouldn't stack with the other, lower-priced items found elsewhere.

So, does anyone know of a way to have items cost a different amount, but only when purchased from a certain location?  Any help would be appreciated.
 
I do not have an answer, unfortunately, but I do have a step in the right direction, which might help more in the long run.

Perhaps a script that allowed prices to be altered relative to their original price would help you? If someone could make that script, it would help out greatly for those who want items to be priced differently depending on the store location.
 
This could work...
Code:
$data_items[1].price = 100
$data_weapons[1].price = 100
$data_armors[1].price = 100
Put that in a script command before shop processing and change the [1] to the number of the item/weapon/armor in the database. Then change the 100 to the price you'd like to set the item to.

So, if you'd like to change the price of item 4, item 12, and armor 14 to 400 gold each you'd insert:
Code:
$data_items[4].price = 400
$data_items[12].price = 400
$data_armors[14].price = 400

But this method would change the price of the good in all shops, so you'd have to do the same thing for your other shops.
 
Thanks, gotcha16.  That worked perfectly.  Since only one location has a different price, I just changed the prices back to normal after leaving that higher-priced shop.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top