[Ace] Skill 001 Change attack to guard. (looking for script)

Hey,

     So my intention is to change/use the attack command to work like a guard command. In other words, remove the targeting window that appears when using attack. Additionally make sure the skill is self casting i.e set the scope to: 'the user'. I recently added this script by Vlue http://www.rpgmakervxace.net/topic/5618-set-guardattack-skills/

     It works really well and it's a fantastic script, the only thing is... it doesn't change how the attack command is applied. All the hard coding associated with the attack still runs. As in, I still have to pick an enemy. (Even though the scope is set to 'the user')

     Basically i want the player to have a self casting attack, which works like a guard. Is their a script? Is it even possible to make an actor have two types of guards? I'm trying to make it so it doesn't have to target an enemy first before it works.


Please help.

Thanks!!
I've moved this thread to RGSS3 Script Support. Please be sure to post your threads in the correct forum next time. Thank you.


Not sure how this got posted into, or approved into the Scripts forum - that area is for scripts you have written and are sharing (though if there is already a thread for the script, you can just add your question to the existing thread).


The attack and guard commands are hardcoded and should not be changed. I'm not familiar with that script, but someone else may be able to tell you if/how you can set up something like what you want using it.
I think you need to explain what exactly you have configured and give screenshots of your skills.


That script allows you to set a different skill ID# to be exactuted when the attack or guard buttons are pressed - and that is the only thing that is hard-coded in the engine.


There is nothing else specially coded for attack unless you added other skills that introduce hardcoding.


If you set the attack skill of an actor to a skill that has a user scope, then when pressing attack that skill will be executed on the user without any targeting window.


If that doesn't happen to you, you either made a wrong configuration, changed to the wrong skill or have a different script messing with the attack.
Configuration is as follows...

I have no other scripts, and in addition, it's the first time ever using a script. (I've tried to keep away from them as much as possible ;P mostly so I have full control over my games.)

In the note tags of my actor (actor1),  it says <attack_id 3>

Skill 3 has:

Skill type: None. Scope: The User. Occasion: Only in battle​
Speed: 0. Success: 100%. Repeats: 1.​
Hit type: Certain Hit​
No required weapon​
Damage / type: None.​
 ​
Effects: Recover MP - 15​
 ​
I've even tried setting the skill type to magic and allowing the actor to use it that way, and it works exactly the way I want it too. Which is why I concluded the script was still borrowing the 'hard code' of attack 001 to must always have a targeting window. Because, if you try to set the attack skill 001 up the same way without any script it does exactly the same thing script or not. If I configure <guard_id 3> into the note tag of actor1 it works! But my issue is, I want to basically have 2 self casting basic attacks. One that recovers MP and the other a normal guard.

Sorry no screen prints. I hope this information should be sufficient.

Thank you Andar, you seem to be the only one I deal with in the forums, I hope I don't end up becoming a pest for you. Your response and knowledge is respected though and I do humbly appreciate your help.

Sock.
*Bump*
That script allows you to set a different skill ID# to be exactuted when the attack or guard buttons are pressed - and that is the only thing that is hard-coded in the engine.

There is nothing else specially coded for attack unless you added other skills that introduce hardcoding.
Actually...Vlue's script only changes the skill used for attack and guard, but it still uses the default "Attack" and "Guard" buttons in the battle, and those buttons are hard-coded as well.

And that is the exact issue Vlue's script got.

You can try to use this snippet together with Vlue's script:

class Scene_Battle < Scene_Base def command_attack BattleManager.actor.input.set_attack sk = $data_skills[BattleManager.actor.attack_skill_id] if !sk.need_selection? next_command elsif sk.for_opponent? select_enemy_selection else select_actor_selection end end def command_guard BattleManager.actor.input.set_guard sk = $data_skills[BattleManager.actor.guard_skill_id] if !sk.need_selection? next_command elsif sk.for_opponent? select_enemy_selection else select_actor_selection end endendWarning: I did NOT test this!You can put this snippet anywhere below Materials and above Main.

In theory, this should fix your issue.

Original thread: https://forums.rpgmakerweb.com/threads/ace-skill-001-change-attack-to-guard-looking-for-script.53610/