I know Shaz made a plugin that does it but it's clearly only for MV, when I try it in MZ and it just causes a bunch of errors. Can anyone help me out javascript-wise? Are there functions it can call that affect the battle view? Or does anyone have a plugin that works in MZ?
MZ Change Battle View in Game From Sideview back to Frontview
RPG Maker MZ SupportIf you have Visustella battlecore then you can do that with their plugin command, because of that reason Shaz won't update their script. I will look into it and see if I can find it within js folder. It might be in rmmz_managers.js
$dataSystem.optSideView. Set to true for side view, false for front.
Just be aware that outside of using a plugin that specifically supports it (like VS Core Engine) the value won't be retained through save files.
Just be aware that outside of using a plugin that specifically supports it (like VS Core Engine) the value won't be retained through save files.
I made a script for you.
Game_System.prototype.isSideView = function() {
if ($gameSwitches.value(1) == true) {
return true;
} else {
return false;
}
};
Copy and paste into text file and save it as .js, like frontsideview.js or whatever. It uses game switch 001 by default. If switch = true, then sideview, else if false, then it will be frontview.
The script is free for both noncommercial and commercial use. No credit needed. You are free to edit and distribute.
Good luck with your game. Happy I could help.
Thank you Trihan. I think this solution will help since I believe game switches are saved. I had thought about it ahead of time. Hopefully it works.
Game_System.prototype.isSideView = function() {
if ($gameSwitches.value(1) == true) {
return true;
} else {
return false;
}
};
Copy and paste into text file and save it as .js, like frontsideview.js or whatever. It uses game switch 001 by default. If switch = true, then sideview, else if false, then it will be frontview.
The script is free for both noncommercial and commercial use. No credit needed. You are free to edit and distribute.
Good luck with your game. Happy I could help.
Thank you Trihan. I think this solution will help since I believe game switches are saved. I had thought about it ahead of time. Hopefully it works.
You are correct! You can actually simplify that a bit:
JavaScript:
Game_System.prototype.isSideView = function() {
return $gameSwitches.value(1);
}
You guys are amazing I sincerely appreciate the help!
So do i make it a js.plugin or an in-game script?
So do i make it a js.plugin or an in-game script?
You'd want to make it a JS plugin.
I got the script to work but now when I attack in first person I get this error?
I kind of stumbled on this thread by chance so apologies for bumping it a bit up--but I think I had at least some kind of insight, if not an outright answer.
From the error log provided, you're using Fossil along with Mog's battlehud, right? I believe that's the root of the errors--as I had a similar sort of error with that specific combination that forced me to have to think otherwise on my setup, haha.
Hopefully there's a relatively easy fix for it though!
From the error log provided, you're using Fossil along with Mog's battlehud, right? I believe that's the root of the errors--as I had a similar sort of error with that specific combination that forced me to have to think otherwise on my setup, haha.
Hopefully there's a relatively easy fix for it though!
Original thread: https://forums.rpgmakerweb.com/threads/mz-change-battle-view-in-game-from-sideview-back-to-frontview.146799/