Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Supporting multiple battle systems
Tsukihime
post Dec 3 2011, 09:42 AM
Post #1


Level 25
Group Icon

Group: Revolutionary
Posts: 560
Type: None
RM Skill: Undisclosed
Rev Points: 25




Is there an easy way to modify an existing battle system to make it so that a different battle system depending on whether a certain condition has been met?

For example suppose I had the standard battle system, and then in certain events I would run it maybe as a side-view, or even as a completely different one (maybe using the fire emblem scripts).

Kind of like mini-games, or perhaps even as part of the story.

I would guess the structure would be like

CODE
If some condition is satisfied (map name, event name, event comment, etc)
   execute battle using these set of scripts
else if some other condition
   execute battle using these set of scripts
else
   maybe default


Where I abstract it so that I have generic "interface" that is exposed to the rest of the game (ie: Scene_Battle.new), but then the rest of the code would load different subclasses.

Performance-wise, how would it behave? I'm thinking only the transition to the battle scene as well as loading time, but maybe there's something I'm overlooking?

I would structure it such that the generic flow is the same, but I would instantiate one of the subclasses and call those methods.

This post has been edited by Tsukihime: Dec 3 2011, 09:44 AM


__________________________
My Scripts
Go to the top of the page
 
+Quote Post
   
maximusmaxy
post Dec 3 2011, 10:03 AM
Post #2


PZE whore
Group Icon

Group: Revolutionary
Posts: 131
Type: Scripter
RM Skill: Skilled




The problem is most custom battle systems overwrite the existing standard battle system. Placing a seccond custom battle system script would then usually overwrite the first script if they both overwrite the Scene_Battle. Some battle systems like Atoa's support multiple battle styles in the same script which i believe can be changed while playing, which might be what your looking for.

It really just depends what scripts you want to use together and how the scripts are written. You could use a CBS and an ABS together since they are both utilized in different scenes however i highly doubt 2 ABS's or 2 CBS's would be compatible since one would cancel out the other. I'm not saying it isn't possible, although it may require quite a bit of scripting to get the scripts to be compatible together.

However i may be mistaken, i believe there is a part in the SDK which is used to counter this problem (enabling and disabling scripts) although i am not very familiar with the SDK and i believe scripts can only be enabled/disabled on runtime and not during gameplay.


__________________________
Check out the new PZE Forums! http://zeldaengine.net/index.php
Go to the top of the page
 
+Quote Post
   
Tsukihime
post Dec 3 2011, 02:26 PM
Post #3


Level 25
Group Icon

Group: Revolutionary
Posts: 560
Type: None
RM Skill: Undisclosed
Rev Points: 25




Functions overwriting other functions might be the major problem.

In the best case you would end up with two separate scene_battle classes, but then there's all the other classes that may have had functions overwritten.

I guess for mini-games that are meant to be stand-alone and does not rely on anything, everything should be included in the module rather than relying on existing functionality.


__________________________
My Scripts
Go to the top of the page
 
+Quote Post
   
Night_Runner
post Dec 5 2011, 11:50 PM
Post #4


Level 50
Group Icon

Group: +Gold Member
Posts: 1,520
Type: Scripter
RM Skill: Undisclosed




If your lucky, you might be able to get away with getting it working with a few small alterations...
in the custom battle system, change class Scene_Battle to class Scene_Battle2 < Scene_Battle, (so go get in to battle you need to have an event run the script $scene = Scene_Battle2.new) and change all alias calls to super, it may work.
But most likely you will find that the windows, sprites & the spritemap have all been tweaked in the script as well, and then you'd have to change them to Spriteset_Map2 < Spriteset_Map like with the Scene_Battle, and it gets very tedious and messy...


__________________________
K.I.S.S.
Want help with your scripting problems? Upload a demo! Or at the very least; provide links to the scripts in question.

Most important guide ever: Newbie's Guide to Switches
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 19th May 2013 - 06:22 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker