Yanfly Lunatic Power Charge help?

Status
Not open for further replies.

Lonewulf123

Veteran
Veteran
Joined
Oct 13, 2014
Messages
300
Reaction score
89
First Language
Enlish
Hello,

I'm using Yanfly's lunatic code to simulate the Power Charge and Mind Charge skills from the SMT series.

The video can be found here:
http://yanfly.moe/2016/09/29/tips-tricks-power-charge-mind-charge-shin-megami-tensei-rpg-maker-mv/

For those of you not familiar, power charge is a move that gives the next physical skill you use a damage multiplier.

However, my issue with the code is that the power charge or physical attack boost, only applies for the basic attack skill. I want this buff to apply to physical skills, as well as the basic attack.

Currently, the physical attack skills aren't getting buffed.

Here's the code, I'm using:
<Custom Action Start Effect>

// Get the current action.

var action = user.currentAction();

// Check if the action is physical, is a basic attack, and deals HP damage.

if (action.isPhysical() && action.isAttack() && action.isHpEffect()) {

// Play an animation to indicate the effect is taking off.

user.startAnimation(2);

}

</Custom Action Start Effect>



<Custom Confirm Effect>

// Check if the action is physical, is a basic attack, and deals HP damage.

if (this.isPhysical() && this.isAttack() && this.isHpEffect() && value > 0) {

// Increase the damage by a multiplier.

value *= 3.0;

// Round up the damage.

value = Math.ceil(value);

// Remove the state.

user.removeState(stateId);

}

</Custom Confirm Effect>
Can anyone help me apply this code to both physical skills and the basic attack?
 

Uzuki

Kawaii on the streets, Senpai in the sheets
Veteran
Joined
Aug 18, 2012
Messages
1,933
Reaction score
1,326
First Language
English
Primarily Uses
RMMV
Did you label the physical skills as physical? I just tested it and it's working fine for me.
 

Lonewulf123

Veteran
Veteran
Joined
Oct 13, 2014
Messages
300
Reaction score
89
First Language
Enlish
Yup, all physical skills are labeled physical, yet the charge only works for basic attacks not skills.
 

Uzuki

Kawaii on the streets, Senpai in the sheets
Veteran
Joined
Aug 18, 2012
Messages
1,933
Reaction score
1,326
First Language
English
Primarily Uses
RMMV
@Lonewulf123 And it's a state right? Is the actor inflicted with that state when you use it?
 

Lonewulf123

Veteran
Veteran
Joined
Oct 13, 2014
Messages
300
Reaction score
89
First Language
Enlish
@Lonewulf123 And it's a state right? Is the actor inflicted with that state when you use it?
Correct, it's setup as a state.

I don't know if this is affecting it, but I'm using yanfly's skill unleash and when the skills are set as the default attack, the code works. But using them from the skill menu is a no go.
 

Uzuki

Kawaii on the streets, Senpai in the sheets
Veteran
Joined
Aug 18, 2012
Messages
1,933
Reaction score
1,326
First Language
English
Primarily Uses
RMMV
Can you show some picturesof the skills and state? I've been using it and it's working fine for basic and skill attacks.
 

Lonewulf123

Veteran
Veteran
Joined
Oct 13, 2014
Messages
300
Reaction score
89
First Language
Enlish
I was able to solve this! Basically, there's a line in the power charge code that checks to see if a basic attack is being used.

I solved this by removing the two lines that check for that:
  • && action.isAttack()
  • && this.isAttack()
Not sure, how you got it to work without removing those, but hey at least its working for me now!

This can be closed.
 

Ms Littlefish

Dangerously Caffeinated
Global Mod
Joined
Jan 15, 2014
Messages
6,417
Reaction score
8,102
First Language
English
Primarily Uses
RMMV

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.

 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
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'??

Forum statistics

Threads
105,867
Messages
1,017,062
Members
137,575
Latest member
akekaphol101
Top