Halli Hallo!
Das nachfolgende Script weist leider eine kleine Schwäche auf:
#===============================================================================
# Additional Drops Note Tags
# by Deriru
#
# PLEASE GIVE CREDIT IF USED!
#
#-------------------------------------------------------------------------------
# What it does:
# It gives a feature wherein you can make enemies drop more items by using note
# tags. Note that the calculation is by percentage rather than fraction.
#-------------------------------------------------------------------------------
# Setting up additional drops:
# Here is the format for making the tag note for additional drops:
# <DROP_TAG ItemType DropID Percentage>
# <Drops 2 30 100>
#
# DROP_TAG: See setup options
# ItemType: The type of drop.
# DropID: The ID of the drop (to the left of the item/equip's name in database.)
# Percentage: Percentage of the item drop (out of 100)
#
# See the Slime in the demo's Enemy tab to see some examples.
#-------------------------------------------------------------------------------
# Setup Options:
# DROP_TAG: The note tag label for the additional drops.
#-------------------------------------------------------------------------------
# Setup Start!
#-------------------------------------------------------------------------------
module Deriru
module DropNotes
DROP_TAG = "Drops"
end
end
#-------------------------------------------------------------------------------
# Setup End!
# DO NOT TOUCH THE PARTS BELOW IF YOU DON'T KNOW WHAT YOU'RE DOING!
#===============================================================================
class Game_Monster < Game_Character
def get_rewards
if $Vampyr_SBABS.auto_exp_e_gold
exp = (self.actor.maxhp+self.actor.maxmp+self.actor.atk+self.actor.def+self.actor.spi+
self.actor.agi+self.actor.hit+self.actor.eva) * $Vampyr_SBABS.auto_exp_rate / 100
else
exp = self.actor.exp
end
exp = (exp*1.5) if self.overkill
if $Vampyr_SBABS.divide_exp
x = (exp/$game_party.members.size)
for i in $game_party.members
i.gain_exp(x, true)
end
else
x = exp
for i in $game_party.members
i.gain_exp(x, true)
end
end
$game_player.reward = "Exp: #{exp.to_f}"
droped_items = []
filt1 = /<#{Deriru::DropNotes::DROP_TAG} ([\w]*) [\w]* [\w]*>/i
filt2 = /<#{Deriru::DropNotes::DROP_TAG} [\w]* ([\w]*) [\w]*>/i
filt3 = /<#{Deriru::DropNotes::DROP_TAG} [\w]* [\w]* ([\w]*)>/i
data = $data_enemies[self.enemy_id].note
cat = data.scan(filt1)
id = data.scan(filt2)
chance = data.scan(filt3)
for i in 0..((cat.size) - 1) do
next unless rand(101) <= chance[0].to_i
case cat[0].to_i
when 1
droped_items.push($data_items[id[0].to_i])
when 2
droped_items.push($data_weapons[id[0].to_i])
when 3
droped_items.push($data_armors[id[0].to_i])
end
end
for i in droped_items.compact
$game_drop.push(Game_Drop.new(self, i.icon_index, i, 0))
end
if $Vampyr_SBABS.auto_exp_e_gold
gold = (self.actor.maxhp+self.actor.maxmp+self.actor.atk+self.actor.def+self.actor.spi+
self.actor.agi+self.actor.hit+self.actor.eva) * $Vampyr_SBABS.auto_gold_rate / 100
else
gold = self.actor.gold
end
if gold > 0 and rand(100) <= $Vampyr_SBABS.gold_drop_rate
$game_drop.push(Game_Drop.new(self, $Vampyr_SBABS.gold_drop_icon_index, nil, gold))
end
@animation_id = self.actor.die_animation_id if self.actor.die_animation_id > 0
if self.actor.die_se != nil
RPG::SE.new(self.actor.die_se).play
else
Sound.play_enemy_collapse
end
if $Vampyr_SBABS.battle_area_variable > 0
$game_variables[$Vampyr_SBABS.battle_area_variable] += 1
$game_map.need_refresh = true
end
@killed = true
end
end
Dieses Add-on ermöglicht es, mehrere Items im Vampyr SBABS aus Gegnern fallen zu lassen.
Nur leider gilt dies nicht für Event-Monster. Ein Event-Monster erstellt man mithilfe von Kommentaren auf der Eventseite.
(Comment) Enemy 4
(Comment) Die Self Switch A
Stirbt ein solcher Feind, werden höchstens die zwei Standard-Items aus der Datenbank fallen gelassen, aber nicht die Extra-Drops!
Hat jemand eine Idee, wie man das im Script umschreiben könnte, sodass es für Area- und Event-Monster zählt?
Vielen Dank schon mal! Ich benötige es sehr dringend! :D
Hier eine Demo mit allen nötigen Inhalten:
DEMO (http://uploading.com/files/me25ddmc/Vampyr%2BSBABS.zip/)