Limit Break

Whovencroft

Warper
Member
Joined
Feb 28, 2014
Messages
3
Reaction score
0
First Language
English
Primarily Uses
Thanks for the reply Selchar, I wasn't expecting one so quickly.

I haven't tried calling the second conditions first yet, I don't know why that never crossed my mind.

The code I put up for Victor's wasn't exact, it was just my approximation (I wasn't at home to check).

I agree the code should work for his, but it just.. doesn't.

As for the task itself, yes I wanted one to overwrite the other, not have them both available at the same time.

I'm going to try fiddling around with the code I have already based on your suggestion though, probably not till the morning as I'm off to work.

Edit: Well, I spent an hour trying to get this working to no avail.  Four days in, I believe I am out of ideas.  Would you mind terribly helping me out?  
 
Last edited by a moderator:

Selchar

Veteran
Veteran
Joined
Dec 28, 2012
Messages
299
Reaction score
81
First Language
English
Primarily Uses
@Nanaki_Fan - If you are referring to Vendastelca's post, #13, I checked and it works.  The only reason it wouldn't would be either because of a typo onn your part(match it to how you typed it in the terms tab of the database) or another script overwriting the method.

@Whovencroft - Try the following as your limit break script.

Code:
#===============================================================================# Script: True Limit Break# Author: Selchar# Requestor: Whovencroft#-------------------------------------------------------------------------------=beginThis is a modified variant of the Limit Break system from FF7.  You have botha 'normal' limit break, and you have a 'true' limit break.  To use this script,start with the settings below.  You create skill categories much likethe default Skill/Magic, and place it's number Main/True.  Then you createskills in said category and have your actors learn them.  They don't need tohave the "Limit" category under features as the command will appear on it's ownwhen the conditions have been met(Full TP gauge)/(low hp)  Also of note, any skills placed in your "Limit" category will automatically haveit's TP cost equal your current TP, or max TP since you need it at max toaccess the command. Finally, the Limit command will only appear to actors/classes who have thenotetag <use_limit_break>, or are equipped with an item/state that has it.=end#===============================================================================module Selchar  module True_Limit_Break    #Allows you to change Max TP.      Max_TP = 100        #Use this to designate a skill category to be used for Limit Breaks.    Main = 3    #Use this to designate a skill category to be used for True Limit Breaks.    True = 4        #Max Hp % required before the True Limit commad is possible.    Max_HP_Rate = 0.24        #Choose whether your "Limit" command will either replace, or appear above    #the Attack command.    Replace_Attack = false  endend #===============================================================================#Don't edit below this line unless you know what you are doing.#===============================================================================$imported = {} if $imported.nil?$imported[:True_Limit_Break] = true unless $imported[:Selchar_ASCE]  msgbox("'Selchar's Add Skill Command Exceptions hasnot been detected, Exiting")  Exitend module Selchar::ASCE  Battle_ID << Selchar::True_Limit_Break::Main  Battle_ID << Selchar::True_Limit_Break::Trueend class Window_ActorCommand < Window_Command  #--------------------------------------------------------------------------  # * Alias: Add Attack Command to List  #--------------------------------------------------------------------------  alias :sel_true_limit_break_add_attack_command :add_attack_command  def add_attack_command    if @actor.tp == @actor.max_tp      limit_check = @actor.feature_objects.any?{|obj| obj.use_limit_break}      if limit_check        if @actor.hp_rate <= Selchar::True_Limit_Break::Max_HP_Rate          add_true_limit_break_command        else          add_limit_break_command        end        return if Selchar::True_Limit_Break::Replace_Attack      end    end    sel_true_limit_break_add_attack_command  end    #--------------------------------------------------------------------------  # * New Methods: Add Limit Command to List  #--------------------------------------------------------------------------  def add_limit_break_command    name = $data_system.skill_types[Selchar::True_Limit_Break::Main]    add_command(name, :skill, true, Selchar::True_Limit_Break::Main)  end  def add_true_limit_break_command    name = $data_system.skill_types[Selchar::True_Limit_Break::True]    add_command(name, :skill, true, Selchar::True_Limit_Break::True)  endend class Game_BattlerBase  def tp_rate    @tp.to_f / max_tp  end    def max_tp    return Selchar::True_Limit_Break::Max_TP  end    alias :sel_true_limit_break_tp_cost :skill_tp_cost  def skill_tp_cost(skill)    case skill.stype_id    when Selchar::True_Limit_Break::Main || Selchar::True_Limit_Break::True      return @tp.to_i    else      sel_true_limit_break_tp_cost(skill)    end  endend class RPG::BaseItem  def use_limit_break    @use_limit_break = @note =~ /<use_limit_break>/i if @limit_break.nil?    @use_limit_break  endend
 

Whovencroft

Warper
Member
Joined
Feb 28, 2014
Messages
3
Reaction score
0
First Language
English
Primarily Uses
You're the best.

I was just trying to make my own version of this, but I couldn't quite get it working.

#===============================================================================

#Script: Limit Break 8

#Author: Selchar

#-------------------------------------------------------------------------------

=begin

 

Finally, the Limit command will only appear to actors/classes who have the

notetag <use_musou>, or are equipped with an item/state that has it.

=end

#===============================================================================

 

module Selchar

  module Musou

    #How low your hp must be before your chosen skill type can show.

    Hp_Limit = 24

        

    #Use this to designate a skill type to be used for Limit Breaks.

    Type_ID = 6

    

    #Choose whether your "Limit" command will either replace, or appear above

    #the Attack command.

    Replace_Attack = false

  end

end

 

#===============================================================================

#Don't edit below this line unless you know what you are doing.

#===============================================================================

$imported = {} if $imported.nil?

$imported[:musou] = true

 

unless $imported[:Selchar_ASCE]

  msgbox("'Selchar's Add Skill Command Exceptions has

not been detected, Exiting")

  Exit

end

 

module Selchar::ASCE

  Battle_ID << Selchar::Musou::Type_ID

end

 

class Window_ActorCommand < Window_Command

  #--------------------------------------------------------------------------

  # * Alias: Add Attack Command to List

  #--------------------------------------------------------------------------

  alias sel_musou_add_attack_command add_attack_command

  def add_attack_command

a = @actor

    current_hp_percent = 100*a.hp/a.mhp

    if current_hp_percent <= Selchar::Musou::Hp_Limit && a.tp == a.max_tp 

        limit_check = false

        a.feature_objects.each do |obj|

          limit_check = true if obj.use_true_musou

        end

 

if a.tp == a.max_tp

      limit_check = false

      @actor.feature_objects.each do |obj|

        limit_check = true if obj.use_musou

      end

 

        if  limit_check

          add_musou_command

          return if Selchar::Musou::Replace_Attack

        end

      end

    end

    sel_musou_add_attack_command

  end

 

 

 

  

  #--------------------------------------------------------------------------

  # * New Method: Add Limit Command to List

  #--------------------------------------------------------------------------

  def add_musou_command

    name = $data_system.skill_types[selchar::Musou::Type_ID]

    add_command(name, :skill, true, Selchar::Musou::Type_ID)

  end

end

 

class RPG::BaseItem

def use_true_musou

    @note =~ /<use_true_musou>/i ? @use_true_musou = true : @use_true_musou = false if @musou.nil?

    @use_true_musou

  end

  def use_musou

    @note =~ /<use_musou>/i ? @use_musou = true : @use_musou = false if @musou.nil?

    @use_musou

  end

 

end
 

Thanks so much for taking the time to help me out, I really appreciate it  :D
 

Nanaki_Fan

Veteran
Veteran
Joined
Jul 15, 2014
Messages
501
Reaction score
159
First Language
English
Primarily Uses
@Nanaki_Fan - If you are referring to Vendastelca's post, #13, I checked and it works.  The only reason it wouldn't would be either because of a typo onn your part(match it to how you typed it in the terms tab of the database) or another script overwriting the method.
its all spelt correctly. I put my term as "focus Attk"

so I changed the "limit" in the colour script to match this. But its still not working

EDIT: ahh never mind it needed to be moved right to the top! Got it working :D

EDIT2: ok one more thing, is it possible to add a message box to the animation script that says "Limit break Ready" or "limit reached" or "limit break reached" something along those lines?

EDIT3: I got it working by myself! woot!

 I added the following to your code:

$game_message.background = 1 $game_message.position = 2 $game_message.add("Limit Break Ready")Now it displays a message at the bottom of screen with a faded background saying "Limit Break Ready" when the animation plays.

Here is the modified animation code with message box.

module Selchar module Max_Tp_Ani Actors_Only = true Default = 81 endendclass Game_Battler < Game_BattlerBase def max_tp_animation(mirror = false) animation = $data_animations[Selchar::Max_Tp_Ani::Default] $game_message.background = 1 $game_message.position = 2 $game_message.add("Limit Break Ready") if animation self.animation_id = Selchar::Max_Tp_Ani::Default self.animation_mirror = mirror end end alias :max_tp_animation_change :tp= def tp=(tp) @selchar_max_tp_ani = @tp max_tp_animation_change(tp) unless @tp == @selchar_max_tp_ani if actor? max_tp_animation if @tp == max_tp else unless Selchar::Max_Tp_Ani::Actors_Only max_tp_animation if @tp == max_tp end end end endend
Now if I can just get it to show the actors face when the message displays I will be happy :D
 
Last edited by a moderator:

captainproton

Dangerously Nifty
Veteran
Joined
Dec 20, 2013
Messages
1,276
Reaction score
570
First Language
english
Primarily Uses
Wow! I can't wait to put this to use in my game!
 

bcapek25

Villager
Member
Joined
Feb 14, 2015
Messages
8
Reaction score
0
Primarily Uses
this script is a way better way of implementing the limit function than i had been using. I'm having an issue with it tho, i've narrowed down the cause but have no idea how to fix it. I'm using Yanfly's battle command script and they are in fact compatible, but as far as i can tell only if you are using the default "attack" skill. I have used yami's sideview battle to create new attack animations fo each class, and then use Yanfly's battle command script to replace the default attack. so for example, i make an attack for an archer where he shoots a bow instead of running up and beating the enemy with it, that skill is say #10. So in the battle commands i get rid of the default attack and use skill 10 instead. well that seems to stop the limit break script from "activating" and putting the limit command in the battle menu, i assume it's linked to the default attack command somehow. I tried rearranging the scripts with no luck. I tried giving the actors both "attack" commands and using yanfly's "hide command until switch is on" for the default attack and linking it to a switch that never turns on, but it didn't work and both attacks showed up in my command menu, maybe that's an incompatability between the two command scripts? basically i just don't know how to fix it but i love this script and really want to use it, if anyone has any ideas i'd really appreciate it.
 
Last edited by a moderator:

Selchar

Veteran
Veteran
Joined
Dec 28, 2012
Messages
299
Reaction score
81
First Language
English
Primarily Uses
My script connects directly to the attack command.  From the sound of it you 'removed' said command and just pointed towards a specific skill instead?  Try using Yanfly's Weapon Attack Replace or a script with similar functionality to that to 'Replace' the attack command instead.
 

bcapek25

Villager
Member
Joined
Feb 14, 2015
Messages
8
Reaction score
0
Primarily Uses
Thanks selchar, with as many of yanfly's scripts as i use i'm not sure how i missed that one lol, but i think it will do the trick.

Edit: well, it's close anyway. i guess the problem would be a weapon that is usable by more than one class, since I had changed animations based on class. I can either change my approach or keep looking for an alternative way to change my attack animations. thanks for the idea tho.
 
Last edited by a moderator:

Seijiro Mafuné

A Random.
Veteran
Joined
Aug 22, 2014
Messages
52
Reaction score
2
First Language
English
Primarily Uses
This question has to do with FF8's Aura.

In that game, you could use the Aura spell, the Aura Stone item, or Mighty Guard to give your character max Crisis Level - so you could keep on using Limit Breaks until it ran out, even if you had max HP. Is there a way to implement this feature in a state - something that forces the HP value to be 100% or less as long as it's active?
 

Nanaki_Fan

Veteran
Veteran
Joined
Jul 15, 2014
Messages
501
Reaction score
159
First Language
English
Primarily Uses
Hello,

So I have found a bug when using the "animation" version of this script.

When a character gets attacked and is killed the animation still plays to show that they have got "100 tp" as they get an increase in TP before they die. Is there anyway to check if the character is dead before the animation/limit break is given?
 

Selchar

Veteran
Veteran
Joined
Dec 28, 2012
Messages
299
Reaction score
81
First Language
English
Primarily Uses
module Selchar module Max_Tp_Ani Actors_Only = true Default = 81 endendclass Game_Battler < Game_BattlerBase def max_tp_animation(mirror = false) return if self.dead? animation = $data_animations[Selchar::Max_Tp_Ani::Default] if animation self.animation_id = Selchar::Max_Tp_Ani::Default self.animation_mirror = mirror end end alias :max_tp_animation_change :tp= def tp=(tp) @selchar_max_tp_ani = @tp max_tp_animation_change(tp) unless @tp == @selchar_max_tp_ani if actor? max_tp_animation if @tp == max_tp else unless Selchar::Max_Tp_Ani::Actors_Only max_tp_animation if @tp == max_tp end end end endendI just added a single line 'return if self.dead?' to the method max_tp_animation, should work.
 

Nanaki_Fan

Veteran
Veteran
Joined
Jul 15, 2014
Messages
501
Reaction score
159
First Language
English
Primarily Uses
module Selchar module Max_Tp_Ani Actors_Only = true Default = 81 endendclass Game_Battler < Game_BattlerBase def max_tp_animation(mirror = false) return if self.dead? animation = $data_animations[Selchar::Max_Tp_Ani::Default] if animation self.animation_id = Selchar::Max_Tp_Ani::Default self.animation_mirror = mirror end end alias :max_tp_animation_change :tp= def tp=(tp) @selchar_max_tp_ani = @tp max_tp_animation_change(tp) unless @tp == @selchar_max_tp_ani if actor? max_tp_animation if @tp == max_tp else unless Selchar::Max_Tp_Ani::Actors_Only max_tp_animation if @tp == max_tp end end end endendI just added a single line 'return if self.dead?' to the method max_tp_animation, should work.
unfortunately that did not work.

My characters still show the animation when they get a TP boost from the enemy attack and are killed.
 

Selchar

Veteran
Veteran
Joined
Dec 28, 2012
Messages
299
Reaction score
81
First Language
English
Primarily Uses
Ok I had a closer look, I had to be a little indirect but I think I have it solved now. I don't like doing it this way but the default scripts left me little choice in the matter. Hope no new problems come up from the code below.

Code:
module Selchar  module Max_Tp_Ani    Actors_Only = true    Default = 81  endendclass Game_Battler < Game_BattlerBase  attr_accessor :selchar_max_tp_ani  def max_tp_animation(mirror = false)    animation = $data_animations[Selchar::Max_Tp_Ani::Default]    if animation      self.animation_id = Selchar::Max_Tp_Ani::Default      self.animation_mirror = mirror    end  end    #Use Skill on person to 'recover' tp  alias :max_tp_animation_change_iegtp :item_effect_gain_tp  def item_effect_gain_tp(user, item, effect)    @selchar_max_tp_ani = self.tp    max_tp_animation_change_iegtp(user, item, effect)    return if self.hp == 0    unless self.tp == @selchar_max_tp_ani      if actor?        max_tp_animation if self.tp == max_tp      else        unless Selchar::Max_Tp_Ani::Actors_Only          max_tp_animation if self.tp == max_tp        end      end    end  end  #Tp gain from using skills  alias :max_tp_animation_change_iue :item_user_effect  def item_user_effect(user, item)    @selchar_max_tp_ani = user.tp    max_tp_animation_change_iue(user, item)    return if user.hp == 0    unless user.tp == @selchar_max_tp_ani      if user.actor?        user.max_tp_animation if user.tp == user.max_tp      else        unless Selchar::Max_Tp_Ani::Actors_Only          user.max_tp_animation if user.tp == user.max_tp        end      end    end  end    #Tp gailn from damage  alias :max_tp_animation_change_ed :execute_damage  def execute_damage(user)    @selchar_max_tp_ani = self.tp    max_tp_animation_change_ed(user)    return if self.hp == 0    unless self.tp == @selchar_maxl_tp_ani      if actor?        max_tp_animation if self.tp == max_tp      else        unless Selchar::Max_Tp_Ani::Actors_Only          max_tp_animation if self.tp == max_tp        end      end    end  endend
 

Ralph

Retired Badass
Restaff Lead
Joined
Mar 8, 2013
Messages
329
Reaction score
230
First Language
Fantasy Heroics
I was going to drop a spellbook for you to learn but it tuens out to be different kind of limit break...:
 

Nanaki_Fan

Veteran
Veteran
Joined
Jul 15, 2014
Messages
501
Reaction score
159
First Language
English
Primarily Uses
Ok I had a closer look, I had to be a little indirect but I think I have it solved now. I don't like doing it this way but the default scripts left me little choice in the matter. Hope no new problems come up from the code below.

module Selchar module Max_Tp_Ani Actors_Only = true Default = 81 endendclass Game_Battler < Game_BattlerBase attr_accessor :selchar_max_tp_ani def max_tp_animation(mirror = false) animation = $data_animations[Selchar::Max_Tp_Ani::Default] if animation self.animation_id = Selchar::Max_Tp_Ani::Default self.animation_mirror = mirror end end #Use Skill on person to 'recover' tp alias :max_tp_animation_change_iegtp :item_effect_gain_tp def item_effect_gain_tp(user, item, effect) @selchar_max_tp_ani = self.tp max_tp_animation_change_iegtp(user, item, effect) return if self.hp == 0 unless self.tp == @selchar_max_tp_ani if actor? max_tp_animation if self.tp == max_tp else unless Selchar::Max_Tp_Ani::Actors_Only max_tp_animation if self.tp == max_tp end end end end #Tp gain from using skills alias :max_tp_animation_change_iue :item_user_effect def item_user_effect(user, item) @selchar_max_tp_ani = user.tp max_tp_animation_change_iue(user, item) return if user.hp == 0 unless user.tp == @selchar_max_tp_ani if user.actor? user.max_tp_animation if user.tp == user.max_tp else unless Selchar::Max_Tp_Ani::Actors_Only user.max_tp_animation if user.tp == user.max_tp end end end end #Tp gailn from damage alias :max_tp_animation_change_ed :execute_damage def execute_damage(user) @selchar_max_tp_ani = self.tp max_tp_animation_change_ed(user) return if self.hp == 0 unless self.tp == @selchar_maxl_tp_ani if actor? max_tp_animation if self.tp == max_tp else unless Selchar::Max_Tp_Ani::Actors_Only max_tp_animation if self.tp == max_tp end end end endend
I shall take a look and let you know if any problems arise :)
 

DancinZombiee

Villager
Member
Joined
Sep 8, 2014
Messages
29
Reaction score
0
First Language
English
Primarily Uses
i got it working but how do i put the limit break i made into the skill category
 

Seijiro Mafuné

A Random.
Veteran
Joined
Aug 22, 2014
Messages
52
Reaction score
2
First Language
English
Primarily Uses
I'm not sure what the exact question is, but a reminder...

1: on the Terms tab, you'll set the various subtypes of special attacks [starts with Skills and Magic], so you change the max number by +1 and add the Limit Break there, which allows you to set it to skills;

2: on the Skills tab, you make up the skills you want and add the Limit Break type where it would say Skills or Magic.

3: on the Actors/Classes tab, you can add notes to define which Limit Breaks are learned.

These can be used for non-Limit Break features, but I think it's what you are asking.
 

DancinZombiee

Villager
Member
Joined
Sep 8, 2014
Messages
29
Reaction score
0
First Language
English
Primarily Uses
I'm not sure what the exact question is, but a reminder...

1: on the Terms tab, you'll set the various subtypes of special attacks [starts with Skills and Magic], so you change the max number by +1 and add the Limit Break there, which allows you to set it to skills;

2: on the Skills tab, you make up the skills you want and add the Limit Break type where it would say Skills or Magic.

3: on the Actors/Classes tab, you can add notes to define which Limit Breaks are learned.

These can be used for non-Limit Break features, but I think it's what you are askin

I'm not sure what the exact question is, but a reminder...

1: on the Terms tab, you'll set the various subtypes of special attacks [starts with Skills and Magic], so you change the max number by +1 and add the Limit Break there, which allows you to set it to skills;

2: on the Skills tab, you make up the skills you want and add the Limit Break type where it would say Skills or Magic.

3: on the Actors/Classes tab, you can add notes to define which Limit Breaks are learned.

These can be used for non-Limit Break features, but I think it's what you are asking.
k thanks i got it working now :)
 
Joined
Dec 6, 2013
Messages
3
Reaction score
0
First Language
English
Primarily Uses
I love this script but I was curious if it was possible to have a unique skill type for each character? I was hoping to give each character a skill type catered to their style of fighting and not have the same name show for each character once they've achieved max TP, but can't figure out how to accomplish it. I've tried adding an array as well as modifying the script where it asks for the Type_ID but I have very little scripting knowledge, especially in ruby. 
 

Dragonfly89

Warper
Member
Joined
Nov 11, 2014
Messages
1
Reaction score
0
First Language
German
Primarily Uses
Heyho,

I've a question. Is there a chance to make the Limit-Command blinking in different colors or making a rainbow-effect?

And I'd like it to be bold written.

Thx for help^^
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,575
Latest member
akekaphol101
Top