unattended_baby

Villager
Member
Joined
May 12, 2020
Messages
6
Reaction score
3
First Language
English
Primarily Uses
RMMV
Hey there, I'm wondering if there is a way to call the "border drawing" script that the default text boxes use in a separate plug-in. I'm sure there is, but my looking around the web hasn't yielded much of a result. I'm specifically trying to do the following:
zMntIaN.png
7rrIR6i.png


I'm trying to use this border that's around the text boxes

LwOR0Z8.png


around the MASH bar, and even the health bars later on. is there a way to call this:
c78mm32.png

and draw it within a plug-in?

Sorry if this question has been answered before, I don't know what exactly I should be looking for and any help would be greatly appreciated! thank you so much.

I am using RPG MAKER MV.
I'm using the SRD_TimeAttack_Mash for the "mash bar"
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
4,513
Reaction score
1,733
First Language
Dutch
Primarily Uses
RMMV
what exactly do you want to achieve?
if you want to remove the border on the title screen only,
you make windows opacity to false/null/0 to re remove it.

otherwise, make a different widow layout for title only (this makes the
blackpart visible, while opacity remove all except text, cursor and colors.

but just border is not possible so far I know, or explain better what
you want to achieve and what scenes.
 

unattended_baby

Villager
Member
Joined
May 12, 2020
Messages
6
Reaction score
3
First Language
English
Primarily Uses
RMMV
what exactly do you want to achieve?
if you want to remove the border on the title screen only,
you make windows opacity to false/null/0 to re remove it.

otherwise, make a different widow layout for title only (this makes the
blackpart visible, while opacity remove all except text, cursor and colors.

but just border is not possible so far I know, or explain better what
you want to achieve and what scenes.

Okay, let me post even more images.

BE3s3NN.png


O3F49FW.png


I am simply trying to find the bit of code that draws the border, and apply it to this plug-in.
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
4,513
Reaction score
1,733
First Language
Dutch
Primarily Uses
RMMV
there is a way to add it, if it's adjustable, than it's best that a advance coder,
with more knowldge can add the function/modify the function for you.

my guess it's the last function where too add it, because it draws the gauge,
and while I dont know the plugin, it would be harder, so someone that knows
it or more js knowledge is helpfull to it.

my 2 options that might be added or usefull if you have knowledge,
1) add the background image when the mash is being used.
2) create a window around the mash button that draws it from window.png

the best way might be 2, single size can be 1, multiple sized, requires 2.
but I dont understand full how SRD coded, so I cannot really help you out.

but I wish you good luck on the project and that someone can add this
for you :)
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
2,852
Reaction score
2,189
First Language
EN
Primarily Uses
RMMZ
Plugin link:

RMMV's game windows draw their borders via the Window.prototype._refreshFrame method in rpg_core.js. It basically chops up the windowskin (ImageManager.loadSystem("Window")) into corner, edge, and middle pieces, then stretches/positions them appropriately around the window's border. Code in spoiler below for ease of reference~
JavaScript:
Window.prototype._refreshFrame = function() {
    var w = this._width;
    var h = this._height;
    var m = 24;
    var bitmap = new Bitmap(w, h);

    this._windowFrameSprite.bitmap = bitmap;
    this._windowFrameSprite.setFrame(0, 0, w, h);

    if (w > 0 && h > 0 && this._windowskin) {
        var skin = this._windowskin;
        var p = 96;
        var q = 96;
        bitmap.blt(skin, p+m, 0+0, p-m*2, m, m, 0, w-m*2, m);
        bitmap.blt(skin, p+m, 0+q-m, p-m*2, m, m, h-m, w-m*2, m);
        bitmap.blt(skin, p+0, 0+m, m, p-m*2, 0, m, m, h-m*2);
        bitmap.blt(skin, p+q-m, 0+m, m, p-m*2, w-m, m, m, h-m*2);
        bitmap.blt(skin, p+0, 0+0, m, m, 0, 0, m, m);
        bitmap.blt(skin, p+q-m, 0+0, m, m, w-m, 0, m, m);
        bitmap.blt(skin, p+0, 0+q-m, m, m, 0, h-m, m, m);
        bitmap.blt(skin, p+q-m, 0+q-m, m, m, w-m, h-m, m, m);
    }
};

You could make the gauge its own window instead, but I would not recommend that in this situation because SRD's Timed Attack plugins assume the gauge is a sprite (you would probably need a lot of overrides to make things compatible).
 

unattended_baby

Villager
Member
Joined
May 12, 2020
Messages
6
Reaction score
3
First Language
English
Primarily Uses
RMMV
Plugin link:

RMMV's game windows draw their borders via the Window.prototype._refreshFrame method in rpg_core.js. It basically chops up the windowskin (ImageManager.loadSystem("Window")) into corner, edge, and middle pieces, then stretches/positions them appropriately around the window's border. Code in spoiler below for ease of reference~


You could make the gauge its own window instead, but I would not recommend that in this situation because SRD's Timed Attack plugins assume the gauge is a sprite (you would probably need a lot of overrides to make things compatible).
So would there be any possibility of leaving in the gauge that the plug-in already draws but calling the bit of code that draws the window behind it before the gauge is drawn and then cleaning it up after the action is performed? Therefore, it still keeps the bit of code required by the plug-in itself to draw the gauge sprites, but have a larger rectangle behind it drawing the window border? or is that in of itself its own can of worms? you're doing a great job of explaining this to me, and i appreciate it immensely.

edit: i have no intentions of changing the gauge size later on and the window drawn could actually just be a sprite instead. if there's any way to just draw a picture that's a little larger than the gauge and then remove it, that's what I'd like. I have no problem cracking open an art program to piece together the sprites myself and make a rectangle that could be called from the "pictures" folder. sorry if it seems like I'm asking two different questions here.
 
Last edited:

unattended_baby

Villager
Member
Joined
May 12, 2020
Messages
6
Reaction score
3
First Language
English
Primarily Uses
RMMV
sorry, double post. hit quote instead of edit....
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
2,852
Reaction score
2,189
First Language
EN
Primarily Uses
RMMZ
Drawing the border before or after depends on what visual effect you want. If it's blitted to the same bitmap canvas, then any overlap (including transparent areas) will replace the existing pixels. Like you implied, I think a better approach would be to make a new sprite/bitmap for the border. That can be added to the spriteset either before or after the gauge. Then every point in the plugin where the gauge gets repositioned, add a similar line to reposition the border. :kaophew:

You'd also need to identify a good place to actually paint (or load) the border image. If you want to just load a fixed picture, you could do something like new Sprite(ImageManager.loadPicture("MashGaugeBorder")), add it to the scene's spriteset, then manipulate it with its x, y, and visible properties.

For a reference on adding sprites to a scene, check out the code Scene_Title has for its background/title stuff (rpg_scenes.js).
 

unattended_baby

Villager
Member
Joined
May 12, 2020
Messages
6
Reaction score
3
First Language
English
Primarily Uses
RMMV
Drawing the border before or after depends on what visual effect you want. If it's blitted to the same bitmap canvas, then any overlap (including transparent areas) will replace the existing pixels. Like you implied, I think a better approach would be to make a new sprite/bitmap for the border. That can be added to the spriteset either before or after the gauge. Then every point in the plugin where the gauge gets repositioned, add a similar line to reposition the border. :kaophew:

You'd also need to identify a good place to actually paint (or load) the border image. If you want to just load a fixed picture, you could do something like new Sprite(ImageManager.loadPicture("MashGaugeBorder")), add it to the scene's spriteset, then manipulate it with its x, y, and visible properties.

For a reference on adding sprites to a scene, check out the code Scene_Title has for its background/title stuff (rpg_scenes.js).
This is insanely helpful, thank you so much for taking the time out of your day to reach out and provide guidance. Take care and be well.
 

Latest Threads

Latest Profile Posts

My home state baseball team is going back to the World Series for the first time since 1999. I remember when they went in 1995 and won, that was like the best day of my life. (I'm a huge baseball fan and yes I'm talking about the Braves).
FL Studio is a huge step up from LMMS but I'm having such a tough time with it D:<
The new Dune movie reminds me of the game Dune 2 made by Westwood. A quality product on its own, but extremely disloyal to its source of inspiration.
Terrible Writing Advice, you've done it again.
1635026211997.png

Forum statistics

Threads
116,038
Messages
1,095,210
Members
151,386
Latest member
sheyzo
Top