The RPG Maker Resource Kit

RMRK RPG Maker Creation => Requests => Script Request => Topic started by: shintashi on June 17, 2010, 12:06:14 AM

Title: How do I address shop items?
Post by: shintashi on June 17, 2010, 12:06:14 AM
I've got an idea to temporarily add "profit" to the base item prices depending on what kind of shop keeper is being used.

The basic method would be temporarily jacking the price of specific items (script),
then having the prices reset after the shop event closes (more script)


the intermediate method would be a "wholesale" +/* "markup" = "retail"
with 'markup being a default of like 0, and with every transaction completed adding "markup" to a variable
used for determining how much gold you might find if you can unlock the shopkeeper's treasure chest

Unfortunately, I can't figure out what the syntax for addressing items is.

I tried things like
p $item
p $item[1]
p $game_party.items

but I'm getting no where fast.
Title: Re: How do I address shop items?
Post by: cozziekuns on June 17, 2010, 12:50:40 AM
Items can be referenced through $data_items.
Weapons can be referenced through $data_weapons.
Armours can be referenced through $data_armors.
Title: Re: How do I address shop items?
Post by: tSwitch on June 17, 2010, 01:01:00 AM
shintashi, I truly advise using the in game help and searching around that for information, you literally could have found this by searching for 'items' 'armor' and 'weapons'.
Title: Re: How do I address shop items?
Post by: shintashi on June 17, 2010, 01:31:25 AM
edit: my bad

this thread was intended for XP. I have difficulty seeing the XP/VX difference because of a partial dyslexia.

the answer is correct however.
Title: Re: How do I address shop items?
Post by: tSwitch on June 17, 2010, 01:45:40 AM
I don't understand where VX came into things but..yeah, there's help for XP.
Title: Re: How do I address shop items?
Post by: shintashi on June 17, 2010, 02:13:14 AM
Quote from: NAMKCOR on June 17, 2010, 01:45:40 AM
I don't understand where VX came into things but..yeah, there's help for XP.

$data_items isn't actually in my help file, but it's in some of the lines of the script editor. Because of all the other 'item' terms, like 'draw_item' and 'item.scope' I couldn't figure out the "$data_" part.
Title: Re: How do I address shop items?
Post by: Mr_Wiggles on June 17, 2010, 06:45:02 AM
there is a script that does something like this already...
http://www.hbgames.org/forums/viewtopic.php?f=11&t=6051

hope it helps you out.