Hiding Party Members in battle

Hey there fellow RM'ers. Jaymonius here yet again for another question in the scripting department!

I'm trying to make a skill that requires the character to... hide in battle so they will never be targeted and no attacks will harm them. I don't want to just simply remove them from the battle party as it will look bad with another script I'm using: The Formation Bonus script. 


Is there a script that can give me what I need? Or can someone whip up a quick script that can do that? I'd be grateful for your assistance. 😀  

I guess as good example would be Edward's Hide Skill from Final Fantasy 4.

 
Are you using any battlescript? Because in Ace, there is no actor sprite to hide grafically by default, the actor only has a data line at the bottom unless you changed the battlesystem. And if you changed it, the result depends on the scripts you're using, so you have to link them.


If you're still using default (or if you don't care about visibility to the player), the solution is a simple state that reduces target rate to 0% and the actor will never be targeted by any enemiy.
Apply a state with TGR 0% on the hide skill
Ah! Right! I'm using the Theolized Battle System combined with Vlue's Formation Bonus, I was trying to make it so the hidden character can't be targeted by ally or enemy.
TGR 0% only sets it to be ignored by enemy target chooser in priority, it can still be targeted by AoE attacks or random chain attacks.


And it will not block enemy or ally to target them.


Normally a "Hide Skill" can be easily done with by adding a TGR 0% state to the skill without the need of any script added.


The user is safe from most attack but still have chances of being attacked by AoE or chain effect.


What you want there is to "remove" the actor from the target list. Which in the default design of the battle engine, they are considered "non-battle character" to the system (delete from party list). Having to remove them from both the participant and the dead list is not an easy job, and you will need a way to update the state for character not in battle so they can be added back to the battle when the hide state expired. Plus with the other custom scripts you are using there (since there's no link i am not sure what they do), there can be very high chance of conflicts if the custom script tries to get data from a deleted actor from battle.


edit:


and oh, if i remember right, the game will automatically replace a new actor in the missing/open slot, so that part need to be modified too, else hide char automatic switch to next char in line.


Since actors are battlers too, they might just work with the .hide method like enemy, but need to be tested.


Alternatively:


There might be scripts out there that works a little differently, eg, when click on hidden target it will do nothing and play a buzzer sound. Target able but you won't be able to choose it. You might want to give those script a try too.
Problem is, I am unable to find said script that 

Alternatively:


There might be scripts out there that works a little differently, eg, when click on hidden target it will do nothing and play a buzzer sound. Target able but you won't be able to choose it. You might want to give those script a try too.

Problem is, that's the exact script I'd need, but I can't seem to find one anywhere, hence why I was hoping if anyone knew if there was one, or could cook up a script like that. X_X;
It's Tsukihime's "Untargetable" script
So, I checked it out, as one person mentioned, there is some conflicting script that prevents me from making an ally go invisible. That may take some investigating. But this is a good start.
Not sure how Tsukihime's script work, but normally if it just forbids you to select a target (return buzzer sound), that target will not go "invisible", it's still there on the screen, just not selectable (choosable with pointer, but can't select)
Hmmm. guess I'll have to ask around a little... but it's definitely a good start in the right direction though.
I'll give that .hide method a check when i have the time later, if it's working like it should then i can probably make you a hide skill that not only disable the actor from battle but change his/her sprite to a new "invisible version" sprite on the map as long as a hide state is applied.


or if you can't wait till i am free, do this in your hide skill battle formula box.


a.hide


and see if the character/actor will go into true hide mode like an enemy.
The problem I'm currently having when I put the untargetable script in, is when I'm in battle and  try and choose an ally to use said skill on to inflict the state the makes them untargetable, it doesn't execute the action and returns me to the command window.
that sounds like an incompatibility between several scripts.


I suggest you follow the link "how to use a script" in my signature, it also contains a bughunting procedure - and now you need to make sure that you configured the untargetable script correctly in a new project and if yes find out which other script interferes.
Alright, I found out where it starts crashing and when it just stops functioning as a whole. It happens when I have the script above the YSA Classical ATB script. But when I put it below said script, then the problem I mentioned earlier occurs. 

But when it's above the Classical ATB Script, and try using the skill on a character it gives me this error message in response. 

(Script ' Game_Unit' line 83: TypeError occurred.


Error ocurred, check the debug console for more information.)


 
yes, and we need that info from the debug console to continue debugging.


Please activate the debug console, play to the error again and give us a screenshot of the console window (it can be activated in the editor menu where you start your playtest)
Alright, here's the log. 

 

Spoiler
Load: Traits Namer v1.02 by Kread-EX
Game_Unit:83:in `[]': can't convert String into Integer, TypeError
    from Game_Unit:83:in `smooth_target'
    from MOG_Scope_EX:275:in `targets_for_friends'
    from MOG_Scope_EX:206:in `make_targets'
    from Implementation v1.4:6225:in `use_item'
    from YEA - Battle Engine+:2992:in `execute_action'
    from Instacast:303:in `execute_action'
    from ATB Fixes:654:in `perform_catb_action'
    from ATB Fixes:635:in `block in process_catb'
    from ATB Fixes:631:in `each'
    from ATB Fixes:631:in `process_catb'
    from Classical ATB:959:in `process_action'
    from Scene_Battle:48:in `update'
    from Monster List:1361:in `update'
    from Scene_Base:14:in `main'
    from SceneManager:23:in `run'
    from Troubleshoot:10:in `block in <main>'
How to read that output:


Every line has the name of a script that is involved with the current problem. The higher up in the list, the larger is the probability that the cause is there - and all default scripts should be considered safe unless you modified them.


"Troubleshoot" is probably your name for the backtracer script that created this output, that is also not part of the error.


So you'll have to check MOG_Scope_EX for the problem first - which isn't strange at all. If you had given any indication that you used a scope manager to change the targeting procedures, we would have advised caution in all cases of using something like the untargetable script as that will also change the way how the target scopes are handled.
Okay, so I deleted the MOG_Scope_EX, now it hooked me up with another problem based on Theo's Basic Modules. It wasn't working properly for me anyway, as I gotta sort that problem out at another time.

Here's the log. 

 

Spoiler
Theo - Basic Modules v1.5d:116:in `<': comparison of String with 0 failed, ArgumentError
    from Theo - Basic Modules v1.5d:116:in `targets_for_friends'
    from Game_Action:152:in `make_targets'
    from Invisible:77:in `make_targets'
    from Target manager:167:in `make_targets'
    from Implementation v1.4:6225:in `use_item'
    from YEA - Battle Engine+:2992:in `execute_action'
    from Instacast:303:in `execute_action'
    from ATB Fixes:654:in `perform_catb_action'
    from ATB Fixes:635:in `block in process_catb'
    from ATB Fixes:631:in `each'
    from ATB Fixes:631:in `process_catb'
    from Classical ATB:959:in `process_action'
    from Scene_Battle:48:in `update'
    from Monster List:1361:in `update'
    from Scene_Base:14:in `main'
    from SceneManager:23:in `run'
    from Troubleshoot:10:in `block in <main>'
Is ATB Fixes referring to DoubleX RMVXA Bug Fix to YSA Battle System: Classical ATB?


If so, you may want to give me your demo so I can check what's happening(as this error log utterly surprise me due to the fact the CATB has absolutely nothing to do with action targets) 🙂

Original thread: https://forums.rpgmakerweb.com/threads/hiding-party-members-in-battle.57197/