[XP] Chaos Rage Limit System

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

Previous topic - Next topic

X-Law

lol so my english is worse than i thought :^_^': The multiple limits is just an example. I just wanna show the limit name in a menu, to show a help for it. I need to use CRLS, cuz i'm using CD, SR and SL ^^.
So i think i found MY error in the window command lol. I'm really silly xD. I forgot to add the summoned char ID into the chaos drive config. I added the ID and now it's working right :). So thanks anyway ^^
Now i just need that request before, the way to show the limit name in a menu :P

AlbatrosStorm is on sale now!

Blizzard

May 06, 2009, 10:58:57 am #161 Last Edit: May 06, 2009, 01:02:27 pm by Blizzard
Post me the script of the Window_Skill you are using and I'll edit it.

EDIT:

Quote
Script 'CRLS Blizz ABS' line 6449: NoMethodErroe occured

undefined method 'icon_name' for nil:NilClass


CRLS configuration, specifically SL:

    when 1
      limit_name = "Devastator"
      limit_id = 81
      ...
    when 2
      limit_name = "Summon Proximus"
      limit_id = 82
      ...


The number of skills in your database: 80.
Now somebody tell me how can you expect an actor to be able to use skill #81 or #82 if the skill doesn't exist?
Check out Daygames and our games:

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


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

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

Shining Riku

Well, if you were talking to me, Blizz, how do I turn CD's on then? :P

Is THAT why the CD option stays darkened in battle, even though I have everything turned on? :???:
I thought it was just as simple as setting CD's to true...... :huh:


X-Law

ok, so actually i'm using the one used in Alistor's Menu, atm just to try it out. But maybe i just use the normal window_skills instead. I wanna use the most easy option
Spoiler: ShowHide
Quote#==============================================================================
# ** RMXP Standard Development Kit (SDK)
#------------------------------------------------------------------------------
#  A system aimed to increase compatibility between RGSS scripts
#==============================================================================
module SDK
# Set Autodetect global to false
$lbadd_menu_sdk = false
# SDK Autodetect routine
if defined?(log_alias)
   # Set Autodetect global to true
   $lbadd_menu_sdk = true
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 :lb_attack_detected
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
alias lbadd1_init initialize
def initialize
   lbadd1_init
   if @lb_height != nil
     @lb_attack_detected = true
   end
end
end

#==============================================================================
# ** Game_Temp
#------------------------------------------------------------------------------
#  This class handles temporary data that is not included with save data.
#  Refer to "$game_temp" for the instance of this class.
#==============================================================================
class Game_Temp
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :seperation               # Seperation flag
attr_accessor :limitbreak_skills        # Limit Break skill flag
attr_accessor :limit_menu               # Limit Break menu flag
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
alias lbadd1_init initialize
def initialize
   lbadd1_init
   @seperation         = true
   @limitbreak_skills  = false
   @limit_menu         = false
end
end

#==============================================================================
# ** Window_Skill
#------------------------------------------------------------------------------
#  This window displays usable skills on the skill and battle screens.
#==============================================================================
class Window_Skill < Window_Selectable
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
unless $gnd_lb_patch 
def refresh
   if self.contents != nil
     self.contents.dispose
     self.contents = nil
   end
   @data = []
   unless @actor == nil
     for i in 0...@actor.skills.size
       skill = $data_skills[@actor.skills]
       unless skill == nil
         if $game_temp.seperation
           if $game_temp.limitbreak_skills
             @data.push(skill) if skill.element_set.include?($lb_element_id)
           else
             @data.push(skill) unless skill.element_set.include?($lb_element_id)
           end
         else
           @data.push(skill)
         end
       end
     end
   end
   # If item count is not 0, make a bit map and draw all items
   @item_max = @data.size
   if @item_max > 0
     self.contents = Bitmap.new(width - 32, row_max * 32)
     for i in 0...@item_max
       draw_item(i)
     end
   end
   $game_temp.seperation        = true
   $game_temp.limitbreak_skills = false
end   
end
#--------------------------------------------------------------------------
# * Draw Item
#     index : item number
#--------------------------------------------------------------------------
def draw_item(index)
   skill = @data[index]
   if @actor.skill_can_use?(skill.id)
     self.contents.font.color = normal_color
   else
     self.contents.font.color = disabled_color
   end
   x = 4 + index % 2 * (288 + 32)
   y = index / 2 * 32
   rect = Rect.new(x, y, self.width / @column_max - 32, 32)
   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, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
   self.contents.draw_text(x + 28, y, 204, 32, skill.name, 0)
   unless HIDE_ZERO_SP && skill.sp_cost == 0
     self.contents.draw_text(x + 232, y, 48, 32, skill.sp_cost.to_s, 2)
   end
end
#--------------------------------------------------------------------------
# * Check Data
#--------------------------------------------------------------------------
def data
   return @data
end
end

I'm not using SDK at all, so for the compatibility part just ignore it XD
Thanks in advance

AlbatrosStorm is on sale now!

Blizzard

Then put a demo together. That script doesn't seem to mess up anything. :/

Quote from: Scientist Riku on May 06, 2009, 05:58:51 pm
Well, if you were talking to me, Blizz, how do I turn CD's on then? :P

Is THAT why the CD option stays darkened in battle, even though I have everything turned on? :???:
I thought it was just as simple as setting CD's to true...... :huh:


Yes. You need to set the conditions for the CD command to become available. i.e.

      cdsr_rate = 0
      cdhp_rate = 100
      cdsp_rate = 100

Check out Daygames and our games:

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


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

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

cstb

Dont forget to give your character the CD's in an event!
Chronos: Failed project due to loss of data.
Maybe I could try again...


Which Final Fantasy Character Are You?
Final Fantasy 7

X-Law


AlbatrosStorm is on sale now!

Shining Riku

May 07, 2009, 06:25:21 pm #167 Last Edit: May 07, 2009, 10:10:38 pm by Scientist Riku
Thanks guys.  :P I feel blind.

I am SO sorry for being an idiot. I'll do what you all said.

I finally got it to work. I wasn't aware I had to set up those settings in the character's Soul Limit thingy. Sorry for all the trouble.  :^_^':
But now I can continue things without a hitch. Thanks again!

EDIT: Whoa! Ok, something really weird happened. I tried the Chaos Drive, but whenever the transformed actor gets hit he dies instantly.

In another scenario he transformed while another actor attacked one of the foes with a skill. Transformed actor died instantly after that foe was damaged and subsequently defeated. He died any time damage was dealt, and it may be safe to assume if any damage is inflicted he'd die instantly for whatever reason.

Do you know what may be the cause Blizz? I'm clueless.  :O_O:

Blizzard

# Additional info:
#
#   You can use animations and common event calls (i.e. for enhanced
#   animations) for any CD skill. It is recommended that CD skills target the
#   user.
#
#
# Important note:
#
#   Chaos Drives are not normal skills and should be NOT used as such. Chaos
#   Drive skills as normal skills will not make a transformation happen. Do not
#   assign two different characters the same Chaos Drive character. If you want
#   them to access the same character, make a duplicate CD character in your
#   database.
Check out Daygames and our games:

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


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

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

Mightylink

Quote from: X-Law
n00b at scripting :(


Eh men, me too :P

Tried to learn, but I got sick of useless hello world tutorials.

Blizzard

May 08, 2009, 03:34:10 am #170 Last Edit: May 08, 2009, 06:12:16 am by Blizzard
Maybe you should read my e-book. xD

EDIT: @X-Law:
Quote#==============================================================================
# ** Limit Break (DVV's)
#------------------------------------------------------------------------------
#    by DerVVulfman
#    version 2.6
#    07-25-2008
#    Full SDK 2.2 Compatible (Does not need or require SDK 2.2)
#------------------------------------------------------------------------------


No, but it breaks my script because it defines SDK. -_- This section here:

module SDK
  # Set Autodetect global to false
  $lbadd_menu_sdk = false
  # SDK Autodetect routine
  if defined?(log_alias)
    # Set Autodetect global to true
    $lbadd_menu_sdk = true
  end 
end


Replace it with this one:

$lbadd_menu_sdk = true


Secondly you put this script below the CRLS and you expect it to work? Lol.

Thirdly. When I define the SL configurations properly, everything works fine.

Fourthly. This piece of code here:

      for i in 0...@actor.skills.size
        skill = $data_skills[@actor.skills[i]]
        unless skill == nil
          if $game_temp.seperation
            if $game_temp.limitbreak_skills
              @data.push(skill) if skill.element_set.include?($lb_element_id)
            else
              @data.push(skill) unless skill.element_set.include?($lb_element_id)
            end
          else
            @data.push(skill)
          end
        end
      end


Below it add this here:

      skill = $data_skills[@actor.limit_id]
      unless skill == nil
        if !$game_temp.seperation || !$game_temp.limitbreak_skills
          @data.push(skill)
        end
      end

Check out Daygames and our games:

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


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

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

X-Law

May 08, 2009, 10:52:03 am #171 Last Edit: May 08, 2009, 10:56:17 am by X-Law
Thanks Blizzard!
But well...
First, I changed the part of the SDK module to the line you gave
$lbadd_menu_sdk = true

and then got 2 errors; One of undefined method Window_HorizCommand (this one is defined in sdk, but i don't use sdk), and the other error in window_base o.O. Anyway, with the module by default, it worked right with your scripts.
Secondly, i didn't expect it to work, that's why i'm asking for help -.-

QuoteThirdly. When I define the SL configurations properly, everything works fine.

what do you mean by that? i think i configured it properly too, and it works fine too, or what do you mean by works fine? in the menu option? lol

Fourthly, well i added that piece of code, but at the beggining it doesn't work i added in this way
for i in 0...@actor.skills.size
        skill = $data_skills[@actor.skills[i]]
        unless skill == nil
          if $game_temp.seperation
            if $game_temp.limitbreak_skills
              @data.push(skill) if skill.element_set.include?($lb_element_id)
            else
              @data.push(skill) unless skill.element_set.include?($lb_element_id)
            end
          else
            @data.push(skill)
          end
        end
        skill = $data_skills[@actor.limit_id]
        unless skill == nil
          if !$game_temp.seperation || !$game_temp.limitbreak_skills
            @data.push(skill)
          end
        end
      end

But it doesn´t work :(, then i changed this line
if !$game_temp.seperation || !$game_temp.limitbreak_skills
to this
if $game_temp.seperation || !$game_temp.limitbreak_skills
but it doesn't work neither, Then i realized that i must give the skill to the player, then it shows up in the window. But then the player can use the skill as a normal skill, and SL use the skill ID associated without have to learn the skill first :(. And then, once again i got drawed the name of the skill in the database instead of the name of the Limit. I mean, the skill associated in CRLS to Devastator is Sanctus. I want to show Devastator in the menu instead of Sanctus.
I'm my way of noob (lol) i tried adding some lines to "draw_item" method, changing
skills.name
from
draw_text
, to
$game_actors[@actor.id].limit_name
, then the limit name is drawed correctly :D. But maybe this can cause bugs, cuz this method is used to draw the skills in a normal window_skills :S
I'm a pain in the ass, i know, sorry :(. Maybe i'll just should leave the system without modifications -.-
Quote from: Mightylink on May 08, 2009, 03:27:01 am
Quote from: X-Law
n00b at scripting :(


Eh men, me too :P

Tried to learn, but I got sick of useless hello world tutorials.

yep i got sick too, i tried using some tutorials in my lenguage, but it doesn't get too far :( So, i´m still a n00b xD

AlbatrosStorm is on sale now!

Blizzard

May 08, 2009, 11:48:38 am #172 Last Edit: May 08, 2009, 11:50:27 am by Blizzard
Quote from: X-Law on May 08, 2009, 10:52:03 am
Thanks Blizzard!
But well...
First, I changed the part of the SDK module to the line you gave
$lbadd_menu_sdk = true

and then got 2 errors; One of undefined method Window_HorizCommand (this one is defined in sdk, but i don't use sdk), and the other error in window_base o.O. Anyway, with the module by default, it worked right with your scripts.


That's weird. I didn't get any error when I did that along with putting it in the right order.

Quote from: X-Law on May 08, 2009, 10:52:03 am
Secondly, i didn't expect it to work, that's why i'm asking for help -.-


You need to put everything above CRLS.

Quote from: X-Law on May 08, 2009, 10:52:03 am
QuoteThirdly. When I define the SL configurations properly, everything works fine.

what do you mean by that? i think i configured it properly too, and it works fine too, or what do you mean by works fine? in the menu option? lol


As soon as I made my character be able to use an SL when he has 100% HP, 100% SP and 0% SR, I was able to use SL as much as I want. You need to set up SL right. There's a configuration section of all of it.

Quote from: X-Law on May 08, 2009, 10:52:03 am
Fourthly, well i added that piece of code, but at the beggining it doesn't work i added in this way
for i in 0...@actor.skills.size
        skill = $data_skills[@actor.skills[i]]
        unless skill == nil
          if $game_temp.seperation
            if $game_temp.limitbreak_skills
              @data.push(skill) if skill.element_set.include?($lb_element_id)
            else
              @data.push(skill) unless skill.element_set.include?($lb_element_id)
            end
          else
            @data.push(skill)
          end
        end
        skill = $data_skills[@actor.limit_id]
        unless skill == nil
          if !$game_temp.seperation || !$game_temp.limitbreak_skills
            @data.push(skill)
          end
        end
      end

But it doesn´t work :(, then i changed this line
if !$game_temp.seperation || !$game_temp.limitbreak_skills
to this
if $game_temp.seperation || !$game_temp.limitbreak_skills
but it doesn't work neither, Then i realized that i must give the skill to the player, then it shows up in the window. But then the player can use the skill as a normal skill, and SL use the skill ID associated without have to learn the skill first :(. And then, once again i got drawed the name of the skill in the database instead of the name of the Limit. I mean, the skill associated in CRLS to Devastator is Sanctus. I want to show Devastator in the menu instead of Sanctus.


Well, of course it's drawing the real name of the skill. I can't change that without hacking half of the Window_Skill code.

If this doesn't work:

        skill = $data_skills[@actor.limit_id]
        unless skill == nil
          if !$game_temp.seperation || !$game_temp.limitbreak_skills
            @data.push(skill)
          end
        end


then just use this:

        skill = $data_skills[@actor.limit_id]
        if skill != nil && !$game_temp.in_battle
          @data.push(skill)
        end

Check out Daygames and our games:

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


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

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

Shining Riku

May 08, 2009, 01:27:10 pm #173 Last Edit: May 08, 2009, 01:44:23 pm by Scientist Riku
Yes, I set the skill to target the actor, and as far as I know I followed all the directions. The skill just has one animation, and I didn't do anything else with it.

Only the one actor knows the CD. I do read the instructions.  :'(

I'll play around with some stuff, but I don't expect to find the cause.

EDIT: I DID find the cause! Holy crap I'm stupid!
I had doom states turned on and it happened to be set to the Transformation state. Dang....The second I turned the doom states off It got fixed. This has to be my stupidest mistake yet.

At any rate, it's solved! YAY! :w00t: It's all thanks to the simplicity of your scripts Blizz.

I seem to break what I touch, so this is an improvement for me. Sorry for all the trouble. I must really frustrate the fudge outta all of you.

Thanks for trying to help me though. I'm sorry to have wasted your time.  :urgh:

Blizzard

Did you define into which actor the skill should transform the actor using that skill?
Check out Daygames and our games:

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


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

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

fugibo

If RMXP had a feature to label states from the editor, this stuff would never be a problem. Hours of time could go unwasted.

Shining Riku

Yeah, I have everything figured out now Blizz. :)

I know that only one particular CD can be owned by a character at a time, and yes I've figured out how to attach an "actor" to a particular CD.

I'm all good to go, seriously. It's all up and working now.

Blizzard

Check out Daygames and our games:

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


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

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

X-Law

Hi
So now that all of my other problems got fixed now. I encountered a error/incompatibility. I decided to use DBS finally, but i hate that Fight/Scape bar, so then i'm using the DerVV's script 'Laura's remove escape bar' (or something like that xD), it works but when i select the escape command for an actor, when it supossed to take effect, the game closes and gives me this error
"CRLS line 2135: Nomethoderror ocurred
Undefined method 'current_action' for nil:NilClass"
so the error is given in CRLS script, but it's an incompatibility with the escape option to be in the window_command i think.
How can i fix this? it's easy? or should i find another way to not show the fight/escape bar?
Thanks in advance

AlbatrosStorm is on sale now!

Blizzard

It's how the new command window is named. Can you post the escape bar script?
Check out Daygames and our games:

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


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

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