RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[RGSS2.0]Battlecry VX v1.00

0 Members and 2 Guests are viewing this topic.

********
Hungry
Rep:
Level 96
Mawbeast
2013 Best ArtistParticipant - GIAW 11Secret Santa 2013 ParticipantFor the great victory in the Breakfast War.2012 Best Game Creator (Non-RM Programs)~Bronze - GIAW 9Project of the Month winner for December 2009Project of the Month winner for August 20082011 Best Game Creator (Non RM)Gold - GIAW Halloween
Battlecry VX
Version: 1.01
Author: NAMKCOR
Date: 09/21/2008

Version History


  • v1.01: fixed a bug where if an actor had no sounds the game would crash
  • v1.00: original system release

Planned Future Versions

possible revisions to take exotic-CBS into consideration.

Description

Plays user configured battle cries for characters at the start of battle and at the end of battle. 
Pre-battle cries are selected by the difficulty of the enemy troop, and post-battle cries are selected by the remaining hp percentage of the actor that scored the final blow.

Features

  • easy to configure
  • volume control
  • doesn't crash due to lack of sound to play

Screenshots

n/a

Instructions

Instructions are in the comments of the script, in their respective locations.
All that is needed is simple configuration.

Script


Code: [Select]
#=======================================================================
# Battle Cry VX         version 1.01
#-----------------------------------------------------------------------
# Function:
#  Plays user configured battle cries for characters at the start
#  of battle and at the end of battle. 
#  Pre-battle cries are selected by the difficulty of the enemy
#  troop, and post-battle cries are selected by the remaining
#  hp percentage of the actor that scored the final blow.
#
# Compatibility:
#  This script -should- be compatible with other custom battle scripts
#  but compatibility has not as of yet been tested.
#
# Instructions:
#  Simply configure the arrays of actor sounds in the case statements
#  More detailed instructions will be given in the respective areas.
#  Only skills truly needed are typing, copy, and paste.
#-----------------------------------------------------------------------
# Contact:
#  Should you encounter a bug or incompatibility with this script,
#  e-mail NAMKCOR at Rockman922@hotmail.com, or message at
#  http://www.rmrk.net or http://forum.chaos-project.com
#
# This script was designed for use and distribution only on
# The RPG Maker Resource Kit (RMRK) and Chaos Project.
# If this script is found posted on any other website, it is STOLEN
# and it is advised to contact NAMKCOR at the above methods.
#
# This script is -strictly- for NON-commercial purposes.  Please
# credit NAMKCOR for the creation of this script if you use it.
#=======================================================================

module NAMKCOR
 
  #=======================================================================
  # volume: simply set the return value to be equal to the volume
  #         you want the battlecries to be played at
  #=======================================================================
  def self.volume
    return 80
  end
 
  #=======================================================================
  # battle_range: set the return value to be how many levels above or
  #               below the enemy for easy/difficult battles.
  #=======================================================================
  def self.battle_range
    return 5
  end
 
  #=======================================================================
  # mid_hp: set the return value to be the percentage of hitpoints that
  #         is the -minimum- value for being in 'middle' hp range.
  #=======================================================================
  def self.mid_hp
    return 40
  end
 
  #=======================================================================
  # high_hp: set the return value to be the percentage of hitpoints that
  #         is the -minimum- value for being in 'high' hp range.
  #=======================================================================
  def self.high_hp
    return 75
  end
 
  #=======================================================================
  # bosses: to add a boss, simply create a "when" clause for the
  #         troop id, and set the 'return' value to 'true'
  #         do not touch the 'else' clause
  # example:
  #          when 5
  #            return true
  #=======================================================================
  def self.bosses(id)
    case id
    when 3
      return true
    else
      return false
    end
  end
 
  #=======================================================================
  # troop_level: to set a troop level, create a "when" clause for the
  #              troop id, and set the 'return' value to be the level
  #              desired.  do not touch the 'else' clause.
  #              THERE MUST BE AN ENTRY FOR EVERY TROOP IN THE DATABASE
  # example:
  #          when 5
  #              return 3
  #=======================================================================
  def self.troop_level(id)
    case id
    when 1
      return 1
    when 2
      return 5
    when 3
      return 10
    else
      return 0
    end
  end
 
  #=======================================================================
  # start_battlecry: to add a new actor's set of battlecries to the
  #                  listing, create a "when" clause for the actor's id
  #                  and the return value to an array, configured as follows.
  # array config: ["easy_battle_se", "normal_battle_se", "hard_battle_se",
  #                "boss_battle_se"]
  #                the values in "" are the names of the sound files.
  #                ALL SOUND FILES MUST BE PLACED IN 'AUDIO/Battlecry'
  #               
  # Suggestion: for organization's sake, try naming the files by actor id
  #                           
  # example:
  #          when 3
  #              return ["easy","normal","hard","boss"]
  #=======================================================================
  def self.start_battlecry(id)
    case id
    when 1
      return ["Actor001-easyBattle", "Actor001-normalBattle",
              "Actor001-desperateBattle", "Actor001-bossBattle"]
    when 2
       return ["Actor002-easyBattle", "Actor002-normalBattle",
              "Actor002-desperateBattle", "Actor002-bossBattle"]
    else
      return nil
    end
  end
 
  #=======================================================================
  # victory_battlecry: to add a new actor's set of battlecries to the
  #                  listing, create a "when" clause for the actor's id
  #                  and the return value to an array, configured as follows.
  # array config: ["highHP_win", "normalHP_win", "lowHP_win"]
  #                the values in "" are the names of the sound files.
  #                ALL SOUND FILES MUST BE PLACED IN 'AUDIO/Battlecry'
  #               
  # Suggestion: for organization's sake, try naming the files by actor id
  #                           
  # example:
  #          when 3
  #              return ["high","normal","hurting"]
  #=======================================================================
  def self.victory_battlecry(id)
    case id
    when 1
      return ["Actor001-bestWin","Actor001-normWin","Actor001-lowWin"]
    when 2
      return ["Actor002-bestWin","Actor002-normWin","Actor002-lowWin"]
    else
      return nil
    end
  end
 
end

#=======================================================================
# DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING
#=======================================================================
class Game_Troop < Game_Unit
  def id
    return @troop_id
  end
end

class Scene_Battle < Scene_Base
 
  alias :old_start :start
  def start
    old_start
    @id = $game_party.members[rand($game_party.members.size)]
    if NAMKCOR.bosses($game_troop.id) == true
      @type = 3
    else
      if (@id.level + NAMKCOR.battle_range) <= NAMKCOR.troop_level($game_troop.id)
        @type = 2
      elsif (@id.level - NAMKCOR.battle_range) >= NAMKCOR.troop_level($game_troop.id)
        @type = 0
      else
        @type = 1
      end
    end
    @bcArray = NAMKCOR.start_battlecry(@id.id)
    if @bcArray != nil
        if @bcArray[@type] != nil
          Audio.se_play("Audio/Battlecry/" + @bcArray[@type], NAMKCOR.volume, 0)
        end
    end
  end

  alias :old_victory :process_victory
  def process_victory
    @hp_percent = (@active_battler.hp / @active_battler.maxhp) * 100
    if @hp_percent < NAMKCOR.mid_hp
      @hp_state = 2
    elsif @hp_percent > NAMKCOR.high_hp
      @hp_state = 1
    else
      @hp_state = 0
    end
    @bcArray = NAMKCOR.victory_battlecry(@active_battler.id)
    if @bcArray != nil
        if @bcArray[@hp_state] != nil
          Audio.se_play("Audio/Battlecry/" + @bcArray[@hp_state], NAMKCOR.volume, 0)
        end
    end
    old_victory
  end
end
Credit


  • NAMKCOR

Thanks

  • Ghero for requesting the script

Support


for support, contact me at Rockman922@hotmail.com, or PM me here on RMRK.

Known Compatibility Issues

no known compatibility issues.

Demo


Sendspace (Outdated, please use the script from this thread)

Author's Notes


heh, this was my first script for XP and now it's my first for VX.
Irony ;8

Restrictions

This script is not to be posted on any website aside from RMRK and Chaos Project.
This script is ONLY to be used in non-commercial projects.
and please, credit me for writing it.
I'd love links to games that use it as well :)

« Last Edit: February 08, 2012, 07:01:48 PM by NAMKCOR »

FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Good stuff NAM, I hope to see more of your stuff for VX :)

EDIT::

I've tried it out. It's pretty cool the amount of customization you've given the script. I always get tired when I'm making the customization stuff and so a lot of my stuff that should be customizable ends up hard coded. Anyway, good work.
« Last Edit: September 27, 2008, 11:10:13 PM by modern algebra »

pokeball PMGOffline
**
Rep: +0/-0Level 81
just played the demo and it seems to play the "lowWin" even when the only damage taken was 4HP

**
Rep:
Level 63
RMRK Junior
hi i dont know about scripting but this is cool, have to say it does crash due the lack of sounds, i dont know if im doing something wrong

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Change the sounds to ones you do have. There is a configuration section starting around line 135. It looks like:

Code: [Select]
  #=======================================================================
  # start_battlecry: to add a new actor's set of battlecries to the
  #                  listing, create a "when" clause for the actor's id
  #                  and the return value to an array, configured as follows.
  # array config: ["easy_battle_se", "normal_battle_se", "hard_battle_se",
  #                "boss_battle_se"]
  #                the values in "" are the names of the sound files.
  #                ALL SOUND FILES MUST BE PLACED IN 'AUDIO/Battlecry'
  #               
  # Suggestion: for organization's sake, try naming the files by actor id
  #                           
  # example:
  #          when 3
  #              return ["easy","normal","hard","boss"]
  #=======================================================================
  def self.start_battlecry(id)
    case id
    when 1
      return ["Actor001-easyBattle", "Actor001-normalBattle",
              "Actor001-desperateBattle", "Actor001-bossBattle"]
    when 2
       return ["Actor002-easyBattle", "Actor002-normalBattle",
              "Actor002-desperateBattle", "Actor002-bossBattle"]
    else
      return nil
    end
  end

**
Rep:
Level 63
RMRK Junior
i did it and is not working, i have the sounds in Audio/Battlecry named by actor's ID as suggested and this is my config so far...sorry i dont know how to it in a box, and thanks for the fast reply
#=======================================================================
  # start_battlecry: to add a new actor's set of battlecries to the
  #                  listing, create a "when" clause for the actor's id
  #                  and the return value to an array, configured as follows.
  # array config: ["easy_battle_se", "normal_battle_se", "hard_battle_se",
  #                "boss_battle_se"]
  #                the values in "" are the names of the sound files.
  #                ALL SOUND FILES MUST BE PLACED IN 'AUDIO/Battlecry'
  #               
  # Suggestion: for organization's sake, try naming the files by actor id
  #                           
  # example:
  #          when 3
  #              return ["easy","normal","hard","boss"]
  #=======================================================================
  def self.start_battlecry(id)
    case id
    when 9
      return ["Actor009-easyBattle", "Actor009-normalBattle",
              "Actor009-desperateBattle", "Actor009-bossBattle"]
    when 10
       return ["Actor010-easyBattle", "Actor010-normalBattle",
              "Actor010-desperateBattle", "Actor010-bossBattle"]
    else
      return nil
    end
  end
 
  #=======================================================================
  # victory_battlecry: to add a new actor's set of battlecries to the
  #                  listing, create a "when" clause for the actor's id
  #                  and the return value to an array, configured as follows.
  # array config: ["highHP_win", "normalHP_win", "lowHP_win"]
  #                the values in "" are the names of the sound files.
  #                ALL SOUND FILES MUST BE PLACED IN 'AUDIO/Battlecry'
  #               
  # Suggestion: for organization's sake, try naming the files by actor id
  #                           
  # example:
  #          when 3
  #              return ["high","normal","hurting"]
  #=======================================================================
  def self.victory_battlecry(id)
    case id
    when 9
      return ["Actor009-bestWin","Actor009-normWin","Actor009-lowWin"]
    when 10
      return ["Actor010-bestWin","Actor010-normWin","Actor010-lowWin"]
    else
      return nil
    end
  end
 
end
« Last Edit: December 08, 2011, 02:32:43 AM by acuarion »

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
well, upload your project and I will take a look. It's a file missing error, so it might be something to do with format or naming, but I can't tell just by looking at the script.

**
Rep:
Level 63
RMRK Junior
ok ill do it in few min, this is my first week using this type of program so i will appreciate any constructive feedback :) i think it may be some confilcts with the scripts im using, i dont know a thing about scripts :D
« Last Edit: December 08, 2011, 03:23:09 AM by acuarion »

**
Rep:
Level 63
RMRK Junior
well, it seem im a new in this of posting too ^_^ i tried 2 times to upload my project and when the load was completed my page turned out as a new post page...nothing attached :S....

in other hand i find out what my problem is, it seem you need to have battlecries set for all party members or the game will crash, i did a couple of test an all of them were the same, when i have a full party game crashes if the voices are not set for each member, wich is kind of a pain for me cuz im planning to use a 6 members party and eventually some temp party members...... seems im gonna have to set voices for everyone T_T

**
Rep:
Level 83
Hello.  From the looks of this, this script is almost exactly what I'm looking for.  I was curious though, and wanted to ask, if there are any plans on adding features such as attacking, being attacked, using skills/items, when HP gets critical in battle, sound effects for each character?  I have found a similar script that does what I am looking for, however it isn't compatible with the Tankentai atb side view battle script.

I just thought I would ask.  Not sure if the script creator still checks on this thread or has any plans on doing any additions or not.  Can't hurt to ask.  Thanks  :zwink:

**
Rep:
Level 63
RMRK Junior
well i dont know if they are going to add damage/hit configurations or something like that, but for skills what im doing is, editing the skills animations and adding the voice i want, is kind of a lot of work because if for example you have 3 char using fire you gonna have to copy/paste 3 fires animation and add the voices you want for each char,  but at least is something :) im only doing with the signature skills of  my characters though, i dont wanna crazy with that

**
Rep:
Level 62
Shou Akuma Chimera
omg them necro

Well i always run into the same problem over and over again, at some point the script starts error either at the start of the battle or at the end

the error i get is as follows:

Script 'Battlecry VX' line 205: NoMethodError occured.

undefined method `[]' for nil:NilClass

*
*crack*
Rep:
Level 64
2012 Best Newbie2012 Most Unsung MemberFor frequently finding and reporting spam and spam bots
Quote
the error i get is as follows:

Script 'Battlecry VX' line 205: NoMethodError occured.

undefined method `[]' for nil:NilClass

Alright so after just testing, it does the same for me when I am loading from a previously saved game.

It runs fine after starting a completely new game.


Have you done this and are you still getting this error?
All of my scripts are totally free to use for commercial use. You don't need to ask me for permission. I'm too lazy to update every single script post I ever made with this addendum. So ignore whatever "rule" I posted there. :)

All scripts can be found at: https://pastebin.com/u/diamondandplatinum3

**
Rep:
Level 62
Shou Akuma Chimera
Yes i'm in the middle of Testing the Scripts, i didn't really start with the Game itself yet XD i first want the scripts to work.

*
*crack*
Rep:
Level 64
2012 Best Newbie2012 Most Unsung MemberFor frequently finding and reporting spam and spam bots
Are you using custom audio?

Or did you use the ones included with the demo like I did?
(cause I'm too lazy to make my own right now)
All of my scripts are totally free to use for commercial use. You don't need to ask me for permission. I'm too lazy to update every single script post I ever made with this addendum. So ignore whatever "rule" I posted there. :)

All scripts can be found at: https://pastebin.com/u/diamondandplatinum3

**
Rep:
Level 62
Shou Akuma Chimera
i use custom ones but they're named exactly like the one the script calls for (Copy&Paste).

*
*crack*
Rep:
Level 64
2012 Best Newbie2012 Most Unsung MemberFor frequently finding and reporting spam and spam bots
Well if they've got the exact same name as the demo, then there shouldn't be a problem.

And it looks like something that I will actually need to look at before I can solve it.

Any chance you could put your script and audio files in a new project and upload it somewhere, so I can take a look?
All of my scripts are totally free to use for commercial use. You don't need to ask me for permission. I'm too lazy to update every single script post I ever made with this addendum. So ignore whatever "rule" I posted there. :)

All scripts can be found at: https://pastebin.com/u/diamondandplatinum3

**
Rep:
Level 62
Shou Akuma Chimera
urrr so all scripts and Audio files into a new project?

i just had made a little bit of effort in getting the Start to work, but it Errored at the end of the battle again...

These Nil errors are annoying me

*
*crack*
Rep:
Level 64
2012 Best Newbie2012 Most Unsung MemberFor frequently finding and reporting spam and spam bots
No, just Battlecry VX and the custom audio files you're using for it.

Before sending it to me, test it out in your new project and see if it works.

If it does, then another script could be the problem.

If it still gets an error, then upload it somewhere for me.
All of my scripts are totally free to use for commercial use. You don't need to ask me for permission. I'm too lazy to update every single script post I ever made with this addendum. So ignore whatever "rule" I posted there. :)

All scripts can be found at: https://pastebin.com/u/diamondandplatinum3

**
Rep:
Level 62
Shou Akuma Chimera
AH STUPID ME

since i have two actors with the same name (powered up scene planned) i typed the Wrong ID so the Actor in the party wasn't in the script ><

i should've doublechecked that ._.
i figured that out when the Error in the new project changed from that Nil Error to ''Sound: Actor002_normalbattle not found'' ><

i thought the script doesn't check the other teammates and only plays sounds assigned to the partylead xD

**
Rep:
Level 63
RMRK Junior
well yes, the scrip checks every members of the team, and if you dont have sounds assigned to each of them the game will give you an error, just make sure to have all the sounds for all your team members in the script and it should be fine :)

:-\ thats a pain though if you have a lot of team members like i do.....i have 8 members and imagine my pain assigning diferent sounds for all of them :)

********
Hungry
Rep:
Level 96
Mawbeast
2013 Best ArtistParticipant - GIAW 11Secret Santa 2013 ParticipantFor the great victory in the Breakfast War.2012 Best Game Creator (Non-RM Programs)~Bronze - GIAW 9Project of the Month winner for December 2009Project of the Month winner for August 20082011 Best Game Creator (Non RM)Gold - GIAW Halloween
I thought I had that taken into account, weird.
I programmed if the hpState was nil, but not if the actor id sounds were nil.

It should be fixed now.

Hello.  From the looks of this, this script is almost exactly what I'm looking for.  I was curious though, and wanted to ask, if there are any plans on adding features such as attacking, being attacked, using skills/items, when HP gets critical in battle, sound effects for each character?  I have found a similar script that does what I am looking for, however it isn't compatible with the Tankentai atb side view battle script.

I just thought I would ask.  Not sure if the script creator still checks on this thread or has any plans on doing any additions or not.  Can't hurt to ask.  Thanks  :zwink:

I don't know if you're still around but I don't really intend to update the script with more features, I don't use RPG Maker anymore really.
« Last Edit: February 08, 2012, 06:59:47 PM by NAMKCOR »

FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

***
Rep:
Level 69
RESIDENT ADONKADONK
Very useful indeed! I imagine it isn't that hard to edit.
EDIT: What's up with the signature type thing?
« Last Edit: February 11, 2012, 02:28:09 PM by Adon »

I'm back.

**
Rep:
Level 62
Shou Akuma Chimera
well yes, the scrip checks every members of the team, and if you dont have sounds assigned to each of them the game will give you an error, just make sure to have all the sounds for all your team members in the script and it should be fine :)

:-\ thats a pain though if you have a lot of team members like i do.....i have 8 members and imagine my pain assigning diferent sounds for all of them :)

42 Actors, and about 22 i had to assign voices to...
this Game will take more time to get all them scripts and Actors to work than actually working on the storyline..... XD