Sorting Items in Shop Window - Printable Version +- Save-Point (https://www.save-point.org) +-- Forum: Games Development (https://www.save-point.org/forum-4.html) +--- Forum: Code Support (https://www.save-point.org/forum-20.html) +--- Thread: Sorting Items in Shop Window (/thread-7208.html) Pages:
1
2
|
RE: Sorting Items in Shop Window - DerVVulfman - 01-17-2018 Kinda got a script of sorts, but not TOO friendly. It lets you add items to the shop. All items added this way are added to the 'END' of your shop list, so whatever you want to be at the top... better have it set first in the 'SHOP PROCESSING' command. Code: #============================================================================== You use this by adding a script call before you run the shop. This script call is 'add_to_shop' and you pass an array of items into it. The items are added to the END of your shopping list, but will be in the order you add. An example of the call may appear like this: Code: list = [ [0,3], [1,4], [0,2], [2,1] ] Each item is an array of two parameters [type, ID] Type 0 is an item, 1 is a weapon and 2 is armor. ID si just the item id in the database. Testing it, my event list looks like this: Code: @>Script: list = [ [0,3], [1,4], [0,2], [2,1] ] Unfortunately, I do have to have an item in the shop first, and that one is always at the top of the list. In this case, the High Potion appears before the others I mentioned. But... here ya go? You can add them in your order just by manually making a list like above. RE: Sorting Items in Shop Window - Mel - 01-18-2018 Oh well, I will definitely try this out. :) RE: Sorting Items in Shop Window - kyonides - 01-18-2018 Or if anybody wants them to be ordered alphabetically and type no script call at all, use the following snippet... Code: class Scene_Shop RE: Sorting Items in Shop Window - DerVVulfman - 01-18-2018 (01-18-2018, 01:02 AM)Melana Wrote: Oh well, I will definitely try this out. :) Hey, if you try that script out, try this one too: Store Goods Wipe When you use the Shop Processing command, you need to make at least ONE item. This script can erase the item, so all you add with what I sent ya here can take over 100 percent. |