A few simple shop modifications

Sarff

Villager
Member
Joined
Dec 31, 2016
Messages
13
Reaction score
0
Primarily Uses
Hello,
I'm trying to do very simple modifications on the shop window, but I must be stupid because I can't seem to do them :D
Can anyone help?

VX ACE

1 - Show currency near the price. So instead of "5000" it would show "5000 g" or "5000 /icon" or whatever I have set up
2 - Show sell price in the sell window list. To the side of the item's number, I'd like to quickly see how much it sells for.
3 - Remove completely the "Key Items" selection in the sell window

I've been trying to create new classes and copy/paste Window_Buy Window_Sell etc but with little success :(
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,108
Reaction score
13,713
First Language
English
Primarily Uses
RMMV
So are you asking for someone to help you, or to write it for you? If you just want a nudge in the right direction, you're going to have to post what you've already done (in CODE tags)
 

Sarff

Villager
Member
Joined
Dec 31, 2016
Messages
13
Reaction score
0
Primarily Uses
Well if someone would write those 3 conditions for me it would be wonderful!
I really haven't done much in the shop section (actually nothing), only in other parts like menus and stuff or others which I solved myself. The problem is I can't figure out how to change these three things I listed
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,713
First Language
English
Primarily Uses
RMVXA
As you want this written for you, it needs to move.

[mod]Moving this to RGSS3 Script Requests[/mod]
 

Sarff

Villager
Member
Joined
Dec 31, 2016
Messages
13
Reaction score
0
Primarily Uses
Thanks for that, even though just some indication on how to do it also would be helpful
 

A-Moonless-Night

WINTER IS COMING
Veteran
Joined
Mar 17, 2012
Messages
682
Reaction score
446
First Language
English
Primarily Uses
RMVXA
This should help:
Code:
class Window_SellItemCategory < Window_ItemCategory
  def col_max; 3; end
 
  def make_command_list
    add_command(Vocab::item,     :item)
    add_command(Vocab::weapon,   :weapon)
    add_command(Vocab::armor,    :armor)
  end

end

class Scene_Shop < Scene_MenuBase
 
  def create_category_window
    @category_window = Window_SellItemCategory.new
    @category_window.viewport = @viewport
    @category_window.help_window = @help_window
    @category_window.y = @dummy_window.y
    @category_window.hide.deactivate
    @category_window.set_handler(:ok,     method(:on_category_ok))
    @category_window.set_handler(:cancel, method(:on_category_cancel))
  end
 
end

class Window_ShopSell < Window_ItemList
 
  def draw_item_number(rect, item)
    draw_text(rect, sprintf(":%2d / %d%s", $game_party.item_number(item), item.price / 2, Vocab::currency_unit), 2)
  end
 
end

class Window_ShopBuy < Window_Selectable

  def draw_item(index)
    item = @data[index]
    rect = item_rect(index)
    draw_item_name(item, rect.x, rect.y, enable?(item))
    rect.width -= 4
    draw_text(rect, "#{price(item)}" + Vocab::currency_unit, 2)
  end

end
 

Sarff

Villager
Member
Joined
Dec 31, 2016
Messages
13
Reaction score
0
Primarily Uses
This seems to work wonders, thanks a lot!
Is there any way to make the group digit (from Yanfly Core) adapt to the new "windows/script" as well? Right now 5000 is displayed like 5,000 everywhere except in shop, I assume because of the new script, obviously. Some ways to do it? Tell the Yan Core to do the group digit ALSO in the new shop?

But thanks!
 

A-Moonless-Night

WINTER IS COMING
Veteran
Joined
Mar 17, 2012
Messages
682
Reaction score
446
First Language
English
Primarily Uses
RMVXA
This should do the trick:
Code:
class Window_SellItemCategory < Window_ItemCategory
  def col_max; 3; end
 
  def make_command_list
    add_command(Vocab::item,     :item)
    add_command(Vocab::weapon,   :weapon)
    add_command(Vocab::armor,    :armor)
  end

end

class Scene_Shop < Scene_MenuBase
 
  def create_category_window
    @category_window = Window_SellItemCategory.new
    @category_window.viewport = @viewport
    @category_window.help_window = @help_window
    @category_window.y = @dummy_window.y
    @category_window.hide.deactivate
    @category_window.set_handler(:ok,     method(:on_category_ok))
    @category_window.set_handler(:cancel, method(:on_category_cancel))
  end
 
end

class Window_ShopSell < Window_ItemList
 
  def draw_item_number(rect, item)
    text_a = sprintf(YEA::CORE::ITEM_AMOUNT, $game_party.item_number(item).group) + " / "
    text_c = (item.price / 2).group + Vocab::currency_unit
    wid = text_size(text_c).width
    draw_text(rect.x, rect.y, rect.width - wid, rect.height, text_a, 2)
    draw_currency_value(item.price / 2, Vocab::currency_unit, rect.x, rect.y, rect.width)
  end
 
end

class Window_ShopBuy < Window_Selectable

  def draw_item(index)
    item = @data[index]
    rect = item_rect(index)
    draw_item_name(item, rect.x, rect.y, enable?(item))
    rect.width -= 4
    draw_currency_value(price(item), Vocab::currency_unit, rect.x, rect.y, rect.width)
  end

end
 

Sarff

Villager
Member
Joined
Dec 31, 2016
Messages
13
Reaction score
0
Primarily Uses
FABULOUS!
Thanks a lot <3
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!

Forum statistics

Threads
106,036
Messages
1,018,461
Members
137,821
Latest member
Capterson
Top