NBDA v1.3b
(NAMKCOR's Battle Difficulty Announcer)
Info This script can be used to have actors talk before and after battle, to describe both the battle and their own conditions
Kinda Valkyrie Profile-ish
Features -- uses easily customizable arrays to determine sounds
-- uses an array to create enemy group levels
-- have different sounds for Boss Battles!
-- actors' statements at end battle are determined by their hp levels
-- user friendly instructions
-- exotic CBS compatable!
Screenies N/A - Audio Script
Version History (note: versions 1.0-1.1 were NOT released)
- 1.0 - completed basic system for pre-battle talk
- 1.0b - fixed bug where dead people spoke
- 1.1 - added end of battle speech
- 1.1b - fixed bug where any hp loss resulted in low hp sounds
- 1.2 - Fixed mute characters bug; removed useless variable; sounds now must
go in their own folder under SE for easier organization
The folder is - "Audio\SE\NBDA\"
Discovered complete incompatability with Cogwheel's RTAB
as well as a compatabilizing technique
- 1.3 - Made the script compatible (mostly) with exotic-CBS'es
removed useless lines of code
- 1.3b - Fixed echo problem by changing location of the end-battlecry =D
Script Spoiler for :
#================================================================= # NAMKCOR's Battle Difficulty Announcer v1.3b #--------------------------------------------------------------------------------------------------------------------- # Created By: NAMKCOR # Created for the Websites: Chaos Project & RPG Maker Resource Kit # (www.chaosproject.co.nr & www.rmrk.net) # If this script is hosted on any other website, then it is stolen, please contact # me at the address given below #-------------------------------------------------------------------------------------------------------------------- # If you find any Bugs/Incompatability issues with this script, please contact me at # the following e-mail address: Rockman922@aol.com, and please be descriptive # with your e-mail subject, as I delete spam on sight. I might be able to fix it, but # as of right now I'm kinda a mediocre scripter so some Incompatability issues may # be unsolvable. #-------------------------------------------------------------------------------------------------------------------- # Function: # This script will play a "battle cry" that is randomized and chosen due to a set # number of parameters. This system was designed to be customizable without # # much special scripting know-how # Compatability: # 100% compatability with SDK (some things may conflict I dunno SDK well) # 90% compatability with exotic-CBS # # Instructions: # Comments and instructions for the individual customizations will be given # right where they are located. Only real skills needed are reading, typing, # and copy&paste # All sounds used must go under "Audio\SE\NBDA\" or the script will bug #-------------------------------------------------------------------------------------------------------------------- # Version History: # 1.0 - completed system, different phrases at start of battle only # 1.0b - Fixed a bug where dead people could still talk at beginning of battle # 1.1 - Added talking at end of battle # 1.1b - Fixed a bug where any hitpoint loss at all would result # Low HP sounds being played # 1.2 - Fixed mute characters bug; removed useless variable; sounds now must # go in their own folder under SE for easier organization # The folder is - "Audio\SE\NBDA\" # Discovered incompatability with Cogwheel's RTAB # as well as a compatabilizing technique (temporary) # 1.3 - Made the script compatible (mostly) with exotic-CBS'es # removed useless lines of code # 1.3b - Fixed echo problem by changing location of the end-battlecry =D #================================================================= #don't touch class Game_Party def partyActors return @actors end end #end don't touch #================================================================= # This array will be used to detect if an enemy troop is a boss battle # Simply add the index of the boss troops to the array #================================================================= $bosses = [3] #================================================================= # This array is used to detect the level of the enemy in the database # All enemy MUST have a level value put in this array, and the levels MUST be # In order of the enemy in the database or the system will bug and/or crash # ENEMY LEVELS CANNOT BE NIL # To include a boss, make the level value equal to zero # # example - say you have 5 enemies, and the first two are level 1 battles, 2 # level 5, $enemy_level would look like this: # $enemy_level[1,1,5,5] #================================================================= $enemy_level = [1,5,10,10] #================================================================= # These arrays are used to store the sounds played by the actors # All you need to do is write the name of the sound you want played by the actor # Based on the conditions # Like the enemy levels, this one is organized by the actor's number in # the database, and all must have a value for the correct sound to be played # (or nil if no sound) # # $in_boss_battle: If the character is in a boss battle # $in_desperate_battle: if the character's level is DESPERATE or more levels below the # enemy party's level # (change DESPERATE to whatever value you feel would be # appropriate to determine whether or not the character # will have a tough time with the battle) # $in_normal_battle: if the battle isn't desperate or easy, basically in the right range # for the character's level # $in_desperate_battle: if the character's level is EASY or more levels above the # enemy party's level # (change EASY to whatever value you feel would be # appropriate to determine whether or not the character # will have an easy time with the battle) # $low_hp: if the character has low hp at the start of battle, they will say this # LOWPERCENT: what percent of hp would be considered low # MIDPERCENT: what percent of hp would be considered middleish # $end_low_hp: what sound is played at the end of battle if actor's hitpoints are # below LOWPERCENT # $end_mid_hp: what sound is played at the end of battle if actor's hitpoints are # above LOWPERCENT, but lower than MIDPERCENT # $end_high_hp: what sound is played at the end of battle if the actor's hitpoints are # above MIDPERCENT # # The character's sounds must be in order of the actors in the database # for mute characters, leave their values nil # # example: if actor 1 plays sound "omg" at the beginning of boss battles, and # actor 3 plays "ahhh" but actor 2 is mute, $in_boss_battle would look # like this: # $in_boss_battle = ["omg", nil, "ahhh"] # where "omg" and "ahhh" are the names of the SE file in the folder # # The syntax is the same for all the other arrays #================================================================= $in_boss_battle = ["Actor001-bossBattle", "Actor002-bossBattle",nil,nil] $in_desperate_battle = ["Actor001-desperateBattle","Actor002-desperateBattle",nil,nil] DESPERATE = 4 $in_normal_battle = ["Actor001-normalBattle","Actor002-normalBattle",nil,nil] $in_easy_battle = ["Actor001-easyBattle","Actor002-easyBattle",nil,nil] EASY = 4 $low_hp = ["Actor001-lowHP","Actor002-lowHP",nil,nil] LOWPERCENT = 25 MIDPERCENT = 75 $end_low_hp = ["Actor001-lowWin","Actor002-lowWin",nil,nil] $end_mid_hp = ["Actor001-normWin","Actor002-normWin",nil,nil] $end_high_hp = ["Actor001-bestWin","Actor002-bestWin",nil,nil] #================================================================== #DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING #================================================================== @char_selection = 0 class Scene_Battle #alias phase1 to make it compatible alias new_phase1 start_phase1 #overloaded phase1 for battlecry before phase1 execution def start_phase1 #Battlecry Excecution @played = false @troop_id2 = ($game_temp.battle_troop_id)-1 @actors = $game_party.partyActors @char_selection = rand(@actors.size) while @actors[@char_selection].level == nil or @actors[@char_selection].hp <= 0 @char_selection = rand(@actors.size) end @level = @actors[@char_selection].level @hpRemain = (@actors[@char_selection].hp*100/@actors[@char_selection].maxhp) @enemylevel = $enemy_level[@troop_id2] if $bosses.include?(@troop_id2) and @played == false if $in_boss_battle[@char_selection] != nil Audio.se_play("Audio/SE/NBDA/" + $in_boss_battle[@char_selection], 100, 100) @played = true end end if @hpRemain < LOWPERCENT and @played == false if $low_hp[@char_selection] != nil Audio.se_play("Audio/SE/NBDA/" + $low_hp[@char_selection], 100, 100) @played = true end end if @level + DESPERATE <= @enemylevel and $in_desperate_battle[@char_selection] != nil and @played == false Audio.se_play("Audio/SE/NBDA/" + $in_desperate_battle[@char_selection], 100, 100) @played = true elsif @level - EASY >= @enemylevel and $in_easy_battle[@char_selection] != nil and @played == false Audio.se_play("Audio/SE/NBDA/" + $in_easy_battle[@char_selection],100,100) @played = true elsif $in_normal_battle[@char_selection] != nil and @played == false Audio.se_play("Audio/SE/NBDA/" + $in_normal_battle[@char_selection],100,100) end @played = false #end battlecry execution new_phase1 end end class Window_BattleResult < Window_Base #-------------------------------------------------------------------------- # * Object Initialization # exp : EXP # gold : amount of gold # treasures : treasures #-------------------------------------------------------------------------- alias new_initialize initialize def initialize(exp, gold, treasures) #play end of battle SE @played = false @actors = $game_party.partyActors @char_selection = rand(@actors.size) while @actors[@char_selection].level == nil or @actors[@char_selection].hp <= 0 @char_selection = rand(@actors.size) end @hpRemain = (@actors[@char_selection].hp*100/@actors[@char_selection].maxhp) if @hpRemain <= LOWPERCENT and @played == false if $end_low_hp[@char_selection] != nil Audio.se_play("Audio/SE/NBDA/" + $end_low_hp[@char_selection], 100, 100) @played == true end end if @hpRemain <= MIDPERCENT and @hpRemain > LOWPERCENT and @played == false if $end_mid_hp[@char_selection] != nil Audio.se_play("Audio/SE/NBDA/" + $end_mid_hp[@char_selection], 100, 100) @played == true end end if @hpRemain > MIDPERCENT and @played == false if $end_high_hp[@char_selection] != nil Audio.se_play("Audio/SE/NBDA/" + $end_high_hp[@char_selection], 100, 100) @played == true end end new_initialize(exp,gold,treasures) end end
Just paste that in it's own script above main.
Instructions are given in the script's comments above the arrays and values
that they concern
Demo Attached to this Post
*requires .rar extractor, can be found
HERE Compatability Most likely compatable with SDK
Most likely compatable with exotic CBSes
no known incompatability issues
Other Info WOHOO! This is my first "real" script
If you find any bugs, please feel free to e-mail me at Rockman922@aol.com
Also contact me and let me know about any incompatability issues!
If this script is used in a game, please credit me, and let me know about the game so that I can see what you did with my script ok?
--enjoy!