(Solved) (Yanfly Plugins) Trying to alter Stockpile tips and tricks.

Servidion

Last Soul Keeper
Veteran
Joined
Mar 15, 2015
Messages
233
Reaction score
27
First Language
English
Primarily Uses
RMMV
So recently Yanfly came out with a tips and tricks for a Stockpile effect. You can stock up stacks to be consumed with abilities.

Yanfly Stockpile
http://yanfly.moe/2017/02/15/tips-tricks-stockpile-pokemon-rpg-maker-mv/#more-4848

Yanfly Consume Stacks
http://yanfly.moe/2017/02/17/tips-tricks-stockpile-spit-up-pokemon-rpg-maker-mv/#more-4855

I'm trying to build a state that adds a charge each turn, and then a skill that will consume all stacks and have a different effect based on stacks consumed.
My passive state doesn't seem to want to build up stacks.
Passive State - Temporal Anomaly:
<Custom Turn Start Effect>
// Default the temporal stacks to 0.
user._temporal = user._temporal || 0;
// Increase the temporal stack by 1
user._temporal += 1;
// Cap the temporal stack at 9
user._temporal = Math.min(user._temporal, 9);
// Update the state counter for the temporal stack
user.setStateCounter(stateId, user._temporal);
</Custom Turn Start Effect>

I haven't exactly built the skill yet because I haven't been able to get the state working.
Skill - Time Freeze:
<Custom Execution>
// If the temporal stack is 1-3
if (user._temporal === 1) { - I have no idea what to change the "=== 1" to.
user.addState(915);
// If the temporal stack is 4-6
} else if (user._temporal === 4) { - I have no idea what to change the "=== 4" to.
user.addState(916);
// If the temporal stack is 7-9
} else {
user.addState(917);
}
</Custom Execution>

<After Eval>
// Reduce stacks back to 1.
(No idea what to put here)
</After Eval>

I barely grasp how to use Javascript, so any help would be appreciated.
 

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
797
Reaction score
350
First Language
English
Primarily Uses
N/A
// If the temporal stack is 1-3
if (user._temporal === 1) { - I have no idea what to change the "=== 1" to.
user.addState(915);
if (user._temporal > 0 && user._temporal < 4) //checks if temporal count is greater than 0 AND less than 4 (1-3)
You can use the syntax here to figure out the others.
Side note: You have over 900 states?!

<After Eval>
// Reduce stacks back to 1.
(No idea what to put here)
</After Eval>
user._temporal = 0 //removes all temporal stocks
 

Servidion

Last Soul Keeper
Veteran
Joined
Mar 15, 2015
Messages
233
Reaction score
27
First Language
English
Primarily Uses
RMMV
Thank you very much! But do you have any idea why the passive state won't gain stacks? In a bit I'm going to try to build it differently just in case a passive state can't gain stacks. I'll build it so the passive state adds a new state at the beginning of a turn (if it doesn't exist), and the new state will be the temporal stacking. Hopefully that'll work.

And I have a little over 700 states, but there's some spacing between some states for headers and such. I have a section of status ailments, class states, passive states (equippable like FF Tactics), gear states, and misc states.

*edit* So the state itself still isn't working. This is what I have for the modified state:

Passive State - Tempest of Time (This state works fine):
<Custom Turn Start Effect>
if (!a.isStateAffected(331)) {
if (target.isAlive()) {
user.addState(331);
}
}
</Custom Turn Start Effect>

State 331 - Temporal (This state does not work):
<Custom Turn Start Effect>
user._temporal = user._temporal || 0;
user._temporal += 1;
user._temporal = Math.min(user._temporal, 10);
user.setStateCounter(stateId, user._temporal);
</Custom Turn Start Effect>

State 331 doesn't seem to add any stacks or even display the counter for that matter.
 
Last edited:

Fugama

Means well, but messes up sometimes.
Veteran
Joined
Jun 7, 2014
Messages
158
Reaction score
90
First Language
Fake English
Primarily Uses
RMMV
Make Temporal a custom apply effect instead
 

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
797
Reaction score
350
First Language
English
Primarily Uses
N/A
I was just teasing about the number of states.
While it does seem like a lot to me (I currently have less than 80 that I use), if it works for you, no problem.

But back on topic, I'm curious as to how you know the state isn't working if you didn't make a skill that uses it.
What part isn't working and besides the counter thing, how do you know?
(I should mention that I don't use any passive state plugins and there don't know what the setStateCounter call does.
I AM a plugin maker here and can figure out most code I see with some time, but unless you show me what your states are supposed to do, I can't really show you why it's not doing it.)
 

Servidion

Last Soul Keeper
Veteran
Joined
Mar 15, 2015
Messages
233
Reaction score
27
First Language
English
Primarily Uses
RMMV
@Maliki79 I hadn't tested it with the skill, but the counter wasn't showing up at all. Displaying the counter would be very important to the class that uses it. I did, however, have a talk with a friend of mine, @Nekoyoubi, using a plugin of his that uses states as resources (Rage, Energy, etc.). I've used this plugin for a long time, but until now I hadn't thought about using it in quite this way.
http://stitchgaming.com/2016/04/nemv-state-resources/

The solution we came up with was this:
Passive State 330 - Tempest of Time. This state is tied to the Arbiter soul and applies state 331 during battle.
<Custom Battle Effect>
if (!a.isStateAffected(331)) {
if (target.isAlive()) {
user.addState(331);
}
}
</Custom Battle Effect>
<Custom Turn Start Effect>
if (!a.isStateAffected(331)) {
if (target.isAlive()) {
user.addState(331);
}
}
</Custom Turn Start Effect>

State 331 - Temporal. This state is a resource (similar to Yanfly's stacking) that can be used to power skills like MP or TP.
<Resource 0, 9>
<Resource BattleEnd: 0>
<Custom Turn Start Effect>
if (target.isAlive()) {
user.adjustSR(331, 1);
}
</Custom Turn Start Effect>

Skill - Time Freeze. Self targeting. This skill can be used without Tempest of Time or Temporal, but only adds state 118, if from 0-4 stacks it'll add state 118, if 5-8 stacks it'll add state 119 instead, and if it's at 9 stacks it'll add state 120.
<Custom Execution>
var r = user.getSR(331);
user.addState(r<5?118:r<9?119:120);
</Custom Execution>

<After Eval>
b.adjustSR(331, -9)
</After Eval>
 

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

Latest Threads

Latest Posts

Latest Profile Posts

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
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,975
Members
137,563
Latest member
cexojow
Top