VE - Unreachable Targets

Discussion in 'JS Plugin Releases (RMMV)' started by Victor Sant, Jan 16, 2016.

  1. Victor Sant

    Victor Sant Veteran Veteran

    Messages:
    1,694
    Likes Received:
    1,434
    Location:
    Brazil
    First Language:
    Portuguese

    [​IMG]
    [​IMG]






     

    This plugin allows to creat a trait that makes battlers unable to be targeted by other battler’s actions and battlers that are able to reach them.


    Download:


    Victor Engine - Unreachable Targets


    Credits:

    Author: Victor Sant


    Terms of Use
     
    Last edited by a moderator: Mar 13, 2016
    #1
  2. Misaki

    Misaki Pikalyze Veteran

    Messages:
    156
    Likes Received:
    24
    Location:
    Canada
    First Language:
    English
    Primarily Uses:
    RMMV
    Nice! Makes it easier then doing stuff like fullhealing the target or just increasing their defensive stats to insane amounts. Thx.
     
    #2
    Victor Sant likes this.
  3. Hoppy

    Hoppy Veteran Veteran

    Messages:
    326
    Likes Received:
    54
    First Language:
    English
    I can't wait for the dig script that comes with this.
     
    #3
  4. Ichida za Zeal

    Ichida za Zeal Veteran Veteran

    Messages:
    69
    Likes Received:
    7
    First Language:
    English
    I feel like this could lead to a properly programmed Dragoon Jump ability. :D
     
    #4
  5. Victor Sant

    Victor Sant Veteran Veteran

    Messages:
    1,694
    Likes Received:
    1,434
    Location:
    Brazil
    First Language:
    Portuguese
    VE - Unreachable Targets - to make the battler unreachable

    +

    VE - State Graphics - to make the battler invisible (just change the graphic to a blan graphic)

    +

    VE - Charge Actions - to delay the actions and apply the state with the unreachable and graphic tags.

    +

    VE - Cast Animations - to display animations on the user when using the skills

    :D
     
    Last edited by a moderator: Jan 17, 2016
    #5
    Spindaboy, HintonR and Nuxill like this.
  6. killerfer

    killerfer Veteran Veteran

    Messages:
    198
    Likes Received:
    49
    Location:
    Brazil
    First Language:
    Portuguese
    Hi Victor, thank you for this plugin, it is awesome. I've found a couple of bugs when using it.

    1. When you force an action upon a random target in the troops tabs, it returns an error.

    2. When using in conjunction with Yanfly's Battle Status Window, if an actor is unreacheable, the faces become messed up when using itens or skills that target the allies. (maybe this problem is in yanfly plugin, not yours, but I thought you should know)

    Let me know if you need screenshots of either error.
     
    #6
  7. Victor Sant

    Victor Sant Veteran Veteran

    Messages:
    1,694
    Likes Received:
    1,434
    Location:
    Brazil
    First Language:
    Portuguese
    1. can you post the event you used to force the action? I tried a few things but none of those. Also an screenshot from the console (press F8 during test play) would be helpful to track the source of the error.


    2. This plugin overwrites a few functions. Try placing the YF Battle Status bellow this one.


    EDIT: Found the issue. YF don't use the Window_BattleActor to draw the faces, and the changes I've made are not considered.



    Add this to either plugin:


    Window_BattleActor.prototype.drawStatusFace = function(index) {
    var actor = $gameParty.reachableFriends()[index]; // changed 'battleMembers' to 'reachableFriends'
    var rect = this.itemRect(index);
    var ww = Math.min(rect.width - 8, Window_Base._faceWidth);
    var wh = Math.min(rect.height - 8, Window_Base._faceHeight);
    var wx = rect.x + rect.width - ww - 6;    var wy = rect.y + 4; 
    this.drawActorFace(actor, wx, wy, ww, wh);
    };


    This will make it get the right face for the targets. I suppose this will not cause issues with the YF plugin since the don't change the Window_BattleActor.
     
    Last edited by a moderator: Jan 20, 2016
    #7
  8. killerfer

    killerfer Veteran Veteran

    Messages:
    198
    Likes Received:
    49
    Location:
    Brazil
    First Language:
    Portuguese
    Thank you Victor. For the forced action, I just made Enemy #1 use skill 1 (attack) on a random target. It happens on turn 0 (before the battle actually starts, maybe that's the cause of the error?). Here is the console:

    [​IMG]
     
    #8
  9. Victor Sant

    Victor Sant Veteran Veteran

    Messages:
    1,694
    Likes Received:
    1,434
    Location:
    Brazil
    First Language:
    Portuguese
    @killerfer updated the plugin, check if the issue is solved.
     
    #9
    killerfer likes this.
  10. killerfer

    killerfer Veteran Veteran

    Messages:
    198
    Likes Received:
    49
    Location:
    Brazil
    First Language:
    Portuguese
    @Victor Sant nope, still the same. The file seems to be the same one though.
     
    #10
  11. Victor Sant

    Victor Sant Veteran Veteran

    Messages:
    1,694
    Likes Received:
    1,434
    Location:
    Brazil
    First Language:
    Portuguese
    @killerfer Yeah, you're right, it seems that I uploaded the unchanged file instead of the fixed one. Updated the file again, now with the right one, check if it's working fine now.
     
    #11
    killerfer likes this.
  12. killerfer

    killerfer Veteran Veteran

    Messages:
    198
    Likes Received:
    49
    Location:
    Brazil
    First Language:
    Portuguese
    #12
  13. killerfer

    killerfer Veteran Veteran

    Messages:
    198
    Likes Received:
    49
    Location:
    Brazil
    First Language:
    Portuguese
    @Victor Sant


    Hello Victor. I updated your Basic Module to use the new Custom Vehicles (awesome btw) and the error with the force action has returned, along with a new error in the Direct Commands plugin (unrelated with force actions, happens whenever a battle start and my actor has a weapon with a direct command equipped). When I turn those two plugins OFF everything works fine. Here is the console for both errors.

    console1.png

    console2.png
     
    #13
  14. Victor Sant

    Victor Sant Veteran Veteran

    Messages:
    1,694
    Likes Received:
    1,434
    Location:
    Brazil
    First Language:
    Portuguese
    @killerfer Very weird issues, i just added things to de module, but not changed anything as far i remember. I've made a small adjustment on the plugins to ensure that what seems to be causing it don't happens. Test them to see if this solve your issue.
     
    Last edited by a moderator: Feb 6, 2016
    #14
    killerfer likes this.
  15. killerfer

    killerfer Veteran Veteran

    Messages:
    198
    Likes Received:
    49
    Location:
    Brazil
    First Language:
    Portuguese
    #15
  16. HeroicJay

    HeroicJay Veteran Veteran

    Messages:
    315
    Likes Received:
    173
    First Language:
    English
    Primarily Uses:
    RMMV
    Aha. I used Yanfly plugins and some base engine trickery* to simulate the "Jump" ability, and it worked for the most part, but even after setting the Targetting rate to 0 and the evasion to 999%, you could still use defensive skills (and a monster could still use full-party-targeting Certain Hit skills) on the Jumping characters. This is what I needed to finish the skill. Awesome.


    * - The "Jump" status seals all your commands, sets you to auto-battle, and grants you the "Land" ability. Set up the animations right and there's 90% of your jump skill right there.


    EDIT: Oh, but I need your base plugin? I hope that doesn't cause any conflicts...
     
    Last edited by a moderator: Feb 17, 2016
    #16
  17. Victor Sant

    Victor Sant Veteran Veteran

    Messages:
    1,694
    Likes Received:
    1,434
    Location:
    Brazil
    First Language:
    Portuguese
    The basic module itself will not cause any conflict, since it don't change anything on the core functions of the maker.
     
    #17
  18. HeroicJay

    HeroicJay Veteran Veteran

    Messages:
    315
    Likes Received:
    173
    First Language:
    English
    Primarily Uses:
    RMMV
    I have been having a weird issue since installing this plugin, but I have so many plugins (including some written by myself) that I want to look into it a little more to be sure where the problem is - more than once I thought the problem was one thing when it was actually another. I'm using Yanfly's CTB, for the record. The problem goes like this:
     


    I have three characters. A, B, and C, in that order. B has the Jump command.


    B jumps. While B is in the air, A uses a Potion on C. I clearly see the cursor selecting C. But the Potion is instead used on A.


    I suspect B being in the air is screwing with the targeting (it's trying to target the "second character", since C was listed second, but that's technically B, who is untargetable, so it picks a random target), but again, I want to look into it a little deeper before I'm sure it's not some weird interplay of plugins.


    EDIT: So far, looks like I was mostly right. The smoothTarget function in rpg_objects.js is looking at the index among the entire party, not just the "reachable" characters. Where I was wrong: It's not randomizing, it's hitting A every time. Which is even more wrong. So the next question is: where is the index set?


    Also, I'm seeing that, thanks to Battle Core, moving the cursor over C makes the game appear to select a third blank slot while targeting. Selecting the blank spot actually makes the Potion hit the right target.


    SOLUTION: I got good results on the main bug with this:


    Window_BattleActor.prototype.reachableIndex = function() {
    return this.actor() ? this.actor().index() : 0;
    };

    Scene_Battle.prototype.onActorOk = function() {
    var action = BattleManager.inputtingAction();
    action.setTarget(this._actorWindow.reachableIndex());
    this._actorWindow.hide();
    this._skillWindow.hide();
    this._itemWindow.hide();
    this.selectNextCommand();
    };


    The mouse cursor targeting is still wonky (now, selecting the blank third slot causes actor A to always be targeted) but it's a step in the right direction.
     
    Last edited by a moderator: Feb 19, 2016
    #18
    Victor Sant likes this.
  19. MakeAndCreate

    MakeAndCreate Veteran Veteran

    Messages:
    39
    Likes Received:
    3
    First Language:
    English
    It doesn't seem to work for me.  I'm still able to reach enemies with unreachable tags without having any skill item, or actor with the reach target tag.  Could there be a reason for this?  


    Never mind, fix that, but I do want to know if there is a way to remove an unreachable tag without the need of state removal?  
     
    Last edited by a moderator: Feb 28, 2016
    #19
  20. Victor Sant

    Victor Sant Veteran Veteran

    Messages:
    1,694
    Likes Received:
    1,434
    Location:
    Brazil
    First Language:
    Portuguese
    No, The tag is locked on the object it is. If you don't want to mess with eventing the state removal, You can use the Passive States plugin and add a condition for it.

    This is a bug with rpg maker smooth targeting, it's widely known, so it should be fixed on the update they have planned (the one from the improvement boards)
     
    Last edited by a moderator: Feb 29, 2016
    #20

Share This Page