22pepperjack

Veteran
Veteran
Joined
Jun 18, 2013
Messages
235
Reaction score
72
First Language
English
Primarily Uses
so im not sure if this is the best method for doing this, but it seems to ALMOST work. im using Yanfly's Buffs and States Core and yanflys STB scripts

Buffs and States Core

Standard Turn Battle


what ive done is add in a custom skill for the player character:
initial skill.png

when the skill is used it damages the user, and adds a state to said character that provides a double damage boost.
state.png
this state lasts for 3 turns, and upon expiring at the end of its last turn, (using the buffs and states core) i attempted to add in a special "Explosion" attack that damages all enemies. without taking up the users turn since it happens after they did their attack, but before the next user attacks.

the code in the note block:

<Custom Remove Effect>
var skill = 12;
var target = -1;
BattleManager.queueForceAction(user, skill, target);
</Custom Remove Effect>

everything works perfectly fine on the skills initial use, the player takes damage, deals double damage for three turns, and after the third turn they deal an explosive damage to ALL opponents before the opponents attack back. however, if the player uses the skill again AFTER this (on the next turn after the state is removed and the skill used) then it gets stuck in an infinite loop. the player takes damage, the state is applied, but then the state is perpetually at 4 turns remaining and never expires.

for the life of me i have no clue why the state gets caught in a loop and stops ticking down its turns.

EDIT: ok so using this ability seems to break the turn counter for all states. battlers and enemies are still able to fight it out no problem, but all states stop counting down after the custom remove skill is used.
 

Attachments

  • final attack.png
    final attack.png
    149.4 KB · Views: 3

Autofire

PICNIC Solver
Veteran
Joined
Aug 4, 2017
Messages
50
Reaction score
24
First Language
English
Primarily Uses
RMMV
There are a few possible solutions here, assuming I understood the problem correctly. You might want to implement more than one of these because they change some aspects of the mechanic, though that's up to you.
  1. Put <Reapply Ignore Turns> into your state's note box. I'm exactly sure what's causing this issue, but I believe you don't want the turn counter to increase when the user re-casts this.
  2. Use <Custom Leave Effect> instead of <Custom Remove Effect>. If the state is being reapplied, it's possible that's triggering the removal effect. Keep in mind that Remove gets triggered even if the state is removed by a skill or by death. I'm not sure, but your current system might allow a dead character to use your Unleashed Fury skill, if the circumstances are right...
  3. Using Yanfly's Skill Core plugin, you could make it so that the character cannot use the skill while they have the status. You could use the <Custom Requirement> tags, and use the hasState function to check if the user has the state.
  4. Again, using Yanfly's Skill Core plugin, use the <HP Cost: 25%> instead of having the user attack themselves. This has an extra benefits of putting the health cost into the menu, and it also prevents the player from using the skill if this would be killed by it. This might actually solve your issue, because this isn't considered an attack on the user.
I'm still not sure I totally understand. These are the things that just occurred to me after looking at the way stuff is set up.
 

22pepperjack

Veteran
Veteran
Joined
Jun 18, 2013
Messages
235
Reaction score
72
First Language
English
Primarily Uses
There are a few possible solutions here, assuming I understood the problem correctly. You might want to implement more than one of these because they change some aspects of the mechanic, though that's up to you.
  1. Put <Reapply Ignore Turns> into your state's note box. I'm exactly sure what's causing this issue, but I believe you don't want the turn counter to increase when the user re-casts this.
  2. Use <Custom Leave Effect> instead of <Custom Remove Effect>. If the state is being reapplied, it's possible that's triggering the removal effect. Keep in mind that Remove gets triggered even if the state is removed by a skill or by death. I'm not sure, but your current system might allow a dead character to use your Unleashed Fury skill, if the circumstances are right...
  3. Using Yanfly's Skill Core plugin, you could make it so that the character cannot use the skill while they have the status. You could use the <Custom Requirement> tags, and use the hasState function to check if the user has the state.
  4. Again, using Yanfly's Skill Core plugin, use the <HP Cost: 25%> instead of having the user attack themselves. This has an extra benefits of putting the health cost into the menu, and it also prevents the player from using the skill if this would be killed by it. This might actually solve your issue, because this isn't considered an attack on the user.
I'm still not sure I totally understand. These are the things that just occurred to me after looking at the way stuff is set up.

1 - I have the default settings for the buffs and states core set to ignore the reapplication of states (no stacking) so idk if that changes anything. I tried it and from first glance i dont see any difference across any states/skills but idk lol.

2 - this is something ive been looking/swapping back and forth between for a bit now as i didnt really understand the difference between the two, ill definitely keep it on "Leave" now that i know thats a risk, my only question is about the end of a battle, if the state is on a character at the end of a battle while using "remove" everything works fine. but if "leave" is applied it seems to leave the battle in a state of limbo? lol

3 - was gonna implement this next lol now i know how thanks!

4 - definitely a neat trick, didnt know that little command lol, however im not sure how this prevents the issue? when the skill is used, the damage is instantly dealt to the player and the state is applied, 3 turns later (after that character does whatever they do) the state expires and immediately after the unleashed fury skill is auto used to hit all opponents. after that turns continue as normal.

ive noticed that if i remove the custom attack from the end of the state nothing bad happens, but the moment that code is implemented and used, all states no longer count down.

thanks for helping me solve a future problem for the prevent use of active skill thing, but unfortunately the bug still persists. and even worse, i found a comment on Yanfly's site about one of the reasons she is discontinuing the STB script. apparently the use of buffs and states core with STB causes a bug with the STB turn counter that stops it from keeping track. which is the issue im having. :/

if any ideas exist for how to jumpstart the turn-counters heart after the skill is used, (maybe through common events but i dont really know how those work to be honest lol.) or maybe how to do the same skill but without the buffs and states core. i would really appreciate it.

P.S. autofire what did you mean by putting the health cost "into the menu" for item 4? and again, thanks!
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,693
Reaction score
3,031
First Language
Tagalog
Primarily Uses
RMVXA
The problem is that you are using STB together with Force Action.

As Yanfly said in his site:

And while STB is turn-based, there are still some features that cannot be used with it (for example, negative action speed which works with DTB) and forced actions (because they will override the current turn calculator)

Basically, you can't, at least not with just those plugins. I dont know if theres a fix for this though, especially since Yanfly chose to drop support of his STB CTB and ATB plugins due to the problems they cause to other things.
 

22pepperjack

Veteran
Veteran
Joined
Jun 18, 2013
Messages
235
Reaction score
72
First Language
English
Primarily Uses
Yeah, kinda figured it might not be so simple once I saw that, hopefully one exists or can be found. Thanks for the help tho!
 

Autofire

PICNIC Solver
Veteran
Joined
Aug 4, 2017
Messages
50
Reaction score
24
First Language
English
Primarily Uses
RMMV
The problem is that you are using STB together with Force Action.
Oh yeah... forgot about that issue. That makes things... pretty hard. If I had the time I'd attempt to fix it, but I've heard it's pretty complex.

4 - definitely a neat trick, didnt know that little command lol, however im not sure how this prevents the issue?
I wasn't totally sure what was causing the issue. It kind of sounded like it had to do with the actor hitting themselves, causing something to happen. Giving the skill an HP cost makes it so that the character isn't being attacked while still making them lose HP.
 

Latest Threads

Latest Profile Posts

Trailer is almost done for the game i can't wait to show it to everyone
I've got good news and bad news. The good news is, there aren't any bad news to report. The bad news is, there aren't any good news to report.

Or as others say, yesterday was uneventful.


I am curious that can you "understand/get the point" about what does this place do generally?
(ARPG game)
If anyone knows any C# programmers, please send them my way.
Chilling at night in a tavern.
ChillingAtTavern.png

After 'multiple breakdowns', it's finally over. 10/10 will do this again.

Forum statistics

Threads
129,856
Messages
1,205,752
Members
171,034
Latest member
MrDummyAcc_dot
Top