Contraband Item

Hi there. I am currently working on a game where I want some items to be contraband. In that they can be bought .. at a very high price from certain vendors and in certain places they can be gotten from enemies/environment. But not sold. I have tried setting the item to a key item. But alone that does not make it unsellable. A functional solution is to set the base item price to zero but set the shop item price to what i want. However even though this works the shop still displays the item with no cost field. meaning you have to try and buy one before you can see that it indeed costs money. 


Maybe I need to restart save to update those records? It seems counter intuitive to display the base price even when the shop price is different. Maybe this is just a bug with 0 cost items I dunno.
Are you using any plugins?


Have you checked out Yanflys Item core?


Im not sure if this is a feature in it but that would be the best bet in my mind as this doesnt appear to be a built in function of rpg maker.
You can set the price to 0 so they can't be sold, and then just use events to give the items to the player rather than opening a shop screen.



OR if you want to allow the player to buy the item from a regular shop, create two items that are identical apart from the price.  Put the priced item in the shop you want the player to be able to buy from.  After the Shop Processing command, set a variable to the number of those items in inventory.  Then remove that number of items and add the same number of the priced item.  This is a non-script way of doing what you're after, but there is the possibility that the player can buy the item and then sell it again to the same shopkeeper without leaving the shop window.  Once the shop window is closed and the items are swapped around, they won't be able to sell.


Otherwise you'll need a plugin.
Thanks for the answers. It doesn't seem like there's a completely ideal solution to my problem without using plugins. And I can't really write script myself. I've got my hands full just learning the engine right now. It's not that bad that there's no price listing in the shop. I am using many plugins and yeah that includes YEP_ShopMenuCore. Think maybe this could be a bug with the shop menu plugin? Seems weird that it would display the base price rather than the price specified in the shop processing event.
There are already some plugins for shops.  Would be worth checking out what's there to see if any of them already do what you want.


Re the issue with the shop plugin you've already got - that would be a question to ask in the thread for that plugin, since it's not related to this question.
Cant you just make it a key item and have an evented shop for selling them?...instead of the built in shop?
Yeah .. that could work .. didn't think of doing it like that. Thanks! And sorry Shaz I know you already mentioned that solution didn't quite get what you meant before. I guess my head is full of other stuff. Between managing commissions and searching for some licensed/free assets and actually making the game I am quite run ragged at the moment. It's great XD.


Thanks for your help with this issue everyone I will likely take this route. Consider it solved.
It'll give you a chance to make a kick ass menu for selling the stuff, too.


Plug-ins are great, of course! I freaking love MV lol. But they're not always completely necessary. Not sure if it's a good idea for game speed reasons to load up a ton of plug-ins where some of them could have easily been done through an alternate route. o:
Well in some cases it's necessary. I've had troubles because I wanted to use yanfly's core engine to run things at a higher resolution.But without some of the other menu plugins this created a lot of weird screen issues and ui inconsistency.


Like I said .. I'm learning so maybe I'm just doing it wrong right now XD. About every day I run into some new thing that wracks my brain to try and get it working properly. My current bugbear is action sequences XD. Also having to completeley throw out all the skills I wrote because they where impossible to read and organize because I had made them in such a weird order lol. And don't even ask about my naming conventions on like the first 30 switches in my gameXD. Or about trying to get something to animate by cycling through event pages with self switches XD.


I'm getting better I promise lol.

Original thread: https://forums.rpgmakerweb.com/threads/contraband-item.65080/