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,392
Reaction score
810
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,392
Reaction score
810
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,392
Reaction score
810
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,200
Reaction score
15,546
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

aww man, color hex code #C4C4C4 doesn't work for the tint value in this scene I need something darker, which stinks just because I liked that one it was my favorite plastic explosive three times...#696969 (nice) should work better (WHY IS MY BRAIN LIKE THIS)
Tell it to me straight, doc. If I've been trying to piece together a "shorter" game to learn stuff outside of game jams... am I just running away from my WIP? :v
Well, I've got a party tomorrow, and my friends are coming over. I wanted to work a bit on the Fandom Scouts assets so I can be ready when that update arrives... in other news, Pizza Time Horror is getting a second teaser, and it shows Cabaret Helen's last performance before the location closed.
Also who used to be scared of Chuck E as a kid? I was! Now I love him!
The new cards and what they do:

(I am clearly not a youtuber... Haha)

Forum statistics

Threads
117,281
Messages
1,106,084
Members
153,453
Latest member
kuzmitchoww
Top