Is it possible to change Battle System in game?

Status
Not open for further replies.

_Shadow_

Tech Magician Level:
Moderator
Joined
Mar 2, 2014
Messages
4,019
Reaction score
2,627
First Language
Greek
Primarily Uses
RMMV
Hello community. On the Database, below the System Tab, there is an option as a checkbox.Use Side-view Battle. I know how it was meant to work. You tick it, you got a side view battle system. You let it unticked, it by default selects first person point of view battle system.

Now look. The question is mostly out of curiosity. Let's say I wanna be naughty and greedy. Let's say I loaded assets for both
side view and first person view battle systems. Can I switch from one system to another in game?
I don't mean during battle, I mean doing a battle and then running an event that executes a script that does the trick and the next battle is now front view, and vice versa.
Since this works probably with a boolean attribute of a specific class, this might be possible. Right?
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,186
Reaction score
1,162
First Language
Spanish
Primarily Uses
RMVXA
technically yes, as the battle scene is built on demand, and there is a check for side/front view.
 

_Shadow_

Tech Magician Level:
Moderator
Joined
Mar 2, 2014
Messages
4,019
Reaction score
2,627
First Language
Greek
Primarily Uses
RMMV
My thoughts exactly, so I now just wonder... how! :p
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,186
Reaction score
1,162
First Language
Spanish
Primarily Uses
RMVXA
do a broad search for $gameSystem.isSideView()
it seems to be set to change only the sprites, when the battle scene calls for it.
it's a sprite-level decision, you should make it scene-level.
 

_Shadow_

Tech Magician Level:
Moderator
Joined
Mar 2, 2014
Messages
4,019
Reaction score
2,627
First Language
Greek
Primarily Uses
RMMV
$gameSystem.isSideView()
I take it that this method returns a boolean result, right?
How do we set that to true or false, that's actually the question.
How can I change the initila database value to another.
 

_Shadow_

Tech Magician Level:
Moderator
Joined
Mar 2, 2014
Messages
4,019
Reaction score
2,627
First Language
Greek
Primarily Uses
RMMV
Thanks @caethyril very much for that.
@Shaz, I wonder, are the sprites related to the battle system set only on the beginning of a game?
I am asking because of this:

else if (this.troop().name.match(/^FV/))"

You set up the file paths accordingly on the plugin. Doesn't the engine do this each time a battle occurs? Or is it setting the value just once?

No matter what this will probably work without any problems.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,649
Reaction score
13,262
First Language
English
Primarily Uses
RMMV
The plugin will do exactly what you want it to do. It checks prior to entering a battle to see if that troop is set for front view or side view.

The plugin does not set any file paths.
 

_Shadow_

Tech Magician Level:
Moderator
Joined
Mar 2, 2014
Messages
4,019
Reaction score
2,627
First Language
Greek
Primarily Uses
RMMV
Oh! It seems I failed to read your comments on start.

* Prefix a troop name with SV to set battles with that troop to side view
* Prefix a troop name with FV to set battles with that troop to front view
* Prefix a troop name with RV to set a random view for each battle with that troop

So you made it so it checks the name of the troops and act accordingly I see. :D

Final question, since I just want to change to side view and vice versa (if possible), with a simple script command for each time:
What is the object we are referring to using the special reference "this"?

I believe that if I substitute "this" with the object it refers to, it can do the trick using script lines via the eventing system. Or not?
this._isSideView = true;
this._isSideView = false;

What I understand here is this:
You probably refer to Game_System.prototype.isSideView and you actually also override the class prototype utility to set it work along with the naming of the Troops. Am I right?

For instance. Will this set the side view to true?

Game_System.prototype.isSideView = true;

And will this set the side view to false?

Game_System.prototype.isSideView = false;

I know your plugin is superior and more practical, I just want to know if I CAN change from a mode to another using one line script Event Commands.
And to this point, I am sorry if I am a hassle here @Shaz, but I try to learn a few things deeper and these are my first steps in javascript, so thanks in advance you little blue beloved squirrel!. :)
 
Last edited:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,649
Reaction score
13,262
First Language
English
Primarily Uses
RMMV
In that plugin, this refers to $gameTroop.

No, Game_System.prototype.isSideView is a function, not a variable. If you check it out, it gets its value from $dataSystem.optSideView which you could set to true or false.

However, $dataSystem will be loaded when you boot up the game, and if you change it mid-game then go back to the menu and either start a new game or resume a different saved game, it will still be what you last changed it to, not what it should be for a new game or what it was when you last created that save file. So changing $dataSystem stuff will affect more than the current game.

If you run the command prior to every single battle to set it to the desired format, it would be okay. That means you'd have an issue if you use random battles.
 

_Shadow_

Tech Magician Level:
Moderator
Joined
Mar 2, 2014
Messages
4,019
Reaction score
2,627
First Language
Greek
Primarily Uses
RMMV
No randomness of course.
I was thinking on controlled amount of battles, actually emerging by interacting with events, thus script commands can handle things on a Common Event. I am greatful to you @Shaz thank you for helping me on that.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Who knew a adding menu commands would be so hard for something that should be a basic feature.
When you discover great tileset resources that you completely forgot that you had. :kaomad3::kaopride:
Just got a better look at the MZ RTP. I'm very happy with it, especially the sci-fi tiles and sprites. Glad I pre-ordered.
I've just checked the VisuStella Plugins for MZ and there are already 11 plugins. The Yanfly team(perhaps a big one?) really works so effectively and efficiently that some MZ users can likely use tons of Yanfly plugins right after MZ's released (still 13 days from now). I wonder if any other plugin developer(or team) will try to compete with Yanfly this time, no matter how slim the chance to win is :)
Hello! :kaopride:I am new to RPG Maker, though I have been lurking the forums for a while. :kaoswt: Hope to make some friends and learn some stuff here! :kaothx:

Forum statistics

Threads
100,596
Messages
977,602
Members
132,198
Latest member
Glasty
Top