Theolized Sideview Battle System (Now with EDITOR!)

Discussion in 'RGSS3 Scripts (RMVX Ace)' started by TheoAllen, Jun 30, 2014.

  1. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,390
    Likes Received:
    4,961
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    Force action to target means a target will do a specific action sequence. The default of "ATTACK" sequence have a :move_to_target command. And they don't have any target. Let me illustrate it for you

    > An actor do a sequence. It has target to enemy A
    > The sequence is include a command to force the enemy A to do an attack sequence
    > enemy A is confused who to attack? It throws error

    Most of commands are included in editor, except conditional branchs. Like the use of "if else" and "case" commands.
     
    Isabella Ava likes this.
  2. Isabella Ava

    Isabella Ava Veteran Veteran

    Messages:
    635
    Likes Received:
    751
    First Language:
    English
    @TheoAllen I have to say it again that your in game editor is such fabulous tool. It turn creating action sequence into something fun.
    If there is a Load function (to load premade attack sequences), it will even be more effectively (we can load template Sequences and edit it a little to create new Skill)
    (╯ ・ ᗜ ・ )╯
     
    TheoAllen likes this.
  3. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,390
    Likes Received:
    4,961
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    Isn't it weird that me who made the editor never really like to create action sequence within the editor? :D
    The tool is simply to teach people how action sequence works with visuals. Since everyone hate writing sequence and stumbled upon syntax errors, or try to guess what will happen. But personally I never have that problem. So I never expect someone gonna like it.

    Load function was planned. There's "Change List" command that is supposed to be load premade action sequence, but I lost interest and really tired after all of these. Then I just threw the "unfinished" editor for people who were curious to try (you could say the editor version is actually v0.9 or something)
     
    Isabella Ava likes this.
  4. Isabella Ava

    Isabella Ava Veteran Veteran

    Messages:
    635
    Likes Received:
    751
    First Language:
    English
    Lol that's very reasonable = )
     
  5. strelokhalfer

    strelokhalfer Villager Member

    Messages:
    11
    Likes Received:
    3
    First Language:
    Russian
    Primarily Uses:
    RMVXA
    Made small fix for constant RTP path, now it get path from reg.
    Replace in "> Configuration -EDIT HERE-"
    Code:
    RTP_Path = "C:/Program Files (x86)/Common Files/Enterbrain/RGSS3/RPGVXAce"
    with
    Code:
      hKey = "1234" #4 bytes
      #open reg section for read
      Win32API.new("Advapi32", "RegOpenKeyExA", ['L', 'P', 'I', 'I', 'P'], 'L').call(0x80000002, 'SOFTWARE\Enterbrain\RGSS3\RTP', 0, 0x20019 | 0x0200, hKey)
      #get pointer to reg section
      hKey = hKey.unpack('l')[0]
      #convert to UNICODE
      buf =" " * 18
      Win32API.new("kernel32", "MultiByteToWideChar", ['I', 'L', 'P', 'I', 'P', 'I'], 'I').call(65001, 0, "RPGVXAce", -1, buf, 18)
      #get value
      data = '    ' * 32 #memory allocation
      cbData = [128].pack('l') #size
      Win32API.new('advapi32', 'RegQueryValueExW', ['L', 'P', 'P', 'P', 'P', 'P'], 'L').call(hKey, buf, 0, 0, data, cbData)
      #unicode to utf8
      len = Win32API.new("kernel32", "WideCharToMultiByte", ['I', 'L', 'P', 'I', 'P', 'I', 'P', 'P'], 'I').call(65001, 0, data, -1, 0, 0, 0, 0)
      buf =" " * len
      Win32API.new("kernel32", "WideCharToMultiByte", ['I', 'L', 'P', 'I', 'P', 'I', 'P', 'P'], 'I').call(65001, 0, data, -1, buf, len, 0, 0)
      buf.slice!(-1, 1)
      #close reg
      Win32API.new('advapi32', 'RegCloseKey', 'L', 'L').call(hKey)
      RTP_Path = buf
    OR download script from link
     
    Last edited: Dec 9, 2018
    kaukusaki and TheoAllen like this.
  6. raeson

    raeson Warper Member

    Messages:
    3
    Likes Received:
    1
    Hello,

    Your script has been doing wonders for me, and it's quite awesome to work with. However I seem to have run into a problem that is actually frustrating me.

    Code:
      [:pose, 3, 9, 5],
      [:pose, 3, 10, 5],
      [:pose, 3, 11, 5],
      [:pose, 3, 9, 5],
      [:pose, 3, 10, 5],
      [:pose, 3, 11, 5],
      [:pose, 3, 9, 5],
      [:wait, 15],
      [:pose, 2, 0, 5, "Sword-Pointbehind"],
      [:wait, 2],
      [:pose, 3, 2, 1, "Sword-Swing"],
      [:show_anim, 330],
      [:wait, 15],
      [:target_damage, 0.4],
      [:wait, 5],
      [:target_damage, 0.5],
      [:wait, 5],
      [:target_damage, 0.7],
      [:wait, 25],
      [:pose, 3, 0, 15, "Sword-Pointbehind"],
      [:pose, 3, 7, 5, "Sword_Wait"],
      [:pose, 3, 8, 5, "Sword-Finish"],
      [:camera, 0, [0, -20], 55, 1.8],
      [:wait, 75],
      [:focus, 30],
      [:icon, "Clear"],
      [:visible, false],
      [:wait, 30],
      [:show_anim, 329],
      [:wait, 10],
      [:target_damage, 0.4],
      [:wait, 20],
      [:target_damage, 0.4],
      [:wait, 20],
      [:target_damage, 0.6],
      [:wait, 15],
      [:if, "target.state?(2)",
      [
      [:script, "$game_variables[101] = 1"],
      ],
      ],
      [:if, "target.state?(2)", [:rem_state, 2]],
      [:target_damage],
      [:visible, true],
      ],

    Whenever I use that skill above, I'm greeted with this error.
    [​IMG]

    However, if I use a skill with a similar design like this one
    Code:
      [:focus, 60],
      [:sm_target, 35, 0, 10],
      [:wait, 12],
      [:cast, 113],
      [:wait, 6],
      [:pose, 3, 0, 3, "Sword-Pointbehind"],
      [:pose, 3, 7, 3, "Sword_Wait"],
      [:pose, 3, 8, 1, "Sword-Finish"],
      [:anim_follow, true],
      [:cast, 376],
      [:slide, -9, 0, 5, 0],
      [:target_slide, -8, 0, 5, 0],
      [:target_damage],
      [:wait, 15],
      [:icon, "Clear"],
      [:pose, 3, 0, 3],
      [:pose, 3, 1, 3, "Sword-Swing"],
      [:pose, 3, 2, 3],
      [:cast, 375],
      [:slide, -9, 0, 5, 0],
      [:target_slide, -8, 0, 5, 0],
      [:target_damage],
      [:wait, 15],
      [:icon, "Clear"],
      [:pose, 3, 0, 3, "Sword-Pointbehind"],
      [:pose, 3, 7, 3, "Sword_Wait"],
      [:pose, 3, 8, 1, "Sword-Finish"],
      [:cast, 376],
      [:slide, -9, 0, 5, 0],
      [:target_slide, -8, 0, 5, 0],
      [:target_damage],
      [:wait, 8],
      [:icon, "Clear"],
      [:pose, 3, 0, 3],
      [:pose, 3, 1, 3, "Sword-Swing"],
      [:pose, 3, 7, 3, "Sword-Pointdown"],
      [:cast, 377],
      [:slide, -95, 0, 6, 0],
      [:target_slide, -9, 0, 5, 0],
      [:target_damage],
      [:wait, 14],
      [:icon, "Clear"],
      [:pose, 2, 0, 1],
      [:flip, true],
      [:wait, 4],
       [:pose, 3, 1, 4, "Sword-Pointmiddle"],
      [:slide, -160, 0, 3, 0],
      [:target_slide, 33, 0, 5, 0],
      [:pose, 3, 2, 2, "Sword-Pointbehind"],
      [:show_anim, 143],
      [:force_hit],
      [:target_damage],
      [:wait, 8],
      [:flip, false],
      [:icon, "Clear"],
      [:pose, 3, 0, 3],
      [:pose, 3, 1, 3, "Sword-Swing"],
      [:pose, 3, 7, 3, "Sword-Pointdown"],
      [:anim_follow, false],
      [:show_anim, 378],
      [:cast, 349],
      [:slide, -175, 0, 3, 0],
      [:target_slide, -30, 0, 5, 0],
      [:if, "target.state?(2)", [:add_state, 33]],
      [:if, "target.state?(2)", [:force_critical]],
      [:if, "target.state?(2)",
      [
      [:script, "$game_variables[101] = 1"],
      ],
      ],
      [:if, "target.state?(2)", [:rem_state, 2]],
      [:target_damage],
      ],

    it'll work perfectly fine.
     
  7. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,390
    Likes Received:
    4,961
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    @raeson hello, thanks for using my script!

    Here is my guess. For the first sequence skill, I guess it's because you're using AoE damage. In such a case, "target" will be nil.
    For AoE, you use "target_array.any? {|target| target.state?(2)}". It checks if any of those targets has state id 2.

    Hope that helps.
     
    raeson likes this.
  8. raeson

    raeson Warper Member

    Messages:
    3
    Likes Received:
    1
    Oh geez thank you! I figured it had something to do with targeting all enemies, but I couldn't figure out what was the right call.
     
  9. dailyminerals

    dailyminerals Villager Member

    Messages:
    11
    Likes Received:
    0
    First Language:
    English
    Is there some way to create or implement a conditional branch within a move set? For example, having a skill behave one way when the player has 10 MP, but behave a different way when the player has zero MP?
     
  10. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,390
    Likes Received:
    4,961
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    Use this command
    Code:
    [:if, "self.mp == 0", <put action key if true>, <put action key here if false>]
    
    for example
    Code:
    [:if, "self.mp == 0", "ActionKeyFor0MP", "ActionKeyForOtherwise"]
    
    You need to make a separate sequence for each of them though.
     
  11. dailyminerals

    dailyminerals Villager Member

    Messages:
    11
    Likes Received:
    0
    First Language:
    English
    Thanks. I'm making extensive use of your move editor, by the way. It's awesome.
     
  12. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,390
    Likes Received:
    4,961
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    Glad to hear that. Unfortunately, the editor does not cooperate with a branched sequence. So you have to manually type it.
     
  13. dailyminerals

    dailyminerals Villager Member

    Messages:
    11
    Likes Received:
    0
    First Language:
    English
    I have another question. I'm trying to modify TP within a sequence, and I've tried
    self.tp += 10 but it throws an error. Is there a way to add to an actor's TP within a sequence?
     
    Last edited: Jan 20, 2019
  14. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,390
    Likes Received:
    4,961
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    I also use "self.tp += number" and it worked well. What error did you get?
     
  15. dailyminerals

    dailyminerals Villager Member

    Messages:
    11
    Likes Received:
    0
    First Language:
    English
    I used ["self.tp += 50"], which initially threw an "uninitialized constant" error, but now it no longer throws an error, but doesn't actually add the TP. How did you implement it within the sequence?
     
  16. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,390
    Likes Received:
    4,961
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    Code:
    [:script, "put script code here"],
    [:script, "self.tp += 45"],
     
  17. dailyminerals

    dailyminerals Villager Member

    Messages:
    11
    Likes Received:
    0
    First Language:
    English
    Oh, right. Thanks.
     
  18. Arsist

    Arsist Veteran Veteran

    Messages:
    140
    Likes Received:
    10
    Is it possible to temporarily interrupt an attack sequence for a counterattack but have said attack sequence resume after the counterattack is finished?
    Basically, I'm trying to make it more risky to use melee skills because there's a chance that you'll be struck after attacking the opponent, especially if they dodge. The current counterattack system put in place is 'My counterattack activates before your skill and interrupts it entirely'. I have it set via Lunatic Objects that your MP/TP/etc costs activate after you attempt a skill, not before (this change was made so that attacks that cost HP will activate before the user kills themselves with the HP cost, among other reasons), and counterattacks interrupting everything about the item_apply process creates a whole mess of issues.
    Whether using Hime's Battle Reactions http://himeworks.com/2013/09/battle-reactions/ (which acts a pseudo-counter system that can proc before or after a skill is used) or making the following modification
    # --------------------------------------------------------------------------
    # New method : Invoke item for TSBS
    # --------------------------------------------------------------------------
    def tsbs_invoke_item(target, item, subj = @subject)
    #--\
    invoke_pre_reactions(target, item)
    #--/
    if item.id == 702 #rand < target.item_cnt(subj, item)
    tsbs_invoke_counter(target, item)
    elsif rand < target.item_mrf(subj, item)
    tsbs_invoke_mreflect(target, item)
    end
    tsbs_apply_item(target, item, subj) # doesn't support subtitue for now
    #~ tsbs_apply_item(apply_substitute(target, item), item, subj)
    #--\
    invoke_post_reactions(target, item)
    #--/
    end
    or placing my custom counterattack process
    #@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    # COUNTERATTACK MAIN
    #@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    counter = false; base = 0; a = target; b = @subject
    chance = 0
    if item.is_a?(RPG::Skill) and target.opposite?(user) and user.alive? and target.alive?
    #<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
    case item.id
    when 1,2,3 #placeholder skills that can be countered
    base = 20
    if a.result.evaded == true
    #Stance reduces your chance of getting a counterattack by
    #focusing just on evasion
    if a.state?(999) #placeholder "Stance" state
    base = 30
    else
    base = 50
    end
    end
    chance = base
    if a.xstat.counter_rate+b.xstat.counter_suscept >= 0
    chance += base * 0.01*(a.xstat.counter_rate+b.xstat.counter_suscept)
    else
    chance *= 1/(1+((b.xstat.counter_suscept+a.xstat.counter_rate)*0.01)).to_f
    end
    chance *= item.counter_rate * 0.01
    puts "Counter Chance: #{chance.round(3)}"
    if chance > 0
    #-----\
    if rand(100)+1 <= chance.to_i
    counter = true
    end
    #-----/
    end
    if counter == true
    target.backup_actions
    counter_skill = 1
    if target.actor?
    SceneManager.scene.invoke_counter_attack(target, counter_skill)
    else
    SceneManager.scene.invoke_counter_attack(target, counter_skill)
    end
    target.restore_actions
    end
    end
    #<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
    end
    #@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    # Counterattack End
    #@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    either at the end of tsbs_invoke_item in the Implementation section or in the common 'During Effects' for Lunatic effects (since After Effects has it so the "user" and the "target" are the same meaning that I'd have to store the variable "last target" in order to be able to use the stats of both the user to determine counter chances) with minor modifications to the script based on where it's placed...

    Either method of using Battle Reactions or making an invoke_counterattack call mid-skill results in the error
    Code:
    Script 'Sideview Implementation' line 1167: FiberError occurred.
    Which, looking at the console, it prints out
    Sideview Implementation:1167:in `resume': double resume, FiberError
    from Sideview Implementation:1167:in `update'
    from Sideview Implementation:4704:in `block in update_basic'
    from Sideview Implementation:4700:in `each'
    from Sideview Implementation:4700:in `update_basic'
    from Scene_Battle:67:in `update_for_wait'
    from Scene_Battle:73:in `block in wait'
    from Scene_Battle:73:in `times'
    from Scene_Battle:73:in `wait'
    from Window_BattleLog:183:in `call'
    from Window_BattleLog:183:in `wait'
    from Tsukihime Battle Reactions:539:in `display_reaction'
    from Tsukihime Battle Reactions:512:in `perform_reactions'
    from Tsukihime Battle Reactions:500:in `invoke_reactions'
    from Tsukihime Battle Reactions:486:in `invoke_post_reactions'
    from Sideview Implementation:4872:in `tsbs_invoke_item'
    from Sideview Implementation:1588:in `setup_damage'
    from Sideview Implementation:1390:in `execute_sequence'
    from Sideview Implementation:1368:in `block in update_anim_index'
    from Sideview Implementation:1365:in `loop'
    from Sideview Implementation:1365:in `update_anim_index'
    from Sideview Implementation:1187:in `block in force_change_battle_phase'
    The error is referring to the fiber_obj.resume part of
    # --------------------------------------------------------------------------
    # New method : Battler update
    # --------------------------------------------------------------------------
    def update
    return if $game_temp.global_freeze && battle_phase != :skill
    update_move # Update movements (Basic Module)
    update_smove # Update smooth movement (Basic Module)
    if fiber_obj
    fiber_obj.resume # Update Fiber thread
    end
    end
    # --------------------------------------------------------------------------
    # New method : Fiber object
    # --------------------------------------------------------------------------
    def fiber_obj
    return nil
    end
     
  19. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,390
    Likes Received:
    4,961
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    Currently, the counterattack feature is kinda flawed. It was based on my assumption of "how the counterattack should be", i.e, interrupting sequence, not executed after the attack is done like in default RM. Technically speaking, it's overwriting the battle phase from "going to attack" to "get hurts", i,e. impossible to resume the sequence after get counterattacked.

    ------------
    Also, I'm not sure the whole thing you're trying to do.
    Invoke item in my system is to simply to apply item effects and maybe a trigger to counterattack. It can get weird if it's mixed with a reaction skill because the method was designed to be called many times, assumed you're going to sequence multiple hits. Are you going to react to every hit?

    If you want to make a reaction before the skill is executed, here is the sequence structure of my script.
    Code:
      def show_action_sequences(targets, item, subj)
        tsbs_action_init(targets, item, subj)
        tsbs_action_pre(targets, item, subj)
        tsbs_action_main(targets, item, subj)
        tsbs_action_post(targets, item, subj)
        tsbs_action_end(targets, item, subj)
        $game_temp.backdrop.reset_transition_flags
        wait(tsbs_wait_dur)
      end
    
    • Action init is to initialize who is the subject, target, and record the target.
    • Action preparation is for skill casting (Usually this step gets ignored, the preparation phase is not much used. I added it just because)
    • Action main is where the main action sequence is played
    • Action post is the post of the action, like returning to the original position.
    • Action end is the ending of the sequence. This is where the conclusion is being drawn, like total damage, and check if the target is dead.
    If you want to add the battle reaction that is executed before the main action is executed, I'd put it in the action preparation.
    The edit should be something like this in the scene battle(Disclaimer, I didn't dig deeper on how Tsukihime code their script)
    Code:
      alias edited_tsbs_action_pre tsbs_action_pre
      def tsbs_action_pre(targets, item, subj)
        targets.each do |target|
          reactions = target.get_reactions(item).select{|react| !react.pre_react? }
          invoke_reactions(reactions, target, item)
        end unless BattleManager.reaction_processing
        edited_tsbs_action_pre(targets, item, subj)
      end
    
    I've seen that the method "invoke_reactions" looks like a recursive method that call the method "process_action" that might lead to this whole action sequence once again. The thing is, it might work, it might not work. But at least, that's how the integration should look like.

    As for the yanfly lunatic compatibility, I wrote the script with no compatibility in mind with those scripts. Mainly because I was quite unfamiliar with lunatic codes. I might want to look back on what's wrong with my attempt to integrate both, but idk ...

    If you have ruby knowledge to edit stuff, I'd be happy to help you to understand my code, my design, and how all of this stuff is working. But that's all about. Integrating multiple scripts into a working piece is out of my reach.
     
  20. Arsist

    Arsist Veteran Veteran

    Messages:
    140
    Likes Received:
    10
    Essentially, I want to have a counterattack determination occur after the attack is processed but before the target's data is cleared.
    It would likely proc after the last target is hit, as I don't plan to have multiple-target moves be counter-able anyway.

    It would go like this:

    Determine if evasion occurs (I don't use the item_hit system so I merely set it to always result as true; I only use item_eva) or not
    --If not evaded, then calculate damage.
    Process secondary effects like states and MP/TP/HP costs (Lunatic Object's After Effects allows for dynamic, formulaic ailment chances and custom MP cost processes).
    Whether hit or miss, determine whether opponent counterattacks, the rate of counterattacking increasing if the skill is dodged.
    Clear action data.
    Enemy counterattacks or not (this counterattack doesn't need to be a literal invoke_counterattack but can either be a forced action or a call from Hime's Battle Reactions script).
    Battlers return to idle.

    It's not so much that I'm explicitly asking for the script to be modified by you, but I'm more asking if it's possible to fit a custom reaction process anywhere in your script or if that would break the linear battle phase system you have put in place.

    Your Sideview Implementation already has included compatibility for Lunatic Objects, and it's compatible with Lunatic Damage because it doesn't change how damage is calculated, just when it's calculated. I don't use any other Lunatic scripts besides the two.
    Your script has no issue with Lunatic Objects' effects themselves, just the calling of a skill by an enemy while an actor is still attacking. It has no issue with calling an attack by the same actor/enemy mid-process.
    For example, I use it for a custom "Attack String" process where battlers' basic attacks normally strike 2.25 times, aka twice with a 25% chance to attack a third time, this rate of attack varying from battler to battler and is affected by states. So it'll be basic attack -> follow up attack -> potential third follow up attack and soforth. I only plan to have it so that the last hit of an Attack String can be countered, but all I'd have to do is have it so that the state Attack Can Be Countered is only applied upon using the last attack of an Attack String and have it so that counterattacks can only proc if the state Attack Can Be Countered is applied. I don't want to confuse you with my custom processes, though.

    ^ If you're curious how I'm doing this, I place the following code in the After Effects section of Lunatic Objects
    Code:
    #<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
          when /BASIC FIRST/i
    #<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
            attack_rate = user.xstat.attack_rate - 100
            if 1 > 2 #Placeholder condition for when increasing attack rate applies
              attack_rate + 35
            end
            if rand(100)+1 <= (attack_rate - ((attack_rate*0.01).to_i)*100)
              attack_rate += 100
            end
            if attack_rate >= 100
              ((attack_rate*0.01).floor).times do
                user.add_state(245) #stack for additional attacks in attack string
              end
              #The follow-up skill is defaultly the database skill after the basic
              #skill. So, the follow-up to skill 65 would defaultly be skill 66.
              user.process_specific_follow_up(item,item.id+1)
              user.remove_state(245) #remove a stack of follow-up
            end
       
    #<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
          when /BASIC FOLLOW/i
    #<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
            if user.state?(245) #If attacker has follow-ups in attack string
              user.process_specific_follow_up(item,item.id)
              user.remove_state(245) #remove a stack of follow-up
            end
    and have a custom process known as 'process_specific_follow_up' added to Yanfly's Follow-Up Skills script
    Code:
      def process_specific_follow_up(item,follow_up_id)
        action = Game_Action.new(self)
        action.set_skill(follow_up_id)
        if current_action.nil?
          action.decide_random_target
        else
          action.target_index = current_action.target_index
        end
        @actions.insert(1, action)
        @actions[1].follow_up = true
      end
    I have been occasionally looking through your script to see how it works, but I haven't been working on my project as much due to energy issues. I have yet to really bugtest and get a feel for the key, phase, and animation system -- I merely use what you have included and use placeholder graphics and animations and look into what it has overwritten and aliased, as I want to focus more on the technical semantics of the battle system before worrying about audiovisual stuff. Though, the more I neglect learning the inner facets of the TSBS script, the more problems I can run into in the future. So far I have enough Ruby coding knowledge to modify existing scripts and add in some custom processes but not enough to make my own full scripts. My processes tend to stray very far from vanilla Ace's battle system, so it requires more modification on my end.

    I'll have to see if changing where the reaction process is placed in your script prevents the prior-mentioned error.

    The reason I prefer a dynamic, non-interrupting counterattack system rather than the preexisting system is that there's already the chance of a skill being dodged, so to add in the chance to have your skill not be activated entirely adds another element of inconsistency and randomness that seems to punish the player and creates problems because the effects of a skill don't proc.
    Explosion skill that damages the user? The self-damage doesn't even occur because the skill doesn't technically activate due to being counterattacked. Using skill cooldown system? Cooldown doesn't activate, either.
     
    Last edited: Jan 24, 2019

Share This Page