How To Make A Attack With Multiple Possibilities (Solved)

JustADood

Chonky Boi
Member
Joined
Dec 25, 2020
Messages
25
Reaction score
11
First Language
English
Primarily Uses
RMMZ
I'm new to posting but Basically I'm trying to make a attack where you basically gamble it is going to be a fifty fifty attack where if you win you do a lot of damage or if you lose you get a debuff for the entire team anyone know how to do this?

Note: I Am Not Very Active So Ill Try To reply When I Can Thanks!
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
41,252
Reaction score
14,263
First Language
English
Primarily Uses
RMMV
Your profile says you are using MZ, but you posted in the MV forum. Can you please confirm what you are using, and we'll move it to the correct location if necessary.
 

JustADood

Chonky Boi
Member
Joined
Dec 25, 2020
Messages
25
Reaction score
11
First Language
English
Primarily Uses
RMMZ
Haha Im Very Sorry About That I Have Both But I Use MV More.
 

JustADood

Chonky Boi
Member
Joined
Dec 25, 2020
Messages
25
Reaction score
11
First Language
English
Primarily Uses
RMMZ
Your profile says you are using MZ, but you posted in the MV forum. Can you please confirm what you are using, and we'll move it to the correct location if necessary.
Sorry, I Forgot To Reply But I Have Both But Use MV More
 

stramin

Veteran
Veteran
Joined
Nov 4, 2012
Messages
202
Reaction score
92
First Language
spanish
Primarily Uses
N/A
So... is this question about RMMV, right? (you didn't answer the question)

If you are using yanfly action sequences you could try something like this:

Code:
<target action>
EVAL: $gameVariables.setValue(111, Math.random());
if $gameVariables.value(111)>0.5
    action animation
    wait for animation
    action effect
    death break
else
    animation 123: actors
    wait for animation
    add atk debuff: actors
end
<target action>

111 is an available variable you can use for random numbers.

123 is the animation id for the debuff

If you want to give a state instead, use "add state 11: actors", where 11 is the status id.

I didn't test it! but it should be something like this.
 

JustADood

Chonky Boi
Member
Joined
Dec 25, 2020
Messages
25
Reaction score
11
First Language
English
Primarily Uses
RMMZ
So... is this question about RMMV, right? (you didn't answer the question)

If you are using yanfly action sequences you could try something like this:

Code:
<target action>
EVAL: $gameVariables.setValue(111, Math.random());
if $gameVariables.value(111)>0.5
    action animation
    wait for animation
    action effect
    death break
else
    animation 123: actors
    wait for animation
    add atk debuff: actors
end
<target action>

111 is an available variable you can use for random numbers.

123 is the animation id for the debuff

If you want to give a state instead, use "add state 11: actors", where 11 is the status id.

I didn't test it! but it should be something like this.


Im sorry, but where do I paste the code?
 
Last edited:

stramin

Veteran
Veteran
Joined
Nov 4, 2012
Messages
202
Reaction score
92
First Language
spanish
Primarily Uses
N/A
You should paste the code on the skill notetag.

Notice that you need to install the 4 plugins (Battle Engine Core, Action Sequences 1, 2 and 3) in order to make it work.
 

JustADood

Chonky Boi
Member
Joined
Dec 25, 2020
Messages
25
Reaction score
11
First Language
English
Primarily Uses
RMMZ
ARE you using Yanfly action sequences? If you're not, that code won't help you.
yes I am sorry, I dont really understand yanfly plugins very well
 
Last edited:

JustADood

Chonky Boi
Member
Joined
Dec 25, 2020
Messages
25
Reaction score
11
First Language
English
Primarily Uses
RMMZ
You should paste the code on the skill notetag.

Notice that you need to install the 4 plugins (Battle Engine Core, Action Sequences 1, 2 and 3) in order to make it work.

what is the scope for the attack supposed to be and how do change the damage boost? Thanks

This attack also depends on the characters luck correct?
 
Last edited:

stramin

Veteran
Veteran
Joined
Nov 4, 2012
Messages
202
Reaction score
92
First Language
spanish
Primarily Uses
N/A
I think the damage boost is not needed, because you have 2 options:
* do damage to enemy and don't debuff your party
* don't do damage to enemy and debuff your party

if the above is correct.
and this question is about RMMV
and you are using yanfly action sequences
(we don't have these answers yet)

then you can use that code and don't need the damage boost, simply set your damage formula on the skill database:

1611530194385.png

The attack is not luck based, but we can make it that way if you want.

By default luck does nothing with damage, luck is for the chance to get a status.

You can do use luck if you want in your skill formula or the random number to determine the effect.

by the way, this is the skill notetag area:

1611530798971.png
 

JustADood

Chonky Boi
Member
Joined
Dec 25, 2020
Messages
25
Reaction score
11
First Language
English
Primarily Uses
RMMZ
I think the damage boost is not needed, because you have 2 options:
* do damage to enemy and don't debuff your party
* don't do damage to enemy and debuff your party

if the above is correct.
and this question is about RMMV
and you are using yanfly action sequences
(we don't have these answers yet)

then you can use that code and don't need the damage boost, simply set your damage formula on the skill database:

View attachment 176854

The attack is not luck based, but we can make it that way if you want.

By default luck does nothing with damage, luck is for the chance to get a status.

You can do use luck if you want in your skill formula or the random number to determine the effect.

by the way, this is the skill notetag area:

View attachment 176855
Okay, Let me confirm, I AM using MV,
And the Yanfly Plugins

there is a small problem: What is the skill type?

I cant decide whether it is: None, Magic, Or Special because i dont know if it will impact the attack

Also The Character Wont Attack It Shows Him Attacking But Does No Damage Or Animation.

Screenshot (Am I Doing Something Wrong?)
 

Attachments

  • Image.JPG
    Image.JPG
    151.9 KB · Views: 4
Last edited:

stramin

Veteran
Veteran
Joined
Nov 4, 2012
Messages
202
Reaction score
92
First Language
spanish
Primarily Uses
N/A
The Skill type is to tell the engine where to put this skill on the battle menu, I think you could put it under "Skill" or "Magic", it does nothing with the effect of the skill

Change the scope to "1 enemy".

And you can use an animation too, to make it look cool when the skill is successful XD

I hope that works :D
 

JustADood

Chonky Boi
Member
Joined
Dec 25, 2020
Messages
25
Reaction score
11
First Language
English
Primarily Uses
RMMZ
The Skill type is to tell the engine where to put this skill on the battle menu, I think you could put it under "Skill" or "Magic", it does nothing with the effect of the skill

Change the scope to "1 enemy".

And you can use an animation too, to make it look cool when the skill is successful XD

I hope that works :D
I Dont Think Its Working Because There Is No Indicator If Its Failing And The Enemy Is Not Getting Damaged

Is It My Plugins?

Enemies Settings In Case You Need it

HP 999999

MP 0

Attack 1

Defense 1

M Attack 1

M Defense 1

Agility 1

Luck 1
 

Attachments

  • Image 2.JPG
    Image 2.JPG
    79.6 KB · Views: 4
  • Plugins.JPG
    Plugins.JPG
    80.2 KB · Views: 4
Last edited:

stramin

Veteran
Veteran
Joined
Nov 4, 2012
Messages
202
Reaction score
92
First Language
spanish
Primarily Uses
N/A
Sorry, I have an error in my post, the closure tag says:
<target action>

it should say:
</target action>

Try this way:
Code:
<target action>
EVAL: $gameVariables.setValue(111, Math.floor(Math.random()*2));
if $gameVariables.value(111)
    action animation
    wait for animation
    action effect
    death break
else
    animation 59: actors
    wait for animation
    add atk debuff: actors
end
</target action>
 

JustADood

Chonky Boi
Member
Joined
Dec 25, 2020
Messages
25
Reaction score
11
First Language
English
Primarily Uses
RMMZ
Sorry, I have an error in my post, the closure tag says:


it should say:


Try this way:
Code:
<target action>
EVAL: $gameVariables.setValue(111, Math.floor(Math.random()*2));
if $gameVariables.value(111)
    action animation
    wait for animation
    action effect
    death break
else
    animation 59: actors
    wait for animation
    add atk debuff: actors
end
</target action>
Thank You SO Much For Helping It Worked Very Well!
 

Latest Threads

Latest Posts

Latest Profile Posts

Mist_new.png
Some WIP of Mist's newest sprites! Tutorials are awesome and very useful!
The RPG Maker community really is the best. It's so wholesome, kind, and helpful, unlike other communities on the internet, Love all you guys!
KenKrath wrote on RPGMakerWeb's profile.
Nevermind.

Forum statistics

Threads
109,118
Messages
1,042,249
Members
141,615
Latest member
Bamionic
Top