Some problems with Yanfly Lunatic Conditions

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
1. do this after action if damage value was = or superior to 1


<Custom Action End Effect>


if (value >= 1) {


user.removeState(321);


}


</Custom Action End Effect>


Result: no errors, state didn't get removed after dealing damage


__


2. do this after action if skill mana cost was = or superior to 1


<Custom Action End Effect>


if (item.mpCost >= 1) {


user.removeState(361);


}


</Custom Action End Effect>


Result:



__


3. gain mana equal of skill cost if target is slain


<After Eval>


if (target.hp <= 0) {


user.gainMp(item.Mpcost);


}


</After Eval>


Result:



The error seem to happen even with Yanfly plugins on the right order


With every plugin but Yanfly's disabled



Solution: instead of skill MP cost, just write the exact MP number of the skill, though it won't work for states


<Post-Damage Eval>


if (target.hp <= 0) {


user.gainMp(30 * user.mcr);


}


</After Eval>


__


4. self gain upgradable state after doing All Allies action


<After Eval>


if (user.isStateAffected(113))


user.addState(114);


else


if (user.isStateAffected(114))


user.addState(115);


else


if (user.isStateAffected(115))


user.addState(115);


else


user.addState(113);


</After Eval>


Result: user gain states equal to the number of target instead of once.


__


5. What should I write inside an <After Eval> to show a popup if the user/target loses HP/MP?


I will have more over the course of the day, might be compatibility issues or typos, ill check myself over time and check out more issues I have.
 
Last edited by a moderator:

izyees

My Secret Santa
Veteran
Joined
Oct 24, 2015
Messages
248
Reaction score
67
First Language
english
what plugin are you using?


what you want to  do?


have you update the plugin?


for this,


<Custom Action End Effect>
if (value >= 1) {
user.removeState(321);
}
</Custom Action End Effect>


if you want to remove the state from the user that the enemy attack, try use this instead

Code:
<Custom Action End Effect>
if (value >= 1) {
target.removeState(321);
}
</Custom Action End Effect>
 
Last edited by a moderator:

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
All plugins are updated


I want to remove the state on the user when the user attacks
 

izyees

My Secret Santa
Veteran
Joined
Oct 24, 2015
Messages
248
Reaction score
67
First Language
english
gain mana equal of skill cost if target is slain


<After Eval>


if (target.hp <= 0) {


user.gainMp(item.Mpcost);


}


</After Eval>


Result:



The error seem to happen even with Yanfly plugins on the right order


With every plugin but Yanfly's disabled
I encountered this error before, make a new project, copy all rpg_xxx.js and replace with your current project. or just repair your js files (especially rpg_core.js)
 

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
Copy pasted all rpg js files from a new project to my project and the error still happen.


3. solved
 
Last edited by a moderator:

izyees

My Secret Santa
Veteran
Joined
Oct 24, 2015
Messages
248
Reaction score
67
First Language
english
5.

Code:
<After Eval>
if (user.isStateAffected(113)) {
	user.addState(114);
} else if (user.isStateAffected(114)) {
	user.addState(115);
} else if (user.isStateAffected(115)) {
	user.addState(115);
} else {
	user.addState(113);
}
</After Eval>
 

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
Doesn't work, I still gain 2 stacks if there are 2 targets and 3 stacks if there are 3 targets.
 

izyees

My Secret Santa
Veteran
Joined
Oct 24, 2015
Messages
248
Reaction score
67
First Language
english
you forgot to remove the previous state

Code:
user.removeState(x);
 
Last edited by a moderator:

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
The previous states are automatically removed with State Resist.
 

izyees

My Secret Santa
Veteran
Joined
Oct 24, 2015
Messages
248
Reaction score
67
First Language
english
5.


<After Eval>
if (user.isStateAffected(113)) {
if (!user.isStateAffected(114) user.addState(114);
} else if (user.isStateAffected(114)) {
if (!user.isStateAffected(115) user.addState(115);
} else if (user.isStateAffected(115)) {
if (!user.isStateAffected(115) user.addState(115);
} else {
if (!user.isStateAffected(113) user.addState(113);
}
</After Eval>


6. tp is case sensitive

Code:
<Custom Turn End Effect>
user.gainTp(user.mdf);
if (user.tp >= 100) {
user.addState(16);
user.gainTp(-100); 
}
</Custom Turn End Effect>
 
Last edited by a moderator:

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
5.



6. Resolved, thanks to you


3+6 Solved
 
Last edited by a moderator:

izyees

My Secret Santa
Veteran
Joined
Oct 24, 2015
Messages
248
Reaction score
67
First Language
english
sorry, some typos

Code:
<After Eval>
if (user.isStateAffected(113)) {
	if (!user.isStateAffected(114)) user.addState(114);
} else if (user.isStateAffected(114)) {
	if (!user.isStateAffected(115)) user.addState(115);
} else if (user.isStateAffected(115)) {
	if (!user.isStateAffected(115)) user.addState(115);
} else {
	if (!user.isStateAffected(113)) user.addState(113);
}
</After Eval>
 

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
Same error, I get state 114 if there are 2 targets when I didn't had state 113 at the beginning.
 

izyees

My Secret Santa
Veteran
Joined
Oct 24, 2015
Messages
248
Reaction score
67
First Language
english
can we private message?


i don't want to fill this topic with typos.
 

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
Last edited by a moderator:

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

Latest Threads

Latest Posts

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,040
Messages
1,018,470
Members
137,821
Latest member
Capterson
Top