Hi everyone, first time posting here so if I'm going about this all wrong please bear with me. Very new to this.
I am currently most of the way through designing a Combat System I want set up and have most of it functioning, but I need to make use of a JavaScript Notetag to connect the final pieces and have actually 0 knowledge of coding (never done any before at all). I'm not sure if this kind of question goes in here or a different place but I'm happy to have it moved.
The main plugins I'm using are Visustella's Battlecore, Skills & States Core, CTB Battle System & Enhanced TP systems. What I need is to use this Notetag from Skills & States Core so that the State I apply it to will remove all other states of a specific type on the battler it is attached to when it gets erased or expires (I presume I can use the same code in order to use the otherwise identical "On Expire" Notetag for that purpose).
That's the specifics of what I need, but I'll share more detail on exactly what I'm doing below if context is needed:
I am currently most of the way through designing a Combat System I want set up and have most of it functioning, but I need to make use of a JavaScript Notetag to connect the final pieces and have actually 0 knowledge of coding (never done any before at all). I'm not sure if this kind of question goes in here or a different place but I'm happy to have it moved.
The main plugins I'm using are Visustella's Battlecore, Skills & States Core, CTB Battle System & Enhanced TP systems. What I need is to use this Notetag from Skills & States Core so that the State I apply it to will remove all other states of a specific type on the battler it is attached to when it gets erased or expires (I presume I can use the same code in order to use the otherwise identical "On Expire" Notetag for that purpose).
The "Specfic Type" would be a category I can mark using this other Skills & States Core Notetag (assuming I am correct that that's how this Notetag works):
The other thing I need is a separate iteration of the same <JS On Erase State> Notetag to toggle a switch.
That's the specifics of what I need, but I'll share more detail on exactly what I'm doing below if context is needed:
My system as I have it designed works like so: All battlers, friend & foe, have their skills divided into Martial or Magical abilities. Martial Abilities activate instantly, like standard RPG maker fair. Magical abilities however need to go through a Channeling phase before they can be used. When a Magic ability is selected, it applies the general "Channelling" state, as well as an additional "Channel - Ability X" state and toggled switch specific to the chosen ability to the Battler. While "Channeling", a unit that takes a hit has their TP increased (which I've altered with plugins to function as a "concentration" bar), and all attacks trigger a common event at their conclusion that checks to see if anyone has hit Max TP. If they do, all Channeling type states are removed from the battler and the ability switch is toggled off, since the characters 'concentration' was broken and they failed to complete the spell (this is what I need the above code to achieve).
If they do NOT reach Max TP before their next turn begins however, the Toggled On Switch will enable a second ability to be selected, which actually casts the effect part of the 'spell' in question. The switch is then toggled off and the Channeling states naturally expire at the conclusion of that turn.
Most other methods I could see of getting this kind of thing to work unfortunately seemed to require some kind of "Beginning or End of turn Check", which didn't seem possible in the CTB Battle System
.
I also have a plugin to make enemy TP bars visible so that the player can see progress towards disrupting any spell they might be channeling. I like this system because I want the player to have to make strategic tradeoffs about whether they risk casting a spell with a long channel time, since it increases the likelihood that they fail to complete the cast, but naturally the most powerful spells have the longest channel times. This is why I felt the CTB Battle System was necessary to make these tradeoffs a meaningful component of gameplay design.
If they do NOT reach Max TP before their next turn begins however, the Toggled On Switch will enable a second ability to be selected, which actually casts the effect part of the 'spell' in question. The switch is then toggled off and the Channeling states naturally expire at the conclusion of that turn.
Most other methods I could see of getting this kind of thing to work unfortunately seemed to require some kind of "Beginning or End of turn Check", which didn't seem possible in the CTB Battle System
.
I also have a plugin to make enemy TP bars visible so that the player can see progress towards disrupting any spell they might be channeling. I like this system because I want the player to have to make strategic tradeoffs about whether they risk casting a spell with a long channel time, since it increases the likelihood that they fail to complete the cast, but naturally the most powerful spells have the longest channel times. This is why I felt the CTB Battle System was necessary to make these tradeoffs a meaningful component of gameplay design.