How to best replicate a skill in a common event

Hi!

I'd love to be able to replicate a skill, so that a player can trigger it on the map screen using a keybinding.

At first I thought that I could use Force Action to simply trigger the skill, but after reading a bunch, I've learned that Force Action is only a Battle command.

So, it seems like I'll need to sort of "replicate" the skill, in a Common Event. But I'm not quite sure to do this, since skills introduce formulas and variances that I wouldn't know how to translate into a CE. Is there some simpler way to do all this, or could anyone point me in the right direction?

Side question: I'm trying to figure out what determines the sound effect used for a skill. I'm using a very basic HP Recover skill, and it uses the little schlooop effect, but where might I change that?

Thanks!!
Since you can't really recreate a skill to be used on the map, where there is no enemy to actually use any formula or anything on, here's the answer to your side question:
1721219197552.png

In the system tab.
and back to your original question:
it depends on what exactly the skill does.

you can only replicate skills that are targeted on an actor because there is no enemy on the map.
but for skill effects on actors there are change commands to do everything and more than a skill could do.

if you have problems with that you best show both the skill you want to replicate and the common event you have so far.
skills introduce formulas and variances
Control Variable is what you want for this. You can also use Script to input a formula into a variable (or just run a full script to mimic what your skill does);

Taking the side question first: @SGHarlekin thanks -- how might I go about changing this sound? I imagine that any skill whose type is "HP Recover" is going to default to this "Recover" sound effect?

Would it make sense to set the "Type" in the "Damage" area to "None", and then use the Effects options run a Common Event that recovers HP, and handle the sound effects there all manually?

And then that ties into the primary question: if I were to use a Common Event when the ACTUAL skill is triggered (which is the same thing I would need to do to approximate map screen "skills", run a Common Event), then I can enter the formula into a variable, if I'm understanding @kirbwarrior correctly.

So to take the default Heal skill as an example, the formula is 200+a.mat with 20% variance. If I can enter a formula directly into the "script" field of Control Variable, how might I also account for the 20% variance?
Taking the side question first: @SGHarlekin thanks -- how might I go about changing this sound? I imagine that any skill whose type is "HP Recover" is going to default to this "Recover" sound effect?

Would it make sense to set the "Type" in the "Damage" area to "None", and then use the Effects options run a Common Event that recovers HP, and handle the sound effects there all manually?
I suppose there are a number of ways around that. Anything that recovers HP uses that sound effect pretty much. What I do is use action sequencing, which allows me to play whatever sound whenever I want.
I suppose there are a number of ways around that. Anything that recovers HP uses that sound effect pretty much.
That's correct - the Recovery sound is played whenever the result of an action has HP recovery, just like the Actor or Enemy Damage sound is played whenever the result has HP loss.

What I do is use action sequencing, which allows me to play whatever sound whenever I want.
As far as I see from a quick look, this is not modified by Action Sequences. It would still be a part of action effect - you'd need a plugin to change it.

Would it make sense to set the "Type" in the "Damage" area to "None", and then use the Effects options run a Common Event that recovers HP, and handle the sound effects there all manually?

And then that ties into the primary question: if I were to use a Common Event when the ACTUAL skill is triggered (which is the same thing I would need to do to approximate map screen "skills", run a Common Event), then I can enter the formula into a variable, if I'm understanding @kirbwarrior correctly.
I'm not really going to get into this because all of this sounds horribly backwards. And we can't help you implement it in a less backwards way because you have not clearly described what you're trying to do.

But this notion of taking all skill functionality out of the skill database entry and into a common event sounds super hacker-y.

So to take the default Heal skill as an example, the formula is 200+a.mat with 20% variance. If I can enter a formula directly into the "script" field of Control Variable
Note that you cannot use a.mat in a common event, there's no such thing as a - a common event does not know which actor used a skill, and when you're talking about on the map there's no point of reference.

how might I also account for the 20% variance?
With Control Variable. There are options right on the first tab for multiplication and random numbers.
as said above, you need to use control variable.
That is one of the most powerfull commands in the entire engine.

1) control variable temp = magic attack of actor (this is in game data section, which is much more than the default map id)

2) control variable temp += 200 (add 200)

3) control variable variance = random (80 .. 120)

4) control variable temp *= variance (multiplication)

5) control variable temp /=100 (division last due to integer cutoff)

6) use change HP with temp as amount
As far as I see from a quick look, this is not modified by Action Sequences. It would still be a part of action effect - you'd need a plugin to change it.
Oh, I meant like not having an SE selected in the system tab and using AS to play it.
But this notion of taking all skill functionality out of the skill database entry and into a common event sounds super hacker-y.

I completely agree with you Turan, so I was surprised when I found this approach laid out by Shaz in a related thread:

"You don't "make" your actor use a skill or an item. You just add animations, sound effects, whatever you want to the trigger event to make it LOOK like he's used the skill or item."

If it were up to me, non-damage skills would have a provision for use outside of battle, with some reasonable mechanism for choosing the target from amongst actors in the party. But unfortunately we don't seem to have that option, so I am attempting to replicate the function of a skill via a Common Event.

I'm not really going to get into this because all of this sounds horribly backwards. And we can't help you implement it in a less backwards way because you have not clearly described what you're trying to do.

I've been clear about what I'm trying to do: a basic healing skill, outside of battle.

I agree with you that it's horribly backwards. In old RPG's I could always use heal skills outside of battle.

Note that you cannot use a.mat in a common event, there's no such thing as a - a common event does not know which actor used a skill, and when you're talking about on the map there's no point of reference.

Thank you! This answers one of my questions.

1) control variable temp = magic attack of actor (this is in game data section, which is much more than the default map id)

2) control variable temp += 200 (add 200)

3) control variable variance = random (80 .. 120)

4) control variable temp *= variance (multiplication)

5) control variable temp /=100 (division last due to integer cutoff)

6) use change HP with temp as amount

Thank you @Andar! This is exactly what I needed, and is extremely valuable.

Thanks all :LZSsmile::LZSsmile::LZSsmile:
some reasonable mechanism for choosing the target from amongst actors in the party
You can do this with a dummy state. Have your skill target an ally like normal and give them the "Target" state (or whatever name you want) that does nothing, has no icon or name, and doesn't wear off. Then have the skill call a Common Event that looks for who has that state. Do whatever you want to the target, then remove the state. I've done this when I had complicated skills that I couldn't do with just the formula and such.
I may have missed something vital, but I cannot understand this:
I've been clear about what I'm trying to do: a basic healing skill, outside of battle.

I agree with you that it's horribly backwards. In old RPG's I could always use heal skills outside of battle.
But of course you can, you never could not.
If you want a skill which heals in battle and on map, select Occasion: Always.
If only on map, then select Occasion: Menu Screen.

I genuinely do not see why you have a problem with that. Have I missed something basic in your post?
It seems to me that the only potential difficulty is doing this how you want is using a keybinding, but let's establish what the real issue is with the skill itself first.
It seems to me that the only potential difficulty is doing this how you want is using a keybinding, but let's establish what the real issue is with the skill itself first.

The keybinding is what presents the problem.

I can trigger a common event with a bound key, but there doesn't appear to be a way to trigger an actual skill within a common event.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-best-replicate-a-skill-in-a-common-event.170383/