Script call to bring up the skill window that you get when in battle. I’m trying to open up that window on on the map.
MZ Script call to open skill window
Javascript/Plugin Support
JavaScript:
SceneManager._scene.addChild(new Window_BattleSkill(0,0,Graphics.boxWidth,196))
SceneManager._scene.children[SceneManager._scene.children.length-1].setActor($gameActors.actor(1))
SceneManager._scene.children[SceneManager._scene.children.length-1].setStypeId(1)
SceneManager._scene.children[SceneManager._scene.children.length-1].show()
SceneManager._scene.children[SceneManager._scene.children.length-1].activate()
This will, of course, be completely useless for any practical purposes you can imagine because the actual logic to decide what happens when the player tries to select an option in the window simply does not exist during the map scene at all. It's all handled separately by Scene_Battle and the BattleManager during battle scenes.
You are going to have to code the rest of the logic yourself, or find a fully-built plugin that does it for you.
No cheap shortcut here.
Wonderful!! Thank you!!! If the skill is a map skill or has a common event will the common event still work?
No.
Like I said, it's completely useless.
The code/logic for handling when happens when the player presses the OK button to select an option from the window is all handled separately from the window. In the battle scene, it's handled by Scene_Battle. In the skill menu it's handled by Scene_Skill.
The map screen on the other hand, is Scene_Map.
There is simply no existing code in the engine's map scene to handle selecting an option from a skill window.
Like I said, no shortcuts here.
If you want to have a functional skill window on the map, you will have to find or code your own plugin.
A simple script call like that will only give you "window dressing" with no functionality behind it.
Like I said, it's completely useless.
The code/logic for handling when happens when the player presses the OK button to select an option from the window is all handled separately from the window. In the battle scene, it's handled by Scene_Battle. In the skill menu it's handled by Scene_Skill.
The map screen on the other hand, is Scene_Map.
There is simply no existing code in the engine's map scene to handle selecting an option from a skill window.
Like I said, no shortcuts here.
If you want to have a functional skill window on the map, you will have to find or code your own plugin.
A simple script call like that will only give you "window dressing" with no functionality behind it.
Original thread: https://forums.rpgmakerweb.com/threads/script-call-to-open-skill-window.135270/