Yanfly Lunatic Code Help

Silenity

Veteran
Veteran
Joined
Dec 17, 2013
Messages
677
Reaction score
271
First Language
English
Primarily Uses
RMMV
I'm trying to replicate something like this:

-Fighter has the Combo passive.
-Every attack increases his Combo by 1.
-The more combo stacks he has the more damage his attacks do.
-If he does something other than attack like use a skill or item, the combo resets to 0.

I tried editing the code from here but to no avail.
 

JamesRyan

Game Designer
Veteran
Joined
Sep 13, 2014
Messages
697
Reaction score
216
First Language
Vietnamese
Primarily Uses
RMMV
I assume that you have Yanfly's Buffs and States Core and Auto Passive States plugins, so I hope this might help:

- Setup this state as your passive state. The combo state only works in battle and resets for each battle. For each combo stack, the damage increases by 50 for example:
Code:
<Custom Passive Condition>
//Check if your party is in battle to activate the state
if ($gameParty.inBattle()){
condition = true;}
else{
condition = false;
user._comboState = undefined;}
</Custom Passive Condition>

<Custom Battle Effect>
user._comboState = 0;
user.setStateCounter(x, user._comboState); //With X is your state ID. This will display the number of current stacks on your state
</Custom Battle Effect>

<Custom Confirm Effect>
//Check if the action is a normal attack
if (this.isAttack()){
//setup bonus dmg
var bonus = 50 * user._comboState;
//add bonus dmg to the current dmg
value += bonus;
//increase stack by 1
user._comboState += 1;}
else{
//if not an attack, reset the stack to 0
user._comboState = 0;}
user.setStateCounter(x, user._comboState); //With X is your state ID. This will display the number of current stacks on your state
</Custom Confirm Effect>
If this works and you need another way to increase the damage per stack, please let me know.
 

Silenity

Veteran
Veteran
Joined
Dec 17, 2013
Messages
677
Reaction score
271
First Language
English
Primarily Uses
RMMV
I assume that you have Yanfly's Buffs and States Core and Auto Passive States plugins, so I hope this might help:

- Setup this state as your passive state. The combo state only works in battle and resets for each battle. For each combo stack, the damage increases by 50 for example:

If this works and you need another way to increase the damage per stack, please let me know.

That works like a charm. Thank you so much! <3
 

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

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,049
Messages
1,018,547
Members
137,835
Latest member
yetisteven
Top