[XP] Chaos Rage Limit System

Started by Blizzard, January 09, 2008, 03:47:55 pm

Previous topic - Next topic

Blizzard

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

JmLyan

February 05, 2011, 05:23:44 am #301 Last Edit: February 05, 2011, 05:52:31 am by Blizzard
The game over screen simply shows up when any actor is killed.

Here's the script with all modification done to it (in case that's the problem).

*SCRIPT REMOVED, IT'S TOO LONG*

EDIT: I fixed it now, I had left the Chaos Drive state ID at 1 (the KO state).

Blizzard

Lol, alright then.
Please don't double post but use the "Modify" button instead.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

TJ01

I`m not sure, if I`m just a idiot, or if I`ve got the only RTAB System which is not compatible with any scripts, or both...
When I use this script, I get two errors.
One, if a battler attacks, and an other if a character uses a rage/limit/chaos skill.
The first Error:
Spoiler: ShowHide

The second Error:
Spoiler: ShowHide

My RTAB System:
Spoiler: ShowHide
http://www.fileden.com/files/2008/10/3/2126590/Files/RPGMaker/RMXP/Scripts/Other%20Eastern/Cogwheel/RTAB%20116%20-%20e.doc

Blizzard

1. Don't use old save files.
2. Make sure your scripts are in the right order.
3. Make sure you have set up everything right. RTAB is a nasty piece of code and (as you already said) incompatible with everything.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

TJ01

What is the right order?
Should I put CRLS directly under the RTAB System, or under the add-on`s?

Blizzard

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Rose Guardian

Hi, did you change the code since the last up date? I using the Asan'Tear_Battle_System with CRSL Plug in and it won't give the second actor the chaos drive even though it is configured.  Please help me out here I want actor 1 and  2 to use the Chaos Drive.  I know I asked about this before  but now the problem is back and it won't give the second actor the chaos drive even though if it is configured in the script.

Blizzard

You probably just didn't configure it right. Post your configuration and I will take a quick look at it.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Rose Guardian

May 17, 2011, 04:42:42 pm #309 Last Edit: May 17, 2011, 04:44:18 pm by Rose Guardian
Okay here, let me know what I did wrong please.
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Chaos Rage Limit System (Chaos Drive, Soul Rage, Soul Limit) by Blizzard
# Version: 6.2b
# Type: Actor Transformation System, Enhanced Limit Break System
# Date 5.0: 7.7.2007
# Date 5.0b: 12.7.2007
# Date 5.3b: 24.9.2007
# Date 5.31b: 25.10.2007
# Date 5.32b: 10.12.2007
# Date 5.4b: 6.1.2008
# Date 5.5b: 22.1.2008
# Date 5.6b: 26.1.2008
# Date 5.7b: 17.2.2008
# Date 6.0b: 13.7.2008
# Date 6.01b: 28.7.2008
# Date 6.02b: 1.8.2008
# Date 6.03b: 14.8.2008
# Date 6.04b: 30.9.2008
# Date 6.1b: 13.12.2008
# Date 6.11b: 7.3.2009
# Date 6.12b: 8.3.2009
# Date 6.2b: 26.7.2009
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#  
#  This work is protected by the following license:
# #----------------------------------------------------------------------------
# #  
# #  Creative Commons - Attribution-NonCommercial-ShareAlike 3.0 Unported
# #  ( http://creativecommons.org/licenses/by-nc-sa/3.0/ )
# #  
# #  You are free:
# #  
# #  to Share - to copy, distribute and transmit the work
# #  to Remix - to adapt the work
# #  
# #  Under the following conditions:
# #  
# #  Attribution. You must attribute the work in the manner specified by the
# #  author or licensor (but not in any way that suggests that they endorse you
# #  or your use of the work).
# #  
# #  Noncommercial. You may not use this work for commercial purposes.
# #  
# #  Share alike. If you alter, transform, or build upon this work, you may
# #  distribute the resulting work only under the same or similar license to
# #  this one.
# #  
# #  - For any reuse or distribution, you must make clear to others the license
# #    terms of this work. The best way to do this is with a link to this web
# #    page.
# #  
# #  - Any of the above conditions can be waived if you get permission from the
# #    copyright holder.
# #  
# #  - Nothing in this license impairs or restricts the author's moral rights.
# #  
# #----------------------------------------------------------------------------
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
#   THIS SCRIPT MAY NOT BE USED BY PEOPLE WHO ARE MAINLY ACTIVE ON RMXP.ORG!!!
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# IMPORTANT NOTE:
#
#   This script allows the use of the "Soul Rage System" (SRS), the "Soul Limit
#   System" (SLS) and the "Chaos Drive System" (CDS) at the same time. Special
#   Thanks to GuardianAngelX72 for the idea for Chaos Drive.
#
#
# Compatibility:
#
#   98% compatible with SDK 1.x. 70% compatible with SDK 2.x. WILL corrupt your
#   old savegames. Can cause incompatibilty issues with following scripts
#   and/or systems:
#   - exotic CBS-es
#   - Limit Break systems
#   - Custom Equipment systems (i.e. 2 accessories) (can be EASILY merged)
#   - needs the 6.x version of the Scene_SoulRage add-on if you use one
#  
# RTAB specific Compatibility Issues and Notes:
#
#   - Compatible with RTAB 1.16 and a majority of the available plugins.
#   - COMPLETELY INCOMPATIBLE WITH CONNECTED ATTACKING!!! Remove Connected
#     Attacking and turn it off, otherwise you WILL experience bugs! Also
#     remove the Consume Items Patch for Connected Attacking if you have it!
#   - Disables LEFT/RIGHT selection of actors in battle, use Q/W instead.
#   - Seph's slant bars will be used when using the DRAW_SR_BAR option
#   - not compatible with Chaos Drive System yet, refrain from using it in RTAB
#
#
# Features:
#
#   - Chaos Drive, Soul Rage and Soul Limit Systems in one script
#   - configure your databases easily
#   - using Blizzard gradient styler 4.x with 7 different styles
#   - contains universal font fix, never ever "I can't see the letters"
#   - completely overworked all three systems
#   - compatible with Tons of Add-ons
#   - maximum compatibility with other scripts
#   - moving Chaos Drive/Soul Rage/Soul Limit command in defineable color and a
#     faster animated cursor
#
# SRS specific features:
#   - use multiple skills per equipment part
#   - SR % increase when you get attacked, use it to unleash SR skills
#   - cycle through available skills with LEFT/RIGHT
# SLS specific features:
#   - configure Soul Limit for each character separately
#   - using a limit can kill a character if you set it up that way
#   - use a different command than the actual SL skill name
#     (example: command name is "Bahamut", skill name is "Giga Flare")
# CDS specific features:
#   - replaces entire party with one Chaos Drive OR transforms only the actor
#     who is using the CD skill
#   - revert Chaos Drive anytime
#   - configurable conditions like in Soul Limit
#
# new in v5.3b:
#   - compatible with Multi-Hit from Tons of Add-ons v5.x and higher
#   - rewritten conditions using classic syntax to avoid RGSS conditioning bug
#   - added possiblities that status effect, armors and weapons can increase
#     the SRS_RATE for a character
#   - fixed a couple of bugs and glitches
#   - removed the barstyle plugin, please get the newest version of Tons of
#     Add-ons if you want to keep using the bars
#   - Chaos Drive Status Effect can now be named however you like, but you need
#     to configure it anyway
#   - improved coding
#
# new in v5.31b:
#   - fixed a slight bug that would never occur anyway
#   - now the global variable for compatibility contains the version of CRLS
#
# new in v5.32b:
#   - improved performance
#
# new in v5.4b:
#   - now it is possible to define actors who can use SRS/SLS/CDS and who can't
#   - other bugs were not fixed, I was too drunk to fix them at the time being
#
# new in v5.5b:
#   - fixed the bugs that were not fixed in the last version
#
# new in v5.6b:
#   - made easy renaming of the systems possible
#   - added SR_REVERSAL option
#   - decreased lag during the slide-from-the-right animation
#   - organized configuration a little bit better
#   - commented code
#
# new in v5.7b:
#   - now compatible with Item Requirement System from Tons of Add-ons
#
# new in v6.0b:
#   - now compatible with Guilamme777's Multi-Slot Equipment System
#   - now compatible with RTAB v1.16 + majority of plugins
#   - now compatible with Blizz-ABS v1.99 or higher (requires the additional
#     compatibility plugin)
#   - better coding
#
# new in v6.01b:
#   - fixed the bugs that occured at the end of battle
#
# new in v6.02b:
#   - added Chaos Drive state removal upon reversal for convenience and full
#     Blizz-ABS compatibility
#
# new in v6.03b:
#   - fixed bug when using a Soul Limit would take SR additionally to SP
#     instead of the real SR rate
#
# new in v6.04b:
#   - fixed updating issue with SDK 2.x
#
# new in v6.1b:
#   - improved customizability and compatibility with Blizz-ABS
#
# new in v6.11b:
#   - improved coding and customizability
#
# new in v6.12b:
#   - fixed an issue with RTAB
#
# new in v6.2b:
#   - now compatible with HP Consuming Skills from Tons of Add-ons
#
#
# General configuration:
#
#   DRAW_SR     - set this value to false if you don't want SR% display at all
#   DRAW_SR_BAR - set this value to false if you don't want an SR bar at all
#                 (does not work if you don't have a script for HP/SP/EXP bars)
#   SR_NAME     - this is the name of the SR % if you have SRS turned off
#   SR_ENABLED  - add any actor ID of actors who actually have the SR attribute
#                 drawn in battle
#   SR_REVERSAL - if you set this value to true, gaining HP will decrease SR
#   RTAB_ACTIVE - set this value to true if you are using RTAB v1.16 by Minkoff
#
#
# Instructions:
#
#                           ...::: Soul Rage :::...
#
# Explanation:
#
#   This script allows the player equipment to have built-in skills. If enemies
#   attack a character a value (the Soul Rage or SR) will increase. With a
#   certain ammount of SR it is possible to perform special skills that are
#   implemented into equipment. Soul Rage is similar to "Ikari skills" from
#   "Lufia 2 - Rise of the Sinistrals" for the SNES. Although, this script
#   provides the possiblity of using more skills with one equipment part with
#   several enhanced functionalities and allows using the SR value for more
#   than just Soul Rage (like for Soul Limit and/or Chaos Drive).
#
#
# Configuration:
#
#   Press CRTL+SHIFT+F and type into the window:
#   Soul Rage Database
#   You can jump now to the database directly. There are more instructions.
#   Also please configure the following global variable found below:
#
#   SRS_ACTIVE - set this value to false to disable Rage (if you do so you
#                don't need to configure ANYTHING CONNECTED to Soul Rage)
#                (Side-Note: It's pointless to disable both)
#   SRS_NAME   - the name displayed for the Soul Rage System
#   SRS_RATE   - set the filling rate of the SR, 1000 is standard, 500 is 2
#                times slower and 2000 would be 2 times faster
#   RAGE_COLOR - set the values in the () to numbers between 0-255, also note
#                that they determine the color ammount in the color like this
#                example: (RED, GREEN, BLUE, ALPHA) - note: alpha = opacity
#   SR_USERS   - add any actor ID of actors who can use SRS
#
#
# Additional info:
#
#   If you want to change the value of the SR % ingame use the "Call script"
#   event command and use this syntax:
#
#     $game_actors[X].sr = Y
#
#   X - ID of the hero in the database
#   Y - new value of the SR
#
#   You can also use another syntax:
#
#     $game_party.actors[X].sr = Y
#
#   X - position of the hero in the party
#   Y - new value of the SR
#
#   Note that X starts from 0 and NOT 1. The ammount is shown as 100,0%, this
#   is 1000 SR. i.e. 59,1% would be 591 SR.
#
#
# Note:
#
#   Using Soul Rage skills as normal skills is not recommended, because of the
#   SP/SR cost. It is better you create a different skill if you want to use it
#   as Soul Rage. But then again, you don't have to... In the other hand Soul
#   Limit skills can be used as normal skills without any problems.
#
#
#                           ...::: Soul Limit :::...
#
# Explanation:
#
#   Soul Limit is a special attack an actor can use if he has either low HP,
#   high SR, etc. It is an enhanced version of Limit Break / Overdrive, but
#   CONNECTED to the Soul Rage.
#
#
# Configuration:
#
#   SLS_ACTIVE -  set this value to false to disable Limit (if you do so you
#                 don't need to configure ANYTHING CONNECTED to Soul Limit)
#   LIMIT_COLOR - set the values in the () to numbers between 0-255, also
#                 note that they determine the color ammount in the color
#                 like this example: (RED, GREEN, BLUE, ALPHA)
#                 note: alpha = opacity
#   SL_USERS    - add any actor ID of actors who can use SLS
#
#   Press CRTL+SHIFT+F and type into the window:
#   Soul Limit / Chaos Drive Database
#
#
# Additional info:
#
#   Soul Limit is more superior than Limit Break as you can involve HP, SR and
#   even SP conditions as well as consuming. You can create a game where a
#   character can use his Limit skill as long as his HP are under 20% without
#   consuming any stats. (i.e. Final Fantasy VIII) or create a game where the
#   using of a Limit skill requires suicide just by setting the character's
#   @hp_consume value to 100.
#   If you want to change the Soul Limit skill ID and/or command ingame use the
#   "Call script" event command and use this syntax:
#
#     $game_actors[X].set_new_limit('NEW_NAME', ID)
#
#   X        - ID of the hero in the database and Y the ammount
#   NEW_NAME - the new name for the SL command
#   ID       - ID of the new SL skill in the database
#
#   You can also use another syntax:
#
#     $game_party.actors[Y].set_new_limit('NEW_NAME', ID)
#
#   Y        - postion of the hero in the party, starts from 0 (NOT 1!)
#   NEW_NAME - the new name for the SL command
#   ID       - ID of the new SL skill in the database
#
#
#                          ...::: Chaos Drive :::...
#
# Explanation:
#
#   This script will allow the player to use Chaos Drive when in critical
#   HP/SP/SR zone. Chaos Drive will transform the character into another and
#   remove the entire party from battle. If a Chaos Drive dies, his original
#   form will also die and the party will be brought back. Chaos Drives are
#   always full with HP and SP when they enter the battle.
#
#
# Configuration:
#
#   Press CRTL+SHIFT+F and type into the window:
#   START Chaos Drive Database
#   You can jump now to the database directly. There are more instructions.
#   Also please configure the following macros found below:
#
#   CDS_ACTIVE    - set this value to false to disable CD (if you do so you
#                   don't need to configure ANYTHING CONNECTED to Chaos Drive)
#   CDS_NAME      - the name displayed for the Chaos Drive System
#   REVERT_NAME   - the name displayed for the Revert command
#   CD_ID         - set this value to the state ID of Chaos Drive
#   CD_EXP_NORM   - set to true if the EXP/LVL of your Chaos Drives should be
#                   set to the same as their caller (a stronger caller would
#                   call a stronger version of the same Chaos Drive then)
#   REMOVE_PARTY  - set to true if you want the party to disappear when a CD is
#                   called, set to false if you only want replace the caller
#   MAX_PARTY     - set to the value of the maximum size of your party
#   CHAOS_COLOR   - set the values in the () to numbers between 0-255, also
#                   note that they determine the color ammount in the color
#                   like this
#                   example: (RED, GREEN, BLUE, ALPHA) - note: alpha = opacity
#   REVERT_COLOR  - set the values in the () to numbers between 0-255, also
#                   note that they determine the color ammount in the color
#                   like this
#                   example: (RED, GREEN, BLUE, ALPHA) - note: alpha = opacity
#   CONNECTED     - if you set this value to false, when a Chaos Drive dies,
#                   the caster will still be alive
#   STAY_DAMAGE   - if you set this value to true, Chaos Drives will not be
#                   healed when they are reverted, they will stay dead when
#                   they get killed and calling them will be impossible until
#                   they are revived (can be used for summoning systems), note
#                   that you might need special add-on to allow that
#   CD_USERS      - add any actor ID of actors who can use CDS
#
#   To add a new Chaos Drive to a characer use the "Call Script" event command
#   and use following syntax:
#
#     $game_actors[ID].learn_cd(CD)
#
#   To remove a Chaos Drive from a character use this syntax:
#
#     $game_actors[ID].forget_cd(CD)
#
#   ID - ID of the actor in the database
#   CD - ID of the Chaos Drive skill in the database
#  
#   Also create a status effect and set CD_ID to its ID in the database. Make
#   the skill target the user or you will get a bug. Add whatever animation you
#   want.
#
#
# Additional info:
#
#   You can use animations and common event calls (i.e. for enhanced
#   animations) for any CD skill. It is recommended that CD skills target the
#   user.
#
#
# Important note:
#
#   Chaos Drives are not normal skills and should be NOT used as such. Chaos
#   Drive skills as normal skills will not make a transformation happen. Do not
#   assign two different characters the same Chaos Drive character. If you want
#   them to access the same character, make a duplicate CD character in your
#   database.
#
#
# If you find any bugs, please report them here:
# http://forum.chaos-project.com
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

$crls = 6.2

#==============================================================================
# module BlizzCFG
#------------------------------------------------------------------------------
#  This module serves for configuration in my scripts and for consistency.
#==============================================================================

module BlizzCFG
 
 SR_KIND = 3
 SL_KIND = 9
 CD_KIND = 8
 
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Basic CRLS Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 DRAW_SR = true
 DRAW_SR_BAR = true
 SR_NAME = 'SR'
 SR_ENABLED = [1, 2, 3, 4, 5, 6, 7, 8]
 SR_REVERSAL = false
 RTAB_ACTIVE = false
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Basic CRLS Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Soul Rage Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 SRS_ACTIVE = true
 SRS_NAME = 'Soul Rage'
 SRS_RATE = 1000
 RAGE_COLOR = Color.new(255, 0, 0)
 SR_USERS = [1, 2, 3, 4, 5, 6, 7, 8]
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Soul Rage Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Soul Limit Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 SLS_ACTIVE = true
 LIMIT_COLOR = Color.new(0, 255, 0)
 SL_USERS = [1, 2, 3, 4, 5, 6, 7, 8]
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Soul Limit Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Chaos Drive Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 CDS_ACTIVE = true
 CDS_NAME = 'Chaos Drive'
 REVERT_NAME = 'Revert'
 CD_ID = 17
 CD_EXP_NORM = false
 REMOVE_PARTY = true
 MAX_PARTY = 4
 CHAOS_COLOR = Color.new(128, 64, 255)
 REVERT_COLOR = Color.new(255, 255, 255)
 CONNECTED = false
 STAY_DAMAGE = true
 CD_USERS = [1, 2, 3, 4, 5, 6, 7, 8]
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Chaos Drive Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

 def self.sr_database(equip_id, weapon = false)
   skill_ids = []
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Soul Rage Database
#
#   This is your equipment Soul Rage database. To add a new Soul Rage skill to
#   a weapon is very simple. Add another "when"-branch in the script snipplet
#   below (they have comments next to it). Configure it like this template:
#
#     when WEAPON_ID
#       skill_ids.push(SKILL_ID)
#       skill_ids.push(SKILL_ID)
#
#   The same works for armors:
#
#     when ARMOR_ID
#       skill_ids.push(SKILL_ID)
#       skill_ids.push(SKILL_ID)
#
#   WEAPON_ID - the ID of the weapon in your database
#   ARMOR_ID  - the ID of the armor in your database
#   SKILL_ID  - the ID of the skill in your database
#  
#   The lines are commented below so you should have no problems with the
#   script. To determine the percentage of Soul Rage consumed to use a skill,
#   set the SP to the percentage. e.g. 33SP would mean 33% of the Soul Rage
#   bar.
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   if weapon
     case equip_id # weapon IDs
     when 1
       skill_ids.push(1)
     when 6
       skill_ids.push(10)
       skill_ids.push(11)
       skill_ids.push(12)
     when 10
       skill_ids.push(8)
     end
   else
     case equip_id # armor IDs
     when 5
       skill_ids.push(1)
     when 17
       skill_ids.push(25)
     end
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Soul Rage Database
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   end
   return (skill_ids.size > 0 ? skill_ids : [0])
 end
 
 def self.sre_database(equip_id, weapon = false)
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Soul Rage Equipment Database
#
#   This is your Soul Rage Equipment database. Adding equipment IDs here will
#   cause them to increase or decrease the SRS_RATE if they are equipped. All
#   values are in %, that means a value of i.e. 20 will cause 20 more SR, two
#   values of 20 will cause 40, etc. Negative values will decrease the rate.
#   Configure it like this template:
#
#     when WEAPON_ID then return RATE
#
#   The same works for armors:
#
#     when ARMOR_ID then return RATE
#
#   WEAPON_ID - the ID of the weapon in your database
#   ARMOR_ID  - the ID of the armor in your database
#   RATE      - the increase/decrease rate
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   if weapon
     case equip_id # weapon IDs
     when 2 then return 5
     when 15 then return 5
     end
   else
     case equip_id # armor IDs
     when 3 then return 20
     when 13 then return 10
     end
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Soul Rage Database
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   end
   return 0
 end
 
 def self.srs_database(state_id)
   case state_id
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Soul Rage State Database
#
#   This is your Soul Rage State database. Adding status effect IDs here will
#   cause them to increase or decrease the SRS_RATE when they are inflicted.
#   All values are in %, that means a value of i.e. 20 will cause 20 more SR,
#   two values of 20 will cause 40, etc. Negative values will decrease the
#   rate. Configure it like this template:
#
#     when STATE_ID then return RATE
#
#   STATE_ID - the ID of the status effect in your database
#   RATE     - the increase/decrease rate
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   when 17 then return 10
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Soul Rage Database
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   end
   return 0
 end
 
 def self.cd_database(id)
   case id
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Chaos Drive Database
#
#   Use following template to connect Chaos Drive skills and their Chaos
#   Drives:
#
#     when SKILL_ID then return ACTOR_ID
#
#   SKILL_ID - the ID of the skill in your database
#   ACTOR_ID - the ID of the actor in your database
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   when 4 then return 8
   when 5 then return 6
   when 88 then return 7
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Chaos Drive Database
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   end
   return 0
 end
 
 def self.crls_database(id)
   case id
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Soul Limit / Chaos Drive Database
#
#   This is your Soul Limit/Chaos Drive Database. Below you can configure the
#   Special attack and the command name of the Soul Limit. You can also
#   configure the conditions that need to be met to allow the usage of Soul
#   Limit and Chaos Drive. Use following syntax to setup the Soul Limit for
#   each character:
#
#   when ACTOR_ID
#     limit_name = 'NAME'
#     limit_id = SKILL_ID
#     slsr_rate = VAL1
#     slhp_rate = VAL2
#     slsp_rate = VAL3
#     slsr_consume = VAL4
#     slhp_consume = VAL5
#     slsp_consume = VAL6
#     cdsr_rate = VAL7
#     cdhp_rate = VAL8
#     cdsp_rate = VAL9
#     cdsr_consume = VALa
#     cdhp_consume = VALb
#     cdsp_consume = VALc
#     allow_suicide = BOOL
#
#   ACTOR_ID - the ID of the character in the normal database
#   NAME     - the name the limit command should have
#   SKILL_ID - the ID of the Soul Limit skill in the normal database
#   VAL1     - minimum SR (in %) needed to make the Soul Limit skill available
#   VAL2     - maximum HP (in %) needed to make the Soul Limit skill available
#   VAL3     - maximum SP (in %) needed to make the Soul Limit skill available
#   VAL4     - SR (in %) cunsumed if Soul Limit is used
#   VAL5     - HP (in %) cunsumed if Soul Limit is used
#   VAL6     - SP (in %) cunsumed if Soul Limit is used
#   VAL7     - minimum SR (in %) needed to make the Chaos Drive skills available
#   VAL8     - maximum HP (in %) needed to make the Chaos Drive skills available
#   VAL9     - maximum SP (in %) needed to make the Chaos Drive skills available
#   VALa     - SR (in %) cunsumed if Chaos Drive is used
#   VALb     - HP (in %) cunsumed if Chaos Drive is used
#   VALc     - SP (in %) cunsumed if Chaos Drive is used
#   BOOL     - true or false
#
#   Example:
#  
#   when 2
#     limit_name = "Saturn Cannon"
#     limit_id = 101
#     slsr_rate = 80
#     slhp_rate = 50
#     slsp_rate = 100
#     slsr_consume = -10
#     slhp_consume = 10
#     slsp_consume = 50
#     cdsr_rate = 0
#     cdhp_rate = 10
#     cdsp_rate = 10
#     cdsr_consume = 0
#     cdhp_consume = 0
#     cdsp_consume = 10
#     allow_suicide = false
#
#  (let's say skill number 101 is called "Last Judgement")
#
#   Character number 2 needs minimum 80% SR, his HP must be less than or equal
#   to 50% and his SP must be less than or equal to 100% (in other words, SP
#   don't affect the availability of the SL skill of character number 2). If he
#   uses the Soul Limit command displayed as "Saturn Cannon", he will use the
#   skill "Last Judgement" (ID number 101). He will gain 10% of his maximum SR,
#   lose 10% of his maximum HP and lose 50% of his maximum SP. If his HP are
#   less than or equal to 10% he will not die, but his HP will only decrease to
#   1. Chaos drive can be used if the HP and SP are 10% or lower. If used, 10%
#   SP of the using actor will be consumed. If you are not using either SL or
#   CD, you can just skip configuring those numbers.
#
# Side-notes:
#  
#   The VAL values can be from 0 to 100 (since it is in %). Every value over
#   100 is automatically limited to 100. Negative values will cause stat
#   gaining instead of losing. (You can create skills, that heal the user AND
#   attack the enemies without a common event call). If you set the values
#   VAL1, VAL2 and/or VAL3 to a negative number, this character will have no
#   Soul Limit.
#
# Notes:
#  
#   - you have the possibility to i.e. set a command to "Bahamut", but the
#     actual skill name that will be displayed during its animation will be
#     "Giga Flare" (does not work in Blizz-ABS)
#   - to change a Soul Limit skill during the game read the instructions at the
#     beginning of the script
#   - do not set it up that way that the user dies from using a Chaos Drive. It
#     might bug your game. Best is to let using a CD skill not consume any HP.
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   when 1
     limit_name = "Devastator"
     limit_id = 79
     slsr_rate = 20
     slhp_rate = 50
     slsp_rate = 100
     slsr_consume = 20
     slhp_consume = 0
     slsp_consume = 0
     cdsr_rate = 0
     cdhp_rate = 100
     cdsp_rate = 100
     cdsr_consume = 0
     cdhp_consume = 0
     cdsp_consume = 0
     allow_suicide = false
   when 2
     limit_name = "Summon Proximus"
     limit_id = 80
     slsr_rate = 100
     slhp_rate = 100
     slsp_rate = 100
     slsr_consume = 20
     slhp_consume = 0
     slsp_consume = 0
     cdsr_rate = 20
     cdhp_rate = 100
     cdsp_rate = 100
     cdsr_consume = 100
     cdhp_consume = 0
     cdsp_consume = 0
     allow_suicide = true
 when 3
     limit_name = "Flare"
     limit_id = 80
     slsr_rate = 100
     slhp_rate = 100
     slsp_rate = 100
     slsr_consume = 20
     slhp_consume = 0
     slsp_consume = 0
     cdsr_rate = 20
     cdhp_rate = 100
     cdsp_rate = 100
     cdsr_consume = 100
     cdhp_consume = 0
     cdsp_consume = 0
     allow_suicide = true
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Soul Limit / Chaos Drive Database
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   else
     limit_name, allow_suicide = '', true
     slsr_rate = slhp_rate = slsp_rate = cdsr_rate = cdhp_rate = cdsp_rate = -1
     limit_id = slsr_consume = slhp_consume = slsp_consume = cdsr_consume =
     cdhp_consume = cdsp_consume = 0
   end
   return [limit_name, limit_id, slsr_rate, slhp_rate, slsp_rate,
           slsr_consume, slhp_consume, slsp_consume, cdsr_rate, cdhp_rate,
           cdsp_rate, cdsr_consume, cdhp_consume, cdsp_consume, allow_suicide]
 end

 def self.find_chaos(id)
   (1...$data_actors.size).each {|i|
       if $game_actors[i] != nil
         return $game_actors[i] if $game_actors[i].chaos_id == id
       end}
 end
 
end

#==============================================================================
# Game_System
#------------------------------------------------------------------------------
#  Enhanced with new variables.
#==============================================================================

class Game_System
 
 attr_accessor :chaos_party
 attr_accessor :bar_style
 attr_reader   :bar_opacity
 #----------------------------------------------------------------------------
 # override initialize
 #----------------------------------------------------------------------------
 alias init_crls_later initialize
 def initialize
   init_crls_later
   # adding helping variables
   @chaos_party = []
   BlizzCFG::MAX_PARTY.times {@chaos_party.push(0)} unless BlizzCFG::REMOVE_PARTY
 end
 #----------------------------------------------------------------------------
 # bar_opacity=
 #  alpha - new value
 #  Sets the new value of the bar opacity.
 #----------------------------------------------------------------------------
 def bar_opacity=(alpha)
   if alpha > 255
     @bar_opacity = 255
   elsif alpha < 0
     @bar_opacity = 0
   else
     @bar_opacity = alpha
   end
 end
 
end

#==============================================================================
# Game_Actor
#------------------------------------------------------------------------------
#  Enhanced with variables and methods to handle CRLS.
#==============================================================================

class Game_Actor

 attr_accessor :chaos_id
 attr_accessor :chaos_action
 attr_reader   :cd_skills
 attr_reader   :sr
 attr_reader   :limit_name
 attr_reader   :limit_id
 #----------------------------------------------------------------------------
 # override setup
 #  commands - new commands
 #  Sets a new list of skills and updates the display.
 #----------------------------------------------------------------------------
 alias setup_crls_later setup
 def setup(actor_id)
   setup_crls_later(actor_id)
   @cd_skills, @sr, @chaos_id, @chaos_action = [], 0, 0, 0
   @limit_name, @limit_id, @slsr_rate, @slhp_rate, @slsp_rate, @slsr_consume,
   @slhp_consume, @slsp_consume, @cdsr_rate, @cdhp_rate, @cdsp_rate,
   @cdsr_consume, @cdhp_consume, @cdsp_consume, @allow_suicide =
       BlizzCFG.crls_database(actor_id)
 end
 #----------------------------------------------------------------------------
 # sr=
 #  sr - new SR value
 #  Sets a new value of SR.
 #----------------------------------------------------------------------------
 def sr=(sr)
   if sr > 1000
     @sr = 1000
   elsif sr < 0
     @sr = 0
   else
     @sr = sr
   end
 end
 #----------------------------------------------------------------------------
 # set_new_limit
 #  name - new Soul Limit name
 #  id   - skill ID of the new Soul Limit skill
 #  Changes the Soul Limit of the actor.
 #----------------------------------------------------------------------------
 def set_new_limit(name, id)
   @limit_name, @limit_id = name, id
 end
 #----------------------------------------------------------------------------
 # learn_cd
 #  id - skill ID of the new Chaos Drive skill
 #  This method allows learning of CD skills. It is called by the user.
 #----------------------------------------------------------------------------
 def learn_cd(id)
   # if valid CD skill
   if id > 0 && !@cd_skills.include?(id)
     # learn and sort by skill ID
     @cd_skills.push(id)
     @cd_skills.sort!
     # teach the Chaos Drive character the skill as well
     actor_id = BlizzCFG.cd_database(id)
     $game_actors[actor_id].learn_cd(id) if self.id != actor_id
     return true
   end
   return false
 end
 #----------------------------------------------------------------------------
 # forget_cd
 #  id - skill ID of the Chaos Drive skill
 #  This method allows forgetting of CD skills. It is called by the user.
 #----------------------------------------------------------------------------
 def forget_cd(id)
   # forget the CD skill
   @cd_skills.delete(id)
   # the Chaos Drive character forgets the skill as well
   actor_id = BlizzCFG.cd_database(id)
   $game_actors[actor_id].forget_cd(id) if self.id != actor_id
   return true
 end
 #----------------------------------------------------------------------------
 # use_chaos
 #  id - skill ID of the Chaos Drive skill
 #  This method processes the use of a CD skill.
 #----------------------------------------------------------------------------
 def use_chaos(id)
   # get CD ID
   @chaos_id = BlizzCFG.cd_database(id)
   # stop if not a CD skill
   return if @chaos_id == 0
   # process extra configurations
   $game_actors[@chaos_id].exp = self.exp if BlizzCFG::CD_EXP_NORM
   $game_actors[@chaos_id].recover_all unless BlizzCFG::STAY_DAMAGE
   # if to remove the entire party
   if BlizzCFG::REMOVE_PARTY
     # change settings of actors
     $game_party.actors.each {|actor| actor.chaos_action = -1}
     $game_system.chaos_party = $game_party.actors
     # remove all actors
     $game_party.actors = []
     # add CD actor
     $game_party.add_actor(@chaos_id)
     # inflict CD state
     $game_party.actors[0].add_state(BlizzCFG::CD_ID)
   else
     # store original actor
     $game_system.chaos_party[self.index] = @id
     # replace with CD actor
     $game_party.actors[self.index] = $game_actors[@chaos_id]
     # inflict CD state
     $game_actors[@chaos_id].add_state(BlizzCFG::CD_ID)
     # change settings
     $game_actors[@chaos_id].chaos_action = @chaos_action = -1
   end
   # apply stat consumption
   last_sr = self.sr
   self.hp -= @cdhp_consume * self.maxhp / 100
   self.sp -= @cdsp_consume * self.maxsp / 100
   self.sr = last_sr - @cdsr_consume * 10
 end
 #----------------------------------------------------------------------------
 # revert_chaos
 #  This method processes the reverting from the Chaos Drive.
 #----------------------------------------------------------------------------
 def revert_chaos
   # remove Chaos Drive state
   remove_state(BlizzCFG::CD_ID)
   # if party was removed
   if BlizzCFG::REMOVE_PARTY
     # restore old party
     $game_party.actors = $game_system.chaos_party
     # remove all CD settings
     $game_party.actors.each {|actor| actor.chaos_action = -1}
     # delete temporary party storage
     $game_system.chaos_party = []
     # apply death if CONNECTED option used and died
     BlizzCFG.find_chaos(id).hp = 0 if BlizzCFG::CONNECTED && self.dead?
   else
     # delete actor from temporary storage
     $game_system.chaos_party[self.index] = 0
     # get original actor
     origin_actor = BlizzCFG.find_chaos(id)
     # add original actor back into party
     $game_party.actors[self.index] = origin_actor
     # apply death if CONNECTED option used and died
     origin_actor.hp = 0 if BlizzCFG::CONNECTED && self.dead?
     # remove CD setting
     origin_actor.chaos_action = @chaos_action = -1
   end
 end
 #----------------------------------------------------------------------------
 # sr_can_use?
 #  id - skill ID of SR skill
 #  This method tests whether an SR skill can be used.
 #----------------------------------------------------------------------------
 def sr_can_use?(id)
   left = sr_left(id)
   return (BlizzCFG::SRS_ACTIVE && item_req_test(id) && sr_left(id) != 0)
 end
 #----------------------------------------------------------------------------
 # sl_can_use?
 #  This method tests whether the SL skill can be used.
 #----------------------------------------------------------------------------
 def sl_can_use?
   return false if self.sr / 10 < @slsr_rate
   return false if 100 * self.hp / self.maxhp > @slhp_rate
   return false if 100 * self.sp / self.maxsp > @slsp_rate
   return (BlizzCFG::SLS_ACTIVE && item_req_test(@limit_id) && sl_left != 0)
 end
 #----------------------------------------------------------------------------
 # cd_can_use?
 #  This method tests whether any CD skill can be used.
 #----------------------------------------------------------------------------
 def cd_can_use?
   return false if self.sr / 10 < @cdsr_rate
   return false if 100 * self.hp / self.maxhp > @cdhp_rate
   return false if 100 * self.sp / self.maxsp > @cdsp_rate
   return (BlizzCFG::CDS_ACTIVE && !self.dead? && cd_left != 0)
 end
 #----------------------------------------------------------------------------
 # sr_left
 # id - ID of the SR skill
 #  Returns how many times this SR can be used.
 #----------------------------------------------------------------------------
 def sr_left(id)
   return -1 if $data_skills[id].sp_cost == 0
   return (self.sr / 10 / $data_skills[id].sp_cost)
 end
 #----------------------------------------------------------------------------
 # sl_left
 #  Returns how many times SL can be used.
 #----------------------------------------------------------------------------
 def sl_left
   return -1 if @slsr_consume == 0 && @slhp_consume == 0 && @slsp_consume == 0
   sl = [@slsr_consume == 0 ? -1 : self.sr / 10 / @slsr_consume,
       @slhp_consume == 0 ? -1 : 100 * self.hp / self.maxhp / @slhp_consume,
       @slsp_consume == 0 ? -1 : 100 * self.sp / self.maxsp / @slsp_consume]
   return (sl - [-1]).min
 end
 #----------------------------------------------------------------------------
 # cd_left
 #  Returns how many times CD can be used.
 #----------------------------------------------------------------------------
 def cd_left
   return -1 if @cdsr_consume == 0 && @cdhp_consume == 0 && @cdsp_consume == 0
   cd = [@cdsr_consume == 0 ? -1 : self.sr / 10 / @cdsr_consume,
       @cdhp_consume == 0 ? -1 : 100 * self.hp / self.maxhp / @cdhp_consume,
       @cdsp_consume == 0 ? -1 : 100 * self.sp / self.maxsp / @cdsp_consume]
   return (cd - [-1]).min
 end
 #----------------------------------------------------------------------------
 # item_req_test
 #  This method tests if the Item Requirement System exists and whether a
 #  special skill can be used depending on item consumption.
 #----------------------------------------------------------------------------
 def item_req_test(id)
   if $tons_version != nil && $tons_version >= 6.0 &&
       $game_system.ITEM_REQUIREMENT
     data = BlizzCFG.item_reqs(id)
     return ($game_party.item_number(data[0]) >= data[1])
   end
   return true
 end
 #----------------------------------------------------------------------------
 # override skill_can_use?
 #  id - skill ID
 #  This method was enhanced to disallow the usage of CD skills if the CD
 #  actor was killed previously.
 #----------------------------------------------------------------------------
 alias skill_can_use_crls_later? skill_can_use?
 def skill_can_use?(id)
   # if a CD skill
   if @cd_skills.include?(id)
     # can't use CD if required items not there
     return false if !item_req_test(id)
     # can use CD if STAY_DAMAGE is turned off
     return true unless BlizzCFG::STAY_DAMAGE
     # can use CD if Chaos Drive
     return true if @states.include?(BlizzCFG::CD_ID)
     # find the skill's corresponding CD actor
     id = BlizzCFG.cd_database(id)
     # can be used if skill onnfiguration exists and CD actor is not dead
     return (id != 0 && !$game_actors[id].dead?)
   end
   # normal result processing
   return skill_can_use_crls_later?(id)
 end
 #----------------------------------------------------------------------------
 # use_limit
 #  This method processes stat consumption of SL use.
 #----------------------------------------------------------------------------
 def use_limit
   last_sr = self.sr
   self.hp -= @slhp_consume * self.maxhp / 100
   self.hp = 1 if self.hp == 0 && !@allow_suicide
   self.sp -= @slsp_consume * self.maxsp / 100
   self.sr = last_sr - @slsr_consume * 10
 end
 #----------------------------------------------------------------------------
 # sr_text
 #  This method returns SR in a text format.
 #----------------------------------------------------------------------------
 def sr_text
   return "#{@sr/10}.#{@sr%10}%"
 end
 #----------------------------------------------------------------------------
 # sr_equipment
 #  Returns weapon and armor IDs for SR recognition.
 #----------------------------------------------------------------------------
 def sr_equipment
   # Guilamme777's Multi-Slot Equipment System Compatibility
   return self.weapon_ids, self.armor_ids if defined?(G7_MS_MOD)
   # normal weapons and armors
   return [@weapon_id], [@armor1_id, @armor2_id, @armor3_id, @armor4_id]
 end
 
end

#==============================================================================
# Game_Battler
#------------------------------------------------------------------------------
#  This class was enhanced with the capability to increase SR upon change of
#  HP.
#==============================================================================

class Game_Battler
   
 #----------------------------------------------------------------------------
 # override hp=
 #  val - new value
 #  This method processes SR change upon HP change with considering the added
 #  extra values from armors and states.
 #----------------------------------------------------------------------------
 alias hp_is_equal_to_crls_later hp=
 def hp=(val)
   # store old value
   last_hp = self.hp
   # call normal process
   hp_is_equal_to_crls_later(val)
   # if actor
   if self.is_a?(Game_Actor)
     # if dead
     if self.dead?
       # remove all SR
       self.sr = 0
     # if got damaged or SR_REVERSAL is turned on and got healed
     elsif self.hp < last_hp || BlizzCFG::SR_REVERSAL && self.hp > last_hp
       # initialize normal increase rate
       exrate = 100
       # add equipment rate change
       exrate += BlizzCFG.sre_database(@weapon_id, true)
       [@armor1_id, @armor2_id, @armor3_id, @armor4_id].each {|i|
           exrate += BlizzCFG.sre_database(i, false)}
       # add state rate change
       @states.each {|i| exrate += BlizzCFG.srs_database(i)}
       # change SR
       self.sr += (last_hp - self.hp) * BlizzCFG::SRS_RATE *
           exrate / [last_hp, self.hp].min / 100
     end
   end
 end

end

#==============================================================================
# Game_Party
#------------------------------------------------------------------------------
#  This class was changed to support direct access to the instance variable
#  actors.
#==============================================================================

class Game_Party

 attr_accessor :actors
 
end

#==============================================================================
# Spriteset_Battle
#------------------------------------------------------------------------------
#  This class was changed to be able to apply actor changes in the party during
#  CD use/reversal so it looks nice.
#==============================================================================

class Spriteset_Battle

 #----------------------------------------------------------------------------
 # update_actors
 #  flag - flag to change the display instantly or with fading
 #  This method processes sprite update.
 #----------------------------------------------------------------------------
 def update_actors(flag = false)
   # freeze display
   Graphics.freeze
   # for every actor
   @actor_sprites.each_index {|i|
       # set new actor
       actor = @actor_sprites[i].battler = $game_party.actors[i]
       # who exists and is about to change
       if actor != nil && actor.chaos_action == -1
         # remove old sprite
         @actor_sprites[i].dispose
         # load new sprite
         @actor_sprites[i] = Sprite_Battler.new(@viewport2)
         @actor_sprites[i].update
         # sprite setup
         @actor_sprites[i].battler, actor.chaos_action = actor, 0
       end}
   Graphics.transition((flag ? 0 : 20))
   Graphics.freeze
   update
   Graphics.transition((flag ? 0 : 20))
 end
 
end

#==============================================================================
# Window_Base
#------------------------------------------------------------------------------
#  This class was enhanced with a couple of methods for additional drawing.
#==============================================================================

class Window_Base
 
 #----------------------------------------------------------------------------
 # draw_actor_sr
 #  actor - the actor
 #  x     - x-coordinate
 #  y     - y-coordinate
 #  width - maximal allowed width
 #  This method draws the SR attribute.
 #----------------------------------------------------------------------------
 def draw_actor_sr(actor, x, y, w = 144)
   w = 120 if !$scene.is_a?(Scene_Menu) && !BlizzCFG::RTAB_ACTIVE
   self.contents.font.color = system_color
   self.contents.draw_text(x, y-16, width, 64, BlizzCFG::SR_NAME)
   self.contents.font.color = normal_color
   self.contents.draw_text(x, y, w, 32, actor.sr_text, 2)
 end
 #----------------------------------------------------------------------------
 # draw_actor_sr_with_bar
 #  actor - the actor
 #  x     - x-coordinate
 #  y     - y-coordinate
 #  width - maximal allowed width
 #  This method draws the bar of the SR attribute.
 #----------------------------------------------------------------------------
 def draw_actor_sr_with_bar(actor, x, y, w = 148)
   w -= 12
   rate = actor.sr.to_f / 1000
   # SR bar colors
   color1 = Color.new(80, 0, 0, 192)
   color2 = Color.new(240, 0, 0, 192)
   color3 = Color.new(80, 0, 0, 192)
   # if using RTAB
   if BlizzCFG::RTAB_ACTIVE
     # set colors full opaque
     color1.alpha = color2.alpha = 255
     # draw Seph's megaslow and laggy bar
     draw_slant_bar(x, y + 12, actor.sr, 1000, w, 6, color1, color2)
   else
     # draw the bar
     self.contents.gradient_bar(x, y, w, color1, color2, color3, rate)
   end
   # draw the text
   if $scene.is_a?(Scene_Battle)
     draw_actor_sr(actor, x, y, w)
   else
     draw_actor_sr(actor, x, y)
   end
 end
 #----------------------------------------------------------------------------
 # draw_item_name_srs
 #  item  - the item
 #  x     - x-coordinate
 #  y     - y-coordinate
 #  color - text color
 #  This method draw the equipment part's name in the given color. It is used
 #  by the SRS window.
 #----------------------------------------------------------------------------
 def draw_item_name_srs(item, x, y, color)
   # stop if item doesn't exist
   return if item == nil
   opacity = self.contents.font.color == normal_color ? 255 : 128
   # cache icon
   bitmap = RPG::Cache.icon(item.icon_name)
   # draw icon
   self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
   self.contents.font.color = color
   # draw item name
   self.contents.draw_text(x + 28, y, 288, 32, item.name)
 end
 
end

#====================================[\code]

Blizzard

I am not sure that you have configured the CD part right. Did you teach the appropriate skills using cd_learn to the actors? Have you made sure that conditions for CD are set properly?
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Rose Guardian

Yes I did that.  I just now figured it out. It turned out that the skills had to have same values as the first skill in that part of the script. Thank you for trying to help though.

Rose Guardian

Sorry for the double post but is there away to make the Choas Drive character level up along with the characters that can change into them?

Blizzard

There is an option for that. It's called CD_EXP_NORM.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Rose Guardian