gmestanley

An Ordinary Wizard
Veteran
Joined
Oct 30, 2015
Messages
66
Reaction score
21
First Language
Portuguese
Primarily Uses
So, RPG Maker now has a plugin that adds a FPS meter, which is kind of great since games from nowadays use fps meters to show how fast or slow they are running.


However, I want to customize this plugin to make it my way, adding a second number (for example: 60 FPS would become 60.00 FPS) so it would look like the FPS Meter of Touhou. I would also like to make it more lively so it doesn't uses the plain boring dark theme. Eventually, I found out that it is possible to make this, by altering the .js file of the plugin. However, the alterations I made ("theme = colorful" for the more lively design and "decimals = 2" for the second number) did not show in-game for some reason. Can anyone help me plz?
 

Ossra

Formerly Exhydra
Veteran
Joined
Aug 21, 2013
Messages
1,076
Reaction score
867
First Language
English
Primarily Uses
RMMV
You will need to overwrite or otherwise change the default settings MV assigns to the FPS Meter :

Code:
// * rpg_core (v1.3.1)
// * line 2121 ~ 2125
Graphics._createFPSMeter = function() {
    var options = { graph: 1, decimals: 0, theme: 'transparent', toggleOn: null };
    this._fpsMeter = new FPSMeter(options);
    this._fpsMeter.hide();
};
 

gmestanley

An Ordinary Wizard
Veteran
Joined
Oct 30, 2015
Messages
66
Reaction score
21
First Language
Portuguese
Primarily Uses
@Exhydra Thanks a lot m8! You helped me so much.


Now I just need to adjust the size of the FPS Meter tab. Do you know if I can do it directly on the fpsmeter.js file or do I need to alter the rpg_core.js file too?


EDIT: For some reason, after applying the values "colorful" and "2" to the string "theme" and the integer "decimals", when I press F2 to close the FPS meter, it won't close and it displays in ms instead. why does it happens?
 
Last edited by a moderator:

Ossra

Formerly Exhydra
Veteran
Joined
Aug 21, 2013
Messages
1,076
Reaction score
867
First Language
English
Primarily Uses
RMMV
You will need to edit the colorful theme to change the minimum width. Once you increase the width, you may also have to tinker with the amount of graph columns and so on.

Code:
FPSMeter.theme.colorful = {
    heatmaps: [
        {
            saturation: 0.5,
            lightness: 0.6
        }
    ],
    container: {
        // Settings
        heatOn: "backgroundColor",

        // Styles
        padding: "5px",
        minWidth: "95px",
        height: "30px",
        lineHeight: "30px",
        textAlign: "right",
        background: "#aaa",
        border: "1px solid #ccc",
        borderColor: "rgba(0,0,0,0.1)",
        color: "#fff",
        textShadow: "1px 1px 0 rgba(0,0,0,.2)"
    },
    count: {
        // Styles
        position: "absolute",
        top: 0,
        right: 0,
        padding: "5px 10px",
        height: "30px",
        fontSize: "24px",
        fontFamily: "Consolas, Andale Mono, monospace",
        zIndex: 2
    },
    legend: {
        // Styles
        position: "absolute",
        top: 0,
        left: 0,
        padding: "5px 10px",
        height: "30px",
        fontSize: "12px",
        lineHeight: "32px",
        fontFamily: "sans-serif",
        textAlign: "left",
        float: "left",
        zIndex: 2
    },
    graph: {
        // Styles
        position: "relative",
        boxSizing: "padding-box",
        MozBoxSizing: "padding-box",
        height: "100%",
        zIndex: 1
    },
    column: {
        // Settings
        width: 4,
        spacing: 1,

        // Styles
        background: "#777",
        backgroundColor: "rgba(0,0,0,.2)"
    }
};
 

gmestanley

An Ordinary Wizard
Veteran
Joined
Oct 30, 2015
Messages
66
Reaction score
21
First Language
Portuguese
Primarily Uses
Yeah thanks, but what about the FPS goes to ms error?
 

Ossra

Formerly Exhydra
Veteran
Joined
Aug 21, 2013
Messages
1,076
Reaction score
867
First Language
English
Primarily Uses
RMMV
Hmm ... that does not happen on my test project. Perhaps you edited another piece of code that is now interfering with the FPS Meter toggle?
 

gmestanley

An Ordinary Wizard
Veteran
Joined
Oct 30, 2015
Messages
66
Reaction score
21
First Language
Portuguese
Primarily Uses
uh nope. in the default rpg_core settings, the toggle is click.


i'll see if this happens on mah test project.
 

Latest Threads

Latest Posts

Latest Profile Posts

Ok is telling someone that their drawing isnt good rude
I'm familiar with MZ thanks to jam now. I say it's a better working and looking MV. Lots of plugins too and FOSSIL helps alot. It's not bad.
Some more progress <3 and in most important news:
ALPACARAPTOR SPRITE! (not animated yet, though :( )
h4u90Sz.png
Caz
At the risk of giving myself even more work to do, I kinda wanna redraw the faces of the MV RTP to be a little less.. uhhhhh..

mv-redraw.png
Hmm...you'd think in this day and age, what with Japanese Schoolgirls frequenting anime, JRGs and whatever else...that someone might have made some gym clothes for the generator. You know, the ones with the short bloomers.

Forum statistics

Threads
113,651
Messages
1,076,435
Members
147,671
Latest member
somsomsom
Top