The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: Blizzard on September 18, 2006, 12:07:37 PM

Title: [MISSING] Soul Rage System + Soul Limit System v4.4b
Post by: Blizzard on September 18, 2006, 12:07:37 PM
lol, gone
Title: Re: Soul Rage System + Soul Limit System v4.0b
Post by: thingy on September 23, 2006, 02:46:31 PM
which lines of it do I need to remove to get just the limit system and the bars, none of the extra skills with gear stuff cuz I don't want to go through all of that and make a million different items have skills attached to them
Title: Re: Soul Rage System + Soul Limit System v4.0b
Post by: Blizzard on September 25, 2006, 10:59:51 AM
You can use SephirothSpawn´s Limit Break if you don´t want Soul Rage.
Title: Re: Soul Rage System + Soul Limit System v4.0b
Post by: Winged on October 04, 2006, 07:54:57 AM
SephriothSwpan's Limit Break is more of an "Overdrive" script abd takes up more room, besides, going on low HP to be able to use the skill is much more fun! I would rather just the Limit System but if its not possiable, its still fine by me  ;D

~Winged
Title: Re: Soul Rage System + Soul Limit System v4.0b
Post by: Nightwolf on October 04, 2006, 11:13:34 AM
I said it once im saying it again

YOUR GOOD!
Title: Re: Soul Rage System + Soul Limit System v4.0b
Post by: Blizzard on October 04, 2006, 01:18:16 PM
I guess I should release a 5.0 version with the possbility to use either SRS, SLS or both. :)
Title: Re: Soul Rage System + Soul Limit System v4.0b
Post by: Winged on October 04, 2006, 02:21:44 PM
I'm right behind ya all the way! I can't wait, and the community would LOVE it (Like some FF8 fans)  ;D

~Winged
Title: Re: Soul Rage System + Soul Limit System v4.0b
Post by: thingy on October 04, 2006, 08:23:58 PM
I'm right behind ya all the way! I can't wait, and the community would LOVE it (Like some FF8 fans)  ;D

~Winged
limits were from FF7 first.... the games came out in order of number
(also FF8 was way to easy)
Title: Re: Soul Rage System + Soul Limit System v4.0b
Post by: Winged on October 05, 2006, 12:01:15 AM
I'm right behind ya all the way! I can't wait, and the community would LOVE it (Like some FF8 fans)  ;D

~Winged
limits were from FF7 first.... the games came out in order of number
(also FF8 was way to easy)


Yea, I know. But here, its impossiable to find an FF7 game round here (the oldest one would be 2 which has a PC re-make, but if its without remakes then 8) so I didn't really know how their limit system worked.

~Winged
Title: Re: Soul Rage System + Soul Limit System v4.0b
Post by: oneray on October 24, 2006, 11:28:34 PM
Please help, I don't understand the SR DATABASE part, when i have to press control+shift+f. Do I press in the script window(finds the line that says press control+....) or in the event window? Please help!
Title: Re: Soul Rage System + Soul Limit System v4.0b
Post by: thingy on October 24, 2006, 11:49:41 PM
this event doesn't require any messing around with other events so dunno what ur talking about
Title: Re: Soul Rage System + Soul Limit System v4.0b
Post by: Blizzard on October 25, 2006, 11:38:58 AM
Just like he said. It has nothing to do with the event. If you press CTRL+SHIFT+F in the scripts editor, there will pop up a small window. Just write SR DATABASE in it and press ENTER. It will directly lead you to the database of SR skills.
Title: Re: Soul Rage System + Soul Limit System v4.0b
Post by: oneray on October 25, 2006, 08:46:22 PM
THXs. I might have so more questions so you be on the edge of your seat.

EDIT: K, i got a question. How do i give my weapon the ability to use soul rage?
Title: Re: Soul Rage System + Soul Limit System v4.0b
Post by: Blizzard on October 26, 2006, 12:10:54 PM
Everything is explained in the instructions:

Code: [Select]
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
#
# START SR 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(SOULRAGE_SKILL_ID)
#   skill_ids.push(SOULRAGE_SKILL_ID)
#
# The same works for armors:
#
# when ARMOR_ID
#   skill_ids.push(SOULRAGE_SKILL_ID)
#   skill_ids.push(SOULRAGE_SKILL_ID)
#
# 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 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 6
        skill_ids.push(1)
      when 18
        skill_ids.push(25)
      end
 
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END SR Database
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

For example this here

Code: [Select]
...
    if weapon
      case equip_id # weapon IDs
      when 6
        skill_ids.push(10)
        skill_ids.push(11)
        skill_ids.push(12)
...

will give the weapon with ID number 6 in your database the skills with the ID numbers 10, 11 and 12.
Title: Re: Soul Rage System + Soul Limit System v4.0b
Post by: oneray on October 26, 2006, 08:40:00 PM
OMG! Some times i want to just give up Rpg Maker XP, but the show must go on. I fixed and understood how to use Soul Rage. So i copied the script from a game (made a new game to test it to see if it would work) and pasted it in my game (seeds of life). But then this error window popped up when i was going to battle: ?????'Soul Rage'?745???NoMethodError???? undefined method 'clear' for NilClass. This didn't happen when i tested it. I just want to tell you that i have already put in an ATB script (the one with bars and you have wait until your bar is fill to attack). Please help!
Title: Re: Soul Rage System + Soul Limit System v4.0b
Post by: Blizzard on October 27, 2006, 02:59:30 PM
You don't need to post new topics on that matter.

The problem is that SR is for the default battle system. Somebody needs to make it compatible/merge with the ATB script. I have seen the ATB code (AWFUL CODING!) and it doesn't work like the normal battle system, so Soul Rage can't be used directly with it.
Title: Re: Soul Rage System + Soul Limit System v4.0b
Post by: The Mystical One on October 27, 2006, 03:51:29 PM
Assuming you mean cogwheel's ATB, my God, yes.  It is awful to work with.  I was going to try to make a version of the soul rage that works with it, but the frustration level  is high.
Title: Re: Soul Rage System + Soul Limit System v4.0b
Post by: oneray on October 27, 2006, 08:27:24 PM
I was so damn pissed that i got rid of my ATB script and now the Soul Rage works fine! THXs man! ;D
Title: Re: Soul Rage System + Soul Limit System v4.0b
Post by: XPhater on November 02, 2006, 01:20:21 AM
This script is way awesome Blizzard!  Even a total noob like myself can paste it in and figure it out.

I do have one question though.  Is it possible to make it so that a character's own attacks generate an amount of SR?  It looks like their SR only goes up when the characters get hit, and I'd like them to have a small influence on their own meter uppage.

(Edit) Had font size issues but supernoob (me) figured it out! :)
Title: Re: Soul Rage System + Soul Limit System v4.0b
Post by: Doctor Professor Nikolai on November 02, 2006, 01:26:37 AM
I might use for my game  :)
Title: Re: Soul Rage System + Soul Limit System v4.0b
Post by: XPhater on November 02, 2006, 03:41:46 AM
Ok as I've been playing around with this I did think of a few more things.  I'm going to use your Soul Rage script for physical attacks such as cross cuts and stuff, and use the default SP for magic spells and such.  I want to have a shield skill "Buffet" that I made attached to the shields, but I only want one particular character to gain the skill from them.

If Pookie wields Shield of Uberness, he gets buffet.

If Blarga wields Shield of Uberness, she doesn't get buffet.

Reason being Pookie is a trained defensive master, and Blarga, while capable of wearing a shield, isn't skilled enough to utilize it as effectively.

I don't know anything about scripting, but shouldn't it be possible to put a line at the front of some of the SR definitions that is basically a branch statement saying "if character03" then proceed with the SR definitions for that character as usual?

Another thing is would it be possible to set a regular skill that costs 0 SP, and calls a common event that calls a script to provide an SR increase?  I'm thinking of using the Soul Limit as a "Draw" of sorts for the characters' SR.

Finally (last question I promise)  ;D would it be possible to have a common event so that after battles, SR is reset to 0.0%?

(Edit) Possible bug.  On line 200:

$ALLOW_LIMIT = true # set to false to disable Limit

If I set it to false I get an error message when starting the game up on line 220:

get_limits(actor_id)
Title: Re: Soul Rage System + Soul Limit System v4.0b
Post by: Blizzard on November 02, 2006, 04:47:41 PM
Replace it with

Code: [Select]
get_limit(actor_id) if $ALLOW_LIMIT

To make SR reset after battle, make a common event, make it parallel process, turn on the appropriate switch ingame and just use a call script command with this code:

Code: [Select]
for actor in $game_party.actors
  actor.sr = 0
end

Making it possible using SR only for certain character needs some scripting, yes. Sadly, I'm too short of time to do it, sorry.

And that with the skill that draws SR is possible, sure. Just like you said, let it call a common event and use the syntax to increase the SR mentioned in the instructions.

To make attacks generate SR, you need just another little mod of the script. Add this to Game_Battler

Code: [Select]
alias attack_effect_srs_later attack_effect
def attack_effect(attacker)
  if attack_effect_srs_later(attacker)
    attacker.sr += 80 if attacker.is_a?(Game_Actor)
    return true
  end
  return false
end

Of course you can change 80 to whatever number you want.
Title: Re: Soul Rage System + Soul Limit System v4.0b
Post by: XPhater on November 02, 2006, 05:24:40 PM
Code: [Select]
alias attack_effect_srs_later attack_effect
def attack_effect(attacker)
  if attack_effect_srs_later(attacker)
    attacker.sr += 80 if attacker.is_a?(Game_Actor)
    return true
  end
  return false
end

I tried this and whenever the first character or monster attacks I get an error that says line 399 stack limit is too deep.  Funny thing is, this happens no matter where in Game Battler I place the code.  The error is always on line 399.

Quote
Making it possible using SR only for certain character needs some scripting, yes. Sadly, I'm too short of time to do it, sorry.

That's certainly understandable.  This should be easy enough to work around with more weapon variety among characters.  Thanks man!
Title: Re: Soul Rage System + Soul Limit System v4.0b
Post by: Blizzard on November 02, 2006, 05:29:48 PM
Oops, my bad. >.< Should be:

Code: [Select]
alias attack_effect_srs_later2 attack_effect
def attack_effect(attacker)
  if attack_effect_srs_later2(attacker)
    attacker.sr += 80 if attacker.is_a?(Game_Actor)
    return true
  end
  return false
end
Title: Re: Soul Rage System + Soul Limit System v4.0b
Post by: XPhater on November 02, 2006, 05:33:04 PM
Perfect, it works great now.  You're getting mentioned ingame here too (assuming it ever gets finished!)
Title: Re: Soul Rage System + Soul Limit System v4.0b
Post by: Blizzard on November 02, 2006, 07:16:06 PM
That's cool, thanks. ;D
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: Blizzard on November 04, 2006, 02:16:37 AM
Updated the code. You can now either disable Soul Rage or Soul Limit or just use both. :)
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: Indignos on November 04, 2006, 02:33:31 AM
I just looked at the code. It's nice, man, very awesome!
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: XPhater on November 05, 2006, 04:54:29 PM
Quote
# $game_actors[X].sr = Y
#
# - X is the ID of the hero in the database
# - Y is the new value of the SR

I have a soul limit that increases the SR of party members.  It sets their SR to the value of Y.  Is there a way to make it ADD the value of Y to their existing SR?
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: Blizzard on November 05, 2006, 05:31:19 PM
Either

Code: [Select]
$game_actors[X].sr = $game_actors[X].sr + Y

or

Code: [Select]
$game_actors[X].sr += Y
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: XPhater on November 05, 2006, 06:51:22 PM
The second one worked.  I actually fiddled around with similar statements, thinking that adding a + or replacing the = with a + might work, but I put the + after the = and not before it.

Progress is starting to come along nicely now thanks to your scripts.  I'd gotten bored with gamemaking for a while and this has got me all inspired and stuff.
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: Blizzard on November 06, 2006, 02:14:10 PM
Nice to hear that. ;D Then keep up working on your game. :)
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: nevfx on November 30, 2006, 04:05:41 PM
This is a wicked script. It works fine and I understand it(finally), so I can make some pretty good moves.
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: Karo Rushe on December 16, 2006, 03:58:54 AM
I came to say if there's a way to fix a sorta problem, The Bar for Soul-Rage/Limit doesn't appear when I have the bars from the Ad-Ons. Sorta thought to say that if theres a way to fix it. =]
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: Blizzard on December 17, 2006, 12:32:41 PM
Delete the code for the bars from the SR script. It goes from

Code: [Select]
if BAR_STYLES

to the double end:

Code: [Select]
end
end

Thing is that this code is still version 3.0 while the one in the add-ons is 4.0.
Removing this part should make it work.
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: Karo Rushe on December 18, 2006, 03:27:22 AM
Done. but I get the "Sintax Error" whenever I start the game <sigh>

So I left the Bar's style in Flase, where The "Menu" Glitch/bug is fixed I still don't get the Soul-Charge/Limit/Rage Bar. <sigh>
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: Blizzard on December 18, 2006, 04:57:39 PM
You need to remove the code including the line I posted and both ends. Are you sure, you have removed all of them? Also have you tried to set the constant BAR_STLYES to false?
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: Karo Rushe on December 18, 2006, 10:12:09 PM
You need to remove the code including the line I posted and both ends. Are you sure, you have removed all of them? Also have you tried to set the constant BAR_STLYES to false?
Bar Styles set to false, and removed the codes, all of it...Yet no bars. =/ <sigh>
Title: Normal Skills to Weapons
Post by: oneray on December 19, 2006, 02:30:10 AM
Um...I am wondering how to add normal skills with weapons. Yes, I have followed that code and I know that there is a problem with the SP precentage thing. I was wondering, have you fixed that and can you tell me how to fix it thxs.
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: Blizzard on December 19, 2006, 05:40:52 PM
What exactly is wrong? You can add skills to weapons that work like SR skills. Can you be more specific?

Bar Styles set to false, and removed the codes, all of it...Yet no bars. =/ <sigh>

I can't fix it right now, but attach your Scripts.rxdata to a post and I will fix it as soon as possible. Or some other scripter if he finds the time and mood to do it.
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: oneray on December 20, 2006, 01:25:06 AM
K, totally disregard my last question, I fixed it, but I have a new one ;D. I added a skill to my weapon but when ever I use it, there is no animation or damage. Why is this?
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: Karo Rushe on December 21, 2006, 01:41:15 AM
When you have the Time & Mood:

Code: [Select]
#==============================================================================
# Soul Rage System + Soul Limit System by Blizzard
# Version: 4.2b
# Date: 08.09.2006
# Date v4.2: 3.11.2006
#
#
# Compatibility:
#
# 99% chance of full compatibility with SDK, not tested altough. 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 4.0b version of the Scene_SoulRage add-on if you use one
#
# Complexity:
# - average to high
#
# Special knowledge REQUIRED:
# - reading long and boring instructions
#
# Special knowledge RECOMMENED:
# - using the "Call script" event command
#
#
# Features:
#
# - configure your database easily
# - optional gradient bar drawing with 2 different styles
# - contains universal font fix, never ever "I can´t see the letters"
# - use multiple skills per equipment part
# - new Soul Limit add-on (you can configure it or not use it at all)
# - configure Soul Limit for each character
#
# v4.2:
#
# - 5 new barstyles
# - option to disable Soul Rage
#
# Advantages compared to older versions:
#
# - shorter code
# - maximized compatibilty
# - configurable gradient script
# - moving Soul Rage command in defineable color and a faster animated cursor
# - moving Soul Limit command in defineable color and a faster animated cursor
# - defineable gradient style
# - extremly simple gradient script, also possible to use it to display other
#   stats like HP, SP, EXP, etc.
# - cycle through Soul Rage skills with LEFT/RGIHT
# - Soul Limit now configurable for each character
#
#
# 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 be increased. With
# a certain ammount of SR it is possible to perform special skills, that are
# implemented into equipment. Sould Rage is also known as "Ikari skill" from
# "Lufia 2 - Rise of the Sinistrals" for the SNES.
#
# - NEW in v3.0:
# Additional to ordinary SR skills, it is now possible to bound more than only
# one skill to an equipment part with overall.
#
# - NEW in v4.0:
# No $sr_element anymore. Also now there is a possibility of using a super
# skill (Soul Limit skill) if certain conditions are met. You can configure
# what conditions needs to be met for each character and what stats are going
# to be consumed
#
#
# - Configuration:
# Press CRTL+SHIFT+F and type into the window: SR DATABASE
# You can jump now to the database directly. There are more instructions.
# Also please configure the following global variable found below:
#
# ALLOW_RAGE - 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_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
#
# DRAW_BAR - set this value to false if you don´t want an SR bar at all
# $bar_style - set it from 0 to 6 to use one out of seven bar styles
# $bar_opaccity - set it from 0 to 255 to define the bar's opacity
# BAR_STYLES - set this value to false to use another bar script;
#              DO NOT SET THIS VALUE TO FALSE IF DRAW_BAR IS TRUE AND YOU DON'T
#              HAVE A SEPARATE BAR SCRIPT!
#
# Additional info:
#
# If you want to change the value of the SR bar ingame use the "Call script"
# event command and use this syntax:
#
# $game_actors[X].sr = Y
#
# - X is the ID of the hero in the database
# - Y is the new value of the SR
#
# You can also use another syntax:
#
# $game_party.actors[X].sr = Y
#
# - X is the position of the hero in the party
# - Y is the 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.
# If you are upgrading your script from version 2.0 or lower, be sure to apply
# the new SR skill database format.
#
# Also if you want to use my gradient script, it is the class called "Bitmap"
#
#
# ...::: Soul Limit :::...
#
# Soul Limit is a special attack an actor can use if he has either low HP, high
# SR, etc. You can compare Soul Limit to a sort of Limit Break / Overdrive,
# but connected to the Soul Rage. Configure the Limit part below like in this
# template:
#
# ALLOW_LIMIT - 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
#
# @limit_name - the name of the command that will be displayed as Soul Limit
#               regardless of the Soul Limit skill name
# @limit_id - the Soul Limit skill ID in the normal database
# @min_sr_rate - how much SR (in %) is minimal needed for Limit to be available
#                (set to 0 to disable this condition)
# @max_hp_rate - how much HP (in %) is maximal needed for Limit to be available
#                (set to 100 to disable this condition)
# @max_sp_rat - how much SP(%) is maximal needed for Limit to be available
#                (set to 100 to disable this condition)
# @sr_consume - how much SR(%) will be consumed if Limit is used
#               (set to 0 to disable the consuming of this stat)
# @hp_consume - how much HP(%) will be consumed if Limit is used
#               (set to 0 to disable the consuming of this stat)
# @sp_consume - how much SP(%) will be consumed if Limit is used
#               (set to 0 to disable the consuming of this stat)
# @allow_suicide - set this value to false if you don´t want that a character
#                  can die when using Limit, because of decreasing the HP
#
# The database can be found by pressing CTRL+F and typing Limit 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("STRING", ID)
#
# - X is the ID of the hero in the database and Y the ammount
# - STRING is the new name for the SL command
# - ID is the ID of the new SL skill in the database
#
# You can also use another syntax:
#
# $game_party.actors[X].set_new_limit("STRING", ID)
#
# X is the postion of the hero in the party. Note that X starts from 0 (NOT 1)!
#
# Note:
# Using Soul Rage skills as normal skills is not recommened, 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.
#
#
# If you find any bugs, please report them here:
# http://www.chaosproject.co.nr/index.php?showtopic=54
# or send me an e-mail:
# boris_blizzard@yahoo.de
#
#==============================================================================

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Soul Rage Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

ALLOW_RAGE = true # set to false to disable Soul Rage
SRS_rate = 1000 # SR bar fill rate
RAGE_COLOR = Color.new(240, 0, 0, 255) # Color of the SR command (R, G, B, A)

DRAW_BAR = true # set to "true" if you want a bar else set it to "false"
$bar_style = 5 # SR bar drawing style (from 0 to 6)
$bar_opacity = 255 # SR bar opacity (from 0 to 255)
BAR_STYLES = false # set to "false" if you want to use another bar script

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Soul Rage Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Soul Limit Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

ALLOW_LIMIT = true # set to false to disable Soul Limit
LIMIT_COLOR = Color.new(0, 240, 0, 255) # Color of the SL command (R, G, B, A)

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Soul Limit Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

#==============================================================================
# Game_Actor
#==============================================================================

class Game_Actor < Game_Battler

  attr_reader :sr
  attr_reader :limit_name
  attr_reader :limit_id
 
  alias setup_srs_later setup   
  def setup(actor_id)
    setup_srs_later(actor_id)
    get_limits(actor_id) if ALLOW_LIMIT
    @sr = 0
  end

  def sr=(sr)
    @sr = sr
    @sr = 1000 if @sr > 1000
    @sr = 0 if @sr < 0
  end
 
  def can_use_sr?(id)
    return ($data_skills[id].sp_cost <= self.sr / 10)
  end

  if ALLOW_LIMIT
   
  def get_limits(id)
    case id
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
#
# START Soul Limit Database
#
# This is your Soul Limit Database. Below you can configure the Special attack
# and the command name of the Soul Limit.
# Use following syntax to setup the Soul Limit for each character:
#
#  when ACTOR_ID
#    @limit_name = "STRING"
#    @limit_id = SKILL_ID
#    @sr_rate, @hp_rate, @sp_rate = VAL1, VAL2, VAL3
#    @sr_consume, @hp_consume, @sp_consume = VAL4, VAL5, VAL6
#    @allow_suicide = EXPR
#
# ACTOR_ID - the ID of the character in the normal database
# STRING - the name the 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
# EXPR - true or false
#
# Example:
#
#  when 2
#    @limit_name = "Saturn Cannon"
#    @limit_id = 101
#    @sr_rate, @hp_rate, @sp_rate = 80, 50, 100
#    @sr_consume, @hp_consume, @sp_consume = -10, 10, 50
#    @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.
#
# 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 "Mega Flare"
# - to change a Soul Limit skill during the game read the instructions at the
#   beginning of the script
#
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 
    when 1
      @limit_name = "Final Judgment"
      @limit_id = 81
      @sr_rate, @hp_rate, @sp_rate = 100, 100, 100
      @sr_consume, @hp_consume, @sp_consume = 100, 0, 0
      @allow_suicide = true
    when 2
      @limit_name = "Absolute-Zero"
      @limit_id = 82
      @sr_rate, @hp_rate, @sp_rate = 100, 100, 100
      @sr_consume, @hp_consume, @sp_consume = 20, 100, 0
      @allow_suicide = true
    when 3
      @limit_name = "Torrential Tribute"
      @limit_id = 83
      @sr_rate, @hp_rate, @sp_rate = 80, 80, 50
      @sr_consume, @hp_consume, @sp_consume = 20, 100, 50
      @allow_suicide = false
    when 4
      @limit_name = "Unlimited Blade's Work"
      @limit_id = 84
      @sr_rate, @hp_rate, @sp_rate = 100, 100, 80
      @sr_consume, @hp_consume, @sp_consume = 50, 0, -50
      @allow_suicide = true
    when 5
      @limit_name = "Holy Explosion"
      @limit_id = 85
      @sr_rate, @hp_rate, @sp_rate = 100, 100, 100
      @sr_consume, @hp_consume, @sp_consume = -20, 20, -20
      @allow_suicide = true
    when 6
      @limit_name = "Terra Blaster"
      @limit_id = 86
      @sr_rate, @hp_rate, @sp_rate = 100, 100, 100
      @sr_consume, @hp_consume, @sp_consume = 100, 0, 0
      @allow_suicide = true
    when 7
      @limit_name = "Swords of Light"
      @limit_id = 87
      @sr_rate, @hp_rate, @sp_rate = 100, 100, 100
      @sr_consume, @hp_consume, @sp_consume = 100, 0, 0
      @allow_suicide = true
    when 8
      @limit_name = "None"
      @limit_id = 88
      @sr_rate, @hp_rate, @sp_rate = 100, 100, 100
      @sr_consume, @hp_consume, @sp_consume = 100, 0, 0
      @allow_suicide = true
     
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Soul Limit Database
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    else
      @limit_name = ""
      @limit_id = 1
      @sr_rate, @hp_rate, @sp_rate = -1, -1, -1
      @sr_consume, @hp_consume, @sp_consume = 0, 0, 0
      @allow_suicide = true
    end
  end

  def can_use_limit?
    return (self.sr / 10 >= @sr_rate and
        100 * self.hp / self.maxhp <= @hp_rate and
        100 * self.sp / self.maxsp <= @sp_rate)
  end
 
  def use_limit
    self.sr -= @sr_consume * 10
    self.hp -= @hp_consume * self.maxhp / 100
    self.hp = 1 if self.hp == 0 and not @allow_suicide
    self.sp -= @sp_consume * self.maxsp / 100
  end
 
  def set_new_limit(name, id)
    @limit_name = name
    @limit_id = id
  end
 
  end
 
end
 
#==============================================================================
# Game_Battler
#==============================================================================

class Game_Battler
   
  alias attack_effect_srs_later attack_effect
  def attack_effect(attacker)
    last_hp = self.hp
    save = attack_effect_srs_later(attacker)
    if self.damage.is_a?(Numeric) and self.damage > 0 and
        self.is_a?(Game_Actor) and self.hp != 0
      self.sr += self.damage * SRS_rate / last_hp
    end
    self.sr = 0 if self.is_a?(Game_Actor) and self.dead?
    return save
  end 
   
  alias skill_effect_srs_later skill_effect
  def skill_effect(user, skill)
    last_hp = self.hp
    save = skill_effect_srs_later(user, skill)
    if self.damage.is_a?(Numeric) and self.damage > 0 and
        self.is_a?(Game_Actor) and self.hp != 0
      self.sr += self.damage * SRS_rate / last_hp
    end
    self.sr = 0 if self.is_a?(Game_Actor) and self.dead?
    return save
  end

end

#==============================================================================
# Bitmap
#==============================================================================
#==============================================================================
# Window_Base
#==============================================================================

class Window_Base < Window
 
  def draw_actor_sr_no_bar(actor, x, y, width = 144)
    self.contents.font.color = normal_color
    width = 120 unless $scene.is_a?(Scene_Menu)
    sr_text = (actor.sr/10).to_s + "," + (actor.sr%10).to_s + "%"
    self.contents.draw_text(x, y, width, 32, sr_text, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y-16, width, 64, "SR", 0)
  end
 
  def draw_actor_sr(actor, x, y, w = 148)
    w -= 12
    rate = actor.sr.to_f / 1000
    color1 = Color.new(80, 0, 0, 192)
    color2 = Color.new(240, 0, 0, 192)
    color3 = Color.new(80, 0, 0, 192)
    self.contents.gradient_bar(x, y, w, color1, color2, color3, rate)
    if $scene.is_a?(Scene_Battle)
      draw_actor_sr_no_bar(actor, x, y, w)
    else
      draw_actor_sr_no_bar(actor, x, y)
    end
  end

  def draw_item_name2(item, x, y, color)
    return if item == nil
    opacity = self.contents.font.color == normal_color ? 255 : 128
    bitmap = RPG::Cache.icon(item.icon_name)
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
    self.contents.font.color = color
    self.contents.draw_text(x + 28, y, 288, 32, item.name)
  end
 
end

#==============================================================================
# Window_SoulRage
#==============================================================================

class Window_SoulRage < Window_Selectable

  attr_accessor :index
  attr_accessor :index0
  attr_accessor :index1
  attr_accessor :index2
  attr_accessor :index3
  attr_accessor :index4
 
  def initialize(actor)
    super(0, 128, 640, 384)
    x = 0
    y = 0
    @skill_ids = [[0], [0], [0], [0], [0]]
    @column_max = 1
    @actor = actor
    @index = 0
    @alt_index = [0, 0, 0, 0, 0]
    refresh
    @index = 0
    if $game_temp.in_battle
      self.y = 64
      self.height = 256
      self.back_opacity = 160
    end
  end
 
  def update_actor(actor)
    @actor = actor
    refresh 
  end
 
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    if @actor != nil
      @item_max = 5
      self.contents = Bitmap.new(width - 42, row_max * 42)
      if $fontface != nil
        self.contents.font.name = $fontface
      elsif $defaultfonttype != nil
        self.contents.font.name = $defaultfonttype
      end
      self.contents.font.size = 24
      for i in 0...5
        draw_item(i)
      end
    end
  end
 
  def draw_item(index)
    y = index * 42
    case index
    when 0
      equip = $data_weapons[@actor.weapon_id]
      @skill_ids[0] = database(@actor.weapon_id, true)
    when 1
      equip = $data_armors[@actor.armor1_id]
      @skill_ids[1] = database(@actor.armor1_id)
    when 2
      equip = $data_armors[@actor.armor2_id]
      @skill_ids[2] = database(@actor.armor2_id)
    when 3
      equip = $data_armors[@actor.armor3_id]
      @skill_ids[3] = database(@actor.armor3_id)
    when 4
      equip = $data_armors[@actor.armor4_id]
      @skill_ids[4] = database(@actor.armor4_id)
    end
    id = @skill_ids[index][@alt_index[index]]
    skill = $data_skills[id] if id != 0
    if skill != nil
      if @actor.can_use_sr?(skill.id)
        self.contents.font.color = normal_color
      else
        self.contents.font.color = disabled_color
      end
      rect = Rect.new(x, y, self.width / @column_max - 42, 42)
      self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
      bitmap = RPG::Cache.icon(skill.icon_name)
      opacity = self.contents.font.color == normal_color ? 255 : 128
      self.contents.blt(x+300, y+8, bitmap, Rect.new(0, 0, 24, 24), opacity)
      self.contents.draw_text(x+300 + 28, y, 204, 42, skill.name, 0)
      unless skill.sp_cost == 0
        self.contents.draw_text(x+300 + 216, y, 64, 42, skill.sp_cost.to_s + "%", 2)
      end
      if @skill_ids[index].size > 1
        self.contents.draw_text(x+300 - 16, y, 32, 42, "«")
        self.contents.draw_text(x+300 + 264, y, 32, 42, "»", 2)
      end
    else
      self.contents.font.color = disabled_color
      self.contents.draw_text(x+300 + 28, y, 204, 42, "not available", 0)
    end
    if id == 0
      color = disabled_color
    else
      color = disabled_color
      color = normal_color if @actor.can_use_sr?(id)
    end
    if @actor.equippable?(equip)
      draw_item_name2(equip, x+4, y+4, color)
    else
      self.contents.font.color = disabled_color
      self.contents.draw_text(x, y, 288, 42, "Nothing equipped")
    end
  end
 
  alias upd_srs_later update
  def update
    upd_srs_later
    size = @skill_ids[@index].size
    if Input.trigger?(Input::RIGHT)
      old_index = @alt_index[@index]
      @alt_index[@index] = (@alt_index[@index] + 1) % size
      if old_index != @alt_index[@index]
        $game_system.se_play($data_system.cursor_se)
      end
      refresh
      return
    end
    if Input.trigger?(Input::LEFT)
      old_index = @alt_index[@index]
      @alt_index[@index] = (@alt_index[@index] + size - 1) % size
      if old_index != @alt_index[@index]
        $game_system.se_play($data_system.cursor_se)
      end
      refresh
      return
    end
  end
 
  def top_row
    return self.oy / 42
  end
 
  def top_row=(row)
    row = 0 if row < 0
    row = row_max - 1 if row > row_max - 1
    self.oy = row * 42
  end
 
  def page_row_max
    return (self.height - 42) / 42
  end
 
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
      return
    end
    row = @index / @column_max
    self.top_row = row if row < self.top_row
    if row > self.top_row + (self.page_row_max - 1)
      self.top_row = row - (self.page_row_max - 1)
    end
    cursor_width = self.width / @column_max - 42
    x = @index % @column_max * (cursor_width + 42)
    y = @index / @column_max * 42 - self.oy
    self.cursor_rect.set(x, y, cursor_width, 42)
  end
 
  def update_help
    @help_window.set_text(self.skill == nil ? "" : self.skill.description)
  end
 
  def skill
    id = @skill_ids[@index][@alt_index[@index]]
    return $data_skills[id] if id != 0
  end
 
  def database(equip_id, weapon = false)
    skill_ids = []
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
#
# START SR 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(SOULRAGE_SKILL_ID)
#   skill_ids.push(SOULRAGE_SKILL_ID)
#
# The same works for armors:
#
# when ARMOR_ID
#   skill_ids.push(SOULRAGE_SKILL_ID)
#   skill_ids.push(SOULRAGE_SKILL_ID)
#
# 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(89)
        skill_ids.push(7)
      when 10
        skill_ids.push(8)
      end
   else
      case equip_id # armor IDs
      when 6
        skill_ids.push(1)
      when 18
        skill_ids.push(25)
      end
 
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END SR Database
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    end
    return skill_ids if skill_ids.size > 0
    return [0]
  end
 
end

#==============================================================================
# Window_BattleStatus
#==============================================================================

class Window_BattleStatus < Window_Base

  def refresh
    self.contents.clear
    if $fontface != nil
      self.contents.font.name = $fontface
    elsif $defaultfonttype != nil
      self.contents.font.name = $defaultfonttype
    end
    self.contents.font.size = 24
    @item_max = $game_party.actors.size
    for i in 0...$game_party.actors.size
      actor = $game_party.actors[i]
      actor_x = i * 160 + 4
      draw_actor_name(actor, actor_x, -8)
      draw_actor_hp(actor, actor_x, 14, 120)
      draw_actor_sp(actor, actor_x, 44, 120)
      draw_actor_sr(actor, actor_x, 74, 120) if DRAW_BAR == true
      draw_actor_sr_no_bar(actor, actor_x, 74, 120) if DRAW_BAR == false
      if @level_up_flags[i]
        self.contents.font.color = normal_color
        self.contents.draw_text(actor_x, 100, 120, 32, "LEVEL UP!")
      else
        draw_actor_state(actor, actor_x, 100)
      end
    end
  end
 
end

#==============================================================================
# Window_Command
#==============================================================================

class Window_Command < Window_Selectable
 
  attr_accessor :commands
  attr_accessor :actor
 
  alias initialize_srs_later initialize
  def initialize(width, commands)
    initialize_srs_later(width, commands)
    @SRcommand = "Soul Rage"
  end
 
  def set_player_command
    @Limitcommand = @actor.limit_name if @commands[0] != @actor.limit_name
    refresh
  end
 
  def swap_commands
    temp = @commands[1]
    @commands[1] = @SRcommand
    @SRcommand = temp
    refresh
  end
 
  def swap_commands_2
    if @commands[0] == @actor.limit_name or @Limitcommand == @actor.limit_name
      temp = @commands[0]
      @commands[0] = @Limitcommand
      @Limitcommand = temp
      refresh
    end
  end
 
  alias refresh_srs_later refresh
  def refresh
    if $fontface != nil
      self.contents.font.name = $fontface
    elsif $defaultfonttype != nil
      self.contents.font.name = $defaultfonttype
    end
    self.contents.font.size = 24
    if @actor != nil and ALLOW_LIMIT and @commands[0] == @actor.limit_name
      for j in 0...6
        self.contents.clear
        self.contents.font.color = LIMIT_COLOR
        rect = Rect.new(164 - j * 32, 0, self.contents.width - 8, 32)
        self.contents.draw_text(rect, @commands[0])
        self.contents.font.color = normal_color
        for i in 0...@item_max
          unless @commands[i] == @actor.limit_name
            draw_item(i, normal_color)
          end
        end
        if $scene.is_a?(Scene_Battle) and ALLOW_RAGE
          self.contents.font.size += 4
          self.contents.font.color = normal_color
          self.contents.draw_text(0, 31, width - 32, 32, "›› ", 2)
          self.contents.font.size -= 4
        end
        Graphics.update
      end
    elsif ALLOW_RAGE and @commands[1] == "Soul Rage"
      for j in 0...6
        self.contents.clear
        self.contents.font.color = RAGE_COLOR
        rect = Rect.new(164 - j * 32, 32, self.contents.width - 8, 32)
        self.contents.draw_text(rect, @commands[1])
        self.contents.font.color = normal_color
        for i in 0...@item_max
          unless @commands[i] == "Soul Rage"
            draw_item(i, normal_color)
          end
        end
        if ALLOW_LIMIT and $scene.is_a?(Scene_Battle) and @actor != nil and
            @actor.can_use_limit?
          self.contents.font.size += 4
          self.contents.font.color = normal_color
          self.contents.draw_text(0, -1, width - 32, 32, "›› ", 2)
          self.contents.font.size -= 4
        end
        Graphics.update
      end
    else
      refresh_srs_later
      if $scene.is_a?(Scene_Battle)
        if ALLOW_RAGE
          self.contents.font.size += 4
          self.contents.font.color = normal_color
          self.contents.draw_text(0, 31, width - 32, 32, "›› ", 2)
          self.contents.font.size -= 4
        end
        if ALLOW_LIMIT and @actor != nil and @actor.can_use_limit?
          self.contents.font.size += 4
          self.contents.font.color = normal_color
          self.contents.draw_text(0, -1, width - 32, 32, "›› ", 2)
          self.contents.font.size -= 4
        end
      end
    end
  end
 
  def test_limit
    return (@actor != nil and @actor.can_use_limit? and @index == 0)
  end
 
end

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

class Scene_Battle
 
  alias main_srs_later main
  def main
    main_srs_later
    @rage_window.dispose if @rage_window != nil
  end
   
  alias phase3_setup_command_window_srs_later phase3_setup_command_window
  def phase3_setup_command_window
    phase3_setup_command_window_srs_later
    @actor_command_window.actor = @active_battler
    @actor_command_window.set_player_command
  end
 
  alias update_phase3_srs_later update_phase3
  def update_phase3
    if @rage_window != nil and @rage_window.visible
      @rage_window.update
      update_phase3_rage_select
      return
    end
    update_phase3_srs_later
  end
 
  alias update_phase3_enemy_select_srs_later update_phase3_enemy_select
  def update_phase3_enemy_select
    if Input.trigger?(Input::B)
      end_rage_select_plus
    end
    update_phase3_enemy_select_srs_later
  end

  alias update_phase3_actor_select_srs_later update_phase3_actor_select
  def update_phase3_actor_select
    if Input.trigger?(Input::B)
      end_rage_select_plus
    end
    update_phase3_actor_select_srs_later
  end

  alias phase3_next_actor_srs_later phase3_next_actor
  def phase3_next_actor
    end_rage_select if @rage_window != nil
    phase3_next_actor_srs_later
  end

  def update_phase3_rage_select
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      end_rage_select if @rage_window.visible
      return
    end
    if Input.trigger?(Input::C)
      @skill = @rage_window.skill
      if @skill == nil or not @active_battler.can_use_sr?(@skill.id)
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      $game_system.se_play($data_system.decision_se)
      @active_battler.current_action.skill_id = @skill.id
      @rage_window.visible = false
      if @skill.scope == 1
        start_enemy_select
      elsif @skill.scope == 3 or @skill.scope == 5
        start_actor_select
      else
        phase3_next_actor
      end
      return
    end
  end
 
  def start_rage_select
    @rage_window = Window_SoulRage.new(@active_battler)
    @rage_window.help_window = @help_window
    @actor_command_window.active = false
    @actor_command_window.visible = false
  end
 
  def end_rage_select
    end_rage_select_plus
    @actor_command_window.swap_commands
    @rage_window.dispose
    @rage_window = nil
    @help_window.visible = false
  end
 
  def end_rage_select_plus
    if @rage_window != nil
      if @rage_window.visible
        @actor_command_window.active = true
        @actor_command_window.visible = true
        @help_window.visible = false
      else
        @rage_window.active = true
        @rage_window.visible = true
      end
    end
  end
 
  alias update_phase4_step2_srs_later update_phase4_step2
  def update_phase4_step2
    update_phase4_step2_srs_later
    make_rage_action_result if @active_battler.current_action.kind == 3
    make_sl_action_result if @active_battler.current_action.kind == 9
  end
 
  def make_rage_action_result
    @skill = $data_skills[@active_battler.current_action.skill_id]
    unless @active_battler.current_action.forcing
      unless @active_battler.can_use_sr?(@skill.id)
        $game_temp.forcing_battler = nil
        @phase4_step = 1
        return
      end
    end
    @active_battler.sr -= @skill.sp_cost * 10
    @status_window.refresh
    @help_window.set_text(@skill.name, 1)
    @animation1_id = @skill.animation1_id
    @animation2_id = @skill.animation2_id
    @common_event_id = @skill.common_event_id
    set_target_battlers(@skill.scope)
    for target in @target_battlers
      target.skill_effect(@active_battler, @skill)
    end
  end
 
  def make_sl_action_result
    @skill = $data_skills[@active_battler.current_action.skill_id]
    @active_battler.use_limit
    @status_window.refresh
    @help_window.set_text(@skill.name, 1)
    @animation1_id = @skill.animation1_id
    @animation2_id = @skill.animation2_id
    @common_event_id = @skill.common_event_id
    set_target_battlers(@skill.scope)
    for target in @target_battlers
      target.skill_effect(@active_battler, @skill)
    end
  end
 
  alias update_phase3_basic_command_srs_later update_phase3_basic_command
  def update_phase3_basic_command
    if ALLOW_LIMIT
      if @actor_command_window.test_limit and Input.press?(Input::RIGHT)
        if @actor_command_window.commands[0] !=
            @actor_command_window.actor.limit_name
          $game_system.se_play($data_system.decision_se)
          skill = $data_skills[@actor_command_window.actor.limit_id]
          @help_window.set_text(skill.description, 1)
          @actor_command_window.swap_commands_2
        end
        if not Input.trigger?(Input::UP) and not Input.trigger?(Input::DOWN)
          @actor_command_window.update
        end
      else
        if @actor_command_window.commands[0] ==
            @actor_command_window.actor.limit_name
          $game_system.se_play($data_system.cancel_se)
          @actor_command_window.swap_commands_2
          @help_window.set_text("", 1)
          @help_window.visible = false
        end
      end
      if @actor_command_window.commands[0] ==
          @actor_command_window.actor.limit_name and Input.trigger?(Input::C)
        $game_system.se_play($data_system.decision_se)
        @active_battler.current_action.kind = 9
        @active_battler.current_action.skill_id = @actor_command_window.actor.limit_id
        @skill = $data_skills[@active_battler.current_action.skill_id]
        @help_window.visible = false
        if @skill.scope == 1
          start_enemy_select
          @actor_command_window.swap_commands_2
        elsif @skill.scope == 3 or @skill.scope == 5
          start_actor_select
          @actor_command_window.swap_commands_2
        else
          @actor_command_window.swap_commands_2
          phase3_next_actor
        end
        return
      end
    end
    if ALLOW_RAGE
      if @actor_command_window.index == 1 and Input.press?(Input::RIGHT)
        if @actor_command_window.commands[1] != "Soul Rage"
          $game_system.se_play($data_system.decision_se)
          @actor_command_window.swap_commands
        end
        if not Input.trigger?(Input::UP) and not Input.trigger?(Input::DOWN)
          @actor_command_window.update
        end
      else
        if @actor_command_window.commands[1] == "Soul Rage"
          $game_system.se_play($data_system.cancel_se)
          @actor_command_window.swap_commands
        end
      end
      if @actor_command_window.commands[1] == "Soul Rage" and
          Input.trigger?(Input::C)
        $game_system.se_play($data_system.decision_se)
        @active_battler.current_action.kind = 3
        start_rage_select
        return
      end
    end
    update_phase3_basic_command_srs_later
  end

end

or some Scripter sees this, hope he can see the problem.
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: Karo Rushe on December 31, 2006, 06:50:46 PM
Many thank's Blizzard ^_^

Your a saviour.
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: blazinhandle on January 20, 2007, 12:50:07 AM
damn this guy's good. somebody throw an RMXP-Emmy statue his way.... 8)
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: blazinhandle on January 22, 2007, 10:34:19 PM
blizz, is it possible to increase the SR rate when a character is in a certain state?

Would it be something like this:

if $game_actor[X].state == 3 #Raged or what have you
  $SRS_rate.actor[X] = 2000
  else $SRS_rate = 1000

Also, is it possible to only enable Soul Limit if an accesory is equipped?

thanks man!
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: blazinhandle on January 23, 2007, 12:15:25 AM
errr excuse the double post please, wait make that a triple :o...and also all of the questions :police:

I'm using a weapon leveling script and was wondering if I could plug in "if weapon_lvl = whatever" into the Soul Rage system so that they could only use a skill if the weapon has acquired the skill.
Or better yet, just define the leveling script to check if the skill has been learned because doesn't the SR system give the skills based on what is equipped rather than if the skill has actually been learned?

once again, I don't mean to be a nag  :lol:
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: Blizzard on January 23, 2007, 10:36:02 AM
1.

Find these methods at the beginning:

Code: [Select]
  def attack_effect(attacker)
...
  def skill_effect(user, skill)

Now find the line (or a very similar) in both methods that says:

Code: [Select]
self.sr += self.damage * SRS_rate / last_hp

Copy-paste the line and add this addition at the end of the line:

Code: [Select]
if @states.include?(ID)

So it should be like:

Code: [Select]
self.sr += self.damage * SRS_rate / last_hp if @states.include?(ID)

Change ID to the state you want. The actual code might vary a little bit from this here, because this here is from my own game and I use version 2.7b, not 4.xb. It just suits me better.
Also, this will increase it exactly by 100%. If you want another rate, you need kind of this:

Code: [Select]
self.sr += self.damage * SRS_rate * PERC / (100 * last_hp) if @states.include?(ID)

where you need to change PERC to the additional percentage increase. You know... If you change it to 50, the state will make you gain 50% additional SR. If you make it 170, the state will make you gain 170% additional SR.

2.

Find this method:

Code: [Select]
  def can_use_limit?
    return (self.sr / 10 >= @sr_rate and
        100 * self.hp / self.maxhp <= @hp_rate and
        100 * self.sp / self.maxsp <= @sp_rate)
  end

Replace it with this one:

Code: [Select]
  def can_use_limit?
    return (self.sr / 10 >= @sr_rate and
        100 * self.hp / self.maxhp <= @hp_rate and
        100 * self.sp / self.maxsp <= @sp_rate or
        @armor4_id == XX)
  end

Change XX to the ID of the accessory in the database.

3.

Ok, for the last part, you need to change the SR database itself. Find the method:

Code: [Select]
  def database(equip_id, weapon = false)
    skill_ids = []
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
#
# START SR 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(SOULRAGE_SKILL_ID)
#   skill_ids.push(SOULRAGE_SKILL_ID)
#
# The same works for armors:
#
# when ARMOR_ID
#   skill_ids.push(SOULRAGE_SKILL_ID)
#   skill_ids.push(SOULRAGE_SKILL_ID)
#
# 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 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 6
        skill_ids.push(1)
      when 18
        skill_ids.push(25)
      end
 
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END SR Database
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    end
    return skill_ids if skill_ids.size > 0
    return [0]
  end
 
end

Ok, to make a WEAPON have an additional skill if a certain level is acquired this part here:

Code: [Select]
    if weapon
      case equip_id # weapon IDs
      when 6
        skill_ids.push(10)
        skill_ids.push(11)
        skill_ids.push(12)
      when 10
        skill_ids.push(8)
      end

has to look like this:

Code: [Select]
    if weapon
      case equip_id # weapon IDs
      when 6
        skill_ids.push(10)
        skill_ids.push(11)
        skill_ids.push(12) if $data_weapons[equip_id].level >= 5
      when 10
        skill_ids.push(8)
      end

Since I don't know the weapon level script, it could also be like this:

Code: [Select]
    if weapon
      case equip_id # weapon IDs
      when 6
        skill_ids.push(10)
        skill_ids.push(11)
        skill_ids.push(12) if @actor.weapon_lvl >= 5
      when 10
        skill_ids.push(8)
      end

Best is you try it out and tell me if it works. If it doesn't, post a link to the topic where you got the script or post the script itself. When I have taken a look at it, I will know what to do.

BTW, need an item that extends SR capacity from 100% to i.e. 150%?

Change:

Code: [Select]
  def sr=(sr)
    @sr = sr
    @sr = 1000 if @sr > 1000
    @sr = 0 if @sr < 0
  end

to

Code: [Select]
  def sr=(sr)
    @sr = sr
    @sr = maxsr if @sr > maxsr
    @sr = 0 if @sr < 0
  end
 
  def maxsr
    base = 1000
    base += EXTRA if @armor4_id == ID
    return base
  end

Change ID to the accessory ID and EXTRA to 10 times the extra percentage. So, if you want 180%, change EXTRA to 800. If you want 10%, change it to 100.
Now just above should be:

Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: Karo Rushe on January 23, 2007, 06:04:23 PM
Is there a way to make an Ability to recover The Soul Bar? I want to use it for one of the specials of one character  :=:
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: blazinhandle on January 23, 2007, 07:00:49 PM
yo thanks a lot blizz,

1:I couldn't get the first one to work.

2:I did get the second one to work! I wanted the Soul Limit to only be availible when a character had their accessory equipped so i did this:

  def can_use_limit?
    if @armor4_id >= 86 #with each characters' acc. being 86 or higher
    return (self.sr / 10 >= @sr_rate and
        100 * self.hp / self.maxhp <= @hp_rate and
        100 * self.sp / self.maxsp <= @sp_rate)
    end
  end

3: This worked too!

One more thing though Blizz, I'm using Minkoff's Animated Battlers which moves the characters in battle. It works by using a grid of 8x4 sprites (8 poses, 4 movements per pose) and it calls a movement when you select attack, skill, defend, item, etc. However, when I use SR or SL it shutsdown b/c there isn't a pose set for those. Is it possible to set the pose to use Skill? Anyways, if you get a chance, here's the script for it:

[code]#==============================================================================
# ** Animated Battlers - Enhanced   ver. 5.0                       (12-23-2006)
#------------------------------------------------------------------------------
#  Animated Battlers by Minkoff
#  Enhancements by DerVVulfman       
#  Low percentage and Status Poses
#     Concept & Base coding by Twin Matrix
#  Stationary Enemies requested by jens009
#  Continuous Victory Looping for actors requested by Skyla Doragono
#  Actors readying themselves before battle requested by Clive
#  Default Battlers for Enemies requested for by WithViolence
#  Mixed Default and Spritesheet Battlers requested for by SteveE22
#  Hero & Enemy z.depth concept by Min-Chan and Caldaron ( totally redone :) )
#  Stationary Poses suggested by Twin Matrix
#  Critical Hit animation requested by Mimi-Chan
#  Both Enemy and Actor's individual Frames per Pose requested by creiz
#  Expandable Battle Parties beyond 4 requested by Leknaat
#  Additional value call added for compatability with Battle Cry script
#  Removed dependancy on $game_system for the Sideview Mirror system
#  Fixed the 'Blocking during Victory State' bug discovered by Kaze950
#  Collapse stack-error found by JirbyTaylor(fixed) / Code by SephirothSpawn

#==============================================================================
#
#   ADDITIONAL CALLS AVAILABLE PRIOR TO COMBAT:
#
#------------------------------------------------------------------------------
#  SIDEVIEW MIRROR:     This value switches  the positions  of both enemies and
#                       heroes to opposite ends of the screen.
#
#   Script : $sideview_mirror = [number]
#   number : a value indicating whether the hero & enemy positions are switched
#            0 = Default:  Enemies on the left, Heroes on the right
#            1 = Switched: Heroes on the left, Enemies on the right
#
#------------------------------------------------------------------------------
#  BATTLER FORMATIONS:  This value changes the way your heroes line up when the
#                       battle starts.
#
#   Script : $formation_style = [number]
#   number : a value indicating the type of formation your heroes will use
#            0 = Diagonal (Default)    4 = Column Pattern 1
#            1 = Diagonal Pattern 2    5 = Column Pattern 2
#            2 = Slanted Pattern 1     6 = Wave Formation 1
#            3 = Slanted Pattern 2     7 = Wave Formation 2
#
#            8 = Randomized (system will choose from 0 to 7)
#
#------------------------------------------------------------------------------
#  FORMATION OPTIONS:   These values  may expand your system  to go beyond the
#                       default four player system.
#
#   Script : $formation_max_member = [number]
#   number : A value indicating the maximum number of members in your party.
#             (default = 4)
#             
#   Script : $formation_max_height = [number]
#   number : A value indicating (in pixels) the top height of your party shown
#            in the Battle Screen.  The higher the number, the lower the party
#            on the screen. (default = 220)
#
#   Script : $formation_max_width  = [number]
#   number : The left/right width of the party's formation.  (default = 128)
#
#   Script : $battlestatus_height = [number]
#   number : The actual height of your battlestatus window. (default = 160)
#
#  NOTE: The combined $formation_max_height and $battlestatus_height determines
#        the vertical distance between battlers in their formation.
#
#==============================================================================


# Things added since original version by Minkoff:
#   Can reverse the battler positions
#   Editable spritesheet layout in script
#   Able to define total/max frames per pose
#   Can define individual # of frames per each pose
#   Can use 'red-out' RTP death or 'battler death' pose
#   Can show battler falling before death.
#   'Casting' pose now available for RTAB/Skill Timing users
#   Can show battler celebrating before victory pose
#   Can tag battlers who's victory pose loops indefinitely
#   Can show actor battlers get ready before battle starts.
#   Separate poses for 'skills', 'items' or 'weapons' based on their id
#   Can allow the battlers to step forward before using items & skills (FFVII+)
#   Attacking battlers rush towards their targets while item & skill users don't
#   Certain weapons can force the battler NOT to move
#   Certain items & skills can force battlers to 'rush' the enemy
#   Certain skills or items can force movement to the center of the screen
#   Stationary enemies. In case enemies do NOT move when they attack.
#   Adjustable 'low health' checker. Set your low health to 25%... 30%... 10%...
#   Poses now available for status ailments
#   Dead revert to 'victory' pose bug fixed.
#   Default battlers now available for actors and/or enemies
#   Default battlers now usable by ID number (had to rewrite red-out for that)
#   Escaping Enemies bug found by SteveE22.  Fixed just as fast.
#   Hero Formations (total of 8 hardwired -& 1 random- ... add at your own risk)
#   Z-Depth for attack overlapping purposes
#   Corrected attack overlap offset routine.  Overlap now based on battler size
#   Certain skills and items can now prevent movement
#   Can allow battlers to take step forward before performing 'attack' pose.(FF)
#   Certain weapons can move battlers to center screen instead of a full move.
#   Escaping Enemies can now have a pose before disappearing (was a rush pose)
#   Redesigned Scene_Battle's movement routine
#   Added pose for Critical Hits
#   Added the enemy's hash for frame number based on poses
#   Added the actor's hash for frame number based on poses
#   Re-Tooled the formations to go beyond the default four party system
#   Minor value added for compatability with Delissa's Battle Cry script
#   Default Collapse Stack-Error fixed(code by SephirothSpawn) found JirbyTaylor
#   Removed dependancy on $game_system for the Sideview Mirror system
#   Fixed the 'Blocking during Victory State' bug discovered by Kaze950
#   Includes an Adaptation Switch for use with RTAB's Connected Attacking script
#   
#   40 counted.

#==============================================================================
# ** Sprite_Battler
#------------------------------------------------------------------------------
#  This sprite is used to display the battler.It observes the Game_Character
#  class and automatically changes sprite conditions.
#==============================================================================

class Sprite_Battler < RPG::Sprite
 
  attr_accessor :battler_offset         # Degree of action forcing 
  attr_accessor :skill_used             # Degree of action forcing 
  attr_accessor :item_used              # Degree of action forcing 
 
  #--------------------------------------------------------------------------
  # * Initialize
  #--------------------------------------------------------------------------
  alias cbs_initialize initialize
  def initialize(viewport, battler = nil)

    # * Configuration System *
   
    # * Default Battler Style Switches
    #--------------------------------------------------------------------------       
    $default_enemy = true               # If true, these switches allows the use
    $default_actor = false              # of default battlers for actors/enemies
    $default_enemy_id = []             # Ids of enemies using default battlers
    $default_actor_id = []              # Ids of actors using default battlers
    @default_collapse_actor   = false   # If true, restores the old 'red fade'
    @default_collapse_enemy   = true    #   collapse effect (using spritesheets)
   
   
    # * Animation Frames and Animation Speed
    #--------------------------------------------------------------------------   
    @speed              = 4      # Framerate speed of the battlers
    @poses              = 11     # Maximum # of poses (stances) in the template
    @frames             = 4      # Maximum # of frames in each pose
    @frames_standard    = 4      # Standard # of frames played in each pose.
    @low_hp_percentage  = 0.25   # Determines health% of battler for WOOZY pose.
 
 
    # * Poses Control
    #--------------------------------------------------------------------------   
   
    # Editable Template (Some people wanted to change their template design)
    $p1   =   0   # Sets the 'Ready Pose'  ($p1) to be pose  #1 in your template
    $p2   =   1   # Sets the 'Struck Pose' ($p2) to be pose  #2 in your template
    $p3   =   2   # Sets the 'Woozy Pose'  ($p3) to be pose  #3 in your template
    $p4   =   3   # Sets the 'Block Pose'  ($p4) to be pose  #4 in your template
    $p5   =   4   # Sets the 'Charge Pose' ($p5) to be pose  #5 in your template
    $p6   =   5   # Sets the 'Retreat Pose'($p6) to be pose  #6 in your template
    $p7   =   6   # Sets the 'Attack Pose' ($p7) to be pose  #7 in your template
    $p8   =   7   # Sets the 'Item Pose'   ($p8) to be pose  #8 in your template
    $p9   =   8   # Sets the 'Skill Pose'  ($p9) to be pose  #9 in your template
    $p10  =   9   # Sets the 'Victory Pose'($p10)to be pose #10 in your template
    $p11  =  10   # Sets the 'Defeat Pose' ($p11)to be pose #11 in your template
    # Non-Default Poses (can expand beyond the default 11 poses here)
    @poses_setup         = nil         # Choose animation pose for 'preparation'
    @poses_casting       = nil         # Set casting pose to 'Block' for example
    $poses_escaping      = nil         # Set 'coward' pose for fleeing monsters)   
    $poses_critical      = nil         # Set 'critical' hit pose for BIG hits.
    @poses_dying         = nil         # Choose animation pose for dying throws.
    @poses_winning       = nil         # Set winning dance to 'block' for examp.
    @poses_winning_loops = [7]         # Set victory non-freezing actor as #7
    # Non-Default Pose Hashes (poses dependant on .id values)
    @poses_status  = {3 => 2, 4 => 3}  # Default: #3(Venom)&#4(Dazzle) is 'Woozy'
    $poses_skills  = {57 => 6}         # Default: #57(Cross Cut) does 'Attack'
    $poses_items   = {13 => 3}         # Default: #13(Sharp Stone) does 'Block'
    $poses_weapons = {}                # Didn't set any weapons to any poses
 
 
    # * Frames Control
    #--------------------------------------------------------------------------   
    @frames_per_pose    = {0 => 2}            # Set #of frames to pose(by index)

    # Advanced Individual Pose/Frame Hashes   # Advanced Individual Poses  uses
                                              # hashes within hashes. As a demo
    $poses_actor = {7 => {0 => 4}}            # you can see that enemy #1 has 2
    $poses_enemy = {1 => {0 => 2, 3 => 2}}    # sets of controls:  index 0 (for
                                              # a ready pose is set to 1 frame,
    # while index 3 (block) is set to 'two' frames.   Likewise, for the actor's
    # hash, Actor #7 (Gloria) has only 1 control hash.   It sets index pose '0'
    # (the ready pose again) to use four frames of animation (even though I had
    # set the ready pose to just use '2' with the @frames_per_pose hash earlier.
   
   
    # Individual Battler Settings
    @mirror_enemies     = true     # Enemy battlers use reversed image
    @stationary_enemies = false    # If the enemies don't move while attacking
    @stationary_actors  = false    # If the actors don't move while attacking
    @calculate_speed    = false    # System calculates a mean/average speed
    @phasing            = true     # Characters fade in/out while attacking
   
   
    # * Movement Settings (Step-Forward / Final Fantasy-Style)
    #--------------------------------------------------------------------------   
    $rush_offset        = 0        # How much additional space between battlers
    $rush_attack        = false    # If true, battler steps forward to attack
    $rush_skill         = true     # If true, battler steps forward to use skill
    $rush_item          = true     # If true, battler steps forward to use item
   
   
    # * Movement Arrays (Arrays for skill/weapon/item IDs that affect movement)
    #--------------------------------------------------------------------------   
    $moving_item_atk    = [1]     # Examples are items that need to be applied.
    $moving_skill_atk   = [57,61] # Examples are martial-arts and sneak attacks
    $move2center_atk    = []      # Moves battler to center based on weapon id!
    $move2center_item   = [5]     # Moves battler to center for a big item atk!
    $move2center_skill  = [7]     # Moves battler to center for a big skill atk!
 
 
    # * Stationary Arrays (Arrays for skill/weapon/item IDs that halt movement)
    #--------------------------------------------------------------------------   
    # Array that holds the id # of skills, items or weapons that affect movement
    $stationary_enemyid = []       # Enemies that don't RUN during melee attacks
    @stationary_weapons = [17,18,19,20,21,22,23,24] # (examples are bows & guns)
    @stationary_skills  = []       # (examples are bows & guns)
    @stationary_items   = []       # (examples are bows & guns)
   
    # Adaptation Switches
    $RTAB_Connected_Attacking = false  # Needed to be on if RTAB and Con. Attk.
   
    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   
    # DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU'RE DOING
    @frame, @pose = 0, 0
    @last_time = 0
    @last_move_time = 0
    @battler_offset = 0
    @skill_used = 0
    @item_used = 0
    $casted = false
    $casting = false
    @dying   = true
    @s_pose  = false
    $victory = false
    @winning = true
    cbs_initialize(viewport, battler)
    viewport.z = 99
    $formation = $formation_style
    # Setting values called from EVENT scripts
    $sv_mirror = $sideview_mirror
    $sv_mirror = 0 if $sideview_mirror == nil
    $max_member = $formation_max_member
    $max_member = 4 if $formation_max_member == nil
    $formation_top = $formation_max_height
    $formation_top = 220 if $formation_max_height == nil
    $formation_width = $formation_max_width
    $formation_width = 128 if $formation_max_width == nil
    $battlestat_height = $battlestatus_height
    $battlestat_height = 160 if $battlestatus_height == nil
    $formation = $formation_style
    $formation = 0 if $formation_style == nil
    # if Formation is random
    if $formation == 8 then
      $formation = rand(8).to_i
    end
  end
  #--------------------------------------------------------------------------
  # * Update
  #--------------------------------------------------------------------------
  alias cbs_update update
  def update
    return unless @battler
    # Regular Update
    cbs_update
    # Reset hash for Advanced Pose/Frames
    pose_temp = {}
    # Start Routine
    unless @started
      @pose = state
     
      if @battler.is_a?(Game_Enemy)
        if not $default_enemy
          if $default_enemy_id == nil
            # Set up Spritesheet Standards 
            @width = @width / @frames
            @height = @height / @poses
          else
            if not $default_enemy_id.include?(@battler.id)
              @width = @width / @frames
              @height = @height / @poses
            end
          end
        end
      end
 
      if @battler.is_a?(Game_Actor)
        if not $default_actor
          if $default_actor_id == nil
            # Set up Spritesheet Standards 
            @width = @width / @frames
            @height = @height / @poses
          else
            if not $default_actor_id.include?(@battler.id)
              @width = @width / @frames
              @height = @height / @poses
            end
          end
        end
      end
     
      @battler_offset = @width * 0.75
   
      @display_x = @battler.screen_x
      @display_y = @battler.screen_y
      @display_z = @battler.screen_z
      @destination_x = @display_x
      @destination_y = @display_y
      @destination_z = @display_z
      self.opacity = 0
      @started = true
    end
 
    # Cut Out Frame
    # Enemy Battler Routine
    if @battler.is_a?(Game_Enemy)
      if $default_enemy
        self.src_rect.set(@width * 0, @height * 0, @width, @height)
      else
        if $default_enemy_id !=nil
          if $default_enemy_id.include?(@battler.id)
            self.src_rect.set(@width * 0, @height * 0, @width, @height)
          else
            self.src_rect.set(@width * @frame, @height * @pose, @width, @height)
          end
        else
          self.src_rect.set(@width * @frame, @height * @pose, @width, @height)
        end
      end
    end
   
    # Actor Battler Routine
    if @battler.is_a?(Game_Actor)
      if $default_actor
        self.src_rect.set(@width * 0, @height * 0, @width, @height)
      else
        if $default_actor_id !=nil
          if $default_actor_id.include?(@battler.id)
            self.src_rect.set(@width * 0, @height * 0, @width, @height)
          else
            self.src_rect.set(@width * @frame, @height * @pose, @width, @height)
          end
        else
          self.src_rect.set(@width * @frame, @height * @pose, @width, @height)
        end
      end
    end
   
    # Position Sprite
    self.x = @display_x
    self.y = @display_y
    self.z = @display_z
    self.ox = @width / 2
    self.oy = @height
   
    # Adjust sprite direction if facing the other way...
    if $sv_mirror == 1
      if @battler.is_a?(Game_Actor)
        self.mirror = !!battler
      else
        if not @mirror_enemies
          self.mirror = !!battler
        end
      end
    else
      if @battler.is_a?(Game_Enemy)
        if @mirror_enemies
          self.mirror = !!battler
        end
      end
    end
   
    # Setup Frames per Pose
    poseframe = @frames_standard
    poseframe = @frames_per_pose[@pose] if @frames_per_pose.include?(@pose)
    # Set Advanced Poses for Actors
    if @battler.is_a?(Game_Actor)
      pose_temp = $poses_actor[@battler.id] if $poses_actor.include?(@battler.id)
      poseframe = pose_temp[@pose] if pose_temp.include?(@pose)
    end   
    # Set Advanced Poses for Enemies
    if @battler.is_a?(Game_Enemy)
      pose_temp = $poses_enemy[@battler.id] if $poses_enemy.include?(@battler.id)
      poseframe = pose_temp[@pose] if pose_temp.include?(@pose)
    end
 
    # Setup Animation
    time = Graphics.frame_count / (Graphics.frame_rate / @speed)
    if @last_time < time
      @frame = (@frame + 1) % poseframe
      if @frame == 0
        if @freeze
          @frame = poseframe - 1
          return
        end
        @pose = state
      end
    end
    @last_time = time
    # Setup Dying Animation
    if @battler.dead?
      if @dying == true
        @pose = state
        @dying = false
      end
    else
      if @battler.is_a?(Game_Actor)
        if @poses_setup != nil
          if @s_pose == false
            @pose = @poses_setup
            @s_pose = true
          end
        end
        if $victory == true
          if @winning == true
            @pose = state
            @winning = false
          end
        end
      end
    end
   
    # Move It
    move if moving
  end
 
  #--------------------------------------------------------------------------
  # * Current State
  #--------------------------------------------------------------------------
  def state
    # Damage State
    if [nil,{}].include?(@battler.damage)
      # Battler Fine
      @state = $p1
      # Battler Wounded
      @state = $p3 if @battler.hp < @battler.maxhp * @low_hp_percentage
      # Battler Status-Effect
      for i in @battler.states
        @state = @poses_status if @poses_status.include?(i)
      end
      # If Battler Dead
      if @battler.dead?
        # If using default battlers or default collapse
        if (@default_collapse_actor and @battler.is_a?(Game_Actor)) or
          (@default_collapse_enemy and @battler.is_a?(Game_Enemy)) or
          ($default_actor and @battler.is_a?(Game_Actor)) or
          ($default_enemy and @battler.is_a?(Game_Enemy)) or
          ($default_enemy_id.include?(@battler.id) and @battler.is_a?(Game_Enemy)) or
          ($default_actor_id.include?(@battler.id) and @battler.is_a?(Game_Actor))
          # Do absolutely nothing :)
        else
          # Use Poses system
          if @poses_dying != nil
            if @dying == true
              @state = @poses_dying
            else
              @state = $p11
            end
          else
            @state = $p11
          end
          # Fix Opacity
          self.opacity = 255     
        end
      end
    end
 
    # Casting State
    if $casted
      if @battler.rtp != 0
        if @poses_casting != nil
        @state = @poses_casting
        end
      end
    end
   
    # Victory State
    if @battler.is_a?(Game_Actor)
      if $victory
        if @poses_winning != nil
          if @winning == true
            if not @battler.dead?
              @state = @poses_winning
            end
          else
            if not @battler.dead?
            @state = $p10
              if not @poses_winning_loops.include?(@battler.id)
                @freeze = true
              end
            end
          end
        else
          if not @battler.dead?
            @state = $p10
            if not @poses_winning_loops.include?(@battler.id)
              @freeze = true
            end
          end
        end       
      end
    end
   
   
    # Guarding State (not if dead OR in victory)
    if not @battler.dead?
      if not $victory
        @state = $p4 if @battler.guarding?
      end
    end
    # Moving State
    if moving
    # Adjust sprite direction if facing the other way...
      if $sv_mirror == 1
        # If enemy battler moving
        if @battler.is_a?(Game_Enemy)
          # Battler Moving Left
          @state = $p5 if moving.eql?(0)
          # Battler Moving Right
          @state = $p6 if moving.eql?(1)
        # Else actor battler moving
        else
          # Battler Moving Left
          @state = $p6 if moving.eql?(0)
          # Battler Moving Right
          @state = $p5 if moving.eql?(1)
        end
      else     
        # If enemy battler moving
        if @battler.is_a?(Game_Enemy)
          # Battler Moving Left
          @state = $p6 if moving.eql?(0)
          # Battler Moving Right
          @state = $p5 if moving.eql?(1)
        # Else actor battler moving
        else
          # Battler Moving Left
          @state = $p5 if moving.eql?(0)
          # Battler Moving Right
          @state = $p6 if moving.eql?(1)
        end
      end
    end
    # Return State
    return @state
  end
 
  #--------------------------------------------------------------------------
  # * Move
  #--------------------------------------------------------------------------
  def move
    time = Graphics.frame_count / (Graphics.frame_rate.to_f / (@speed * 5))
    if @last_move_time < time
      # Pause for Animation
      return if @pose != state
      # Phasing
      if @phasing
        d1 = (@display_x - @original_x).abs
        d2 = (@display_y - @original_y).abs
        d3 = (@display_x - @destination_x).abs
        d4 = (@display_y - @destination_y).abs
        self.opacity = [255 - ([d1 + d2, d3 + d4].min * 1.75).to_i, 0].max
      end
      # Calculate Difference
      difference_x = (@display_x - @destination_x).abs
      difference_y = (@display_y - @destination_y).abs
      difference_z = (@display_z - @destination_z).abs 
      # Done? Reset, Stop
      if [difference_x, difference_y].max.between?(0, 8)
        @display_x = @destination_x
        @display_y = @destination_y
        @display_z = @destination_z
        @pose = state
        return
      end
     
      # Calculate Movement Increments
      increment_x = increment_y = 1
      if difference_x < difference_y
        increment_x = 1.0 / (difference_y.to_f / difference_x)
      elsif difference_y < difference_x
        increment_y = 1.0 / (difference_x.to_f / difference_y)
      end
      increment_z = increment_y
 
      # Calculate Movement Speed
      if @calculate_speed
        total = 0; $game_party.actors.each{ |actor| total += actor.agi }
        speed = @battler.agi.to_f / (total / $game_party.actors.size)
        increment_x *= speed
        increment_y *= speed
        increment_z *= speed
      end
     
      # Multiply and Move
      multiplier_x = (@destination_x - @display_x > 0 ? 8 : -8)
      multiplier_y = (@destination_y - @display_y > 0 ? 8 : -8)
      multiplier_z = (@destination_z - @display_z > 0 ? 8 : -8)     
      @display_x += (increment_x * multiplier_x).to_i
      @display_y += (increment_y * multiplier_y).to_i
      @display_z += (increment_z * multiplier_z).to_i
     
    end
    @last_move_time = time
  end
 
  #--------------------------------------------------------------------------
  # * Set Movement
  #--------------------------------------------------------------------------
  def setmove(destination_x, destination_y, destination_z)
    unless (@battler.is_a?(Game_Enemy) and @stationary_enemies) or
           (@battler.is_a?(Game_Actor) and @stationary_actors)
      unless @stationary_weapons.include?(@battler.weapon_id) or
             @stationary_skills.include?(@skill_used) or
             @stationary_items.include?(@item_used)
        @original_x = @display_x
        @original_y = @display_y
        @original_z = @display_z         
        @destination_x = destination_x
        @destination_y = destination_y
        @destination_z = destination_z
      end
    end
  end
 
  #--------------------------------------------------------------------------
  # * Movement Check
  #--------------------------------------------------------------------------
  def moving
    if (@display_x != @destination_x and @display_y != @destination_y and !@battler.dead?)
      return (@display_x > @destination_x ? 0 : 1)
    end
  end
 
  #--------------------------------------------------------------------------
  # * Set Pose
  #--------------------------------------------------------------------------
  def pose=(pose)
    @pose = pose
    @frame = 0
  end
 
  #--------------------------------------------------------------------------
  # * Freeze
  #--------------------------------------------------------------------------
  def freeze
    @freeze = true
  end
 
  #--------------------------------------------------------------------------
  # * Fallen Pose
  #--------------------------------------------------------------------------
  if @derv_anim_bat_stack.nil?
    @derv_anim_bat_stack = true
    alias cbs_collapse collapse
    def collapse
      if @default_collapse_enemy
        cbs_collapse if @battler.is_a?(Game_Enemy)
      end
      if @default_collapse_actor
        cbs_collapse if @battler.is_a?(Game_Actor)
      end
      if $default_enemy
        cbs_collapse if @battler.is_a?(Game_Enemy)
      end
      if $default_actor
        cbs_collapse if @battler.is_a?(Game_Actor)
      end
      if $default_enemy_id != nil
        if $default_enemy_id.include?(@battler.id)
          cbs_collapse if @battler.is_a?(Game_Enemy)
        end
      end
      if $defend_actor.id != nil
        if $default_actor_id.include?(@battler.id)
          cbs_collapse if @battler.is_a?(Game_Actor)
        end   
      end
    end
  end
end 
 
#==============================================================================
# ** Game_System
#------------------------------------------------------------------------------
#  This class handles data surrounding the system. Backround music, etc.
#  is managed here as well. Refer to "$game_system" for the instance of
#  this class.
#==============================================================================

class Game_System
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor   :sideview_mirror
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias initialize_cbs_customize initialize
  def initialize
    # Call original initialization process
    initialize_cbs_customize
    @sideview_mirror = 0
  end
end 
 

#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
#  This class handles the actor. It's used within the Game_Actors class
#  ($game_actors) and refers to the Game_Party class ($game_party).
#==============================================================================

class Game_Actor
  #--------------------------------------------------------------------------
  # * Actor X Coordinate
  #--------------------------------------------------------------------------
  def screen_x
    # Determine minimum horizontal space between battlers
    x_spacer = $formation_width / $max_member
    if self.index != nil
      case $formation
      when 0                                    # DIAGONAL PATTERN 1
        if $sv_mirror == 1
          return self.index * -x_spacer + (($max_member+1)*x_spacer) #202       
        else
          return self.index * x_spacer + (640-(($max_member+1)*x_spacer))#450
        end         
      when 1                                    # DIAGONAL PATTERN 2   
        if $sv_mirror == 1
          return self.index * x_spacer + x_spacer #64       
        else
          return self.index * -x_spacer + (640-x_spacer*2) #576
        end       
      when 2                                    # 2-ROW SLANT
        if $sv_mirror == 1
          if self.index < ($max_member/2)
            return self.index + (($max_member+1)*x_spacer) + (x_spacer * self.index)
          else
            return self.index + (x_spacer * self.index) - x_spacer * 0.5
          end
        else
          if self.index < ($max_member/2)
            return self.index + (640-(($max_member+1)* x_spacer)) + (-x_spacer * self.index)
          else
            return self.index + (640-((x_spacer*0.5)-x_spacer)) + (-x_spacer * self.index)
          end
        end
      when 3                                    # 2 ROW - SLANT
        if $sv_mirror == 1
          if self.index < ($max_member/2)
            return self.index + (x_spacer/2)+(($max_member+1)* x_spacer) + (-x_spacer * self.index)
          else
            return self.index + (($max_member+1)* x_spacer) + (-x_spacer * self.index)
          end       
        else
          if self.index < ($max_member/2)
            return self.index + 442 + (x_spacer * self.index)
          else
            return self.index  + 430 + (x_spacer * self.index)
          end       
        end
      when 4                                    # Column Pattern 1       
        if $sv_mirror == 1
          if ((self.index + 1) / 2) >= (((self.index + 1).to_f) / 2 )
            return self.index + ($max_member*(x_spacer*1.5)) + (-(x_spacer*1.5) * (self.index-1))
          else
            return self.index + ($max_member*(x_spacer*1.5)) + (-(x_spacer*1.5) * self.index)
          end       
        else
          if ((self.index + 1) / 2) >= (((self.index + 1).to_f) / 2 )
            return self.index + 640-($max_member*(x_spacer*1.5)) + ((x_spacer*1.5) * (self.index-1))
          else
            return self.index + 640-($max_member*(x_spacer*1.5)) + ((x_spacer*1.5) * self.index)
          end       
        end
      when 5                                    # Column Pattern 2
        if $sv_mirror == 1
          if ((self.index + 1) / 2) >= (((self.index + 1).to_f) / 2 )
            return self.index + ($max_member*(x_spacer*1.5)) + (-(x_spacer*1.5) * (self.index-1))
          else
            return self.index + ($max_member*(x_spacer*1.5)) + (-(x_spacer*1.5) * self.index)
          end       
        else
          if ((self.index + 1) / 2) >= (((self.index + 1).to_f) / 2 )
            return self.index + 640-($max_member*(x_spacer*1.5)) + ((x_spacer*1.5) * (self.index-1))
          else
            return self.index + 640-($max_member*(x_spacer*1.5)) + ((x_spacer*1.5) * self.index)
          end     
        end
      when 6                                    # Wave Formation 1
        if $sv_mirror == 1
          if self.index < ($max_member/2)
            return 170
          else
            return  90
          end       
        else
          if self.index < ($max_member/2)
            return 470
          else
            return 550
          end       
        end
      else                                      # Wave Formation 2
        if $sv_mirror == 1
          if self.index < ($max_member/2)
            return 170
          else
            return  90
          end       
        else
          if self.index < ($max_member/2)
            return 470
          else
            return 550
          end       
        end
      end
    else
      return 0
    end
  end
  #--------------------------------------------------------------------------
  # * Actor Y Coordinate
  #--------------------------------------------------------------------------
  def screen_y
    # Determine minimum vertical space between battlers
    y_spacer = (480 - $battlestat_height - $formation_top) / $max_member
    if self.index != nil
      case $formation
      when 0
        return self.index * (y_spacer*1.25) + $formation_top
      when 1
        return self.index * (y_spacer*1.25) + $formation_top
      when 2
        if self.index < ($max_member/2)
          return $formation_top + ((y_spacer*2.5) * self.index)
        else
          return ($formation_top - (y_spacer*($max_member+1))) + ((y_spacer*2.5) * self.index) #was 60
        end       
      when 3
        if self.index < ($max_member/2)
          return $formation_top + ((y_spacer*2.5) * self.index)
        else
          return ($formation_top - (y_spacer*($max_member+1))) + ((y_spacer*2.5) * self.index) # was 60
        end
      when 4
        if ((self.index + 1) / 2) >= (((self.index + 1).to_f) / 2 )           
          return $formation_top + ($battlestat_height/2)
        else
          return $formation_top + ($battlestat_height/6)
        end
      when 5
        if ((self.index + 1) / 2) >= (((self.index + 1).to_f) / 2 )           
          return $formation_top + ($battlestat_height/6)
        else
          return $formation_top + ($battlestat_height /2)
        end
      when 6
        if self.index < ($max_member/2)
          return $formation_top + (y_spacer * 2.5 * self.index)
        else
          return $formation_top + (y_spacer * 2.5 * ((self.index) - ($max_member/2)))
        end 
      else
        if self.index < ($max_member/2)
          return $formation_top + (y_spacer*2.5*(($max_member/2)-1))+ (y_spacer * 2.5 * -self.index)
        else
          return $formation_top + (y_spacer*2.5*(($max_member/2)-1)) + (y_spacer * 2.5 * -((self.index) - ($max_member/2)))
        end 
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Actor Z Coordinate
  #--------------------------------------------------------------------------
  def screen_z
    return screen_y
  end
end


#==============================================================================
# ** Game_Enemy
#------------------------------------------------------------------------------
#  This class handles enemies. It's used within the Game_Troop class
#  ($game_troop).
#==============================================================================

class Game_Enemy < Game_Battler
  def screen_x
    if self.index != nil
      if $sv_mirror == 1
        return 640 - $data_troops[@troop_id].members[@member_index].x
      else
        return $data_troops[@troop_id].members[@member_index].x
      end
    end
  end
end 
 

#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
#  This class performs battle screen processing.
#==============================================================================

class Scene_Battle
 
  #--------------------------------------------------------------------------
  # * Make Skill Action Results (alias used to determine skill used)
  #--------------------------------------------------------------------------
  alias make_skill_action_result_anim make_skill_action_result
  def make_skill_action_result(battler = @active_battler, plus_id = 0)
    @rtab = !@target_battlers
    if $RTAB_Connected_Attacking
      make_skill_action_result_anim(battler, plus_id)
    else
      @rtab ? make_skill_action_result_anim(battler) : make_skill_action_result_anim
    end
    @skill_used = @skill.id
  end
 
  #--------------------------------------------------------------------------
  # * Make Item Action Results (alias used to determine item used)
  #--------------------------------------------------------------------------
  alias make_item_action_result_anim make_item_action_result
  def make_item_action_result(battler = @active_battler)
    @rtab = !@target_battlers
    @rtab ? make_item_action_result_anim(battler) : make_item_action_result_anim
    @item_used = @item.id
    @item_usage = @item.scope
  end
 
  #--------------------------------------------------------------------------
  # * Frame Update (main phase step 1 : action preparation) (Casting Routine)
  #--------------------------------------------------------------------------
  alias update_phase4_step1_anim update_phase4_step1
  def update_phase4_step1(battler = @active_battler)
    @rtab = !@target_battlers
    if $rtab_detected == true
      update_phase4_step1_anim(battler)
      if battler.current_action.kind == 1 and
        (not battler.current_action.forcing or @force != 2)
        if battler.rtp != 0   
          $casted = true
        end
      end
    else
      update_phase4_step1_anim
    end
  end
 
  #--------------------------------------------------------------------------
  # * Action Animation, Movement
  #--------------------------------------------------------------------------
  alias cbs_update_phase4_step3 update_phase4_step3
  def update_phase4_step3(battler = @active_battler)
    @rtab = !@target_battlers
    target = (@rtab ? battler.target : @target_battlers)[0]

    # If enemy is a default battler
    if battler.is_a?(Game_Enemy)
      if $default_enemy
        if @rtab then battler.white_flash = true end
        if @rtab then battler.wait = 10 end
      end
      if $default_enemy_id != nil
        if $default_enemy_id.include?(@battler.id)
          if @rtab then battler.white_flash = true end
          if @rtab then battler.wait = 10 end
        end
      end       
    end
    # If actor is a default battler
    if battler.is_a?(Game_Actor)
      if $default_actor
        if @rtab then battler.white_flash = true end
        if @rtab then battler.wait = 10 end
      end
      if $default_actor_id != nil
        if $default_actor_id.include?(@battler.id)
          if @rtab then battler.white_flash = true end
          if @rtab then battler.wait = 10 end
        end
      end               
    end

    # Set values and poses based on Action
    case battler.current_action.kind
    when 0  # Attack
      rush_type = $rush_attack
      full_moving = true ; if rush_type; full_moving = false; end
      if $move2center_atk.include?(battler.weapon_id); center_move=true ; end
      if $stationary_enemyid.include?(battler.id) and battler.is_a?(Game_Enemy)
        full_moving = false
        center_move = false
        rush_type = false
      end
      if battler.current_action.basic == 2
        # If escaping, disable all movement
        full_moving = false
        center_move = false
        rush_type = false       
      end
      base_pose = $p7
      base_pose = $poses_weapons[battler.weapon_id] if $poses_weapons.include?(battler.weapon_id)     
      if battler.current_action.basic == 2
        base_pose = $poses_escaping if $poses_escaping != nil
      end
     
    when 1  # Skill
      rush_type = $rush_skill
      if $moving_skill_atk.include?(@skill_used) ; full_moving = true ; end
      if $move2center_skill.include?(@skill_used) ; center_move = true ; end       
      base_pose = $p9
      base_pose = $poses_skills[@skill_used] if $poses_skills.include?(@skill_used)
    when 2  # Item
      rush_type = $rush_item
  &n
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: Darico on January 23, 2007, 07:04:31 PM
You should edit your post and put it all in a code box! It will make it easier to copy and paste, etc. Also, what went wrong after the first one? Same problem?
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: blazinhandle on January 23, 2007, 07:10:46 PM
well with the first one, no one would gain any SR regardless of the state.
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: Darico on January 23, 2007, 07:16:27 PM
Ok, sorry thought I should just ask now incase someone else asks later. I thought the problem might of just changed to something esle lol.
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: Blizzard on January 25, 2007, 01:49:44 PM
@blazin:

Ok, about the first one:

Again, find these methods:

Code: [Select]
  def attack_effect(attacker)
...
  def skill_effect(user, skill)

Find this line in bothe methods:

Code: [Select]
self.sr += self.damage * SRS_rate / last_hp

Under each add:

Code: [Select]
self.sr += self.damage * SRS_rate / last_hp if @states.include?(ID)

Change ID to the state you want. This will double the SRS_rate.

BUT!
If you want it to increase consantly every round if a state is applied, you need something different.


Now about Minkoff's script:

Find this part of the code:

Code: [Select]
    # Set values and poses based on Action
    case battler.current_action.kind
    when 0  # Attack
      rush_type = $rush_attack
      full_moving = true ; if rush_type; full_moving = false; end
      if $move2center_atk.include?(battler.weapon_id); center_move=true ; end
      if $stationary_enemyid.include?(battler.id) and battler.is_a?(Game_Enemy)
        full_moving = false
        center_move = false
        rush_type = false
      end
      if battler.current_action.basic == 2
        # If escaping, disable all movement
        full_moving = false
        center_move = false
        rush_type = false       
      end
      base_pose = $p7
      base_pose = $poses_weapons[battler.weapon_id] if $poses_weapons.include?(battler.weapon_id)     
      if battler.current_action.basic == 2
        base_pose = $poses_escaping if $poses_escaping != nil
      end
     
    when 1  # Skill
      rush_type = $rush_skill
      if $moving_skill_atk.include?(@skill_used) ; full_moving = true ; end
      if $move2center_skill.include?(@skill_used) ; center_move = true ; end       
      base_pose = $p9
      base_pose = $poses_skills[@skill_used] if $poses_skills.include?(@skill_used)
    when 2  # Item
      rush_type = $rush_item
      if $moving_item_atk.include?(@item_used) or @item_scope == 1..2 ; full_moving = true ; end
      if $move2center_item.include?(@item_used); center_move = true; end
      base_pose = $p8
      base_pose = $poses_items[@item_used] if $poses_items.include?(@item_used)

Add after them these lines here:

Code: [Select]
    when 3  # SR
      rush_type = $rush_skill
      if $moving_skill_atk.include?(@skill_used) ; full_moving = true ; end
      if $move2center_skill.include?(@skill_used) ; center_move = true ; end       
      base_pose = $p9
      base_pose = $poses_skills[@skill_used] if $poses_skills.include?(@skill_used)
    when 9  # SL
      rush_type = $rush_skill
      if $moving_skill_atk.include?(@skill_used) ; full_moving = true ; end
      if $move2center_skill.include?(@skill_used) ; center_move = true ; end       
      base_pose = $p9
      base_pose = $poses_skills[@skill_used] if $poses_skills.include?(@skill_used)
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: blazinhandle on January 25, 2007, 05:38:25 PM
wow.....

okay, the first one works now for sure. Sorry, I was replacing it instead of adding it before.

And commands are all set as well. My hat is off to you permanently, Blizz!  :=:
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: blazinhandle on January 29, 2007, 05:49:50 PM
hey blizz, is this compatable with Momo's battle icon command script?

Momo's Battle Icon Command Script

Code: [Select]
###################################################
# ?????????????
#
# ??????????????????????
# ??????????????????????????
# ?????????????????????????????
# ???????????????????????????????????
#
# 2005.8.15 ????
# ???????????????????????????
#
# 2006.2.17
# ????????????????????

if true  # ?????? true????false???
 
module Momo_IconCommand
  # ???????????
  ATTACK_ICON_NAME = "Weapon01" # ??
  SKILL_ICON_NAME = "Skill01"   # ???
  GUARD_ICON_NAME = "menu2"  # ??
  ITEM_ICON_NAME = "Item01"     # ????
  # ??????x????
  X_PLUS = -60
  # ??????y????
  Y_PLUS = -170
  # ??????????
  # 0:????? 1:??
  SELECT_TYPE = 1
  # ????????
  FLASH_COLOR = Color.new(255, 255, 255, 128)
  # ???????????(????)
  FLASH_DURATION = 10
  # ?????????(????)
  FLASH_INTERVAL = 20
 
  ZOOM_MAX = 1.5      # ????(1.0??)
  ZOOM_MIN = 0.5      # ????(1.0??)
  ZOOM_INTERVAL1 = 4  # ????????????????
  ZOOM_INTERVAL2 = 4  # ????????????????
  ZOOM_INTERVAL3 = 4  # ????????????????
  ZOOM_INTERVAL4 = 4  # ????????????????
  ZOOM_TYPE = true   # ???????true????????false
 
  # ????????????????
  COM_NAME_DROW = true
  # ??????????
  COM_NAME_MOVE = true
  # ???????
  ATTACK_NAME = "Attack"    # ??
  SKILL_NAME = "Skills"   # ???
  GUARD_NAME = "Defend"     # ??
  ITEM_NAME = "Items"  # ????
  # ????
  COM_NAME_COLOR = Color.new(255, 255, 255, 255)
  # ????????????
  COM_NAME_X_PLUS = 60
  COM_NAME_Y_PLUS = 60
end

class Window_CommandIcon < Window_Selectable
  attr_accessor :last_index
  #--------------------------------------------------------------------------
  # ? ?????????
  #--------------------------------------------------------------------------
  def initialize(x, y, commands)
    super(520, 150, 40, 160)
    # ??????????????????????????????????
   
    @item_max = commands.size
    @commands = commands
    @row_max = commands.size
    @index = 0
    @last_index = nil
    @name_sprite = nil
    @sprite = []

    self.opacity = 160
    refresh
  end
  def dispose
    super
    for sprite in @sprite
      sprite.dispose unless sprite.nil?
    end
    @name_sprite.dispose unless @name_sprite.nil?
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #--------------------------------------------------------------------------
  def refresh
    @name_sprite.dispose unless @name_sprite.nil?
    for sprite in @sprite
      sprite.dispose unless sprite.nil?
    end
    @name_sprite = nil
    draw_com_name if Momo_IconCommand::COM_NAME_DROW
    @sprite = []
    for i in 0...@item_max
      draw_item(i)
    end
  end
  #--------------------------------------------------------------------------
  # ? ?????
  #--------------------------------------------------------------------------
  def draw_item(index)
    @sprite[index] = Sprite_Icon.new(nil, @commands[index])
    @sprite[index].z = self.z + 1
   
  end
  def draw_com_name
    @name_sprite = Sprite_Comm_Name.new(nil, get_com_name)
   
  end
 
  # ??
  def update
    super
    icon_update
    com_name_update if Momo_IconCommand::COM_NAME_DROW
    if move_index?
      @last_index = self.index
    end
  end
  # ???????
  def icon_update
    for i in 0...@sprite.size

     
      @sprite[i].active = (self.index == i)
      @sprite[i].x = self.x + 20#+ i * 24
      @sprite[i].y = self.y  + i * 30 +32
      @sprite[i].z = (self.index == i) ? self.z + 2 : self.z + 1
      @sprite[i].visible = self.visible
      @sprite[i].update
    end
  end
  # ??????????
  def com_name_update
    if move_index?
      @name_sprite.name = get_com_name
    end
    @name_sprite.x = self.x - 12 + Momo_IconCommand::COM_NAME_X_PLUS
    @name_sprite.y = self.y - 40 + Momo_IconCommand::COM_NAME_Y_PLUS
    @name_sprite.z = self.z + 1
    @name_sprite.active = self.active
    @name_sprite.visible = self.visible
    @name_sprite.update
  end
  def get_com_name
    make_name_set if @name_set.nil?
    name = @name_set[self.index]
    name = "" if name.nil?
    return name
  end
  def make_name_set
    @name_set = []
    @name_set[0] = Momo_IconCommand::ATTACK_NAME
    @name_set[1] = Momo_IconCommand::SKILL_NAME
    @name_set[2] = Momo_IconCommand::GUARD_NAME
    @name_set[3] = Momo_IconCommand::ITEM_NAME
  end
  def move_index?
    return self.index != @last_index
  end
  def need_reset
    @name_sprite.need_reset = true if Momo_IconCommand::COM_NAME_DROW
  end
end

# ??????????
class Sprite_Icon < Sprite
  attr_accessor :active
  attr_accessor :icon_name
  #--------------------------------------------------------------------------
  # ? ?????????
  #--------------------------------------------------------------------------
  def initialize(viewport, icon_name)
    super(viewport)
    @icon_name = icon_name
    @last_icon = @icon_name
    @count = 0
    @zoom_in = Momo_IconCommand::ZOOM_TYPE
    self.bitmap = RPG::Cache.icon(@icon_name)
    self.ox = self.bitmap.width / 2
    self.oy = self.bitmap.height / 2
    @active = false
  end
  #--------------------------------------------------------------------------
  # ? ??
  #--------------------------------------------------------------------------
  def dispose
    if self.bitmap != nil
      self.bitmap.dispose
    end
    super
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #--------------------------------------------------------------------------
  def update
    super
    if @icon_name != @last_icon
      @last_icon = @icon_name
      self.bitmap = RPG::Cache.icon(@icon_name)
    end
    if @active
      case Momo_IconCommand::SELECT_TYPE
      when 0
        icon_flash
      when 1
        icon_zoom
      end
    else
      icon_reset
    end
  end
  def icon_flash
    if @count % Momo_IconCommand::FLASH_INTERVAL == 0 or @count == 1
      self.flash(Momo_IconCommand::FLASH_COLOR, Momo_IconCommand::FLASH_DURATION)
    end
    @count += 1
  end
  # ????
  def icon_zoom
    if @zoom_in
      interval1 = Momo_IconCommand::ZOOM_INTERVAL1
      interval2 = Momo_IconCommand::ZOOM_INTERVAL2
      zoom_max = Momo_IconCommand::ZOOM_MAX
      zoom_in(zoom_max, interval1, interval2)
    else
      interval1 = Momo_IconCommand::ZOOM_INTERVAL3
      interval2 = Momo_IconCommand::ZOOM_INTERVAL4
      zoom_min = Momo_IconCommand::ZOOM_MIN
      zoom_out(zoom_min, interval1, interval2)
    end
    @count += 1
    if @count >= interval1 + interval2
      @count = 0
      @zoom_in ^= true
    end
  end
  # ????
  def zoom_in(zoom_max, interval1, interval2)
    if interval1 >= @count
      zoom = 1.0 + (zoom_max - 1.0) * (1.0 * @count / interval1)
    else
      zoom = zoom_max - (zoom_max - 1.0) * (1.0 * (@count - interval1) / interval2)
    end
    self.zoom_x = zoom
    self.zoom_y = zoom
  end
  # ????
  def zoom_out(zoom_min, interval1, interval2)
    if interval1 >= @count
      zoom = 1.0 - (1.0 - zoom_min) * (1.0 * @count / interval1)
    else
      zoom = zoom_min + (1.0 - zoom_min) * (1.0 * (@count - interval1) / interval2)
    end
    self.zoom_x = zoom
    self.zoom_y = zoom
  end
  def icon_zoom000
    case @count
    when 1..10
      zoom = 1.0 + @count / 10.0
    when 11..20
      zoom = 2.0 - (@count - 10) / 10.0
    end
    self.zoom_x = zoom
    self.zoom_y = zoom
  end
  def icon_reset
    @count = 0
    self.zoom_x = 1.0
    self.zoom_y = 1.0
  end
end

# ?????????????
class Sprite_Comm_Name < Sprite
  attr_accessor :active
  attr_accessor :name
  attr_accessor :need_reset
  #--------------------------------------------------------------------------
  # ? ?????????
  #--------------------------------------------------------------------------
  def initialize(viewport, name)
    super(viewport)
    @name = name
    @last_name = nil
    @count = 0
    @x_plus = 0
    @opa_plus = 0
    @need_reset = false
    @active = false
    self.bitmap = Bitmap.new(160, 32)
  end
  #--------------------------------------------------------------------------
  # ? ??
  #--------------------------------------------------------------------------
  def dispose
    if self.bitmap != nil
      self.bitmap.dispose
    end
    super
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #--------------------------------------------------------------------------
  def update
    super
    if @active
      if need_reset?
        @need_reset = false
        @last_name = @name
        text_reset
      end
      move_text if Momo_IconCommand::COM_NAME_MOVE
    end
  end
  def move_text
    @count += 1
    @x_plus = [@count * 8, 80].min
    self.x = self.x - 80 + @x_plus
    self.opacity = @count * 25
  end
  def text_reset
    @count = 0
    @x_plus = 0
    self.bitmap.clear
    self.bitmap.font.name = "Final Frontier"
    self.bitmap.font.color = Momo_IconCommand::COM_NAME_COLOR
    self.bitmap.draw_text(0, 0, 160, 32, @name)
  end
  def need_reset?
    return (@name != @last_name or @need_reset)
  end
end

class Scene_Battle
  #--------------------------------------------------------------------------
  # ? ???????????
  #--------------------------------------------------------------------------
  alias scene_battle_icon_command_start_phase1 start_phase1
  def start_phase1
    com1 = Momo_IconCommand::ATTACK_ICON_NAME
    com2 = Momo_IconCommand::SKILL_ICON_NAME
    com3 = Momo_IconCommand::GUARD_ICON_NAME
    com4 = Momo_IconCommand::ITEM_ICON_NAME
    @actor_command_window = Window_CommandIcon.new(0, 0, [com1, com2, com3, com4]) #Window_CommandIcon
    @actor_command_window.y = 50
    @actor_command_window.back_opacity = 160
    @actor_command_window.active = false
    @actor_command_window.visible = false
    @actor_command_window.update
    scene_battle_icon_command_start_phase1
  end
  #--------------------------------------------------------------------------
  # ? ????????????????????
  #--------------------------------------------------------------------------
#  alias scene_battle_icon_command_phase3_setup_command_window phase3_setup_command_window
#  def phase3_setup_command_window
#    scene_battle_icon_command_phase3_setup_command_window
    # ???????????????????
#    @actor_command_window.x = command_window_actor_x(@actor_index)
#    @actor_command_window.y = command_window_actor_y(@actor_index)
#    @actor_command_window.need_reset
#  end
#  def command_window_actor_x(index)
#    $game_party.actors[index].screen_x + Momo_IconCommand::X_PLUS
#  end
#  def command_window_actor_y(index)
#    $game_party.actors[index].screen_y + Momo_IconCommand::Y_PLUS
#  end
end
end
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: Blizzard on January 30, 2007, 01:55:45 PM
Nope. At least not that I know.

And LOL, my battle icon script is shorter and looks better. :)
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: blazinhandle on January 30, 2007, 04:07:39 PM
ur wouldn't happen to have the link for that would you  ;) ;) sorry about the irrelevance to the SR/SL topic...
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: Blizzard on January 30, 2007, 04:19:12 PM
Haven't posted it. Might never do.
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: blazinhandle on January 30, 2007, 04:30:47 PM
lol, you silly SOB  ;D
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: oneray on February 15, 2007, 09:13:32 PM
When ever I choose a skill through a weapon or armour, and press either left or right, I experience an error. It is hard to explain but it think this will help: ATTACK>WEAPON SKILL>GRANLIAN TRUST (SKILL)>ERROR
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: Blizzard on February 18, 2007, 05:44:44 PM
Hm... Very unusual... Well, just upload your Scripts.rxdata again, I'll fix it. ;)
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: oneray on February 18, 2007, 06:12:56 PM
NVM. I fixed the problem. ;Dthxs anyway
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: Blizzard on February 18, 2007, 09:13:34 PM
No problem. ;D I'll release a version 4.3b with a refined code in the next few days. I have noticed and "apparent glitch". The SR attribute wouldn't reset when the character is killed with a "Do damage in battle" event command. Also I that gives me the opportunity to remove some lines of the code. In other words: I know what I need to fix, it takes about 5 minutes. ::)
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: Karo Rushe on February 19, 2007, 01:52:23 AM
I would like to know how to make a skill that would Recover the SL/SR Bar in Battle, I kinda gets glitches all over it.
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: Blizzard on February 19, 2007, 12:08:29 PM
Make a commone event call and just use the Call Script command. You would only need a separate skills and a separate common event for each character. You can find in the instructions how to increase/decrease the SR with a Call Script command.
Title: Re: Soul Rage System + Soul Limit System v4.2b
Post by: blazinhandle on February 20, 2007, 04:24:43 PM
blizz, is the SR compatable with advance skill scopes?
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: Blizzard on February 23, 2007, 06:30:50 PM
*updates*
Now compatible with Tons of Add-ons. ;8

EDIT:
@blazin: Most probably yes.
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: Karo Rushe on February 23, 2007, 06:47:21 PM
>=D Excellent....

I will Enjoy this even more.
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: Blizzard on February 23, 2007, 07:02:21 PM
(^_~)d
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: tSwitch on February 23, 2007, 10:39:39 PM
I'm going to use this for my game.
great system.

only 2 things I want to ask

1) why dosen't the cursor stay on Soul Limit or Soul Rage when you cycle
to them?
2) do you mind if I change some of the names to fit my storyline?
like change Soul Limit into Finisher or something?
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: Blizzard on February 24, 2007, 11:26:47 AM
1) Ever played FF7/FF8/FF9? You know, when you press right, the command comes up, but when you let go of it, the old command appears again. That's why.

2) Sure, feel free to rename it, lol! Press CTRL+SHIFT+F, type in the first window "Soul Rage" (with the ") and in the second "YOUR_NEW_NAME_FOR_SOUL_RAGE". Soul Limit is never mentioned as such within the script, only in the comments, so you don't need to rename that one in the script. I use the name "Meta Soul Limit" for the Limits in my game. ;)
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: tSwitch on February 25, 2007, 10:43:34 PM
yes I have played FF7-9, I just wondered if it was supposed to 'stick'

I'm glad there aren't issues with the names.
and yeah I just realized that limit never is mentioned.
Title: Percentage showing
Post by: Ceaon on March 05, 2007, 03:18:07 PM
Hey, I got a question.
In battle, the percentage is showing (for example 45,3%). Which lines do you have to remove so that you only view the bar, not the percentage? Thanks in advance.
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: Blizzard on March 05, 2007, 03:25:20 PM
self.contents.draw_text(x, y, w, h "SOMETEXT_WITH_%_IN_IT") in def draw_actor_sr.
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: Ceaon on March 05, 2007, 05:27:44 PM
Thanks, it's not what you said, but I now found it out myself. Very nice script btw.
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: Karo Rushe on March 10, 2007, 04:00:22 PM
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg441.imageshack.us%2Fimg441%2F2308%2Ferror1bj7.png&hash=b3d536ed78ccf45432d37a976b1517cbc8c0cddb) (http://imageshack.us)

I get this with Mink's Side-View Battle system when I use Soul-Rage.
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: blazinhandle on March 10, 2007, 07:28:54 PM
u have to implement the SR/SL to Minkoffs, its explained in earlier pages.
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: Karo Rushe on March 11, 2007, 04:14:02 AM
I wish I could know how to do that....What should I do now?  :=:
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: Blizzard on March 11, 2007, 01:15:03 PM
Same bug like in the CMS.
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: blazinhandle on March 12, 2007, 03:06:50 AM
hey blizz how can you implement the SR/SL to hold icons like other commands?
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: Blizzard on March 12, 2007, 11:21:20 AM
Sure. You need to mod "def refresh" from Window_Command in the script.
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: blazinhandle on March 12, 2007, 09:47:58 PM
Sure. You need to mod "def refresh" from Window_Command in the script.

well this is what im using to draw the gradients:

Spoiler for:
Code: [Select]
class Window_Battle_Command < Window_Selectable
  #-----------------------------------------------------------------------------
  # @ Draw choice
  #-----------------------------------------------------------------------------
  def draw_item(index, color)
    bitmap = RPG::Cache.icon(@commands[index] + ".png")
    opacity = color == normal_color ? 255 : 128
    self.contents.blt(4, 32*index, bitmap, Rect.new(0, 0, 24, 24), opacity)
    self.contents.font.color = color
    rect = Rect.new(28, 31 * index, self.contents.width - 28, 28)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    self.contents.draw_text(rect, @commands[index])
  end
end

what exactly do i do in refresh? with the command icon script above i still don't have an icon for "Soul Rage" (or in my case "Adrenaline") even when I have an icon named after it. sorry man, i'm not sure what to do.
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: Blizzard on March 12, 2007, 09:53:27 PM
Alright, I'll explain it. RGSS uses bitmaps to display stuff. You can let text be drawn on bitmaps with draw_text(...). Now, the trick it is that you also can cache icons and put them on bitmaps with blt(...). You basically need to change Window_Command's def refresh in the SRS script by adding the caching part and "putting the icon on the bitmap". You need increase the x value of the Soul Rage/Adrenaline text drawing to move it to the right to make some room first.
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: blazinhandle on March 13, 2007, 06:41:19 AM
Alright, I'll explain it. RGSS uses bitmaps to display stuff. You can let text be drawn on bitmaps with draw_text(...). Now, the trick it is that you also can cache icons and put them on bitmaps with blt(...). You basically need to change Window_Command's def refresh in the SRS script by adding the caching part and "putting the icon on the bitmap". You need increase the x value of the Soul Rage/Adrenaline text drawing to move it to the right to make some room first.

i came out with something like this:

Spoiler for:
Code: [Select]
elsif ALLOW_RAGE and @commands[1] == "Adrenaline"
      for j in 0...6
        self.contents.clear
        self.contents.font.color = RAGE_COLOR
    bitmap = RPG::Cache.icon("Adrenaline")
    self.contents.blt(4, 32*index, bitmap, Rect.new(0, 0, 24, 24), opacity)
        rect = Rect.new(164 - j * 28, 32, self.contents.width - 28, 28)
        self.contents.draw_text(rect, @commands[1])
        self.contents.font.color = normal_color
        for i in 0...@item_max
          unless @commands[i] == "Adrenaline"
            draw_item(i, normal_color)
          end
        end

however it only shows up when im holding >> and then pressing down to another command just before it disappears (it'll do it for just a second then you have to go back and hold right while scrolling down the commands)...
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: Blizzard on March 13, 2007, 11:22:38 AM
Code: [Select]
self.contents.blt(4, 32*index, bitmap, Rect.new(0, 0, 24, 24), opacity)

Use this instead:

Code: [Select]
self.contents.blt(164 - j * 28, 32, bitmap, Rect.new(0, 0, 24, 24), opacity)

The the icons will move as well. If it still doesn't work, try putting your two commands below the code you just posted, after the second "end".
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: blazinhandle on March 13, 2007, 06:43:42 PM
hmmm still nothing. When I placed them below the ends the icons just disappeared right away...
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: tSwitch on March 13, 2007, 07:18:29 PM
damnit, I can't find how to reset SR at the end of battle
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: Blizzard on March 13, 2007, 08:11:23 PM
You mean reset to 0? Just use a parallel process common event and put this into a call script command:

Code: [Select]
for actor in $game_party.actors
  actor.sr = 0
end
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: tSwitch on March 14, 2007, 06:42:56 PM
still learning RPG Maker XP a bit, you can make a common event a paralell process?
like without needing an event?
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: Blizzard on March 14, 2007, 06:46:56 PM
Yes. You only need to turn on the switch you set to activate the event. You can use such an event game-wide, not for only one map. :)
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: tSwitch on March 14, 2007, 10:34:14 PM
cool, I didn't know that ;D
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: Rune on March 17, 2007, 04:23:31 PM
 :o That's one ace script there matey

How do you do it
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: Blizzard on March 17, 2007, 09:40:18 PM
I type them? ?_?
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: Rune on March 31, 2007, 09:18:12 AM
Is there a way to change someone's Soul Limit in-game?
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: Blizzard on March 31, 2007, 11:07:00 AM
Quote from: Instructions
# 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("STRING", ID)
#
# - X is the ID of the hero in the database and Y the ammount
# - STRING is the new name for the SL command
# - ID is the ID of the new SL skill in the database
#
# You can also use another syntax:
#
# $game_party.actors[X].set_new_limit("STRING", ID)
#
# X is the postion of the hero in the party. Note that X starts from 0 (NOT 1)!
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: Rune on March 31, 2007, 01:20:52 PM
 :( Why don't I read?
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: JFloyd on April 02, 2007, 12:50:04 AM
I don't understand how to add wepons to the list.
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: Blizzard on April 03, 2007, 10:13:39 AM
Code: [Select]
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
#
# START SR 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(SOULRAGE_SKILL_ID)
#   skill_ids.push(SOULRAGE_SKILL_ID)
#
# The same works for armors:
#
# when ARMOR_ID
#   skill_ids.push(SOULRAGE_SKILL_ID)
#   skill_ids.push(SOULRAGE_SKILL_ID)
#
# 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 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 6
        skill_ids.push(1)
      when 18
        skill_ids.push(25)
      end
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END SR Database
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Just like the database instructions tell you. Since the code is like this:

Quote
    if weapon
      case equip_id # weapon IDs
      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 6
        skill_ids.push(1)
      when 18
        skill_ids.push(25)
      end


I think it shouldn't be a problem. =P
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: JFloyd on April 03, 2007, 09:41:41 PM
I dont understand where to put the stuff....lol, i dont understandy ruby what so ever.
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: Rune on April 04, 2007, 12:44:55 PM
Code: [Select]
when 6
        skill_ids.push(10)
        skill_ids.push(11)
        skill_ids.push(12)
The 6 would be the weapon or armor ID and the numbers in the brackets are the IDs of the skills that that piece of equipment uses as their Soul Rage
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: JFloyd on April 04, 2007, 08:27:22 PM
ok, so say my weapon is 033, the last one on the list, and i want it to use heal i put in that?
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: blazinhandle on April 04, 2007, 11:00:25 PM
so your weapon id in the database is 33, and your skill id in the database is, say, 50...then it would be:

when 33
  skill_ids.push(50)
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: Karo Rushe on April 15, 2007, 01:53:29 AM
This is the Newest Thing I have ever Seen!!!  :tpg:

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg253.imageshack.us%2Fimg253%2F9344%2Fnewerrorai0.png&hash=4a5018010f44576a212bbf0ec1b6aa1c2bd255df) (http://imageshack.us)

How do I fix t
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: Blizzard on April 16, 2007, 10:11:34 AM
Go to line 1165. There might be something very similar to

Code: [Select]
for i in 0...$data_skills.size

If so, change it to

Code: [Select]
for i in 1...$data_skills.size

If not, then there should be something like

Code: [Select]
for SKILL in $data_skills

where SKILL could be skill or just i. If so, below it add

Code: [Select]
next if SKILL == nil

use skill or i instead of SKILL depending on which as in the one above.


Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: Rune on April 16, 2007, 04:12:26 PM
When my Soul Limit is available... There's no arrow next to the attack command... why not? ???
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: Blizzard on April 16, 2007, 04:18:50 PM
Try checking if you have set it up correctly. And try to use the Soul Limit even if you don't have it available. It could be that it's a mistake I made when I was fixing it the last time...
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: Rune on April 16, 2007, 05:08:54 PM
I have set it up correctly... and the Soul Limit doesn't work when it's not available...
It still works when it's supposed to...
Title: Re: Soul Rage System + Soul Limit System v4.4b
Post by: Blizzard on April 16, 2007, 07:06:49 PM
I'll check it out. Might be my mistake.