Okay, so I have a system that you might like. It's not as simple as adding a number to the Pokemon.txt file but it will do what you want.
This will allow you to control how much of an item drops after defeating a wild Pokemon. Items can have the following 3 values.
A single unit, this is set to default so you don't need to add an item to the list if you only want it to drop 1.
An item based amount, the quantity obtained will be based on the item instead of the Pokemon.
And an amount based on the Pokemon where different Pokemon have their own set value.
Above Main add 2 hashes:
Code:
ITEMDROPQTY = {}
PKMNDROPQTY = {}
First let's go over ITEMDROPQTY. This is a list of items that you want to drop. Since the default is set to 1 you don't need to list any items here that you only want 1 of.
For item dependent quantities I will be using the Nanab Berry (a.k.a. Bananas). I want all Nanab berries dropped by Tropius and various monkey Pokemon to be bunches of 3, so I will add this item to the ITEMDROPQTY like this.
ITEMDROPQTY = {406=>3}
406 is the number given to the Nanab Berry in the item.txt file and 3 is the amount I want dropped. Now I want to add Soft Sand to be dropped in groups of 5. The number for Soft Sand is 143.
ITEMDROPQTY = {406=>3,143=>5}
For Pokemon dependent quantities you will need to tell the script that you don't want to pull the amount of the dropped items from the ITEMDROPQTY list, but from the PKMNDROPQTY list. To do so you need to add the item to the ITEMDROPQTY list with a quantity of 0. Then you will need to add the Pokemon and the quantity associated to it to the PKMNDROPQTY list. I will be using the item Dragon Scale (203) and I will be having the item be dropped by Horsea and it's evolutions. Horsea = 116, Seadra = 117, and Kingdra = 230.
ITEMDROPQTY = {406=>3,143=>5,203=>0}
PKMNDROPQTY = {117=>10,230=20}
As you can see item 203 (Dragon Scale) is set to 0 so it will be based on the Pokemon with Seadra dropping 10 Dragon Scales and Kingdra dropping 20 Dragon Scales. Even though I did not list Horsea (116) in the PKMNDROPQTY hash, Horsea will drop 1 Dragon Scale since that is the default.
Now for the script to make this possible.
In PokeBattle_Scene find pbWildBattleSuccess and replace it with this:
Code:
def pbWildBattleSuccess
if @battle.battlers[1].pokemon.hasItem?
dropitem = @battle.battlers[1].pokemon.item
pkmnitem = @battle.battlers[1].pokemon.species
if ITEMDROPQTY.key?(dropitem) && ITEMDROPQTY[dropitem] > 0
qty=ITEMDROPQTY[dropitem]
elsif ITEMDROPQTY.key?(dropitem) && ITEMDROPQTY[dropitem] == 0 && PKMNDROPQTY.key?(pkmnitem)
qty=PKMNDROPQTY[pkmnitem]
else
qty=1
end
if $PokemonBag.pbStoreItem(@battle.battlers[1].pokemon.item,qty)
itemname=PBItems.getName(@battle.battlers[1].pokemon.item)
pocket=pbGetPocket(@battle.battlers[1].pokemon.item)
@battle.pbDisplayPaused(_INTL("The wild {1} dropped\n{2} <icon=bagPocket#{pocket}> x{3}!",@battle.battlers[1].pbThis,itemname,qty))
end
end
@battleEnd = true
pbBGMPlay(pbGetWildVictoryME)
end