Wild Item Drops

Resource Wild Item Drops

Cilerba

relic artist!
Relic Artist
Joined
Nov 15, 2014
Posts
14
Likes
88
Age
23
#1
Cilerba submitted a new resource:

Wild Item Drops - Obtain dropped items after a wild Pokémon faints.

I made a script that allows wild Pokémon to drop their hold items when fainted.
Copy and paste wherever.

Code:
class PokeBattle_Battler
	def pbFaint(showMessage=true)
	unless fainted?
	  PBDebug.log("!!!***Can't faint with HP greater than 0")
	  return true
	end
	if @fainted
#	  PBDebug.log("!!!***Can't faint if already fainted")
	  return true
	end
	@battle.scene.pbFainted(self)
	pbInitEffects(false)
	# Reset status
	self.status=0
	self.statusCount=0
	if @pokemon && @battle.internalbattle...
Read more about this resource...
 
OP
OP
Cilerba

Cilerba

relic artist!
Relic Artist
Joined
Nov 15, 2014
Posts
14
Likes
88
Age
23
#5
Thanks for pointing out the error. I should have a fix within a few days along with a way to separate drop items from hold items!
 

Droid779

Weeb
Member
Joined
Mar 15, 2018
Posts
46
Likes
19
#7
I noticed a bug where my Pokémon “drops” its item when it faints, but the Pokémon still have the item and it duplicates that item into my bag.
 
Last edited:

Elle

Trainer
Member
Joined
Jul 21, 2018
Posts
68
Likes
94
#8
Is there any way to increase the chances of the item being dropped? Also, does it only drop the Common item or is there a chance it will drop it's uncommon / rare item? I've tested about a dozen battles and so far only common drops but that could be just bad luck on my part.

That being said, really awesome script!
 

Mr. Gela

Discord: theo#7722
Member
Joined
Jul 19, 2015
Posts
184
Likes
275
#9
Is there any way to increase the chances of the item being dropped? Also, does it only drop the Common item or is there a chance it will drop it's uncommon / rare item? I've tested about a dozen battles and so far only common drops but that could be just bad luck on my part.

That being said, really awesome script!
For scripted events such as Snorlax/a legendary, you can manually give the Pokémon an item before the fight by editing it. For all wild encounters you can just edit their PBS entry, which has about 3 different item slots (or you can use the same item all 3 times for close to 100% chance of finding them equipped with it). I can't check right now but check the default PBS files. The values are called something like WildItemCommon, WildItemUncommon WildItemRare, but I might be wrong.
 

Elle

Trainer
Member
Joined
Jul 21, 2018
Posts
68
Likes
94
#10
For scripted events such as Snorlax/a legendary, you can manually give the Pokémon an item before the fight by editing it. For all wild encounters you can just edit their PBS entry, which has about 3 different item slots (or you can use the same item all 3 times for close to 100% chance of finding them equipped with it). I can't check right now but check the default PBS files. The values are called something like WildItemCommon, WildItemUncommon WildItemRare, but I might be wrong.
Alright, thanks for the help. :)
 

EpiQ

Novice
Member
Joined
Mar 1, 2018
Posts
22
Likes
5
#11
Can you help me pls? I have this error:
Code:
---------------------------
Pokemon
---------------------------
[Pokémon Essentials version 17.1]

Exception: NoMethodError

Message: undefined method `fainted?' for #<PokeBattle_Battler:0x945d0e8>

Wild Drop:3:in `pbFaint'

PokeBattle_Battler:3170:in `pbProcessMoveAgainstTarget'

PokeBattle_Battler:3473:in `pbUseMove'

PokeBattle_Battler:3453:in `loop'

PokeBattle_Battler:3476:in `pbUseMove'

PokeBattle_Battler:3674:in `pbProcessTurn'

PokeBattle_Battler:3673:in `logonerr'

PokeBattle_Battler:3673:in `pbProcessTurn'

PokeBattle_Battle:2907:in `pbAttackPhase'

PokeBattle_Battle:2904:in `each'
Thank you!
PS: Is it already separate hold items with drop items? Or will be in the future?
 

TechSkylander1518

Wiki Dweeb
Member
Joined
Mar 24, 2017
Posts
362
Likes
352
#12
Solved the issue of player drops! Just change the conditional to

if @opponent==false && @pokemon.item >0 && showMessage && @battle.pbIsOpposing?(@index)

(Unrelated to player, but I switched it to @opponent==false because I was still getting trainer drops, for some reason)
 
Top