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.

How to disable Sell?

Is there a way or a script alreration to disable the ability to sell in game?
or at least change the buy/sell ratio from 2/1 to something like.... 15/1?
 
That'll work for some purposes, but not others. If you want an item that can be bought and not sold, f'rinstance, or a whole bunch of them, it won't do you any good.

No, for this, you need to either not use shops in the normal way at all, or use a script to edit shop programming.

Like, changing line 309 in scene_shop from

$game_party.gain_gold(@number_window.number * (@item.price / 2))

to

$game_party.gain_gold(@number_window.number * (@item.price / 20))

for example.

Oh, and you'll probably also want to change 249 from

@number_window.set(@item, max, @item.price / 2)

to

@number_window.set(@item, max, @item.price / 20)

unless you want some very confused players...
 
Cool. It seemed a lot easier than disabling "Sell" would be-- just change a couple of numbers, instead of removing both an entire option and the space that it takes up in the window.
 
Yea, i was trying to alter the system to work in junction with a crafting system, where the materials can be bought at a high price (100+ an item), but i diddnt want them to be sold back at half price (im using a character unlocking system where it costs 2500 to unlock a character, and selling the materials would make it totally unfair). But thanks anyway!
 

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