Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
Sign in to follow this  
-Luke-

(Thanks everyone, Solved!)Multi treasure/loot?(Solved)

Question

I've posted something like this on 3 forums and searched all over the web but i can't find a good way to make multiple drops. When you go into database there's ONE treasure spot. Can i have a script or a link anyone? Or can someone make a demo? So i just want let's say a 50% chance of getting a sword and a 40% chance of getting a shield.

 

And don't say to do the thing where you make two troops, i have a action battle system.

 

~Thanks~Luke~

 

:D :B): :rofl:

Share this post


Link to post
Share on other sites

25 answers to this question

Recommended Posts

  • 0

That script you gave me the link to was confusing :blink: Well i'm not good at knowing how to place them and how to use scripts..If anyone could either give me a script with easy to under stand of step-by-step, or they could make a demo =]

 

~Thanks~Luke~

Share this post


Link to post
Share on other sites
  • 0

Okay, but when i just take the multi-script part of it, it still doesn't do anything. I copy and pasted the whole multi-script area in part2 and put it in a new script. What's the next step? What do i add or fill in to what to make the changes i need for my game?

Share this post


Link to post
Share on other sites
  • 0

Oh Yeah I forgot to say this. Welcome to the forums. It's good to see a new member.

Share this post


Link to post
Share on other sites
  • 0

So here's the code. I don't know where to put something like when it's saying to put 'when 1 then return [[1, 2, 50], [3, 15, 10], [2, 4, 5]]'. where do i put one of that with my customized info in it?

 

:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Multi-Drop by Blizzard
# Version: 1.1b
# Type: Game Alteration
# Date: 13.11.2007
# Date v1.0b: 3.4.2008
# Date v1.1b: 5.6.2008
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# 
# Compatbility:
#   
#   Compatible with RTAB and Blizz-ABS 1.70 and higher. Will most probably
#   cause problems with CBS-es that have the start_phase5 method modified.
# 
# 
# Explanation:
#   
#   This add-on allows you to make enemies that drop more than one item. The
#   drops are independent, so if an enemy drops one item, he can drop another
#   one as well. An enemy can even have a couple of drop of the same item.
#   
#   
# Instructions:
#   
#   Configure the drop database below and set up the compatibility
#   configuration. The compatibility ocnfiguration is only needed if you are
#   using RTAB. Blizz-ABS 1.70 and higher will be recognized automatically.
#   
#   
# Side note:
#   
#   This add-on could have been written in less than 100 lines of code, but
#   full RTAB compatbility takes its piece of code.
#   
#   
# If you find any bugs, please report them here:
# http://forum.chaos-project.com
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

if TONS_OF_ADDONS::MULTI_DROP

#==============================================================================
# module BlizzCFG
#==============================================================================

module BlizzCFG

 # set this to true if you are using RTAB
 RTAB_USE = false
 # set this to true if you are using Animated Battlers in RTAB
 RTAB_ANIMA = false
 # set this to true if you are using Battle Report v1.6 by Illustrationism
 RTAB_REPORT = false
 # limit of maximum items dropped, 0xFFFF is infinite
 ITEM_LIMIT = 0xFFFF

 def self.drop_configuration(id)
   case id
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Drop Database
# 
#   Use the following template for configuration:
# 
#     when ID then return [[TYPE1, I_ID1, CH1], [TYPE2, I_ID2, CH2], ...]
#   
#   ID   - enemy ID in the database
#   TYPE - the drop type; 1 for items; 2 for weapons; 3 for armors
#   I_ID - the drop item ID in the database
#   CH   - drop chance
# 
#   You can add as many drops as you want, separate them with commas. Keep in
#   mind that if you set TYPE to 0, the drop is disabled and that you MUST NOT
#   set I_ID to 0. If an enemy is not configured here, the default
#   configuration from your database will be used, otherwise the default
#   configuration from your database will be COMPLETELY OVERRIDEN.
#   
#   Example 1:
#     
#     when 1 then return [[1, 2, 50], [3, 15, 10], [2, 4, 5]]
#   
#   Monster with ID 1 can drop:
#     1 Item ID 2, chance 50%
#     1 Armor ID 15, chance 10%
#     1 Weapon ID 4, chance 5%
#     
#   Example 2:
#     
#     when 2 then return [[1, 1, 50], [1, 1, 40]]
#   
#   Monster with ID 2 can drop:
#     1 Item ID 1, chance 50%
#     1 Item ID 1, chance 40%
#   Full chances of drops because of repeating items:
#     nothing, chance 30%
#     1 Item ID 1, chance 50%
#     2 Items ID 1, chance 20%
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   when 1 then return [[1, 2, 50], [3, 15, 10], [2, 4, 5]]

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Drop Database
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   end
   # return normal item drop if exists
   if $data_enemies[id].item_id > 0
     return [[1, $data_enemies[id].item_id, $data_enemies[id].treasure_prob]]
   elsif $data_enemies[id].weapon_id > 0
     return [[2, $data_enemies[id].weapon_id, $data_enemies[id].treasure_prob]]
   elsif $data_enemies[id].armor_id > 0
     return [[3, $data_enemies[id].armor_id, $data_enemies[id].treasure_prob]]
   end
   # no drop
   return [[0, 0, 0]]
 end
 #----------------------------------------------------------------------------
 # dropped_items
 #  enemy - a killed enemy
 #  This method returns an array of all dropped items.
 #----------------------------------------------------------------------------
 def self.dropped_items(enemy)
   # initialize array
   items = []
   # get drops and start iteration through all drops
   self.drop_configuration(enemy.id).each {|i|
       # if got item
       if rand(100) < i[2]
         # add item, weapon or armor
         case i[0]
         when 1 then items.push($data_items[i[1]])
         when 2 then items.push($data_weapons[i[1]])
         when 3 then items.push($data_armors[i[1]])
         end
       end}
   # result
   return items
 end

end

#==============================================================================
# Scene_Battle
#==============================================================================

class Scene_Battle

 #----------------------------------------------------------------------------
 # start_phase5
 #  This method was completely modified to support multi-drop.
 #----------------------------------------------------------------------------
 def start_phase5
   # if RTAB and Animated Battlers in use
   if BlizzCFG::RTAB_USE && BlizzCFG::RTAB_ANIMA
     # don't end battle as long as an actor is moving around
     $game_party.actors.each {|actor| return if @spriteset.battler(actor).moving}
     # see if an actor remains alive
     $victory = true if $game_party.actors.any? {|actor| !actor.dead?}
     # see if an enemy remains alive
     $defeat = true if $game_troop.enemies.reverse.any? {|enemy| !enemy.dead?}
   end
   @phase = 5
   # set audio
   $game_system.me_play($game_system.battle_end_me)
   $game_system.bgm_play($game_temp.map_bgm)
   # initialize variables
   exp, gold, treasures = 0, 0, []
   # if using RTAB
   if BlizzCFG::RTAB_USE && !BlizzCFG::RTAB_REPORT
     # dispose and setup special things from RTAB
     @active_actor.blink = false if @active_actor != nil
     $game_temp.battle_main_phase = true
     @party_command_window.active = @party_command_window.visible =
     @actor_command_window.active = @actor_command_window.visible = false
     [@skill_window, @item_window].each {|win| win.dispose if win != nil}
     @skill_window = @item_window = nil
     @help_window.visible = false if @help_wait == 0
   end
   # iterate through all enemies
   $game_troop.enemies.each {|enemy|
       # if enemy isn't hidden
       unless enemy.hidden
         # get exp and gold
         exp += enemy.exp
         gold += enemy.gold
         # get all dropped items
         treasures += BlizzCFG.dropped_items(enemy)
       end}
   # limits treasures to a specific number
   treasures = treasures[3..BlizzCFG::ITEM_LIMIT]
   # if used battle RTAB battle report
   if BlizzCFG::RTAB_REPORT
     # used by battle report
     @exp, @gold, @treasures = exp, gold, treasures
   else
     # iterate through all actor indices
     $game_party.actors.each_index {|i|
         actor = $game_party.actors[i]
         # if actor can get EXP
         unless actor.cant_get_exp?
           # store last level
           last_level = actor.level
           actor.exp += exp
           # if level increased after adding EXP
           if actor.level > last_level
             @status_window.level_up(i)
             # if using RTAB
             if BlizzCFG::RTAB_USE
               # execute special RTAB commands
               actor.damage[[actor, -1]] = 'Level up!'
               actor.up_level = actor.level-last_level
             end
           end
         end}
     # add to party's gold
     $game_party.gain_gold(gold)
     # create result window
     @result_window = Window_BattleResult.new(exp, gold, treasures)
   end
   # iterate through all treasures
   treasures.each {|item|
       # add gained treaures to party's inventory
       case item
       when RPG::Item then $game_party.gain_item(item.id, 1)
       when RPG::Weapon then $game_party.gain_weapon(item.id, 1)
       when RPG::Armor then $game_party.gain_armor(item.id, 1)
       end}
   @phase5_wait_count = 100
 end

end

end

Share this post


Link to post
Share on other sites
  • 0

Hey, the script carefully consider it. There, everything is clear and simple.

 

( :blink: ) when 1 then return [[1, 2, 50], [3, 15, 10], [2, 4, 5]]

 

You doing like this:

when 1 then return [[item number, Item ID, Chance]...]

when 2 then return [[item number, Item ID, Chance]...]

when 3 then return [[item number, Item ID, Chance]...]

...

 

And do this again. This is simple.

Share this post


Link to post
Share on other sites
  • 0

I still can't figure it out and i've posted this on many many forums all over. Thanks guys for the help but i'm still not getting this.

 

Now i'm requesting a demo and i will absolutely grateful to the person who can help me figure it out and i will credit them.

 

I am using Mr.Mo's Action Battle System so keep in mind, i don't know if that will effect how it works. I don't care if it's Tons of Addons scripts or something different.

 

-OOPS CAN A STAFF DELETE THE OTHER 2 OF THESE IT POSTED A BUNCH I DIDNT EVEN CLICK IT MORE THAN ONE TIME-

Share this post


Link to post
Share on other sites
  • 0

Woah, please refrain from quadruple-posting...

 

..anyway, that sounds like a neat script to try out. I'll take a crack at it and if I figure it out, I'll let you know.

 

...wait, will this work with Mr. Mo's ABS? Or the default battle system?

Share this post


Link to post
Share on other sites
  • 0

@Shiny-A demo with working Multi-drops. I just need a simple demo with the scripts and just one map with an enemy that has 2 or 3 working drops, and they both have a chance of getting. Thanks.

 

@UrHappy-Thanks,I appreciate it.

Share this post


Link to post
Share on other sites
  • 0

Ok, I made a quick demo using Blizz-ABS and Tons of Add-Ons...it doesn't say when the enemy drops, but if you check your inventory after battle, you should have one of Item ID 1, 2, and 3. (I set each of them to drop 100%).

 

You can use default controls, and to attack, use Tab.

 

Mediafire Download

 

 

Edit: woot...300 posts :D

Share this post


Link to post
Share on other sites
  • 0

I copied the exact script and used the same enemy but no positive results. I'm starting to think it has something to do with the ABS i'm using, so i'm going to try Blizz. I'll let you know how that turns out, Thanks so much guys.

Share this post


Link to post
Share on other sites
  • 0

Yea, it probably is incompatible with Mr. Mo's ABS...personally, I prefer Blizz-ABS, because it's compatible with a lot of scripts, and it's easier to understand than most other ABS systems (at least I think so).

Share this post


Link to post
Share on other sites
  • 0

It worked. Finally i get good results. The fact that i have to use Blizz which i'm not too used to isn't the best, but i can fiddle around with it to fit my needs. Thank so much Shiny and everyone else that helped =]. I'll credit everyone that helped into my game.

 

:) :D :yes: :lol: :drool: :clap: :alright: :biggrin_002:

 

~Thanks~Luke~

Share this post


Link to post
Share on other sites
  • 0

No problem, it was my pleasure :)

 

If you need any help with Blizz-ABS, just ask.

 

PS ~ I recommend downloading the configuration utility if you want to assign your own custom controls, etc. without fiddling with the script. It can be found in the official Blizz-ABS thread.

 

PPS ~ If this problem is solved, edit your first post so that it has [sOLVED] in the title :)

Edited by ShinyToyGuns

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...