CP's Battle Engine

Hi, I'm new to this stuff and have no idea how any of this works. I pasted the script in the script editor and set Battle Style to 3. When I try to test my project or battles I keep getting this: Script '(Insert here)' line 2030: NoMethodError occurred. undefined method `[]' for nil:NilClass

Also, how exactly do I set the graphic for each Actor's battler?
Sounds like you tried to continue a previously saved game. A lot of scripts do extra stuff when setting up actors, and if you start a game prior to adding the script, then save it, when you try and resume the game after the script has been added, that "extra stuff" has not been dong and will cause problems like this.


Also, you shouldn't put your script into the (Insert here) slot. You need to press the insert button to insert a new slot, paste the script into THAT slot, and give the slot a name.
Ok, I've started a new project, Inserted the script in a new slot and named that slot. I've set battle style to 3. I've put battler[testbattler] in the notebox for Eric. I haven't saved anything. I tried testing a battle, but it's still the same default battle hud, it hasn't changed at all. The script isn't working. 
Ok, nevermind, I've gotten it to work.
As several people have asked, how can I make it so that in mode 3 an actor's battler changes when a common event changes their class?
Hi, I was just fooling around with the battle systems, and I think I found a visual error for mode 5 (the RM2k-style battle system). Whenever I use the escape command, the message window disappears, leaving the escape messages just being displayed in thin air, or something like that. This doesn't happen with the other modes, just with mode 5. And I'm just using the script by itself, and nothing else, so it's not like I'm using another script that could be causing this to happen. You think there might be a way to fix this?

screenshot.png
I changed my windows graphics, and I needed a different colour for the messages (dark brown, almost black). How can i set the in-battle colour for the members' names, Hp and MP to white (colour number: 16) when using the battle system number 4?
I seem to be having trouble with the script, It won't actually show up in the test battles  even if i leave the script alone or try to configure it.

am i missing something here? Some help would be nice cause I really like the look of this script ;;;
@aquaticnaho does it show up ingame? Some scripts have problems with test battles, they only work in the real game.
@aquaticnaho does it show up ingame? Some scripts have problems with test battles, they only work in the real game.

It's ok now!, I was using something I shouldn't have been using, so it's working now.
I know I'm gonna feel like a moron once you show me, but I have no idea where to indicate what battler images to use in this script. Can someone illustrate this for me? Thanks!
According to the classification of this thread, "RGSS3 Scripts (RMVX Ace)", apparently this is for VX Ace,
but will this plugin also work for MV?
@JasonGT The answer is no, it can't be used in MV. Scripts are not plugins. Scripts are written in a form of Ruby, plugins in JavaScript.
Thanks Kes for the reply, but is there a MV plugin that'd achieve the similar effect of this Ruby script?
Primarily I'm looking for mode3 where battlers' bodies are shown in full view, rather than just their portraits.
@JasonGT You will have to search the Plugin master list, I am not familiar with every plugin out there. Having said that, remember that battle plugins and scripts are the most complex and time consuming to write, so it could well be that MV doesn't yet have what you are looking for.
awesome script,
just wondering if there's a way to get the characters centered. for instance when the max battlers is 5 and you have only 1 character they are placed far to the left.
also is there a way to set the max battlers to a variable?
max battlers to a variable
There are two lines to change for you requests.

Line 602
return $game_variables[CP::BATTLERS::BATTLERS_MAX]
then change the max battlers to whatever variable you want to use
BATTLERS_MAX = 92

Line 790
cw = contents.width / $game_party.battle_members.size.to_i
thank you so much, @Roninator2 🙂!

ok so now i got a small problem.
when i change the max battlers in game the number following is only 1 or 2.
even though i have 3, 4, or 5 characters on team and in battle.
the number following is only 1 or 2.
I'm not entirely sure, but to get around this you need to start with max battle members the most you will ever have in battle before you add members to the party. Then you can lower it down to what you need. I used 10, then lowered it to 1 and tested adding members. this worked.
I also have the code a little different now.
Code:
    if $game_variables[CP::BATTLERS::BATTLERS_MAX] == 0
      $game_variables[CP::BATTLERS::BATTLERS_MAX] = 10
    end
    return $game_variables[CP::BATTLERS::BATTLERS_MAX]

then change the variable when you start the game.
Great,
Thank you so much, @Roninator2 🙂!!
everythings working wonderfully now!


ok,
so maybe not, the in battle party member switching no longer works,
and when battle finishes after trying it crashes.
here's the error it gives when it crashes.;(

so this problem is happening due to clashing with yanflys party system.

Also is there a way to make a party member who switched lose a turn instead of acting immediately.

Original thread: https://forums.rpgmakerweb.com/threads/cps-battle-engine.4811/