Is it possible to change Battle System in game?

Status
Not open for further replies.

Dreadshadow

Tech Magician Level:
Moderator
Joined
Mar 2, 2014
Messages
3,983
Reaction score
2,601
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,138
Reaction score
1,105
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.
 

Dreadshadow

Tech Magician Level:
Moderator
Joined
Mar 2, 2014
Messages
3,983
Reaction score
2,601
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,138
Reaction score
1,105
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.
 

Dreadshadow

Tech Magician Level:
Moderator
Joined
Mar 2, 2014
Messages
3,983
Reaction score
2,601
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.
 

Dreadshadow

Tech Magician Level:
Moderator
Joined
Mar 2, 2014
Messages
3,983
Reaction score
2,601
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,341
Reaction score
12,842
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.
 

Dreadshadow

Tech Magician Level:
Moderator
Joined
Mar 2, 2014
Messages
3,983
Reaction score
2,601
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,341
Reaction score
12,842
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.
 

Dreadshadow

Tech Magician Level:
Moderator
Joined
Mar 2, 2014
Messages
3,983
Reaction score
2,601
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

Rpg MZ looking good! Not much of a fan of the graphics for world tiles, but love the changes for sprites and movement preview!
Before I am done with even one game, I am going to need Psychiatric assistance after doing all these sprites!
Still I am improving, Spriting not mental fortitude.
It's still early days, and I was going to keep this under wraps until development is a bit further along, but I'm just so damn proud of how robust the integrity-checking in this plugin is that I have to share it.
Do you think the new RPG Maker MZ has support for Android devices ?
JDgoldvox wrote on Mr. Detective's profile.
hey, could u help me with a problem? basically, How do I delete a character from a map after a cut scene is over? I am really new with RPG maker MV. Please help!

Forum statistics

Threads
99,265
Messages
963,657
Members
130,863
Latest member
AdamEternal
Top