Need Help with a Yanfly custom plugin command

XVoid

Conceptual Severance Mage
Member
Joined
Apr 22, 2016
Messages
28
Reaction score
4
First Language
English
Primarily Uses
RMMZ
So in a game I'm working on, I have an actor who reflects magical attacks of most elements. Because of this, I want the stronger, more intelligent enemies in the game to know this and, during battle, not target her with their unique magical attacks. Yanfly's selection control plugin has a note tag to enforce this, but it can only apply to actors universally, which would render her elemental reflection completely useless and then no less intelligent enemies could target her with any magical attacks at all.


However, you can also set custom conditions for targeting on skills using Javascript, apparently. But having no knowledge of Javascript's language whatsoever, I don't know what to do to make this. Basically, I need a JS command that checks to see if the target's name is NOT this specific character's name, and if that condition returns true, then the attack goes through. If I knew how to check to see if something is not equal to something else in Javascript, I could do it myself, using the handy example on the plugin's info page (link here) as a base.


So could someone please help me out with this? Either by posting a modified version of the command on the plugin page or just telling me how to check for something not being a certain way so I can modify it myself.
 

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
Why just not use an eval with yanfly AI to say if the name of the actor = X or if the actor have a state to not target with this specific skill?
 

XVoid

Conceptual Severance Mage
Member
Joined
Apr 22, 2016
Messages
28
Reaction score
4
First Language
English
Primarily Uses
RMMZ
Why just not use an eval with yanfly AI to say if the name of the actor = X or if the actor have a state to not target with this specific skill?
I've been looking at that plugin and I don't see how I would do that, either...
 

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
There are examples you can easily follow in the plugin.


do you really need me to tell you what to write to copy paste it?
 

XVoid

Conceptual Severance Mage
Member
Joined
Apr 22, 2016
Messages
28
Reaction score
4
First Language
English
Primarily Uses
RMMZ
There are examples you can easily follow in the plugin.


do you really need me to tell you what to write to copy paste it?
In the plugin, which I read the entire help file for, none of the evals mention actor names. Don't get patronizing with me, the examples you speak of are literally not there.
 

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
In the plugin, which I read the entire help file for, none of the evals mention actor names. Don't get patronizing with me, the examples you speak of are literally not there.



Alright, nevermind


Good luck.
 

XVoid

Conceptual Severance Mage
Member
Joined
Apr 22, 2016
Messages
28
Reaction score
4
First Language
English
Primarily Uses
RMMZ



Alright, nevermind


Good luck.
Huh. I even read that part (speed reading, admittedly), but I guess I was focusing too much on looking for the word "actor"...


Thanks and sorry for snapping at you over my misconception.
 

waynee95

Inactive
Veteran
Joined
Jul 2, 2016
Messages
682
Reaction score
598
First Language
German
Primarily Uses
RMMV
You can just use:


<Custom Select Condition>


if (target.name() !=== 'Your Name') {


condition = true;


} else {


condition = false;


}


</Custom Select Condition>


Put this in the skill notebox.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,575
Latest member
akekaphol101
Top