Stock Items
How to setup an array in the StockItems setting.
The StockItems feature has several purposes:
Manage stocks for stores that uses a different setup but same stock for easily.
Manage stocks for stores that uses a randomised generated stock.
A combination of the 2 purposes above.
I'll provide 3 different examples and give some short explenation for each:
StockItems = {
:normalStore => [
:POKEBALL, :GREATBALL, :ULTRABALL,
:POTION, :SUPERPOTION, :HYPERPOTION, :MAXPOTION,
:FULLRESTORE, :REVIVE,
:REPEL, :SUPERREPEL, :MAXREPEL,
:ANTIDOTE, :BURNHEAL, :ICEHEAL, :AWAKENING, :PARALYZEHEAL, :FULLHEAL
],
:limitStore => ["daily",
[:POKEBALL, 10, 18], [:GREATBALL, 12, 16], [:ULTRABALL, 8, 15],
:POTION, :SUPERPOTION, :HYPERPOTION, :MAXPOTION,
[:FULLRESTORE, 20, 25], :REVIVE,
:REPEL, [:SUPERREPEL, 20], :MAXREPEL
],
:randomStore => [
:FLAMEPLATE, :SPLASHPLATE, :ZAPPLATE, :MEADOWPLATE, :ICICLEPLATE,
:FISTPLATE, :TOXICPLATE, :EARTHPLATE, :SKYPLATE, :MINDPLATE,
:INSECTPLATE, :STONEPLATE, :SPOOKYPLATE, :DRACOPLATE, :DREADPLATE,
:IRONPLATE, :PIXIEPLATE
]
}
Example 1: :normalStore
:normalStore
How to use this stock in a mart event:
Instead of having to add the whole array of items in the script call, just putting "normalStore" will do:
def pbSomeMart
pbPokemonMart("normalStore")
end
The "normalStore"
holds the whole array of items you have defined in StockItems
, it'll be converted to that array by the script. The only thing you need to keep in mind is that it's spelled correctly. If you would put "normalstore"
instead, you'll get a message in the console saying that "normalstore"
was not found in StockItems
.
Example 2: :limitStore
:limitStore
How to use this stock in a mart event:
Similar to example 1:
def pbSomeMart
pbPokemonMart("limitStore")
end
The "limitStore"
holds the whole array of items including the refresh rate and limits for certain items. Here again, try to avoid typing "limitstore"
instead or you'll get the message in the console like mentioned in example 1. But if you put :limitstore
instead in StockItems, you should be fine, it's case sensivite so you don't need to use capitals like in my example.
Example 3: :randomStore
:randomStore
How to use this stock in a mart event:
Similar to example 1 and 2:
def pbSomeMart
pbPokemonMart("randomStore", random: ["daily", 5])
end
Here i've added the extra parameter random: ["daily", 5]
. Why? Because otherwise this example would be the exact same as example 1, except for it "randomStore" instead of "normalStore" and holding different items.
By adding this random: ["daily", 5]
parameter, you also tell the script to take randomly 5 items and refresh this daily. Again this is an example, the other refresh rates possible are "2daily"
and "weekly"
. Trying to put "random"
will not work and just give you the full stock instead.
Last updated