Stacking TP

RetroBoy

Veteran
Veteran
Joined
Dec 16, 2016
Messages
378
Reaction score
261
First Language
English
Primarily Uses
Hey,

I am using Yanfly scripts, so this is probably another thing that can be done via lunatic mode (if so I am all ears). Essentially, I have a Skill, it gains +1 TP each consecutive time it is used, but I want it to stack. For Example: +1 on the first use, +2 on the second, +3 on the third, on and on to a max of +20.

I've put it here because if it cant be done with Lunatic Mode (and I'm not sure it can), I will need a plugin.

EDIT: I'd also like a way to be able to Lower a Target's TP.
 
Last edited:

falken14

Veteran
Veteran
Joined
Dec 6, 2016
Messages
56
Reaction score
21
First Language
English
Primarily Uses
Maybe you can set the number of times a skill has been used as a variable, use that variable to multiply the skill's tp gain (before the TP is calculated, so it's not multiplying by 0 the first time), then reset the variable after battle. Should be possible I think. For lowering TP, I think you can use 'gainTp(value)' in the damage formula box and set it to negative? Haven't tried it personally but might do the trick.
 

Naveed

Veteran
Veteran
Joined
Nov 2, 2013
Messages
314
Reaction score
146
First Language
English
Primarily Uses
RMMV
For the TP stacking, do you want the stacks to be permanent, or to reset after each battle?
 

RetroBoy

Veteran
Veteran
Joined
Dec 16, 2016
Messages
378
Reaction score
261
First Language
English
Primarily Uses
I want them to reset if they are not used consecutively. Like, if the actor uses any other skill or cant use a skill (because they are stunned or something and lose a turn or something), it resets back to 1.
 

Naveed

Veteran
Veteran
Joined
Nov 2, 2013
Messages
314
Reaction score
146
First Language
English
Primarily Uses
RMMV
Well, this can be done with lunatic mode.

Give the character who has that skill a passive state.

Then, on the skill, use the notetag:

Code:
<Post-Damage Eval>
user._skillStacks = user._skillStacks || 0;
user._skillStacks += 1;
var tpGain = user._skillStacks.clamp(1, 20);
user.gainTp(tpGain);
</Post-Damage Eval>
This'll cause the skill to gain tp based on how many times it has been used, upto 20.

For resetting the stacks if the skill is not used, the passive state is needed.

On the passive state, use the notetag:

Code:
<Custom Conclude Effect>
if (this.item().id !== x) {
user._skillStacks = 0;
}
</Custom Conclude Effect>

<Custom Turn Start Effect>
if (!user.canMove()) {
user._skillStacks = 0;
}
</Custom Turn Start Effect>
In the custom conclude effect, replace x in the first line with the id of the skill.
 

RetroBoy

Veteran
Veteran
Joined
Dec 16, 2016
Messages
378
Reaction score
261
First Language
English
Primarily Uses
Youre a boss!!

**SOLVED**
 
Last edited:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,018
Members
137,563
Latest member
MinyakaAeon
Top