How to make a skill that works like Focus/Concentrate from SMT?

BEP

Villager
Member
Joined
Mar 25, 2022
Messages
27
Reaction score
16
First Language
Portuguese
Primarily Uses
RMMV
So, for my game I want there some of my characters to have skills that act like Focus and Concentrate skills from Shin Megami Tensei, skills that increase the damage of the next Physical/Magical attack by 1.5x. Can anyone tell me how can I be able to do this? I'd assume that it would be via making them give the user a special state, but how do I make that state?
 

Andar

Regular
Regular
Joined
Mar 5, 2013
Messages
39,301
Reaction score
11,481
First Language
German
Primarily Uses
RMMV
basically a state that lasts two turns (the first turn is the current turn, the second is the next turn
and gives the actor the appropiete trait - increasing atack or increasng physical damage or increasing magical damage and so on.

you just have to go through the parameter options of the states and select the one you want.
 
  • Like
Reactions: BEP

BEP

Villager
Member
Joined
Mar 25, 2022
Messages
27
Reaction score
16
First Language
Portuguese
Primarily Uses
RMMV
basically a state that lasts two turns (the first turn is the current turn, the second is the next turn
and gives the actor the appropiete trait - increasing atack or increasng physical damage or increasing magical damage and so on.

you just have to go through the parameter options of the states and select the one you want.
Thanks! For some reason, I didn't see the option to change the Physical/Magical attack parameter, I should really pay more attention to this stuff.
 

BEP

Villager
Member
Joined
Mar 25, 2022
Messages
27
Reaction score
16
First Language
Portuguese
Primarily Uses
RMMV
basically a state that lasts two turns (the first turn is the current turn, the second is the next turn
and gives the actor the appropiete trait - increasing atack or increasng physical damage or increasing magical damage and so on.

you just have to go through the parameter options of the states and select the one you want.
Actually no, I didn't get it. From what it seems, all I did was make my skill make the user weaker to physical/magical attacks, so I still don't get what I'm supposed to do.
1648394437087.png
 

Andar

Regular
Regular
Joined
Mar 5, 2013
Messages
39,301
Reaction score
11,481
First Language
German
Primarily Uses
RMMV
your original description was a bit short, I assumed you meant something different because I never played those games.
one of the problems with any description "like xy" instead of giving an absolute description.

for that, you'll need some plugins. the entire default engine is based on damage received, you can only change the base parameter for damage given, not the details.
If I remember correctly there are several ways to change the damage given that way with yanfly's plugins, but I don't have the links ready.
 
  • Like
Reactions: BEP

BEP

Villager
Member
Joined
Mar 25, 2022
Messages
27
Reaction score
16
First Language
Portuguese
Primarily Uses
RMMV
your original description was a bit short, I assumed you meant something different because I never played those games.
one of the problems with any description "like xy" instead of giving an absolute description.

for that, you'll need some plugins. the entire default engine is based on damage received, you can only change the base parameter for damage given, not the details.
If I remember correctly there are several ways to change the damage given that way with yanfly's plugins, but I don't have the links ready.
I am currently using several yanfly plugins, including the buffs states core. I guess I'll read up a bit on it and try out some notetags to see if it can work properly.

Edit: I read the help text and watched the tutorial video, but I didn't see anything that can help out in my situation.
 
Last edited:

sunnyFVA

how a demon do
Regular
Joined
Nov 6, 2021
Messages
73
Reaction score
96
First Language
English
Primarily Uses
RMMV
Since you're already using Buffs & States Core, this should work.

The Tips & Tricks series is very useful. It has helped me learn about the specific implementations in each entry, better understand the plugins/engine features involved, and consider some JavaScript concepts. Especially if you don't have much coding experience (like me), I think it would be a valuable process to try to really understand what the copy/paste notetags are doing.
 
  • Like
Reactions: BEP

BEP

Villager
Member
Joined
Mar 25, 2022
Messages
27
Reaction score
16
First Language
Portuguese
Primarily Uses
RMMV
Since you're already using Buffs & States Core, this should work.

The Tips & Tricks series is very useful. It has helped me learn about the specific implementations in each entry, better understand the plugins/engine features involved, and consider some JavaScript concepts. Especially if you don't have much coding experience (like me), I think it would be a valuable process to try to really understand what the copy/paste notetags are doing.
Hm, the code seems to work normally for magical attacks, but it's not affecting any of my physical skills. Any idea why that is? Maybe it's because my skills are set as Normal Attacks instead of physical.

Edit: Just checked, and it doesn't seem to be that. In this case I have no idea why this isn't working.
Edit 2: I changed a line, and managed to get it to work with skills properly, just had to remove the line that checked if it was a physical attack.
 
Last edited:

sunnyFVA

how a demon do
Regular
Joined
Nov 6, 2021
Messages
73
Reaction score
96
First Language
English
Primarily Uses
RMMV
It's only a guess, but I'd wager it's the this.isAttack() check. It is my understanding that this returns true if the skill used is a normal attack ("Attack" battle command) or has the property of being considered a normal attack (the conditions of which I'm not 100% on, but I think of the "Effect: Add State: Normal Attack" and "Damage Element: Normal Attack" skill properties).
 
  • Like
Reactions: BEP

BEP

Villager
Member
Joined
Mar 25, 2022
Messages
27
Reaction score
16
First Language
Portuguese
Primarily Uses
RMMV
It's only a guess, but I'd wager it's the this.isAttack() check. It is my understanding that this returns true if the skill used is a normal attack ("Attack" battle command) or has the property of being considered a normal attack (the conditions of which I'm not 100% on, but I think of the "Effect: Add State: Normal Attack" and "Damage Element: Normal Attack" skill properties).
Yeah, I managed to fix it by erasing the line that checked if it was a normal attack, although my only issue is that it only affects the first hit of a multi hit skill. Do you know how to make it affect all the hits?
 

sunnyFVA

how a demon do
Regular
Joined
Nov 6, 2021
Messages
73
Reaction score
96
First Language
English
Primarily Uses
RMMV
If your multihit skills use "Repeat: x" in the database editor, it's possible each repeat is being treated as a new use of the skill. Since this implementation removes the state after a relevant skill is used, it may not be compatible with Repeat. I'm sorry that I'm not sure on the specifics, and hopefully I'm not spreading misinformation.

I use Yanfly's Action Sequences for multihit skills, so within one "use" of the skill, its effect is just executed multiple times. You could consider that structure if you can't work out a compatible implementation of the buff.
 
  • Like
Reactions: BEP

BEP

Villager
Member
Joined
Mar 25, 2022
Messages
27
Reaction score
16
First Language
Portuguese
Primarily Uses
RMMV
If your multihit skills use "Repeat: x" in the database editor, it's possible each repeat is being treated as a new use of the skill. Since this implementation removes the state after a relevant skill is used, it may not be compatible with Repeat. I'm sorry that I'm not sure on the specifics, and hopefully I'm not spreading misinformation.

I use Yanfly's Action Sequences for multihit skills, so within one "use" of the skill, its effect is just executed multiple times. You could consider that structure if you can't work out a compatible implementation of the buff.
Ok, I'll try that out! Thanks for all the help!
 

ave36

Legend of Terra Firma
Regular
Joined
Jun 23, 2019
Messages
173
Reaction score
69
First Language
not English
Primarily Uses
RMMV
Depending on the damage formulas you use, buffing stats for 2 turns may be what you need. Atk for physical, MAt for magical.
 

Latest Threads

Latest Posts

Latest Profile Posts

I already have the idea for my next plugin... :D

A spoiler: It will have to do with the Switches and time.

Let's see if you can guess what it is?
Anybody else do this thing where you go like, "Oooh, so-and-so wud be such a good name for a game!" And then you write it down. And then yo games-to-be-made folder has like, 89 entries wid nothin' but a name?

Just me? :kaoswt:
We've been tricked, we've been backstabbed and we've been, quite possibly, bamboozled.

1695643923498.png

Finally figured out the source of my problems - WindowBase's contentsWidth() doesn't actually return the width of its contents :kaoswt2:
Lies of P. 5/10. It's like Dark Souls if you removed everything great about Dark Souls. It makes me want to replay Dark Souls.
poor Edward has some kind of affliction

ewd.png

Forum statistics

Threads
134,790
Messages
1,250,642
Members
177,577
Latest member
ddyxw
Top