Target any ally except user

Discussion in 'RGSS3 Script Requests' started by HopeFragment, Nov 27, 2017.

  1. HopeFragment

    HopeFragment H'witch Nerd Veteran

    Messages:
    121
    Likes Received:
    11
    Location:
    New Jersey
    First Language:
    English
    Primarily Uses:
    RMVXA
    I use the Yanfly Target Manager, and I have quite a few skills that I want to be able to target any single ally except the user (select a single ally, but can't select user). But even the Yanfly Target Manager doesn't have that option, it has "target all allies except user" but not select an ally not the user. Are there any existing scripts that allow this?
     
    #1
  2. Andar

    Andar Veteran Veteran

    Messages:
    28,446
    Likes Received:
    6,491
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    Tsukihime once wrote one, it is somewhere here on the forum in the archives.

    But she never really supported it and as a result it is not on her site and no guarantees for compatibilities with other scripts.
     
    #2
  3. gstv87

    gstv87 Veteran Veteran

    Messages:
    1,770
    Likes Received:
    799
    First Language:
    Spanish
    Primarily Uses:
    RMVXA
    drop this somewhere after YF scripts and see if it solves the problem
    if not, or if it creates conflicts with standard items in the item window, then you'll need a fix to the actual YF plugin
    Code:
    class RPG::UsableItem < RPG::BaseItem
     def for_friend?
      return [7,8,9,10].include?(@scope)
     end
    end
    
     
    #3
  4. HopeFragment

    HopeFragment H'witch Nerd Veteran

    Messages:
    121
    Likes Received:
    11
    Location:
    New Jersey
    First Language:
    English
    Primarily Uses:
    RMVXA
    I'm sorry if I sound stupid but what am I supposed to do with this? Is there a note tag I insert into the skill notebox? Is this meant to alter the existing "all allies except user" function?
     
    #4
  5. gstv87

    gstv87 Veteran Veteran

    Messages:
    1,770
    Likes Received:
    799
    First Language:
    Spanish
    Primarily Uses:
    RMVXA
    yes.

     
    #5
  6. HopeFragment

    HopeFragment H'witch Nerd Veteran

    Messages:
    121
    Likes Received:
    11
    Location:
    New Jersey
    First Language:
    English
    Primarily Uses:
    RMVXA
    @gstv87 Oh okay. Does it replace "<targets: all but user>" or "<targets: target all allies>", because I might actually use "all but user" for something, but I won't be using "target all allies" which the script says "Sets the targeting scope to hit the selected target ally first and then the remaining allies." I won't ever need that, can it replace that instead? (If you can't do that, I'll stick with what you already made, thank you!)
     
    #6
  7. gstv87

    gstv87 Veteran Veteran

    Messages:
    1,770
    Likes Received:
    799
    First Language:
    Spanish
    Primarily Uses:
    RMVXA
    it doesn't replace anything.
    it's not a plugin.
    it's a fix.

    it should affect the way the plugin handles the case of "all allies", removing the user from the lot.

    please, learn some coding before trying to solve problems with 3rd party plugins, or you won't understand why a fix works, or why a plugin doesn't!
     
    #7
  8. Sixth

    Sixth Veteran Veteran

    Messages:
    2,130
    Likes Received:
    798
    First Language:
    Hungarian
    Primarily Uses:
    RMVXA
    It does, actually, and it kills a whole lot of features from Yanfly's script.
    Unless it is put above Yanfly's Target Manager script. In that case, it will "only" kill the skills and items with the "User" scope, plus all of the "User" based things from Yanfly's script.

    In all honesty, he didn't try to solve the problem, you did. He was just asking for help.
     
    #8
    Calluses, LGardner and Robotic-Yomi like this.
  9. gstv87

    gstv87 Veteran Veteran

    Messages:
    1,770
    Likes Received:
    799
    First Language:
    Spanish
    Primarily Uses:
    RMVXA
    that's why I said if it presents any problems, they should fix the yanfly plugin itself.
    I don't use anything from yanfly, so I can't keep count of what they modify.

    I mean everyone should have at least knowledge of scripting as to be able to tell apart a note tag from a function.
    Or to be able to understand why the fix they get actually solves the problem they have..... that way they can use that fix to learn about the plugin itself and further modify it to solve other problems that might arise.
     
    #9
  10. HopeFragment

    HopeFragment H'witch Nerd Veteran

    Messages:
    121
    Likes Received:
    11
    Location:
    New Jersey
    First Language:
    English
    Primarily Uses:
    RMVXA
    @gstv87 Mind you, I know what a note tag is. When I said the word "function" I meant the not mathematics definition of the word. "an activity or purpose natural to or intended for a person or thing."

    Anyhow, is there any reason you're being so rude to me? If I knew how to code, why would I ask for help on this in the first place? And it isn't a requirement to know coding to use RPG Maker, isn't that a big point of using it? That you can make a game even without knowledge of coding? Sure, it gives you an advantage, but to say "you shouldn't be using scripts in your game if you can't code" is outrageous when there's an entire forum with people you can ask for help on stuff like this, isn't that the point of this site? All you needed to do is explain to me more specifically how it works instead of being rude just because I don't know how to code. I may be unable to code, but I know how to use RPG Maker. If you explain it to me, I will know how to use it.
     
    Last edited: Dec 1, 2017
    #10
    Robotic-Yomi likes this.
  11. Kes

    Kes Global Moderators Global Mod

    Messages:
    20,799
    Likes Received:
    10,584
    First Language:
    English
    Primarily Uses:
    RMVXA

    Please note: RPGMaker is sold as an engine which does not require coding knowledge. It is, therefore, inappropriate to insist that such knowledge become a requirement.



    It is great when people with specialist knowledge can help others with queries. I suggest that we get back to the query at hand so that it can be solved, and leave other aspects to one side.
     
    #11
    Sixth, Robotic-Yomi and bgillisp like this.
  12. gstv87

    gstv87 Veteran Veteran

    Messages:
    1,770
    Likes Received:
    799
    First Language:
    Spanish
    Primarily Uses:
    RMVXA
    he's specifically having problems with a 3rd party plugin, which is external to the RPG Maker engine.
    which is where the problem stands: right in the middle of connecting the engine, with the plugin.

    the target system works by evaluating three statemens: scope of the skill (one/many), side of the effect (for enemy / for ally), and dead/alive.
    if you want to target everyone but the user, then you have to modify "for_friend" so that it doesn't account for "11" which is the user.
    since there's already a consideration for "11" itself, then you can take the 11 out of "for_friend", and it'll target any friendly except the user.
    if you want to target *everyone else* except the user, then you have to remove the user from the final selection obtained after the evaluation of scope and side.... and that's more complex, you won't solve it with one fix to one instruction, and it can create problems with other selections such as item effects in the item window.

    *that* is the coding you need to know.
    if what I posted doesn't solve the problem out right, then you need to post the problem in Yanfly's page and ask for a fix for the script itself.
     
    #12
  13. Andar

    Andar Veteran Veteran

    Messages:
    28,446
    Likes Received:
    6,491
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    @gstv87 not only you're wrong, because this entire forum section is intended for people who does not know how to code to enable them asking for help Form people who can code, without having to hear that they have to learn how to code themselves.

    But additionally your last explanations show that you not even understood the problem.
    The OP looks for a solution to get a scope "single ally, but not user", which is a lot more complex than "every ally but user". To my knowledge yanfly's script simply can't do that at all, the only script that I know of that can do that is the snippet of tsukihimes that I mentioned above (and which I requested myself).
    Unfortunately the computer where I have stored that script is currently out of order and I can't copy it for the OP...
     
    #13
    Robotic-Yomi likes this.
  14. gstv87

    gstv87 Veteran Veteran

    Messages:
    1,770
    Likes Received:
    799
    First Language:
    Spanish
    Primarily Uses:
    RMVXA
    that's exactly what I just explained!

    the first solution I posted, I did with knowledge that it might not solve the problem.
    but if it did, then that would have been enough.
    if it didn't, then they obviously would have needed to fix the script itself.

    I wasn't going to post a full fix for a script I don't know, if I could just post a quick fix that's simple enough to apply!
     
    #14
  15. Kes

    Kes Global Moderators Global Mod

    Messages:
    20,799
    Likes Received:
    10,584
    First Language:
    English
    Primarily Uses:
    RMVXA
    The point is that this is not a quick fix because, as you confirmed, it is for "all allies except the user" when the OP has asked for "a single ally except the user." As it is specifically to be used in conjunction with Yanfly's script, then any proposed solution needs to take into account that script and any impact on it the solution might have. Otherwise it is not a solution.
     
    #15
  16. Sixth

    Sixth Veteran Veteran

    Messages:
    2,130
    Likes Received:
    798
    First Language:
    Hungarian
    Primarily Uses:
    RMVXA
    You can try this script out:
    Put it below any Yanfly scripts.

    I did not test this with any custom scripts, so I can't guarantee that it will work in your project, but it seems to work fine in the default engine.
     
    #16
  17. BeastManMode86

    BeastManMode86 Warper Member

    Messages:
    1
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV

    Greetings, I am also looking for a script like this. Thank you for creating it. I'm working on making a game in MV. Is this for commercial use?
     
    #17
  18. Kes

    Kes Global Moderators Global Mod

    Messages:
    20,799
    Likes Received:
    10,584
    First Language:
    English
    Primarily Uses:
    RMVXA
    @BeastManMode86 This script will not work in MV. VX Ace scripts are written in Ruby (RGSS3, to be exact) and MV plugins are written in Javascript. If you want something like this for MV, I suggest you start a new thread in JS Plugin Requests, perhaps linking back to this thread if that helps explain exactly what you want.
     
    #18

Share This Page