QABS skill sequence variable checks and modify

Hi, thank you all for your time and effort helping amateurs like me create games! I am still very new to RPG Maker, and JavaScript, but with the help of some excellent youtube videos by SRDude, David Browne, Echo607, and Drifty of Driftwood gaming, amongst others; (including help from amazing plug-ins by stellar Devs!) I've been able to get further than I thought possible.

As you can see, I have used QABS (this is the new quasi-abs?) to create an axe slash effect, and shotgun effect in my WIP game. You can see what this looks like in my video .

I was able to use SRDude's HUDMaker plugin to great effect in my video where you can see as the player picks up a shotgun and loads to 8 capacity, it adds visual shells to the hud on the bottom 🙂 . SRDude's HUDMaker makes this simple with game.variable checks, and when I shoot, deducts a shell from a game variable, item count, and thus the hud. I was having trouble implementing QABS and wondering if I can add a change to game variables (like ammunition) in <absSequence> part of the note of the skill maybe?

Right now, if I have the skill "shotgun blast", I can use it, without regard to if the player has ammunition. I want it to work like the 2nd video where QABS would only allow the weapon to fire (pressing tab) if it checked variable ShellCount and it was >=1. I would ask Quxios, but it looks as if he no longer supports his plugin as of March 27. 🙁 . I'd be glad to elaborate further or provide additional pictures/screenshots/videos of code, just ask. I wasnt sure how much I'd be able to add to a post as a new member of the forum.

I can also be reached directly <--snip-->

Thanks all!
@J-Y I have removed your Discord details, as we do not allow channels to be posted about here. Also, if you are asking on this site for help from someone, it would be nice if the answer could be here as well, in case anyone else has the same query in the future.
Understood, @Kes. I see why it would be important to keep communication to the forum, I just thought it may give me better odds to get a reply, but I see it is not allowed, no problem! If I figure out the solution to my question, or even if I just figure out a better way to ask it, I'll post it here.
Update - I still haven't quite figured this out. Modifying the Skills "Effects" on the Skill page in Database seems to allow me to activate Common Events, which I can then use to make conditional checks and variable changes like I'm used to.(highlighted in picture)
QABStroubleshooting1-5.4.jpg

Unfortunately it seems that the "Effects" area only runs upon the collision with another Event, much like I would expect the <absOndamage> tag to work in Notes. So this means now when I "shoot", the common event to check ammo and reduce the variable by one only runs if it hits something, effectively giving the player unlimited ammo until they hit! (this is happening out of order, the game allows you to "shoot" first, and asks if you had the ammo after it hits something, lol)

Unfortunately, it doesn't look like I can add random js to the <absSequence> tag (my switch call to activate doesnt seem to work, i don't know if i know what i'm doing here) (highlighted in picture)

Perhaps if I was to extend the collider to travel "forever" to the border of the screen and "always" hit the wall colliders (and play a richochet sound if so) then this would ensure the "Effects" always activate? This might be possible but I would still like to understand how to insert my own JS into Quxios Note tagging (or understand how to do it another way) so that the conditional checks and variable modifications comes ON ACTIVATION rather than ON STRIKE, as they work currently.


(my apologies if the formatting is off, I'm new to forum posting!)

Thanks in advance for any input! I would be glad to add additional pictures or information if it helps you help me! 🙂
have you had any progress with the problem?
you must add a "commonevent" command in the skills sequence inside the QABS plugin if you want to run a common event as part of the skill sequence. I needed to do this for my game, so I added it myself.

Open QABS.js with an editor and find this part:
JavaScript:
  Skill_Sequencer.prototype.startAction = function(action) {
    var cmd = action.shift().toLowerCase();
    switch (cmd) {
      case 'user': {
        this.startUserAction(action);
        break;
      }
      case 'store': {
        this.actionStore();
        break;
      }
      case 'move': {
        this.actionMove(action);
        break;
      }
      case 'movetostored': {
        this.actionMoveToStored(action);
        break;
      }
      case 'wave': {
        this.actionWave(action);
        break;
      }
      case 'wavetostored': {
        this.actionWaveToStored(action);
        break;
      }
      case 'damage':
      case 'trigger': {
        this.actionTrigger(action);
        break;
      }
      case 'adjustaim': {
        this.actionAdjustAim(action);
        break;
      }
      case 'wait': {
        this.actionWait(action);
        break;
      }
      case 'picture': {
        this.actionPicture(action);
        break;
      }
      case 'trail': {
        this.actionTrail(action);
        break;
      }
      case 'collider': {
        this.actionCollider(action);
        break;
      }
      case 'animation': {
        this.actionAnimation(action);
        break;
      }
      case 'se': {
        this.actionSE(action);
        break;
      }
      case 'qaudio': {
        this.actionQAudio(action);
        break;
      }
      case 'forceskill': {
        this.actionForceSkill(action);
        break;
      }
      //Adding the commonevent in the sequence possibilities
      case 'commonevent': {
        this.actionCommonEvent(action);
        break;
      } // end of the modification
      case 'globallock': {
        $gameMap.globalLock(null, 0, 1);
        break;
      }
      case 'globalunlock': {
        $gameMap.globalUnlock(null, 0, 0);
        break;
      }
    }
  };

Then, a bit lower, you need to add what this new command does, like so:
JavaScript:
 Skill_Sequencer.prototype.actionForceSkill = function(action) {
    var id = Number(action[0]);
    var angleOffset = Number(action[1]);
    var radian = this._skill.radian;
    if (angleOffset) {
      radian += angleOffset * Math.PI / 180;
    }
    var center = this._skill.collider.center;
    var skill = this._character.makeSkill(id);
    var w = skill.collider.width;
    var h = skill.collider.height;
    skill.collider.moveTo(center.x - w / 2, center.y - w / 2);
    skill.radian = radian;
    skill._target = this._skill._target;
    this._character._activeSkills.push(skill);
    this._character._skillCooldowns[id] = skill.settings.cooldown;
  };

  //Adding the action of the new common event command

  Skill_Sequencer.prototype.actionCommonEvent = function(action) {
    var id = Number(action[0]);
    $gameTemp.reserveCommonEvent(id)
  };

  //End of the modification

  Skill_Sequencer.prototype.actionMoveSkill = function(distance, duration) {
    var instant = duration === 0;
    if (duration <= 0) duration = 1;
    this._skill.newX = this._skill.collider.x + Math.round(distance * Math.cos(this._skill.radian));
    this._skill.newY = this._skill.collider.y + Math.round(distance * Math.sin(this._skill.radian));
    this._skill.speed = Math.abs(distance / duration);
    this._skill.speedX = Math.abs(this._skill.speed * Math.cos(this._skill.radian));
    this._skill.speedY = Math.abs(this._skill.speed * Math.sin(this._skill.radian));
    this._skill.moving = true;
    if (instant) {
      this.updateSkillPosition();
    }
  };

Then, in the skill page of your RMMV editor, just add the new command when you need it, for example:

<absSequence>
commonevent 1
</absSequence>

Of course, "1" is the id of the common event you want to use, just change the number depending of the common event you want to start!

Hope it helps!

Edit: for the first part, I have to learn to use Aliases to avoid compatibility issues. Will do so when I have time and update the code here or share the finished plugin. I'm no coder at all so expect issues when using my coding! 😉 By the way, you can do something similar to add control variables to the skill sequence too.
you must add a "commonevent" command in the skills sequence inside the QABS plugin if you want to run a common event as part of the skill sequence. I needed to do this for my game, so I added it myself.

Open QABS.js with an editor and find this part:
JavaScript:
  Skill_Sequencer.prototype.startAction = function(action) {
    var cmd = action.shift().toLowerCase();
    switch (cmd) {
      case 'user': {
        this.startUserAction(action);
        break;
      }
      case 'store': {
        this.actionStore();
        break;
      }
      case 'move': {
        this.actionMove(action);
        break;
      }
      case 'movetostored': {
        this.actionMoveToStored(action);
        break;
      }
      case 'wave': {
        this.actionWave(action);
        break;
      }
      case 'wavetostored': {
        this.actionWaveToStored(action);
        break;
      }
      case 'damage':
      case 'trigger': {
        this.actionTrigger(action);
        break;
      }
      case 'adjustaim': {
        this.actionAdjustAim(action);
        break;
      }
      case 'wait': {
        this.actionWait(action);
        break;
      }
      case 'picture': {
        this.actionPicture(action);
        break;
      }
      case 'trail': {
        this.actionTrail(action);
        break;
      }
      case 'collider': {
        this.actionCollider(action);
        break;
      }
      case 'animation': {
        this.actionAnimation(action);
        break;
      }
      case 'se': {
        this.actionSE(action);
        break;
      }
      case 'qaudio': {
        this.actionQAudio(action);
        break;
      }
      case 'forceskill': {
        this.actionForceSkill(action);
        break;
      }
      //Adding the commonevent in the sequence possibilities
      case 'commonevent': {
        this.actionCommonEvent(action);
        break;
      } // end of the modification
      case 'globallock': {
        $gameMap.globalLock(null, 0, 1);
        break;
      }
      case 'globalunlock': {
        $gameMap.globalUnlock(null, 0, 0);
        break;
      }
    }
  };

Then, a bit lower, you need to add what this new command does, like so:
JavaScript:
 Skill_Sequencer.prototype.actionForceSkill = function(action) {
    var id = Number(action[0]);
    var angleOffset = Number(action[1]);
    var radian = this._skill.radian;
    if (angleOffset) {
      radian += angleOffset * Math.PI / 180;
    }
    var center = this._skill.collider.center;
    var skill = this._character.makeSkill(id);
    var w = skill.collider.width;
    var h = skill.collider.height;
    skill.collider.moveTo(center.x - w / 2, center.y - w / 2);
    skill.radian = radian;
    skill._target = this._skill._target;
    this._character._activeSkills.push(skill);
    this._character._skillCooldowns[id] = skill.settings.cooldown;
  };

  //Adding the action of the new common event command

  Skill_Sequencer.prototype.actionCommonEvent = function(action) {
    var id = Number(action[0]);
    $gameTemp.reserveCommonEvent(id)
  };

  //End of the modification

  Skill_Sequencer.prototype.actionMoveSkill = function(distance, duration) {
    var instant = duration === 0;
    if (duration <= 0) duration = 1;
    this._skill.newX = this._skill.collider.x + Math.round(distance * Math.cos(this._skill.radian));
    this._skill.newY = this._skill.collider.y + Math.round(distance * Math.sin(this._skill.radian));
    this._skill.speed = Math.abs(distance / duration);
    this._skill.speedX = Math.abs(this._skill.speed * Math.cos(this._skill.radian));
    this._skill.speedY = Math.abs(this._skill.speed * Math.sin(this._skill.radian));
    this._skill.moving = true;
    if (instant) {
      this.updateSkillPosition();
    }
  };

Then, in the skill page of your RMMV editor, just add the new command when you need it, for example:

<absSequence>
commonevent 1
</absSequence>

Of course, "1" is the id of the common event you want to use, just change the number depending of the common event you want to start!

Hope it helps!

Edit: for the first part, I have to learn to use Aliases to avoid compatibility issues. Will do so when I have time and update the code here or share the finished plugin. I'm no coder at all so expect issues when using my coding! 😉 By the way, you can do something similar to add control variables to the skill sequence too.
I try this in 2025 and it's doesn't work for me, I'm doing exactly as you said.
Necro-post notice: @wecanfayo

Original thread: https://forums.rpgmakerweb.com/threads/qabs-skill-sequence-variable-checks-and-modify.94519/