Making actor do nothing except use one skill when inflicted by state.

Discussion in 'RPG Maker VX Ace' started by Raythalos, Jun 16, 2015.

  1. Raythalos

    Raythalos Just a regular Alicef@g~ Veteran

    Messages:
    54
    Likes Received:
    0
    Location:
    Gensokyo
    First Language:
    Indonesian
    I'm making one of my characters have a skill that gives him a state that locks him in place, and while he has that state on, he will ignore commands while repeatedly doing a certain skill that he otherwise couldn't use by itself.

    For example:

    A uses Skill B, which gives him state C. Turn ends.

    Next turn comes up, the player couldn't input a command for A, but he casted Skill D automatically.

    The next turn the same thing happens.

    State expires and A is controllable again.

    TL;DR, think of it as Rollout from the Pokemon games.

    I separately tried two scripts to do this;

    • Mr Bubbles' Enemy AI script. I made a blank enemy containing the only skill A was supposed to do and changed state C's properties to autobattle. It was working quite smoothly, until I tested it on troops with one enemy and it apparently triggered Yanfly's Enemy Health bars' script with a "update_enemy_gauge_value" error (for some reason, knowing that the script doesn't have anything to do with health bars) and crashed.
    • Shad3's End Turn/Action Skill, which let me assign skill D onto state C which triggers whenever the turn ends... except since it's a multi-hit skill, if it kills an enemy the game also crashes an error, also attributed to Yanfly's script, only the battle system this time.
      [​IMG]
    So, neither are out of the question. I even tried messing with the order of the scripts and no dice.

    Are there any alternative ways to do this? Help would be appreciated.
     
    Last edited by a moderator: Jun 16, 2015
    #1
  2. Another Fen

    Another Fen Veteran Veteran

    Messages:
    514
    Likes Received:
    232
    First Language:
    German
    You could accomplish that without using scripts if you let the state provide "Auto Battle", teach the actor the skill he/she is supposed to use and seal all other skill types to force the actor into that action.

    However, when an actor uses "Auto Battle", make sure that actor can't use any skills that execute unrelated effects in their damage formula. Since the formula is also evaluated in order to test the skills performance for each target, weird effects may occur otherwise.

    If you want to use one of the scripts and are wondering why you are running into error messages, could you provide a list of scripts you are currently using? (preferrably with links to each source)
     
    Last edited by a moderator: Jun 16, 2015
    #2
  3. Raythalos

    Raythalos Just a regular Alicef@g~ Veteran

    Messages:
    54
    Likes Received:
    0
    Location:
    Gensokyo
    First Language:
    Indonesian
    Unrelated effects? What examples are there? This method might be worth a try for a temporary solution, actually, if it seals the attack moves and guard as well. The only problem with this is he'd probably be unable to use a skill he doesn't have, but that'd be easily fixed. Thanks! I'll go test it soon.

    EDIT: It actually works perfectly with the add skill function a state can have, whoops. Though, he still randomly uses attack sometimes.

    It's a pretty huge list, though... hold on...

    Moghunter's Scripts (Battler Motion, Aura Effect, Battleback EX, Transition EX, Character EX, Chain Commands, Animation+, Event Sensor Range),

    Source's Scripts (Command Slider, Menu Scrollbars, Speed Trails, Enhanced Camera, Scrolling Item Descriptions, Savefile Doctor),

    A HUGE LIST OF Yanfly Scripts,

    Message Scripts (Yami's Pop Message, Zerbu's Text Sounds, Galv's Menu Layout, Message on Box, and Ace Save Addon, ATS Formatting),

    TheoAllen's Victory Aftermath, TheoAllen's Yanfly Critical Fix, Glasses' Boss HP Bar, Vlue's Basic Combo Attacks, Fomar's Counterattack Skill, A snippet for common events before damage, A snippet for an endure state, Hime's Battle Rules, Enemy Reinforcements, and Untargettable State, KreadEX's Skill Update, Neon Black's Passive Skills, Galv's Cover, Mr Bubbles' Revive on each Battle and Autolife state, and Euphoria's Hurt Faces, A snippet for No Convert, and I think that's all, at least for the scripts that I think -may- cause the problem. I haven't tried it with a clean nor Yanfly-only game yet.
     
    Last edited by a moderator: Jun 16, 2015
    #3
  4. Another Fen

    Another Fen Veteran Veteran

    Messages:
    514
    Likes Received:
    232
    First Language:
    German
    I didn't test it myself, but you should be able to also seal specific skills like "Attack" or "Guard".

    Sometimes you see damage formulas like this:
    a.hp -= 100; 500

    to deal 500 damage but reduce the attackers HP by 100 in reverse. The damage to the attacker is applied directly whenever the formula is evaluated which usually only happens when you hit a target.

    However, since "Auto Battle" tests every usable skill against every possible target, this particular formula could cause the battler to take a good amount of damage at the start of each turn.

    You can find several examples what to do with your damage formulas here.

    Could you provide links for the AI scripts you were trying to use? Right now I couldn't find them either in the master script list or a quick search.
     
    Last edited by a moderator: Jun 16, 2015
    #4
  5. Raythalos

    Raythalos Just a regular Alicef@g~ Veteran

    Messages:
    54
    Likes Received:
    0
    Location:
    Gensokyo
    First Language:
    Indonesian
    End Turn Skill and Enemy AI State

    ah, it's alright. The formula is pretty straightforward, so it shouldn't cause any problems.

    Though, the only problem currently is that the character i'm using the state on occastionally uses the regular attack skill.
     
    Last edited by a moderator: Jun 17, 2015
    #5

Share This Page