[MANIACS] CUSTOM BATTLE INTERFACE 1

Ever wanted to make your own battle interface? With the Maniacs patch, it's pretty easy!

This is a simple tutorial to create a custom Battle UI based on Final Fantasy IX's, on Rm2k3. It requires usage of the Maniacs Patch created by BingShan.

Limitations:
- Cannot read party member order.*
- Requires the Maniacs patch.
- Only works on Battle Interface type 3. (Face mode)
*workarounds: you CAN rewrite the order based on the UI by removing all party members and readding them in the same order as the UI. If you remove Order from the main menu, you also have full control over the party formation, easing any possible problems that may arise.

Let's get to it. The first thing you'll have to do is create a System2 graphic that's devoid of numbers / gauges. You'll still, of course, need the cursor. Set that as the System2 of your project, and give all your actors empty faces.
You'll also need to set your Battle Interface mode to Type 3. These should net you with a completely empty interface -- an empty slate for you to build your UI on.



Unfortunately modes 1 & 2 won't let you erase the UI entirely like Mode 3 does. Hopefully, Cherry, BingShan or some other miracle worker will at some point allow us to push the rm2k3 UI outside of view, especially because I'm not fond of Type 3's middle-of-the-screen item/skill window.

Now let's move on to the code.


This is the body of the battle UI. It isn't the cleanest code, but let me explain:

First thing that's happening is, we're calling this common event right here:


This event will check whether a certain character is on your party, if so it'll assign that character to the variable the event is currently pointing at (B.UI_Counter) and add +1 to the pointer variable, then move on to see if there's any more characters on the party. Basically, it'll give you a list of members in your party, limited to 4 members (max member size on 2k3) and unfortunately ignoring Formation.

After calling this common event, you'll have 4 variables, each with the ID of one of your party members. (0 on each empty slot.)

Afterwards, the Erase Picture event merely erases any previous UI pictures before adding the new pictures with updated values. Useful if a character leaves the party for example, or else their info would just stay there, unupdated. There are fancier and more efficient ways to do this but this is simple enough.

Then, we set up 4 pointer variables: X and Y are the base coordinates we'll display our UI on. We're using Top Left positioned pictures. B.UI_Counter, which was already used on the GetActorID event, is reused as a pointer to tell the game which slot it's currently displaying.

B.UI_Picture merely says what PictureID we'll be using on each of the show picture commands.

Following on, you'll notice one of the many awesome new functions of Maniacs: Loop conditions. Since we're showing stats for 4 party members, we'll want the Loop to run 4 times. It's one of the simpler conditions, but there's a lot you can do with this Loop condition and pointers, more than I can wrap my head around.

Then, the first thing I do is write the first actor's name.



This is yet another awesome new function, Show String Picture. We set variable #1 to be the same as the variable the Counter is currently pointing at (which is, the ID of the hero we're currently writing the status for.)

This will display their name at the top left of the StatusWindow.
Since we already displayed this picture, we add +1 to the B.UI_Picture variable, so we can display the next picture at ID+1 and they don't fight for the same ID.

The next 3 pictures are the HP, MP and ATB values for the character that the Count variable is currently pointing at. To retrieve that info, we make another Common Event so that we can call it. There's no way to use Pointers for this so we'll have to make one conditional branch for every possible hero ID.


We're using an ATB Gauge, so at the very end we multiply the ATB value by the number of frames in the spritesheet (-1) and divide by 100, so we can point at the current % value in the show picture command. The empty frame is regarded as Frame 01 so you need to then add +1 before ending that last common event, too.

So, when we're back from this common event, we'll have three different pieces of info:

Temp01 = The CurrentHP of the hero pointed at by Counter.
Temp02 = The CurrentMP of the hero pointed at by Counter.
Temp03 = Which frame of the ATB Gauge the ATB Spritesheet should display.

With that information in hand, all we need to do is properly display it. Since we can't do it like in a script and say that the X position of the HP number = X + 16, we'll have to add and subtract to the initial coordinates, which I do after I run each show picture command for the X axis, and once every loop for the Y axis.

Then at the end of the event, you merely add a Wait command (up to three Wait 0.0 commands, really) to mitigate any possible lag (somehow, this IS quite laggy at 4 members, which I'm inspecting into.)

This displays pretty much exactly the same info that the default 2k3 Type3 system does. If you want, though, it's easy to display state icons and effects, HP and MP gauges, a Limit Break gauge, and whatever other things may interest you -- be creative and use this base to create all sorts of cool battle UIs that bend Rm2k3 to your liking!

And the end result is this:


Next tutorial: Damage popups which I SWEAR to god are WAY easier to explain than this.
Well, I tried to be as thorough as possible. Hope it helps someone!

Maybe I'll make a tech demo at some point so you guys can see it in motion. (not that it's hard to get it running yourselves). Maybe after I get some more functions in. :)

Posts

Pages: 1
I don't understand how you get Parameter of heroes ?
You can get Heroes ID with the control variable and Member tab :

And :


Or directly like this :


With this, all you BattleUI_GetActorID is useless, no ?
Why getting param for each Heroes one by one ?
JosephSeraph
奇跡なゲイパワー♡
7196
omg my version of it doesn't have that function!! i think it's one of the newer commands of Maniacs, this is so exciting, thanks for pointing it out!

I'll give it a check, i'm constantly learning new functions and stuffs with it too... i'm pretty bad at writing tutorials but I figured it's better to have a confusing one than none at all XD
Jo,

Just record yourself using it to make a CBS from scratch and other little things it can do like that.

I'd watch it. Must learn more. I didn't realize that you even posted this. I'll have to take a look at it!
My version is 200128, I think you just have to active the new fonctions variables :
Option->Use new 'Control Variables'

For custom choice command, you found a trick ?
Actually, the only solution i've found is to hardcode all skill, i don't know how hide old interface :/
JosephSeraph
奇跡なゲイパワー♡
7196
Thank you! OMG I didn't read your new comments and I just figured out the "use new Control Variables" being under Option NOW.

Wow. I activated it and it's considerably more powerful than the already extended command! I'm having fun with the Expression function. It lets you do things that would take multiple commands in only a single line, although I don't know the syntax yet.

Unfortunately it doesn't seem to be possible to use it to store a string on a variable like you can on XP and beyond.

As for the custom choice command, no, I settled with it for now. It doesn't look so bad depending on the project. BingShan is working on an engine rewrite (!!) which is why updates have frozen. Hopefully eventually we'll get the ability to do that. I also wanted the ability to open menu windows directly...


Also, all the links broke. I guess Discord finally stopped us from direct linking uploaded images, huh? XD

Should've uploaded to RMN. I still have the images so it'll be an easy fix.

But, @Arc, I take like weeks or a month working on a CBS D: recording it sounds like nightmare, especially since you'd see me staring at the screen in silence for 50 minutes. Maybe I could make condensed videos, though. But I tried recording let's plays yesterday and... I'm just not there anymore, my speech has melted and i can't speak without stuttering -- in any language -- anymore XD i guess it's lack of practice since i don't see humans anymore thanks to COVID-19.
Pages: 1