So there is only one actor in my game, its a short game I plan to finish in a month, players could beat it in a day. This makes the formation command in the main menu useless, so I wanted it to activate skill #2 like the guard command in battle.
Make Formation command in main menu activate skill #2
RGSS3 Script RequestsThe guard command itself is hard-coded to #2 and is useless in the menu as it only works in battle.
What you could get is a script that assigns a menu command to a skill ID that is set in the script, but I strongly advice against making it ID#1, ID#2 or changing those two skills away from basic attack and guard.
What you could get is a script that assigns a menu command to a skill ID that is set in the script, but I strongly advice against making it ID#1, ID#2 or changing those two skills away from basic attack and guard.
Why would you want to activate guard in the menu?
If you don't need that command, you could remove it with a simple edit of the Window_MenuCommand script or just get a menu script like Yanfly's which also allows you to do the same thing
If you don't need that command, you could remove it with a simple edit of the Window_MenuCommand script or just get a menu script like Yanfly's which also allows you to do the same thing
I've changed skill #2 to do something different.
bad decision, because the command will still be called in the battlesystem unless you reprogrammed that as well...
I realize this. That is what I wanted. So instead of telling me that my idea is stupid could someone actually answer my question? I'm aware of what changing skill #2 does and what it entails, and I assure you that it is in my best interest to change it.
Does this skill have a target? Or does it simply call an auto event? Who's stats should it use?
It just calls common event #3, and should use the stats of the stats of the actor that uses it.
class Scene_Menu < Scene_MenuBase #-------------------------------------------------------------------------- # * Formation [OK] #-------------------------------------------------------------------------- def on_formation_ok a = $game_party.members[@status_window.index] if a.skill_cost_payable?($data_skills[2]) a.use_item($data_skills[2]) a.item_apply(a,$data_skills[2]) if $data_skills[2].effects.any?{|e|e.code == Game_Battler::EFFECT_COMMON_EVENT} return_scene end else Sound.play_buzzer end @status_window.refresh @status_window.activate end #-------------------------------------------------------------------------- # * Formation [Cancel] #-------------------------------------------------------------------------- def on_formation_cancel @status_window.unselect @command_window.activate endendclass Window_MenuCommand < Window_Command def add_formation_command add_command($data_skills[2].name, :formation, formation_enabled) endend Hey ♫
I think this snippet should do what you want- it is just plug in and play!
I think this snippet should do what you want- it is just plug in and play!
Original thread: https://forums.rpgmakerweb.com/threads/make-formation-command-in-main-menu-activate-skill-2.41416/