Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

ParaDog's ATB

DerVVulfmann, might I just take the time to say thank you. You are not only a great scripter, but no matter how big your workload gets you're always polite and courteous to everyone and always helping the little guy, which a lot of the good scripters on this forum simply don't have the time for. You're an invaluable member of this community my friend.
 
Okay, problem still, the patch didn't fix the problem. I'm not entirely sure what the problem is here though. In my words, it's one of those incomprehensible errors that makes no sense to me. It appears to be clashing with this line (the emboldened one in this part of the script)
Code:
 #--------------------------------------------------------------------------
  # * Draw Limit Break Meter
  #--------------------------------------------------------------------------
  def draw_actor_lb(actor, x, y, width = 144)
    if defined?(gauge_rect)
      [b]rate = actor.limitbreak.to_f / LB_MAX[/b]
      plus_x = 0
      rate_x = 0
      plus_y = 25
      plus_width = 0
      rate_width = 100
      height = 10
      align1 = 1
      align2 = 2
      align3 = 0
      grade1 = 1
      grade2 = 0
      color1 = Color.new(0, 0, 0, 192)
      color2 = Color.new(255, 255, 192, 192)
      color3 = Color.new(0, 0, 0, 192)
      color4 = Color.new(64, 0, 0, 192)
      color5 = Color.new(80 - 24 * rate, 80 * rate, 14 * rate, 192)
      color6 = Color.new(240 - 72 * rate, 240 * rate, 62 * rate, 192)
      lb = (width + plus_width) * actor.limitbreak * rate_width / 100 / LB_MAX
      gauge_rect(x + plus_x + width * rate_x / 100, y + plus_y,
        width, plus_width + width * rate_width / 100,
        height, lb, align1, align2, align3,
        color1, color2, color3, color4, color5, color6, grade1, grade2)
    end      
  end
end
 
Der VVulfman... I have been having a major issue with the skill delay add on to this (couldn't find a standalone thread for it about)for months now that is potentially game ending. I am having major issues with it and am hoping to release a demo very, very soon, so if you could take a look it would be great!

I think I have finally worked out the cause it terms of gameplay too!

Problem 1

If Party member A uses a skill (with an assigned delay) that is set to USER as a target, when the skill delay bar has filled, instead of reverting back to the normal ATB bar, the skill just recharges and repeats over and over again. The same happens if you change the skill to One ally and cast it upon the caster. If you cast it on another party member the error doesn't occur. I have tested that pretty extensively.

Problem B (Similar)

If I select a skill with an assigned skill delay from the menu it begins to charge as it should. If an enemy then casts a skill also with an assigned skill delay whilst yours in charging then the players skill gauge will immediately jump to 100% and they will then perform the move you selected. The loop effect then begins and stops seemingly randomly after X turns. This can also occur if Party Member A performs the skill first and then the enemy performs its skill. It seems as though they sort of share attributes.

So to summarise:

The skill delay gauge goes into a loop when:

A party member casts a skill with an assigned skill delay upon them self.

A party member casts a skill with a skill delay at a similar time to an enemy casting a skill with a skill delay.

It's the only thing holding me back from a demo so I'd appreciate it so much if you could look at it!

EDIT:

OK, I just played with this for another hour or so and tried changing about the +'s and -'s assigned to the skill via the status effects boxes... I hope this isn't obvious and I look like an idiot... but I eventually came to the idea that setting all skills that impact the enemies as +'s and setting all skills that impact the party as -'s that everything seemed to work... have I got that right?

Here's the code so you can quickly check... (It never mentions my idea)

Code:
#==============================================================================
# ++ ATB Option - Spell Delay ver. 1.01 ++
#  Script by ParaDog
#  http://2d6.parasite.jp/
#------------------------------------------------------------------------------
# Spell Delay script is meant for the "Active Time Battle" system.
#------------------------------------------------------------------------------
# ï¼»Setupï¼½
# After pasting  this script below the ATB,  you can create skills that become
# delayed before they are performed.   The skills in question  must be flagged
# in the database  with the Status effect  designated in  this script's config
# section (Status Effect Status like Knockout, Venom, Dazzle).   And the delay
# is determined  by the value  of the SPELL_SPEED value you set for the spell,
# and the  SPELL_STATUS_TYPE  which you set  that  determines  what  parameter
# (intelligence, dexterity, agility) affects the spell speed in your game.
#==============================================================================

module PARA_CTB
  
  SPELL_SPEED=[] # Do not delete this line (required for Delay Speed setup)

  # Delay speed for every of skill
  # The skill's CT speed is "stat performance ? delay speed"
  # Delay speed is formatted as: "SPELL_SPEED [ (skill ID) ] = speed value"
  SPELL_SPEED[1] = 5
  SPELL_SPEED[2] = 1
  SPELL_SPEED[3] = 0.5
  SPELL_SPEED[7] = 3
  SPELL_SPEED[8] = 1
  SPELL_SPEED[9] = 0.5
  SPELL_SPEED[81] = 1
  SPELL_SPEED[83] = 0.8
  SPELL_SPEED[84] = 2
  SPELL_SPEED[85] = 1.5
  SPELL_SPEED[86] = 1.5
  SPELL_SPEED[87] = 3
  SPELL_SPEED[96] = 1
  SPELL_SPEED[97] = 1
  SPELL_SPEED[99] = 1.5
  
  # Stat performance value
  # Spell performance is based on one of three stats you can choose from for
  # your game.  The speed of the CT bar is based on the Delay speed (above)
  # and the stat you choose below (0: Intelligence / 1: Dexterity / 2: Agility).
  SPELL_STATUS_TYPE = 2
  
  # State name (State Change states... Knockout, Venom... etc)
  SPELL_STATE_NAME = "Casting"

  # Color of Spell Delay gauge (gradation left edge)
  SPELL_COLOR_LEFT = Color.new(128, 0, 255, 255)
  # Color of Spell Delay gauge (gradation right edge)
  SPELL_COLOR_RIGHT= Color.new(225, 225, 255, 255)
  # Color of Spell Delay gauge (filled gauge)
  SPELL_COLOR_FULL = Color.new(200, 200, 255, 255)

end

# End of Config
#------------------------------------------------------------------------------

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

class Scene_Battle
  #--------------------------------------------------------------------------
  # * Go to Command Input for Next Actor
  #--------------------------------------------------------------------------
  def phase3_next_actor
    # Loop
    begin
      # Actor blink effect OFF
      if @active_battler != nil
        @active_battler.blink = false
      end
      # If last actor
      if @actor_array_index + 1 == @pre_action_battlers.size
        # Start main phase
        start_phase4
        return
      # The next in case of enemy
      elsif $game_troop.enemies.include?(@pre_action_battlers[@actor_array_index + 1])
        # Start main phase
        start_phase4
        return
      end
      # Advance actor index
      @actor_array_index += 1
      @actor_index = @pre_action_battlers[@actor_array_index].index
      @active_battler = $game_party.actors[@actor_index]
      @active_battler.blink = true
      # if Spell Delay is false
      if @active_battler.spelling? == false
        @active_battler.current_action.clear
      end
    # Once more if actor refuses command input
    end until @active_battler.inputable?
    # Set up actor command window
    phase3_setup_command_window
  end
  #--------------------------------------------------------------------------
  # * Go to Command Input of Previous Actor
  #--------------------------------------------------------------------------
  def phase3_prior_actor
    # Loop
    begin
      # Actor blink effect OFF
      if @active_battler != nil
        @active_battler.blink = false
      end
      # If first actor
      if @actor_array_index <= 0
        # Start party command phase
        start_phase2
        return
      end
      # Return to actor index
      @actor_array_index -= 1
      @actor_index = @pre_action_battlers[@actor_array_index].index
      @active_battler = $game_party.actors[@actor_index]
      @active_battler.blink = true
      # If Spell Delay is false
      if @active_battler.spelling? == false
        @active_battler.current_action.clear
      end
    # Once more if actor refuses command input
    end until @active_battler.inputable?
    # Set up actor command window
    phase3_setup_command_window
  end
  #--------------------------------------------------------------------------
  # * Make Skill Action Results
  #--------------------------------------------------------------------------
  alias make_skill_action_result_ctbs make_skill_action_result
  def make_skill_action_result
    skill_id = @active_battler.current_action.skill_id
    if PARA_CTB::SPELL_SPEED[skill_id] != nil
      if @active_battler.spelling?
        # Cancel the Spell Delay
        @active_battler.spelling(false)
        make_skill_action_result_ctbs
      else
        # Set force flag
        @active_battler.current_action.forcing = true
        # Start the Spell Delay
        @active_battler.spelling(true)
        @active_battler.countup = true
        clear_ct(@active_battler)
        # Shift to step 1
        @phase4_step = 1
      end
    else
      make_skill_action_result_ctbs
    end
  end
end

#==============================================================================
# ** Window_BattleStatus
#------------------------------------------------------------------------------
#  This window displays the status of all party members on the battle screen.
#==============================================================================

class Window_BattleStatus < Window_Base
  #--------------------------------------------------------------------------
  # * Refresh the CT Gauge
  #--------------------------------------------------------------------------
  def refresh_ct
    for i in 0...$game_party.actors.size
      actor = $game_party.actors[i]
      line_height = 120 / PARA_CTB::PARTY_SIZE
      actor_y = i * line_height + 4
      if actor.spelling?
        # When the spell's CT gauge is full, color of gauge
        ct_color_full = PARA_CTB::SPELL_COLOR_FULL
        # Color of spell's CT gauge (left hand edge)
        ct_color_start = actor.full_ct ? ct_color_full : PARA_CTB::SPELL_COLOR_LEFT
        # Color of spell's CT gauge (right hand edge)
        ct_color_end = actor.full_ct ? ct_color_full : PARA_CTB::SPELL_COLOR_RIGHT
      else
        # When the CT gauge is full, color of gauge
        ct_color_full = PARA_CTB::COLOR_FULL
        # Color of CT gauge (left hand edge)
        ct_color_start = actor.full_ct ? ct_color_full : PARA_CTB::COLOR_LEFT
        # Color of CT gauge (right hand edge)
        ct_color_end = actor.full_ct ? ct_color_full : PARA_CTB::COLOR_RIGHT
      end
      if @level_up_flags[i] != true and actor.ct_visible
        draw_meter(actor.now_ct, actor.max_ct, 344, actor_y+14, 100, 8, ct_color_start, ct_color_end)
      elsif @level_up_flags[i] != true
        draw_meter(0, actor.max_ct, 344, actor_y+14, 100, 8, ct_color_start, ct_color_end)
      end
    end
  end
end

#==============================================================================
# ** Game_Battler
#------------------------------------------------------------------------------
#  This class deals with battlers. It's used as a superclass for the Game_Actor
#  and Game_Enemy classes.
#==============================================================================

class Game_Battler
  #--------------------------------------------------------------------------
  # * Determine Action Speed
  #--------------------------------------------------------------------------
  alias make_action_speed_para_ctb make_action_speed
  def make_action_speed
    if self.spelling?
      # Branch based on Stat type
      case PARA_CTB::SPELL_STATUS_TYPE
      when 0
        sts = int
      when 1
        sts = dex
      when 2
        sts = agi
      end
      # Calculate the Spell Delay length
      if PARA_CTB::SPELL_SPEED[@current_action.skill_id] != nil
        spd = sts * PARA_CTB::SPELL_SPEED[@current_action.skill_id]
        @current_action.speed = spd + rand(10 + agi / 4)
      else
        # Cancel Spell Delay
        spelling(false)
        make_action_speed_para_ctb
      end
    else
      make_action_speed_para_ctb
    end
  end
  #--------------------------------------------------------------------------
  # * Delay Spell?
  #--------------------------------------------------------------------------
  def spelling?
    state_id = -1
    # Acquiring the ID of Spell Delay state
    for i in 1...$data_states.size
      state = $data_states[i]
      if state.name == PARA_CTB::SPELL_STATE_NAME
        state_id = state.id
      end
    end
    if self.state?(state_id)
      return true
    else
      return false
    end
  end
  #--------------------------------------------------------------------------
  # * Delay Spell
  #--------------------------------------------------------------------------
  def spelling(bool)
    # Acquiring the ID of Spell Delay state
    for i in 1...$data_states.size
      state = $data_states[i]
      if state.name == PARA_CTB::SPELL_STATE_NAME
        state_id = state.id
      end
    end
    # If the state is changed
    if state_id != nil
      if bool
        add_state(state_id, true)
      else
        remove_state(state_id, true)
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Decide if Command is Inputable
  #--------------------------------------------------------------------------
  alias ctbs_inputable? inputable?
  def inputable?
    bool = spelling? ? false : ctbs_inputable?
    return bool
  end
end

I am assuming if that is right you have to do it for items that target the enemy and items that target the party too as well... so it would be like this

- for "Casting" Status Effect

Enemy offensive skills
Party defensive skills
Item defensive

+ for "Casting" Status Effect

Party offensive skills
enemy defensive skills
Items offensive

Please tell me I am right now, I know a fair few that are turning to this battle system now and will need to know too!
 
TIME:
10:35PM
Okay... reading this. Going into ParaDog demo.

10:37
Attempting 'cast on self' with the heal script. Currently have it set to '5' for the delay.
Doesn't loop.

10:39
Changing the heal skill to 'user'.
Doesn't loop

10:41
Set enemies to 'heal' skill. Attempting enemy/actor delay mix.
Numerous attempts to create error. Doesn't loop.

10:44:
Changing SPELL_STATUS_TYPE to '2' & run a few more tests.
Doesn't loop

10:48
Copied your material below 'configurable' section into the demo (in case of edit).
Doesn't loop

10:52
Examining your config.

Dude... I can't find anything wrong with your script or the manner you configured it. Maybe it is something else you're using??? A list may help, and please include the script order.

As for a demo with it working, I do keep one in the Animated Battlers topic. I 'commented-out' ParaDog's sideview system (but kept it in there), but his ATB, Skill Delay and Stat Increaser scripts are in there.
 
OK thanks for looking... I'll put the list of my scripts... and changing the + and - is "definitely" altering whether the error appears or not regardless of my other scripts so it must be related to something... right? ...And why else would the script make you set a status if you are already stating which skills have delays like this: SPELL_SPEED[1] = 5

Anyway, here are my scripts... long list...

 
Oh... smack! That's... real ... long.

Um, mebby a 'stripped' down demo???? Limited Graphics and 1 Map? Just enough to keep all the skills (and prevent crashes).

BTW. Is your problem with the 'DEFEND/HIDE' skill?
 
No it isn't, I haven't used that yet. It is with all the skills it can happen. It may happen with enemies too though I can't see their Skill delay gauges so I can't tell. I will prepare a demo and send it to you through PM if that's okay with you, and as I say, with the way I have the +'s and -'s set up it's currently working (only just today). Maybe I should send you a small version of both working and not because I am adamant the +'s and -'s make a difference. I can keep testing and swap them round over and over which effectively keeps bugging up the corresponding skill...
 
Calibre;250776 said:
... and changing the + and - is "definitely" altering whether the error appears or not regardless of my other scripts so it must be related to something... right?

DOH!

True enough that ParaDog's Skill Delay script needs a new 'STATUS' so it can determine whether the user is casting a skill or not.

You don't flag the skill with that Status (as you did with FOCUS). Turn the 'Casting' flags off on your skills. Remove the '+' and '-' stuff from that state. That's what's causing the loops. Once it finishes casting a skill, the skill effect of the STATUS reapplies itself to the target (namely self) and begins the casting again.
 
OK... I'm pretty sure I had it blank to start with and that's why I started messing with the +'s and -'s too see if that fixes it... but it is working for the time being for once so I am ok for now! Thanks for taking a look at that dude.
 
Ugh. I've been loving this script, but it doesn't seem to want to display text on my computer. The text next to the HP and SP bars is invisible. It's completely fine everywhere else.

Someone else on the Creation Asylum forums seems to have had the problem, and then fixed it (without mentioning how).

I'm using the Advanced Message System R4, an OLD old script for side battles (which doesn't change anything but the positioning of your battlers), and the 8 Way Movement script. Paradogs Active Time Battle 5.48 is right below my Scene_Debug.

Any suggestions would be helpful.
 
I have been wondering something recently too. In the default turn based system you can create planned battles by telling an enemy to perform move A every 3 turns and move B every 3 turns 1 turn after move A. When I try to do this using the ATB is doesn't seem to pay any attention because the ATB doesn't work off turns, is there any edit for this or script add-on or fix or anything. It makes fights too random as it is, I assume this applies to all ATB's and CTB's.
 
To Kaiseto:
When you get an error message... do you get a bunch of ????? texts, like this?
'?????' Paradog line 233 NilClass '?????'

To Calibre:
Actually, it does have turns, but it is based on a everyone having completed their turn. While ParaDog originally entitled this ATB v 2.8, it is really STILL a CTB (Conditional Battle System). Even so, ATBs like Cogwheel's RTAB and Trickster's ATB have 'TURNS' counting capabilities. I mean, if you looked at my AnimBat demo with this, I set up a comic little 'Hi, guys' to occur on the second turn. Just takes some getting used to.
 
Um is this script SDK compatible? I keep getting the error

"Script 'SDK 2.2' line 6403: ArgumentError occured.
wrong number of arguments (0 for 1)"

Not sure what's wrong with it... (line 6403 is "update_phase4_step5")

I tried placing the ATB script both above and below SDK 2.2, but the same error occurs.
 
Other than 'MODULE-ONLY' codes like an Input Module (no default RMXP classes involved), scripts of any sort are supposed to be placed below the SDK so they can attach themselves to the current system.

But...

Here's the start of the SDK's update_phase_4_step5 def
Code:
  #--------------------------------------------------------------------------
  # * Frame Update (main phase step 5 : damage display)
  #--------------------------------------------------------------------------
  def update_phase4_step5
    # Hide help window
    @help_window.visible = false
And here's ParaDog's update_phase4_step5 start...
Code:
  #--------------------------------------------------------------------------
  # * Frame Update (main phase step 5 : damage display)
  #--------------------------------------------------------------------------
  alias update_phase4_step5_ctb update_phase4_step5
  def update_phase4_step5

Neither one of them have an extra argument that would cause the error you described. And it can be used with the SDK. It's just that this system may rewrite a few of the SDK 'battlesystem' codes for its own purposes.
 
How do I make the battlers move if I have three of them, so they don't get in the way of the enemy list that's on the left side? like, how do I just shift them to the right a little?  Also, can I use other hp/sp gauges?  Thanks!
 
When ParaDog designed the system, he had the 'enemy list' feature as an option.  Heh... still 'is' an option.  By default, the ABS is still a frontview battlesystem and still positions the actor battlers like the default system (ie... can't move 'em).  Good thing the text appears overtop of the battlers.

As far as other hp/sp gauges... doubtful without an edit or custom script.  That Battlestatus window has the bars built INTO the script.  This means that the bar script you'd request (in the Script Request topic ;) ) would be specific to ParaDog's system to wipe out the 'old' HP bars n such.
 
DerVVulfman":vrjye8ca said:
When ParaDog designed the system, he had the 'enemy list' feature as an option.  Heh... still 'is' an option.  By default, the ABS is still a frontview battlesystem and still positions the actor battlers like the default system (ie... can't move 'em).  Good thing the text appears overtop of the battlers.

If you get the add-on script you can move the battlers(characters) and the menu around to fit things in better. though by default it sets the characters to side-view.
 
True, but that is 'characterset hero' battlesystem.  He may not wish to use such a system (replaces the hero's battlers with their charsets in place).  It can be used as a side-view system (as shown) or as a frontview system or whatnot.

True enough, I would have offered this script if I thought he wanted to use charsets for his battlers but it didn't appear as such. :/
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top