Jump to content
Lil' Yami

YSA Battle System - Classical ATB

Recommended Posts

I'm not sure if this counts as a Necrobump, but I am receiving an error before an enter a battle:

 

"(Insert Script name here because it's not important) line 571: NoMethodError occured.

 

undefined method "/" for nil:NilClass."

 

When I took a look at the formula, the default value turns out to be 0 divided by whatever you set the MAX_CATB_VALUE, which I set to 100, which would obviously cause a problem. But after setting it to a different value (like 20), it still comes up with the same problem.

 

I believe that it may be something caused by one of the YANFLY Battle Scripts that is also running at the same time, since I practically run almost all of them. If you need me to list them, I will.

 

Any help would be greatly appreciated. Also, I placed the CATB Script directly below the YEA Battle Core Script as instructed.

 

I really need to learn how to Script. =|

Share this post


Link to post
Share on other sites

I'm sorry for the (probably) stupid question, but how do I get a spell like Haste to speed up the ATB?

 

Create the state, "Haste" and in the "Notes" Box and enter this:

 

<custom catb rate: x>

 

x being '0' to the maximum limit you set in the script. 100 is the default speed.

Meaning entering 120 means you are moving 20% faster than normal or 120% of default speed.

Entering 50 means you are moving 50% slower than normal or 50% of default speed.

 

Very easy, great feature that comes with the script. You can also enter the tag: <custom catb rate: x> with Weapons and Armor,

I'm not sure how this system accumulates but so far is working ideally with me.

 

Also for "Casting Time", enter: <charge rate: x%> within the "Notes" box of a Skill. I have not tested this with Weapons.

x being the percentage of the rate in comparison to the default speed it will take the complete the skill.

Meaning entering 400 will make the casting time move at 400% the default speed, or 4x the default speed.

Entering 30 will make the casting time move at 30% the default speed, or 1/3 the default speed.

 

Be sure to not forget the % after the number, it does not branch off (no space) between it and the number.

Edited by Andrew Nieves

Share this post


Link to post
Share on other sites

I would like to report a bug.

 

When an enemy selects its action, it uses the fastest charge rate among all its actions instead of the charge rate assigned to it.

 

For example, a Green Dragon has the actions Attack and Aeroga.

 

Attack doesn't have a charge rate (meaning instant cast)

 

Aeroga has a 50% charge rate (meaning 2 turns cast).

 

If Green Dragon selects Attack, it will attack without any delays.

 

If Green Dragon selects Aeroga, IT WILL CAST AEROGA WITHOUT ANY DELAYS!

 

The desired function would be that if Green Dragon selects Aeroga, it should cast Aeroga WITH the casting time delay.

 

Thanks in advance.

Share this post


Link to post
Share on other sites

I'm not sure if this counts as a Necrobump, but I am receiving an error before an enter a battle:

 

"(Insert Script name here because it's not important) line 571: NoMethodError occured.

 

undefined method "/" for nil:NilClass."

 

When I took a look at the formula, the default value turns out to be 0 divided by whatever you set the MAX_CATB_VALUE, which I set to 100, which would obviously cause a problem. But after setting it to a different value (like 20), it still comes up with the same problem.

 

I believe that it may be something caused by one of the YANFLY Battle Scripts that is also running at the same time, since I practically run almost all of them. If you need me to list them, I will.

 

Any help would be greatly appreciated. Also, I placed the CATB Script directly below the YEA Battle Core Script as instructed.

 

I really need to learn how to Script. =|

I get the same error, but I'm not sure how to fix it. But, didn't Yami say he (she? I don't know) isn't supporting this anymore, in favor of Symphoria?

Share this post


Link to post
Share on other sites

Does anybody know how to randomize the ATB bars at the start of battles? As is, everyone always starts at the same percentage full. It would be nice if every now and then someone else got the first turn lol

Share this post


Link to post
Share on other sites

I tried running it, but every battle, most of my party starts at full ATB gauges and the one who doesn't starts in the same place every time. I looked around in the scripts for a bit, but I couldn't really figure out how to customize it.

Share this post


Link to post
Share on other sites

I'm getting an error when I add a party member to a battle, and it's the actor's first turn to act.

 

 


Script 'Yanfly Engine Ace - Ace Battle Engine v1' line 1627: TypeError occured.

 

no implicit conversion from nil to integer

 

 

 

  #--------------------------------------------------------------------------
  # alias method: input
  #--------------------------------------------------------------------------
  alias game_actor_input_abe input
  def input
    if @actions.nil?
      make_actions
      @action_input_index = 0
    end
    if @actions[@action_input_index].nil?                                                     ##line 1627
      @actions[@action_input_index] = Game_Action.new(self)
    end
    return game_actor_input_abe
  end
 
end # Game_Actor

Share this post


Link to post
Share on other sites

I've just posted my attempted fixes and addons to this script:

Bug fixes

Compatibility fixes

Action addon

ATB addon

Cancel addon

Charge addon

Clear addon

Clear addon compatibility fix

Color addon

Cooldown addon

Countdown addon

Escape addon

Hotkey addon

Input addon

Percentage addon

SE addon

Speed addon

Tick addon

Unison addon

Update addon

Wait addon

 

Suggested Complete CATB Scripts Order:

 

 

1.   Yanfly Engine Ace - Ace Core Engine

2.   Yanfly Engine Ace - Ace Battle Engine

3.   YSA Battle System: Classical ATB

4.   YSA Battle Add-on: Lunatic CATB Rate

5.   YSA Battle Add-on: Lunatic CATB Reset

6.   YSA Battle Add-on: Lunatic CATB Start

7.   DoubleX RMVXA Bug Fix to YSA Battle System: Classical ATB

8.   DoubleX RMVXA Compatibility Fix to YSA Battle System: Classical ATB

9.   DoubleX RMVXA Action Addon to YSA Battle System: Classical ATB

10. DoubleX RMVXA ATB Addon to YSA Battle System: Classical ATB

11. DoubleX RMVXA Cancel Addon to YSA Battle System: Classical ATB

12. DoubleX RMVXA Clear Addon to YSA Battle System: Classical ATB

13. DoubleX RMVXA CATB Clear Addon Compatibility Fix

14. DoubleX RMVXA Color Addon to YSA Battle System: Classical ATB

15. DoubleX RMVXA Cooldown Addon to YSA Battle System: Classical ATB

16. DoubleX RMVXA Charge Addon to YSA Battle System: Classical ATB

17. DoubleX RMVXA Speed Addon to YSA Battle System: Classical ATB

18. DoubleX RMVXA Countdown Addon to YSA Battle System: Classical ATB

19. DoubleX RMVXA Countdown Addon Compatibility Fix

20. DoubleX RMVXA Escape Addon to YSA Battle System: Classical ATB

21. DoubleX RMVXA Hotkey Addon to YSA Battle System: Classical ATB

22. DoubleX RMVXA Hotkey Addon to YSA Battle System: Classical ATB

23. DoubleX RMVXA Percentage Addon to YSA Battle System: Classical ATB

24. DoubleX RMVXA Reset Addon to YSA Battle Add-on: Lunatic CATB Reset

25. DoubleX RMVXA SE Addon to YSA Battle System: Classical ATB

26. DoubleX RMVXA Tick Addon to YSA Battle System: Classical ATB

27. DoubleX RMVXA Turn Addon to YSA Battle System: Classical ATB

28. DoubleX RMVXA Unison Addon to YSA Battle System: Classical ATB

29. DoubleX RMVXA Update Addon to YSA Battle System: Classical ATB

30. DoubleX RMVXA Wait Addon to YSA Battle System: Classical ATB

 

 

Edited by DoubleX

Share this post


Link to post
Share on other sites

I briefly tested and it seems to me that the below method under class Schala_Sprite_Target is the cause:

 

 

def actor_max_at
    return $game_system.at_max if $imported[:mog_atb_system]
    return @target.max_atb if $imported[:ve_active_time_battle]
    return @target.max_atb if $imported["YSA-CATB"]
    return ATB::MAX_AP if @ccwinter_atb != nil
    return 1
end

 

 

Tha script made a mistake while trying to make the script compatible with YSA-CATB as there's no such thing of @target.max_atb there. Instead, there's just a global MAX_CATB_VALUE.

So you can change the above method to this:

 

 

def actor_max_at
    return $game_system.at_max if $imported[:mog_atb_system]
    return @target.max_atb if $imported[:ve_active_time_battle]

    # This line is changed
    return 100000.0 if $imported["YSA-CATB"]
    #

    return ATB::MAX_AP if @ccwinter_atb != nil
    return 1
end

 

 

It's set as 100000.0 as it's the default value of MAX_CATB_VALUE. As right now the above method has no way to read MAX_CATB_VALUE, you'll have to type in the actual constant number yourself :)

 

P.S.: I considered including it into my compatibility fix, but as I've just noticed that the last updated date of that Schala AT Gauge is 27/2/2014 and it tried to be compatible with YSA-CATB, maybe it's better for the author to change the above part of that script but I don't know how to contact him/her :D

Edited by DoubleX

Share this post


Link to post
Share on other sites

I briefly tested and it seems to me that the below method under class Schala_Sprite_Target is the cause:

 

 

def actor_max_at
    return $game_system.at_max if $imported[:mog_atb_system]
    return @target.max_atb if $imported[:ve_active_time_battle]
    return @target.max_atb if $imported["YSA-CATB"]
    return ATB::MAX_AP if @ccwinter_atb != nil
    return 1
end

 

 

Tha script made a mistake while trying to make the script compatible with YSA-CATB as there's no such thing of @target.max_atb there. Instead, there's just a global MAX_CATB_VALUE.

So you can change the above method to this:

 

 

def actor_max_at
    return $game_system.at_max if $imported[:mog_atb_system]
    return @target.max_atb if $imported[:ve_active_time_battle]

    # This line is changed
    return 100000.0 if $imported["YSA-CATB"]
    #

    return ATB::MAX_AP if @ccwinter_atb != nil
    return 1
end

 

 

It's set as 100000.0 as it's the default value of MAX_CATB_VALUE. As right now the above method has no way to read MAX_CATB_VALUE, you'll have to type in the actual constant number yourself :)

 

P.S.: I considered including it into my compatibility fix, but as I've just noticed that the last updated date of that Schala AT Gauge is 27/2/2014 and it tried to be compatible with YSA-CATB, maybe it's better for the author to change the above part of that script but I don't know how to contact him/her :D

I don't know, either, since she or she is not in this forum. But here's the blog site:

http://atelier-rgss.com/RGSS/RGSS_VX_ACE.html

 

If you succesfully make a patch, can you give me your demo? Not only @target.max_atb is the problem, also the current_atb, skill charges and something else. 

Share this post


Link to post
Share on other sites

I know that site but I failed to find any way to leave a message there XD

 

For the current_atb to work, you'll need to use my bug fix first as Schala AT Gauge assumes it can access catb_value directly, and it's true if my bug fix is used but false otherwise :D

Place my bug fix below the original catb but above my snippet posted just earlier(I fix bugs before compatibility issues).

 

And for skill charges, Schala AT Gauge isn't supposed to handle that at all, so do you want to add a feature to let it shows the charging process as well?

 

For that something else you mentioned, maybe you can describe them more elaborately so I may better know what you're actually referring to :)

Edited by DoubleX

Share this post


Link to post
Share on other sites

Yeah, in  Schala AT Gauge, skill charges is defined as Actor Cast, whenever a skill with skill charges or cast time or whatever, the actor icon goes down to the bottom again but this time with a star icon showing that he is casting/charging. How to modify the script to work like that?

 

I think I've find the way! Just modify  Schala AT Gauge, changing the AT part like this, it will work will YSA  CATB!

 

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

  #--------------------------------------------------------------------------
  # * AT
  #--------------------------------------------------------------------------  
  def actor_at
      return @target.at if $imported[:mog_atb_system]
      return @target.atb if $imported[:ve_active_time_battle]
      return @target.catb_value if $imported["YSA-CATB"]
      return @target.ap if @ccwinter_atb != nil
      return 0
  end
 
  #--------------------------------------------------------------------------
  # * Max AT
  #--------------------------------------------------------------------------  
  def actor_max_at
      return $game_system.at_max if $imported[:mog_atb_system]
      return @target.max_atb if $imported[:ve_active_time_battle]
      return 100.0 if $imported["YSA-CATB"]
      return ATB::MAX_AP if @ccwinter_atb != nil
      return 1
  end
 
  #--------------------------------------------------------------------------
  # â— Actor Cast
  #--------------------------------------------------------------------------            
  def actor_cast
      return @target.at_cast[1] rescue nil if $imported[:mog_atb_system]
      return -@target.atb if $imported[:ve_active_time_battle]
      return -@target.ct_catb_value if $imported["YSA-CATB"]
      return @target.chant_count rescue 0 if @ccwinter_atb != nil 
      return 0
  end
 
  #--------------------------------------------------------------------------
  # â— Actor Max Cast
  #--------------------------------------------------------------------------            
  def actor_max_cast
      return @target.at_cast[0].speed.abs if $imported[:mog_atb_system]
      return @target.max_atb if $imported[:ve_active_time_battle]
      return 100.0 if $imported["YSA-CATB"]
      return -@target.max_chant_count rescue 1 if @ccwinter_atb != nil 
      return 1
  end
 
  #--------------------------------------------------------------------------
  # â— Actor Max Cast
  #--------------------------------------------------------------------------            
  def gauge_cast
      return @gauge_size if $imported[:mog_atb_system]
      return 0
  end
  
  #--------------------------------------------------------------------------
  # â— Actor Cast?
  #--------------------------------------------------------------------------            
  def actor_cast?
      if $imported[:mog_atb_system]
         return true if !@target.at_cast.empty? rescue false
      end   
      if $imported[:ve_active_time_battle]
         return true if @target.cast_action? rescue false
      end  
      if $imported["YSA-CATB"]
         return true if @target.catb_ct_filled_rate > 0 rescue false
      end 
      if @ccwinter_atb 
         return true if @target.chanting? rescue false
      end
      return false
  end   

end

 

Edited by bloodyliao

Share this post


Link to post
Share on other sites

Yeah, in  Schala AT Gauge, skill charges is defined as Actor Cast, whenever a skill with skill charges or cast time or whatever, the actor icon goes down to the bottom again but this time with a star icon showing that he is casting/charging. How to modify the script to work like that?

 

I think I've find the way! Just modify  Schala AT Gauge, changing the AT part like this, it will work will YSA  CATB!

 

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

  #--------------------------------------------------------------------------
  # * AT
  #--------------------------------------------------------------------------  
  def actor_at
      return @target.at if $imported[:mog_atb_system]
      return @target.atb if $imported[:ve_active_time_battle]
      return @target.catb_value if $imported["YSA-CATB"]
      return @target.ap if @ccwinter_atb != nil
      return 0
  end
 
  #--------------------------------------------------------------------------
  # * Max AT
  #--------------------------------------------------------------------------  
  def actor_max_at
      return $game_system.at_max if $imported[:mog_atb_system]
      return @target.max_atb if $imported[:ve_active_time_battle]
      return 100.0 if $imported["YSA-CATB"]
      return ATB::MAX_AP if @ccwinter_atb != nil
      return 1
  end
 
  #--------------------------------------------------------------------------
  # â— Actor Cast
  #--------------------------------------------------------------------------            
  def actor_cast
      return @target.at_cast[1] rescue nil if $imported[:mog_atb_system]
      return -@target.atb if $imported[:ve_active_time_battle]
      return -@target.ct_catb_value if $imported["YSA-CATB"]
      return @target.chant_count rescue 0 if @ccwinter_atb != nil 
      return 0
  end
 
  #--------------------------------------------------------------------------
  # â— Actor Max Cast
  #--------------------------------------------------------------------------            
  def actor_max_cast
      return @target.at_cast[0].speed.abs if $imported[:mog_atb_system]
      return @target.max_atb if $imported[:ve_active_time_battle]
      return 100.0 if $imported["YSA-CATB"]
      return -@target.max_chant_count rescue 1 if @ccwinter_atb != nil 
      return 1
  end
 
  #--------------------------------------------------------------------------
  # â— Actor Max Cast
  #--------------------------------------------------------------------------            
  def gauge_cast
      return @gauge_size if $imported[:mog_atb_system]
      return 0
  end
  
  #--------------------------------------------------------------------------
  # â— Actor Cast?
  #--------------------------------------------------------------------------            
  def actor_cast?
      if $imported[:mog_atb_system]
         return true if !@target.at_cast.empty? rescue false
      end   
      if $imported[:ve_active_time_battle]
         return true if @target.cast_action? rescue false
      end  
      if $imported["YSA-CATB"]
         return true if @target.catb_ct_filled_rate > 0 rescue false
      end 
      if @ccwinter_atb 
         return true if @target.chanting? rescue false
      end
      return false
  end   

end

 

If, at the end, I included your fix into my compatibility fix, do you want me to credit you there and/or require users to credit you? The same question may apply to Moghunter as well if he/she does see and use your fix :)

Edited by DoubleX

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted