Turn-Based State Variable

Hello, i need help. I want to make a character that does one more attack every turn, like at turn 0 he does 1 attack, at turn 1 he does 2, at turn 2 he does 3, and so on. How can i make it? I use yep plugins and i thought i could use passive states maybe with some conditions but i don't know how to make this. Any suggestions? I don't know Java so keep it in mind when explaining how to make it please.
I don't know Java so keep it in mind when explaining how to make it please.
Just to mention it, RPG Maker doesn't use Java - it uses JavaScript. They sound similar but they're two different coding languages.

I can't think of an easy way to do what you want.

There's the Action Times parameter - you'd have to use a dynamic traits plugin and a passive state on the actor that increases the Action Times trait at the end of each turn.

The code for the passive state wouldn't be hard to give to you, but you'd have to read and learn how the dynamic traits plugin works and its syntax for plugin commands and such.

If you were using MV I'd also suggest you could pull some tricks with Yanfly's Instant Cast, but it appears that the VisuStella version doesn't offer any kind of JavaScript eval notetags for their Instant Use skills, so unless someone knows another MZ plugin that has instant cast, that's not an option.
Just to mention it, RPG Maker doesn't use Java - it uses JavaScript. They sound similar but they're two different coding languages.

I can't think of an easy way to do what you want.

There's the Action Times parameter - you'd have to use a dynamic traits plugin and a passive state on the actor that increases the Action Times trait at the end of each turn.

The code for the passive state wouldn't be hard to give to you, but you'd have to read and learn how the dynamic traits plugin works and its syntax for plugin commands and such.

If you were using MV I'd also suggest you could pull some tricks with Yanfly's Instant Cast, but it appears that the VisuStella version doesn't offer any kind of JavaScript eval notetags for their Instant Use skills, so unless someone knows another MZ plugin that has instant cast, that's not an option.
I'm using MZ but with Fossil all the Yanfly plugins i'm using are working well
Well. With Yanfly stuff, you could try this.

Give the actor a passive state. Give that state the notetags:
Code:
<Custom Turn Start Effect>
user.actionsUsed = 0;
</Custom Turn Start Effect>

<Custom Action Start Effect>
user.actionsUsed++;
</Custom Action Start Effect

Then you'd have to paste into all of your skills:
Code:
<Instant Eval>
instant = user.actionsUsed < $gameTroop.turnCount();
</Instant Eval>
Well. With Yanfly stuff, you could try this.

Give the actor a passive state. Give that state the notetags:
Code:
<Custom Turn Start Effect>
user.actionsUsed = 0;
</Custom Turn Start Effect>

<Custom Action Start Effect>
user.actionsUsed++;
</Custom Action Start Effect

Then you'd have to paste into all of your skills:
Code:
<Instant Eval>
instant = user.actionsUsed < $gameTroop.turnCount();
</Instant Eval>
I did it but it's not working...for theese to work i need to have Instant Cast, Auto Passive States and Buffstates core right? Or are there other plugins i could not have?
Those are the three plugins required for that setup, yes.

How is it not working? Are none of the skills ever instant?

You can add some test messages in:

Code:
<Custom Turn Start Effect>
user.actionsUsed = 0;
console.log("Turn start ", user.actionsUsed);
</Custom Turn Start Effect>

<Custom Action Start Effect>
user.actionsUsed++;
console.log("Action start ", user.actionsUsed);
</Custom Action Start Effect>
   
<Instant Eval>
console.log("Instant ", user.actionsUsed);
instant = user.actionsUsed < $gameTroop.turnCount();
</Instant Eval>

Then, in game, press F8, go to the console tab, and see what the numbers are as you use skills.
The hero is just normally attacking one time per turn
Those are the three plugins required for that setup, yes.

How is it not working? Are none of the skills ever instant?

You can add some test messages in:

Code:
<Custom Turn Start Effect>
user.actionsUsed = 0;
console.log("Turn start ", user.actionsUsed);
</Custom Turn Start Effect>

<Custom Action Start Effect>
user.actionsUsed++;
console.log("Action start ", user.actionsUsed);
</Custom Action Start Effect>
  
<Instant Eval>
console.log("Instant ", user.actionsUsed);
instant = user.actionsUsed < $gameTroop.turnCount();
</Instant Eval>

Then, in game, press F8, go to the console tab, and see what the numbers are as you use skills.
Cattura.PNG
Did you put the Custom Turn Start Effect into the passive state? You can see it's not showing up in the console at all.

And then did you put the Instant Eval into whatever skill you're testing with? You can see that's not showing up in the console, either.

You should post screenshots of how you have the state and a skill set up, but it may just be an incompatibility with FOSSIL and MZ.
I solved, thank you very much man! 😀
Did you put the Custom Turn Start Effect into the passive state? You can see it's not showing up in the console at all.

And then did you put the Instant Eval into whatever skill you're testing with? You can see that's not showing up in the console, either.

You should post screenshots of how you have the state and a skill set up, but it may just be an incompatibility with FOSSIL and MZ.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/turn-based-state-variable.165552/