Status
Not open for further replies.

slickdeath97

Veteran
Veteran
Joined
Feb 26, 2019
Messages
546
Reaction score
21
First Language
english
Primarily Uses
RMVXA
I am using yanfly extra drops and have the notetags on my enemy setup right, but they won't drop anything even when I have it at 100%. How do I fix this?
1635356702826.png
 

Attachments

  • Scripts.zip
    579.8 KB · Views: 1

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
3,377
Reaction score
802
First Language
English
Primarily Uses
RMVXA
Difficulty settings by dr. todd is overwriting the code.
Put yanfly's extra drops below difficulty settings script.
 

slickdeath97

Veteran
Veteran
Joined
Feb 26, 2019
Messages
546
Reaction score
21
First Language
english
Primarily Uses
RMVXA
Difficulty settings by dr. todd is overwriting the code.
Put yanfly's extra drops below difficulty settings script.
That fixed it! Thanks. BTW, it is possible for an enemy to drop more than one of a specific item for just one enemy. For example, have one slime drop 3 potions instead of 1.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
3,377
Reaction score
802
First Language
English
Primarily Uses
RMVXA
The easiest way would be to have the same tag repeated 3 times.
Yanfly says in the script
Insert multiples of this tag to increase the number of drops an enemy can possibly have.

But let me test something.
If it works it would be a change in the note tag.
 

slickdeath97

Veteran
Veteran
Joined
Feb 26, 2019
Messages
546
Reaction score
21
First Language
english
Primarily Uses
RMVXA
The easiest way would be to have the same tag repeated 3 times.
Yanfly says in the script
Insert multiples of this tag to increase the number of drops an enemy can possibly have.

But let me test something.
If it works it would be a change in the note tag.
Ok. Good to know. Let me know what you got.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
3,377
Reaction score
802
First Language
English
Primarily Uses
RMVXA
This works. Need to change the note tag as I said.
<drop I3 2: 80%>
<drop W6 3: 20%>
Ruby:
#==============================================================================
#
# ▼ Yanfly Engine Ace - Extra Drops v1.01
# -- Last Updated: 2011.12.31
# -- Level: Normal
# -- Requires: n/a
# -- Mod to add additional drop items
#==============================================================================
#==============================================================================
# ▼ Instructions
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
#
# -----------------------------------------------------------------------------
# Enemy Notetags - These notetags go in the enemies notebox in the database.
# -----------------------------------------------------------------------------
# <drop Ix z: y%>
# <drop Wx z: y%>
# <drop Ax z: y%>
# Causes enemy to drop item, weapon, or armour (marked by I, W, or A) x at a
# rate of y percent. Insert multiples of this tag to increase the number of
# drops an enemy can possibly have. z = how many items to give
#
#==============================================================================

module YEA
  module REGEXP
  module ENEMY
    
    DROP_PLUS = /<(?:DROP|drop)[ ]([IWA])(\d+) (\d+):[ ](\d+)([%%])>/i
    
  end # ENEMY
  end # REGEXP
end # YEA

class RPG::Enemy < RPG::BaseItem
 
  def load_notetags_edr
    @extra_drops = []
    #---
    self.note.split(/[\r\n]+/).each { |line|
      case line
      #---
      when YEA::REGEXP::ENEMY::DROP_PLUS
        case $1.upcase
        when "I";  kind = 1
        when "W";  kind = 2
        when "A";  kind = 3
        else; next
        end
        item = RPG::Enemy::DropItem.new
        item.kind = kind
        item.data_id = $2.to_i
        item.drop_quantity = $3.to_i
        item.drop_rate = $4.to_i * 0.01
        @extra_drops.push(item)
      end
    } # self.note.split
    #---
  end
 
end

class RPG::Enemy::DropItem
  attr_accessor :drop_quantity
end

class Game_Enemy < Game_Battler
 
  #--------------------------------------------------------------------------
  # overwrite method: make_extra_drops
  #--------------------------------------------------------------------------
  def make_extra_drops
    result = []
    for drop in enemy.extra_drops
      next if rand > drop.drop_rate
      drop.drop_quantity.times do
        result.push(item_object(drop.kind, drop.data_id))
      end
    end
    return result
  end
 
end # Game_Enemy
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,163
Reaction score
15,541
First Language
English
Primarily Uses
RMMV

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

"16. Do NOT contact other members by private message, on the forum or status feed, inviting them to put additional tools (such as leaderboards, ads, etc - whether yours or another person's) into their game."
Oh no. Necessity is the mother of invention. Do I want to know what happened?
Early WIP for my next entry. Since it's early you're going to need to wait a little longer than usual. What's that? You'll find out in my next update!
12.PNG
20 festive cards can now be unlocked in BiteMe!

The cards are permanent, but can only be unlocked in December!
Once the year is over, you won't be able to unlock the cards, or to upgrade it.
https://johndoenews.itch.io/biteme-storymodeCard141-160-Ad.png
Finally showing some updates again

Forum statistics

Threads
117,181
Messages
1,105,245
Members
153,307
Latest member
nyhkkbjyek
Top