Im wondering how to go about making a fear state that prevents the character affected from targeting the origin or the caster of the state.
Fear State (cannot target caster)
RPG Maker MV SupportYanfly Target Core plugin + Yanfly Selection Control and notetag in skill that puts state fear
Code:
<Custom Select Condition>
condition = (user != target);
</Custom Select Condition>
This would just mean the character using the skill that inflicts fear wouldn't be able to target themselves with it, which doesn't sound like something that would ever happen anyway.
Yeah I would have to put a similar notebox in every skill in the gamethat if the user and actor has fear state you cannot target them and even then it would not work with origin caster.
It can happen if they're confused. I've seen confused actors attacking themselves before.
Well...yeah okay I'll give you that one, but my point was that the suggested solution didn't really accomplish the request. I'm still chewing over how best to do this one.
Then, there is a workaround, but let's make it clear:
You want a state wich is called "Fear" and that state regardles of situation can affect anyone in battle (or / and on map) except a hero that has ability to cast a "fear" state, am I right? if so you can use (without a plugins) a common event, a parallel common event with following script:
This parallel common event will check if specific actor (your actor to choose) has a state fear and if this state is found, it will remove it immediately.
Your common event should look like this - https://prnt.sc/todgrr
Just modify first two variables to your settings, fear state to your state in database and fear caster id to actor number in your database.
Just tell me, do you use Yanfly's buff states core plugin and auto passive states plugin?
If yes, then I can do it in yanfly's lunatic mode.
You want a state wich is called "Fear" and that state regardles of situation can affect anyone in battle (or / and on map) except a hero that has ability to cast a "fear" state, am I right? if so you can use (without a plugins) a common event, a parallel common event with following script:
Code:
/***** mini config *****/
var fear_state_id = 99;
var fear_caster_id = 99
/***** don't change here nothing! *****/
var fear_caster = $gameActors.actor(fear_caster_id);
/***** parallel common event will check ****/
/***** whetter caster is state affected ****/
if (fear_caster.isStateAffected(fear_state_id)){
fear_caster.removeState(fear_state_id);}
This parallel common event will check if specific actor (your actor to choose) has a state fear and if this state is found, it will remove it immediately.
Your common event should look like this - https://prnt.sc/todgrr
Just modify first two variables to your settings, fear state to your state in database and fear caster id to actor number in your database.
Just tell me, do you use Yanfly's buff states core plugin and auto passive states plugin?
If yes, then I can do it in yanfly's lunatic mode.
Not quite.
They want a state called Fear where the character who has it isn't able to attack the character who inflicted it upon them.
Ohhh! Now it's clear, I know how to do it, but I'm going out, in the evening I'll give proper solution.
Around 19:00 ~ 20:00 european timezone
Around 19:00 ~ 20:00 european timezone
So getting the behaviour where the player can't target a specific enemy is possible - I was able to do it, using the enemy's target rate to trigger it (so, players can't target enemies with a target rate of 0). The tricky part here however is that the enemy can be targeted by some actors but not others...
Yes I have most if not all the plugins I use.
Exactly I have some ideas but will only effect everyone.
Correct this is exactly how I hope it works. Enemy casts fear either on one or multiple members (based on different skills and encounters). That enemy can no longer be the focus of single target attacks but all or aoe will still effect them.
The idea the actor is stricken with fear so strong they can't manage to make a move against the foe for x turns .
Any success?
Nope, my idea was blind shot. It did not work as I thought. Sorry for late respond, I was on a... long trip... very long trip
No worries, I guess it's not possible.
It IS possible, but it looks likes I'm to stupid for this... To be honest, approximitly half of this community don't want to help, another half has similar problem and patiently waits for solution, next another half of previous half tries to solve it and wish to share solution, another half of this half from previous half has solution and won't share... and this can go on and on... Sorry I had to loose some steam...
No I completely understand and feel the same way. Im not that skilled with this but I try to learn and if I can help I help but I see what you mean.
I dont expect to sit back and wait for someone to make my game for me, im trying solutions but I am not very good.
Will it work something like this? Based off of YF provoke
Code:
<Custom Action Start Effect>
// Get current action.
var action = user.currentAction();
// Check if action exists, for an opponent, and that the provoker isn't on the same team
if (action && action.isForOpponent() && origin.isActor() !== user.isActor()) {
action.setTarget(origin.index());
}
</Custom Action Start Effect>
If there is a way to change the target, I dont understand java enough to find new enemies. I basically deconstruct YF tips and tricks code and combine something I think could be on the right path.
Code:
<Custom Action Start Effect>
// Get current action.
var action = user.currentAction();
// Check if action exists, for an opponent, and that the provoker isn't on the same team
if (action && action.isForOpponent() && origin.isEnemy) {
var members = this.opponentsUnit().aliveMembers();
// Remove the main target from the member list.
members.splice(members.indexOf(target), 1);
action.setTarget(members.index());
}
</Custom Action Start Effect>
I think ill just concede this idea and make fear a state that has a 50% chance to not attack kind of like confuse except you dont attack your ally.
The main problem is that Selection Control only applies to skills rather than states, so if you wanted to do this you'd have to add a selection effect to every skill it's possible for an enemy to use. If you're willing to do that, I have a solution that'll work.
Yeah I figured it would be like that, im willing to do that but was hoping someone had a more elegant solution.
Have you considered to re-think this "Fear" state?
Why not to try something simpler? In warcraft 3 - The Frozen Throne there is a hero to hire, Pit Lord, he has a 3-level skill - Howl Of Terror, wich reduces dealed damage by n% you can combine this with Banshee's primary skill - "Curse" causing 30% of attacks to miss.
This example fear - https://prnt.sc/tphrwj - is a quite neat "Fear" wich I'm using in my project and I think there is no need to overdo with it.
- Reduces Attack by 20% and Accuracy by 20%
Or even neat fear you can make.
Give that state e.g 15% (or any other value you wish) chance to escape from battle (enemy will be so terrifed it will wish to runaway as far as possible from Fear Caster)
Why not to try something simpler? In warcraft 3 - The Frozen Throne there is a hero to hire, Pit Lord, he has a 3-level skill - Howl Of Terror, wich reduces dealed damage by n% you can combine this with Banshee's primary skill - "Curse" causing 30% of attacks to miss.
This example fear - https://prnt.sc/tphrwj - is a quite neat "Fear" wich I'm using in my project and I think there is no need to overdo with it.
- Reduces Attack by 20% and Accuracy by 20%
Or even neat fear you can make.
Give that state e.g 15% (or any other value you wish) chance to escape from battle (enemy will be so terrifed it will wish to runaway as far as possible from Fear Caster)
Im styling my game to take after DND and how it works is if your feared you cannot actively move towards the enemy who your afraid of. Im trying to keep that essence in Rpg Maker.
It would add a bit of diversity having fear basically like a single target shield, you know you wont get attacked by this enemy.
Original thread: https://forums.rpgmakerweb.com/threads/fear-state-cannot-target-caster.124472/