The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: &&&&&&&&&&&&& on November 14, 2006, 01:29:26 AM

Title: Death toll
Post by: &&&&&&&&&&&&& on November 14, 2006, 01:29:26 AM
MADE BY BLIZZARD
ID = 26

class Scene_Battle

  alias main_dt_later main
  def main
    @td_flag = 0
    main_dt_later
  end
 
  alias upd_dt_later update
  def update
    @td_flag = $game_troop.enemies.size if @td_flag == 0
    upd_dt_later
  end
 
  alias battle_end_td_later battle_end
  def battle_end(result)
    battle_end_td_later(result)
    count = 0
    for enemy in $game_troop.enemies
      count += 1 unless enemy.exist? or enemy.hidden
    end
    $game_variables[ID] += @td_flag - count
  end

end


QuoteSet ID to the variable ID you want to use to store the number of killed enemies. Tell me if it works. I'm in a college lesson right now and made that out of my head, but it should work. To show the number just use in a message \v[X] where X is the same number as you set ID.

Can this go in database? PLEEASE! ;D
Title: Re: Death toll
Post by: :) on November 14, 2006, 01:30:20 AM
we need permission for something to be in database?
Title: Re: Death toll
Post by: &&&&&&&&&&&&& on November 14, 2006, 03:01:12 AM
I don't know how I did it before but the NEW TOPIC button is gone...
Title: Re: Death toll
Post by: :) on November 14, 2006, 03:03:11 AM
crap It is!i guess they will move it there if they think it should be.
Title: Re: Death toll
Post by: &&&&&&&&&&&&& on November 14, 2006, 12:55:31 PM
Hey blizzard... pleease put it in...
Title: Re: Death toll
Post by: Blizzard on November 14, 2006, 01:28:12 PM
Lol, I'm not gonna put these few lines of code into the database. It's embarrasing! :=

AND FINALLY SILVERLINE REMOVED THE NEW TOPIC BUTTON FROM THE DATABASES!
Title: Re: Death toll
Post by: &&&&&&&&&&&&& on November 14, 2006, 01:34:03 PM
That's script Discrimination!
you should love all your children blizzard!



:'(   <-- this is your script
Title: Re: Death toll
Post by: Blizzard on November 14, 2006, 01:35:57 PM
No, you got it wrong. It's not a script, it's an add-on. I love all my scripts and add-ons, but because it's not a script, but an add-on it can't be in the Scripts Database. Same reason why my Window_BattleResult add-on isn't there.
I consider codes with less than 100 lines of code and a complexity of very low to low as add-ons.
Title: Re: Death toll
Post by: &&&&&&&&&&&&& on November 14, 2006, 01:43:43 PM
 :'(  still

then we need a addon archive!   ;D
Title: Re: Death toll
Post by: :) on November 14, 2006, 02:33:55 PM
We really should get a script list in the script database, so even the smallest of scripts can be in there.
Title: Re: Death toll
Post by: &&&&&&&&&&&&& on November 14, 2006, 02:36:08 PM
there is  :-\ I made it remeber...
Title: Re: Death toll
Post by: :) on November 14, 2006, 02:38:18 PM
well, no not like the one you made like this:

Have a fourm script listing, with all scripts made in this fourm:

Frourm script listing:

Add-ons:
1. Death Toll

CBS:
1

CMS:
1
2
3

something like that
Title: Re: Death toll
Post by: psiclone on November 14, 2006, 07:08:21 PM
This is a great script idea!

Now, how would I go about setting it so that it will work for each individual character? And also to have it show in their status screen?
Title: Re: Death toll
Post by: Blizzard on November 14, 2006, 08:07:12 PM
I will release the add-on collection "Tons of Add-ons" tomorrow and put it right into the database. Doing that for each character is a completely different system. It would need scripting from zero as this code only checks how many enemies have died at the end of the fight. BTW, there was a little bug, I fixed it. You may already have noticed WHEN I made that script... -.-

EDIT: Lockage, this add-on can now be found here:

Tons of Add-ons (http://rmrk.net/index.php?topic=5147.0)