Sorting Items in Shop Window
#13
Or if anybody wants them to be ordered alphabetically and type no script call at all, use the following snippet...

Code:
class Scene_Shop
  alias kyon_alphabet_scn_shop_main main
  def main
    goods = $game_temp.shop_goods.map do |data|
      kind, id = data
      data << case kind
      when 0 then $data_items[id].name
      when 1 then $data_weapons[id].name
      when 2 then $data_armors[id].name
      end
    end
    goods.sort! {|a,b| a[2] <=> b[2] }
    $game_temp.shop_goods = goods.select {|g| g[0..1] }
    kyon_alphabet_scn_shop_main
  end
end
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9

Maranatha!

The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.

[Image: SP1-Scripter.png]
[Image: SP1-Writer.png]
[Image: SP1-Poet.png]
[Image: SP1-PixelArtist.png]
[Image: SP1-Reporter.png]

My Original Stories (available in English and Spanish)

List of Compiled Binary Executables I have published...
HiddenChest & Roole

Give me a free copy of your completed game if you include at least 3 of my scripts! Laughing + Tongue sticking out

Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE
Reply }


Messages In This Thread
Sorting Items in Shop Window - by Mel - 01-16-2018, 01:50 PM
RE: Sorting Items in Shop Window - by kyonides - 01-16-2018, 08:09 PM
RE: Sorting Items in Shop Window - by Mel - 01-16-2018, 11:40 PM
RE: Sorting Items in Shop Window - by BeJeremiah - 01-17-2018, 12:21 AM
RE: Sorting Items in Shop Window - by Mel - 01-17-2018, 12:55 AM
RE: Sorting Items in Shop Window - by BeJeremiah - 01-17-2018, 01:15 AM
RE: Sorting Items in Shop Window - by Mel - 01-17-2018, 01:35 AM
RE: Sorting Items in Shop Window - by BeJeremiah - 01-17-2018, 01:58 AM
RE: Sorting Items in Shop Window - by kyonides - 01-17-2018, 03:35 AM
RE: Sorting Items in Shop Window - by Mel - 01-17-2018, 04:02 PM
RE: Sorting Items in Shop Window - by DerVVulfman - 01-17-2018, 05:56 PM
RE: Sorting Items in Shop Window - by Mel - 01-18-2018, 01:02 AM
RE: Sorting Items in Shop Window - by DerVVulfman - 01-18-2018, 05:49 AM
RE: Sorting Items in Shop Window - by kyonides - 01-18-2018, 03:01 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
   Special Items Separate Menu Diorm 41 42,459 02-10-2018, 06:06 PM
Last Post: Diorm
   Shop Issues :P LunarBerry 4 8,165 11-23-2016, 02:53 AM
Last Post: LunarBerry
   Showing only specific skills in a window Mel 2 5,884 01-12-2016, 01:34 PM
Last Post: Mel
   Dargor's Large Party script and shop menu Simon Greedwell 2 6,583 08-28-2013, 10:12 PM
Last Post: Simon Greedwell
   Help with Shop Menu [RPG Maker XP] JackMonty 6 12,970 05-23-2013, 10:14 AM
Last Post: JackMonty
  Changing Window Styles in Game JackMonty 8 11,009 03-22-2013, 11:54 PM
Last Post: JackMonty
   Something I noticed about the Advanced Shop Status Window yamina-chan 5 9,975 08-21-2011, 09:16 PM
Last Post: yamina-chan
   [Atoa SBS] Changing the command window font MegaPowerNinja 3 8,322 04-12-2011, 10:23 PM
Last Post: Victor Sant
   Repositioning the actor command window. MegaPowerNinja 4 9,391 04-12-2011, 05:21 AM
Last Post: MegaPowerNinja
   Need Help on Making Battle Status Window riou 4 10,887 03-22-2011, 06:04 AM
Last Post: Victor Sant



Users browsing this thread: 1 Guest(s)