Skill dependent on another skill. Problem implementing

A character has a state which is inflicted for 5 turns.

While that state is in place, I would like that character to be able to do a sneak attack which ignores defence and has a high chance of critical.  the way I've gone about it is like this:

Skill the player sees "Sneak Attack" this calls a common event.

The common event has a conditional branch : actor/state/inflicted from tab 2 of the conditional branch.

When yes, there is a forced action which calls up a skill the player doesn't see and which actually does the business.  In that skill I can set the damage formula without the enemy's defence, so that's not a problem.  What I can't see is how to raise the CRI level for this skill.  All I can think of is for the common event to call another common event which inflicts a one turn state of higher CRI before the forced action, but that seems very messy. 

Is there a better way?

thanks
Um... Set the state to cause "learn skill - sneak attack"

set the skill sneak attacks formula as such

set the sneak attack skill to call common event - change skill - forget skill sneak attack?

This thread may help you with the specified formula, maybe even give you a couple more ideas:

http://forums.rpgmakerweb.com/index.php?/topic/7975-skill-ideas-you-can-do-with-custom-formula/

Not sure if this is what you meant, I'm very tired 😛
A character has a state which is inflicted for 5 turns.

While that state is in place, I would like that character to be able to do a sneak attack which ignores defence and has a high chance of critical.  the way I've gone about it is like this:

Skill the player sees "Sneak Attack" this calls a common event.

The common event has a conditional branch : actor/state/inflicted from tab 2 of the conditional branch.

When yes, there is a forced action which calls up a skill the player doesn't see and which actually does the business.  In that skill I can set the damage formula without the enemy's defence, so that's not a problem.  What I can't see is how to raise the CRI level for this skill.  All I can think of is for the common event to call another common event which inflicts a one turn state of higher CRI before the forced action, but that seems very messy. 

Is there a better way?

thanks
I am guessing you described this poorly. Is the idea that an ENEMY gets the state allowing your character to do the sneak attack on them? For instance, maybe the state is 'vulnerable' and so you can sneak attack them?

One way to do this without doing anything fancy is to just make the Sneak attack skill always work, but do massive damage to 'vulnerable' targets.

If instead you want YOUR character to gain a state that lets them sneak attack (Maybe a preparation state) then the state itself can simply add the skill. That will let them use the skill while they have the state. If they are only meant to use the skill once you'll have to do something slightly more complex to remove the skill (easier if the state can only be applied to a specific character in your game).
@flipwon

I must admit, I haven't really understood your answer.

@Zechnophobe

No, I did not describe this poorly, it is an actor who has has both the state and the skill which is dependent on that state being present.  Neither do I want the state to add the skill.  The player may want to give the state to that actor for a range of reasons; the decision to use the Sneak Attack is a separate decision.

As I've got 2 answers which seem to be at a bit of a tangent, I'll give more details to see if that helps.

The actor has a skill 'Fade Away' which increases EVA and MEV which reducing TGR.  This state lasts for 5 turns.

While that state is inflicted, the player can choose to use the spell 'Sneak Attack' which bypasses defence and (I hope) has an increased CRI.

At the moment 'Sneak Attack' calls a common event which checks that the state 'Fade Away' is inflicted. (done via conditional branch)

If the state is present, the common event calls a skill the player doesn't see which actually inflicts the damage.

My problem is that whilst I can do the bypass defence bit, I cannot see how (from within a skill) to increase CRI

It's that last bit which I would like help on.

Hope that makes it clearer for people.
@ZechnophobeNo, I did not describe this poorly, it is an actor who has has both the state and the skill which is dependent on that state being present.  Neither do I want the state to add the skill.  The player may want to give the state to that actor for a range of reasons; the decision to use the Sneak Attack is a separate decision.
You're still thinking too complex.

If the state adds the skill, then it becomes available in the skill selection of the actor with that state (assuming the actor can use skills of that type).

To use that skill is still a seperate decision, it is NOT automatically used when the state is on the actor.

And if you use add skill instead of learn skill, that skill is automatically removed when the state is removed.

So I see no reason for your complex construct.
The complex construct is because I cannot see how to add a CRI buff with a skill.  In the 'Effects' part of the skill tab, the only buffs available do not include CRI; I cannot see how to add it to the damage formula (though maybe there is a way that I don't know about), therefore I have been trying to find an alternative route to my objective.
Then just have your common event add a state that increases the actor's CRI before the force action occurs and then remove the state afterwards.


This is what states are for: temporary changes.
@Tsukihime

So that looks like I'm back to what I have in my original post. Which is fine, I'd just hoped that maybe there was a better solution

Thanks for confirming the way.

I'll leave the thread open for a short while in case anyone else comes up with an option.
The complex construct is because I cannot see how to add a CRI buff with a skill.  In the 'Effects' part of the skill tab, the only buffs available do not include CRI; I cannot see how to add it to the damage formula (though maybe there is a way that I don't know about), therefore I have been trying to find an alternative route to my objective.
CRI is available as a feature - and yes, I also wished several time that the effects of skills would include all features...

At the moment the only option I see would be to add CRI with the sneak state, but that would have it applied to all skills that use criticals - I don't know if the actor's skill all use criticals or if you disabled them for some skills.

You might check if one of the effects managers comes with the option to change all parameters as part of an effect, but I don't see any way without scripting to get that parameter changed wthout a feature...
If there is a script that provides support for xparam and sparam buffs I can write an effect for it.


Well, such a script SHOULD already provide a way to make an effect call cause buffs are effect-only...
@andar

Perhaps this effects aspect could be for the next version of Ace?

@Tsukihime

The only effects manager script that I know of, because I am using it, is yours.  Does it provide that sort of support?
Also, what kind of crit increase are you looking for?

You can always make it call 2 skills, roll a variable and set one skill to always crit, one to never crit. The roll for the next sneak attack crit would be assumed before the skill is present, but it would work.
@flipwon

that's an interesting suggestion.  However, I would like something a bit more certain than a dice roll if possible.  This is going to be a costly skill in TP terms, and I think it would be unfair on the player to leave them with a 50/50 chance of nothing.
You can make it 3/4, 9/10, it's all whatever you want the variable to do.. Set variable random 1-100, if 93 or less crit, if 94 or more no crit.. All percentages are a dice roll in the end, it's just how big you make the number 🙂
True, but to be honest, I haven't been able to work out how this solution is better/easier to implement/whatever than going with the simpler version.  It seems much more work for a slightly less good outcome, but maybe I'm missing something important here - not difficult as I'm pretty tired.
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.

Original thread: https://forums.rpgmakerweb.com/threads/skill-dependent-on-another-skill-problem-implementing.17129/