Galv 1,386 Posted September 30, 2012 (edited) Pawn Shop - Version 1.1 Galv Introduction This is the outcome of learning about how the shop works. A pawn shop that you can only sell specified items at. Features 1. Sell only specified items by using the RPGMaker shop processing list and flipping a switch. 2. Set the selling rate of the items using a variable (so you can change any time in game). 3. Notetag armors, weapons and actors with bonuses or penalties to this selling rate. 4. Selling rate appears in the pawn shop scene and changes colors - to green if party has a bonus to the default or red if they are at a penalty. 5. Normal shop functionality remains the same while the switch is off. Screenshots How to Use Place script under Materials and above Main. Read script instructions. 1. Set variable to be your selling price % (for pawn shop). (RPGMaker default is half an item's value, which would be variable = 50) 2. Notetag actors/weapons/armor with bonuses to selling price. 3. Set up a shop event as normal and turn a switch on before it to turn it into a pawn shop (don't forget to turn it off after). Script Get it here FAQ None yet. Credit and Thanks - Galv - Tsukihime for the idea Author's Notes This is a learning script. I am aware there will likely be better ways to do things. I'd gladly take advice from more experienced people on how my coding could improve. Updates 2012-10-01 - Version 1.1 - I didn't see I broke it before releasing it. The bonuses/penalties weren't getting calculated to the actual price! Fixed now... Edited October 19, 2012 by Galv 2 Tsukihime and JiM reacted to this Share this post Link to post Share on other sites
DoubleX 202 Posted April 15, 2014 (edited) I've made an addon to your script that allows users to set whether pawn shops are buy or sell shops: http://www.rpgmakervxace.net/topic/23274-doublex-rmvxa-buy-addon-to-galvs-pawn-shop/ About your coding, I've an opinion about it although I'm far from being experienced: The below 2 methods appeared in both class Scene_PawnShop and Window_Rate: def equip_bonus mem = 0 eqs = 0 equip_bonus = 0 no_equips = ($game_party.members.count) * ($game_party.members[0].equips.count) no_equips.times { |i| if $game_party.members[mem].equips[eqs] != nil equip_bonus += $game_party.members[mem].equips[eqs].pawn_bonus end if eqs < 5 eqs += 1 else eqs = 1 mem += 1 end } @equip_bonus = equip_bonus end def actor_bonus actor_bonus = 0 no_actors = $game_party.members.count no_actors.times { |i| if $game_party.members[i] != nil actor_bonus += $data_actors[$game_party.members[i].id].pawn_bonus end } @actor_bonus = actor_bonus end You can write a new module including them in your script so other classes can just call them via the module, avoiding writing the same methods in different classes(especially those without direct relationships). Coding this way can reduce the size of the script and time to maintain those methods as they're no longer duplicated. It also makes the script more 'other-scripter-friendly' if they've to touch those methods Edited April 15, 2014 by DoubleX Share this post Link to post Share on other sites
Galv 1,386 Posted April 18, 2014 This script is one of my first, definitely could be improved a lot Share this post Link to post Share on other sites