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,352
Reaction score
791
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,352
Reaction score
791
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,352
Reaction score
791
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,078
Reaction score
15,498
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

Sizzle sizzle sizzle...
zbf1dCZ.gif
Sharing my past was a mistake. Will delete the post when I get access to a working internet connection again.
TFW you get a plugin working correctly with your other plugins ♡\( ̄▽ ̄)/♡

(CW for minor gore - Einar's Y incision is gone for his test portrait)

Cs5kAbZ.png
Doing some winter related edits for a cozy cottage!
I think it's the third time I am changing my skill info plugin, but as I get better at programming, I want to fix the trash I made earlier :p

Streaming while I am programming the plugin. Join in if you wish :)

Forum statistics

Threads
116,981
Messages
1,103,496
Members
152,845
Latest member
Zynarith2
Top