RMMZ Loosely 5e inspired battle system, Actions and Bonus actions.

KlausAidon

Veteran
Veteran
Joined
Oct 15, 2012
Messages
62
Reaction score
17
First Language
English
Primarily Uses
As the title suggest, I'm tinkering around with making a battle system loosely inspired by 5e rule systems. Wondering if anyone can provide insights, or ideas on how to make my characters have Actions, and bonus actions?

For those unfamiliar, characters are able to do two things during their turns. And Action, and a bonus action. While actions cover most main things in a turn, such as attacking an enemy, or casting a spell. A bonus action are minor actions that can be done along side a main action, and might be most class specific. A rogue hiding as a bonus action, before attacking to line up a sneak attack, or fighter attacking, before raising their shield in defense. A cleric can use a weaker healing spell as a bonus action, while still being able to attack with their main action. etc etc.

What I've been considering is giving each characters two turns, and using two states, one called "Action used", and another called "Bonus action used". Each seal their respective ability types, and will last until the end of turn. What I'm having trouble with is actually giving the characters those states.
So I use the damage formula:
a.addState(32), a.atk - b.def

This does the trick, but with only one problem. It only works if the player lands the attack. If they miss, the state doesn't get added, because the damage formula doesn't go through. So how can I add a state to the character when they use an ability, regardless if that ability works or not?
 

Htlaets

Veteran
Veteran
Joined
Feb 1, 2017
Messages
208
Reaction score
113
First Language
English
Primarily Uses
One way to do it is to use visutella equivalent of yanfly action sequences. In action sequences you can have a skill apply a state to the user when used with absolute certainty.

Edit: Another way is to find the equivalent of yanfly instant use skills, make your bonus actions instant use skills with a global stock of 1 that refreshes every turn so you can use one bonus action globally per turn without ending an actor's turn.
 
Last edited:

KlausAidon

Veteran
Veteran
Joined
Oct 15, 2012
Messages
62
Reaction score
17
First Language
English
Primarily Uses
Visutella's plugins look like they would work. Any idea what the command for adding a state in Visutella's plugins? I'm thumbing through the documentation, but the thing comes with a hefty set of plugins, and a lot of a documentation. If not I can figure it out eventually, either way thanks for pointing me in the right direction.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
3,353
Reaction score
2,476
First Language
English
Primarily Uses
RMMZ
You could use a <JS Pre-Damage As User> tag and call user.addState(id) in there.
 

KlausAidon

Veteran
Veteran
Joined
Oct 15, 2012
Messages
62
Reaction score
17
First Language
English
Primarily Uses
Sorry, how would that look in the notes for the ability?
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,452
Reaction score
14,815
First Language
English
Primarily Uses
RMMV

I've moved this thread to Plugin Requests. Please be sure to post your threads in the correct forum next time. Thank you.

 

KlausAidon

Veteran
Veteran
Joined
Oct 15, 2012
Messages
62
Reaction score
17
First Language
English
Primarily Uses
[move]Plugin Requests[/move]
Sorry, my original question wasn't specifically asking about plugins as I thought my problem was something that could be solved outside of plugin use.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
3,353
Reaction score
2,476
First Language
English
Primarily Uses
RMMZ

KlausAidon

Veteran
Veteran
Joined
Oct 15, 2012
Messages
62
Reaction score
17
First Language
English
Primarily Uses
<JS Pre-Damage As User>
user.addState(32);
</JS Pre-Damage As User>
I tried that, doesn't seem to be working.
2021-05-09.png

But I'll thumb through some of the documentation myself and see if I can figure it out.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
3,353
Reaction score
2,476
First Language
English
Primarily Uses
RMMZ
I tried that, doesn't seem to be working.
View attachment 188830

But I'll thumb through some of the documentation myself and see if I can figure it out.
Oh, sorry. Pre-Damage as User only works on non-skill/item entries (states and the like)

Use <JS Pre-Damage> instead.
 

KlausAidon

Veteran
Veteran
Joined
Oct 15, 2012
Messages
62
Reaction score
17
First Language
English
Primarily Uses
Ok, that seems to have done the trick. It's work now, thanks for the help!
 

Latest Threads

Latest Posts

Latest Profile Posts

So yesterday Dad took me to Volcano Bay, and it was almost ruined by a thunderstorm... then it passed by and the lightning warning got lifted, leading to an awesome time sliding and swimming. Hopefully we get to go to the arcade tonight. The one we're planning on has a restaurant built in with AWESOME food. Not to mention how big the arcade itself is!
image_2021-06-13_150033.png

Maybe I'll actually try making a retro pack. Already have the shark fin made so why not xD
Hey everyone, for everybody following along with my RPG Maker MZ streams: There will unfortunately not be a stream tonight. There is a big exciting event that will go live next week that has been taking all my time, so look forward to that!
Took a small break by playing VR. Latest update of these glasses unfortunately caused a little of trouble but it can be fixed with a manual operation.

Until You Fall is freaking awesome.
I am SO HYPED to share this trailer with everyone when its done. I almost want to tear up i had no idea how far i came along with Fallen Feather in these last 3 years.

Forum statistics

Threads
112,193
Messages
1,066,502
Members
145,802
Latest member
Corim
Top