GaryTheGreat

Veteran
Veteran
Joined
Mar 8, 2017
Messages
118
Reaction score
3
First Language
Russian
Primarily Uses
RMVXA
https://yanflychannel.wordpress.com/rmvxa/battle-scripts/lunatic-targets/

So I found this script with a very confusing and information-less description. I know it says "Level: Lunatic" which I guess means in order to use it you need to know ruby to the point of being able to write your own script instead and be done with it.

But seriously.
All it says is:
"Just put <custom target: string> and do whatever you want" like no man's sky press conference.

Do WHAT?
There's not a single example of "tags with the appropriate flag for the method below to search for."
I have no idea what the syntax even is, and where to find words that describe what the target for the skill should be.
No examples, the screenshot on script's page is just screenshot of the script with no notetags being used in sight...

Can someone please provide an example of the notetag that does something? I've tried a lot, and it doesn't do nothing, so I guess my notetags were wrong.
I'm not looking for super complicated stuff, just something like "target any ally but not yourself" and "target any enemy or any ally but not yourself" and "target every ally and every enemy" that's about it. But I don't even know where to start.

Am I just really dumb?
Pretty much all other yanfly scripts I used were user-friendly and held my hand like "put this there and it will work" from which I derived my own logical conclusions on how to make things work. But this one just... "yeah you'll figure it out"
send help
 

Dyluck

Veteran
Veteran
Joined
Dec 27, 2012
Messages
31
Reaction score
14
First Language
English
Primarily Uses
RMVXA
Scroll down to the bottom and get one of the Add-Ons, and you will get some examples of how the notetags can be used. If you want to choose targets in some other custom ways that is not provided, you will have to write your own code, using those as a template.

With the targeting needs you described, have you looked into Yanfly Target Manager?
 

GaryTheGreat

Veteran
Veteran
Joined
Mar 8, 2017
Messages
118
Reaction score
3
First Language
Russian
Primarily Uses
RMVXA
Target manager is great, but I still can't do "Target any ally or any enemy, but not yourself"

I'm also using Tsukihime's Scope Change to switch between Enemy and Ally targeting with a button, but Target Manager overrides that effect entirely
Still not what I want :<
 

GaryTheGreat

Veteran
Veteran
Joined
Mar 8, 2017
Messages
118
Reaction score
3
First Language
Russian
Primarily Uses
RMVXA
Also addons only have notetags for themselves:

<custom target: foes stat above x%>
<custom target: allies stat above x%>
<custom target: every stat above x%>

and that still doesnt tell me what the core script requires to be written
 

Dyluck

Veteran
Veteran
Joined
Dec 27, 2012
Messages
31
Reaction score
14
First Language
English
Primarily Uses
RMVXA
<targets: all but user>

I believe that targets everyone except user all at once, but I guess you are saying you want to "choose" the one single target though.

Edit: you would have to look at the how the actual code is written for those add-ons, and then use that to help write your own code for what you want.
 

GaryTheGreat

Veteran
Veteran
Joined
Mar 8, 2017
Messages
118
Reaction score
3
First Language
Russian
Primarily Uses
RMVXA
I put in <custom target: all but user> and item now does nothing
I put in <targets: all but user> and item works like it did without a tag
Something's wrong

I think this script doesnt do anything without add-ons
I'm looking at the code and pretty much all it does is check if targets are custom or not and etc
 

Dyluck

Veteran
Veteran
Joined
Dec 27, 2012
Messages
31
Reaction score
14
First Language
English
Primarily Uses
RMVXA
The notetag I gave you was for Target Manager not Lunatic Targets

Yes, exactly Yanfly provided 2 add-ons, but if you want something else, you have to write your own code.
 

GaryTheGreat

Veteran
Veteran
Joined
Mar 8, 2017
Messages
118
Reaction score
3
First Language
Russian
Primarily Uses
RMVXA
Ok, I'm starting to get it
So I write my own scopes in the script, tag them with something and then put that tag in the string
Thanks
 

GaryTheGreat

Veteran
Veteran
Joined
Mar 8, 2017
Messages
118
Reaction score
3
First Language
Russian
Primarily Uses
RMVXA
I don't understand
This is what I did and it's not working
upload_2018-4-7_2-11-28.png
Or this
upload_2018-4-7_2-11-34.png

(Copied from extension)

I removed another script that was doing the targeting. Extensions work fine, with their default tags. My custom one doesn't. Guess I wrote it wrong. Idk how to right.
 
Last edited:

Dyluck

Veteran
Veteran
Joined
Dec 27, 2012
Messages
31
Reaction score
14
First Language
English
Primarily Uses
RMVXA
I'm not sure but the original ones had
case $1.upcase

You don't have that line, yet you have upper case for the code and lower case in your note tag...
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,206
Reaction score
871
First Language
Hungarian
Primarily Uses
RMVXA
I suppose that case statement looks like this:
Code:
case $1.upcase
when /something/i
  # Something
when "SOMETHING"
  # Something
# And so on...
end
In that case, it doesn't matter if you use upper or lower case in your note-tags, they both work, as long as you have your case comparison lines setup correctly.
The code itself will check for that last part in your note-tag (after the <custom target: part), get the custom string you have there, converts all letters in it to upper-case letters, and than uses your case comparisons in the code to see if it matches with something there or not.

The only thing you can't do is use a string with lowercase letters in your case comparisons in the script, because that will never be true (for the reasons explained above). Anything else works.

In short, that little code part shown is not the issue here.

I actually made a script for the exact thing you want a while ago for another request here.
But I have no idea if it will work in your project or not.
If I remember right, the person who requested it also used Yanfly's targeting scripts, so it should work with them.
I don't have time to write any compatibility patches for this, but you can still try it out, and maybe it will work without any additions needed.
 

Dyluck

Veteran
Veteran
Joined
Dec 27, 2012
Messages
31
Reaction score
14
First Language
English
Primarily Uses
RMVXA
Oh, actually the case statement was for other stuff that came after it, so yeah it shouldn't be an issue.
 

GaryTheGreat

Veteran
Veteran
Joined
Mar 8, 2017
Messages
118
Reaction score
3
First Language
Russian
Primarily Uses
RMVXA
Sixth that sounds reasonable, but in Lunatic Addition - Conditions, notetags are lowercase and everything in the script is uppercase and they worked for me. It does target everyone with specific states on them and other things. But can't target just everyone.
(yes I know I can do that with target manager, but there's more than that that I want)

Actually I can do "target any ally, but not self" thing with target manager too, since I only have two actors anyway.

The problem is that I'm trying to combine several scripts that I either don't understand, or they dont work together. If there was just one script that can do everything, which I assume lunatic targets is, that would just be ace.

The other script that I used has toggle scope. You hit a button, and you go from targeting any ally to targeting any enemy. If I could add "not yourself" to that selection, that would be pretty much all I needed.
this one:
https://forums.rpgmakerweb.com/index.php?threads/akea-toggle-target.37740/
 

Latest Threads

Latest Profile Posts

DamageEvil_5.png added!
index.php

Rendering the intro for the 4 time today, everytime it finished I noticed something that I found off and had to fix it and render it all over again...
Would not be so bad if it was not for my PC having the speed of a slug.:kaoswt2:
Tried something. Little sneak peak of Unity AD.
M42S7Us.gif

It's the little things. Lengthened the time the bar fades in and out to be a bit more comfortable.

Forum statistics

Threads
125,739
Messages
1,173,125
Members
164,889
Latest member
zyron250
Top