Pretty Sleek Gauges

● ARCHIVED · READ-ONLY
Started by mjshi 140 posts Page 5 of 7 View original ↗
  1. Idk why but I'm still not receiving emails for some reason. sorry again for the late replies >.<

    Zakarijah said:
    So I'm having an issue where the enemy HP bars move depending on how many enemies are in battle as seen in images(?)
    That's been an issue I've been trying to solve for a very long time. It's pending reworking of the plugin bc it's very tied with the way I'm calculating and displaying things. Sometimes moving an enemy up or down a little can fix it, but I haven't had the time to tackle that lately >.<

    Pozinhofan said:
    I was wondering if there's any possibility to hide the enemy hp bars?
    Not by default, I'd have to change the plugin to let you do that. You can hide it with a script command with this:
    SceneManager._scene._enemyHPBarWindow.visible = false
    Msoulwing said:
    So I recently got back to my project, and decided to see if I could get a patch working.
    I somehow managed to do just that, and then it stopped working again. I have no idea what I changed, and starting over from square 1 has not yielded much success.

    However, I did discover that my current patch text kind of works. The gauge animates just like it should, but it only updates the color when I go in and out of combat, or between menu scenes.
    What specifically are you trying to accomplish here? Like, what's the larger context for what you're trying to have the plugin do? I can try to point you to where you should look if you're trying to modify a specific behavior :)
  2. Well, simply put I'm trying to make it so the color of the HP gauge changes depending on how much HP is left through the FSDK HPcolor plugin, while also animating the gauge.

    EDIT: As a side note, is there any script call that can make an individual enemy's HP bar visible?
    It's not super important, just asking.
  3. Msoulwing said:
    Well, simply put I'm trying to make it so the color of the HP gauge changes depending on how much HP is left through the FSDK HPcolor plugin, while also animating the gauge.
    You should be able to do it if you start from a fresh copy of the plugin, then modify this function to change the boxed values to be based on the current actor HP %.
    Spoiler
    1587881692060.png

    Msoulwing said:
    As a side note, is there any script call that can make an individual enemy's HP bar visible?
    It's not super important, just asking.
    No, this isn't supported in the vanilla plugin.
  4. Hi! First of all, I wanna thank you (and all the people that created the earlier versions) for this awesome plugin, it really does create pretty sleek gauges!

    I have one issue, though. It could be a bug. The problem is purely visual and doesn't really break anything, but would be very nice if it could be fixed. I made sure I used an almost brand-new project to test this, the only active plugins are: YEP_CoreEngine (with 1120x624 Screen Width/Height set in its parameters), and PrettySleekGauges, in that order.

    At the main menu, when someone is affected by an state, its icon shows behind the EXP bar. I'm sure you're aware of this, but anyways, here's some screenshot:

    3r0D1Og.png

    It looks off, so I took a look at your plugin's parameters and, sure enough, there was an "Status Icon XY Offset" option (the description says "Leave blank if you don't have out of battle statuses"; that's why I think you know about the bar covering the icons). I wrote "0, 40" as the format was "X, Y". Here comes the problem: putting anything at all in that setting, seems to create some issues.

    l5nBBVp.png

    As you can see, the icon can be perfectly seen now... but the bars are no longer reaching the end of the screen, and it seems the TP bar has disappeared. It's like some other parameters are being unintentionally overwritten, maybe? I know next to nothing about scripting, so maybe that isn't it, but that's what it seemed like, because it's not about the different in-game resolution per-se - the bars worked well before, even with the widescreen res; as said, it only occurs when I write anything at all in the "Status Icon XY Offset" parameter. Could it be fixed somehow?

    And again, thanks, this time for still reading the thread even after all these years.
  5. Ultra_K said:
    it only occurs when I write anything at all in the "Status Icon XY Offset" parameter. Could it be fixed somehow?

    Does changing the X offset rather than the Y offset help at all? If not, I'll try to take a look at this in ~2 weeks max and thank you for the detailed breakdown on your problem :) It's really helped narrow the possible issue down a lot.
  6. Hey, thanks for replying!

    mjshi said:
    Does changing the X offset rather than the Y offset help at all?

    It seems it doesn't:

    B7CFMPH.png

    I appreciate the response, take your time looking at it. :)
  7. I don't think this is compatible with SRD's Battle Status Customization.
  8. BloodletterQ said:
    I don't think this is compatible with SRD's Battle Status Customization.
    That's entirely possible, what kind of bugs did you find?
  9. update 1.03e
    Adapted @Roninator2 's EXP gauge offset feature as suggested by @Ultra_K into the official codebase. This can be used as a workaround for status icons being overlapped by the EXP bar.

    side note- not really sure where 1.03d went .-. oh well.
  10. Hello, thank you for the great plugin! I am also having issues with the TP bar disappearing and not being able to change the EXP bar position- I tried changing the bar position in the code as well and seems to have no effect. Appreciate any help if possible!
  11. @aceandbacon Can you PM me with screenshots/more information?
  12. Sure! Thank you for your help!
  13. These are very pretty gauges! I like them a lot!
    This question might also be a huge long-shot, but I won't know until I ask.
    Capture.PNG
    As you can see I lost the MP and IP numbers. I'm not too bothered by the IP one, but the MP one is a problem. I know WHY this happens. It's because of how I'm doing the icons. In the MP field it's \*\i[108] which the game assumes it has to write out entirely and thus pushes MP off the screen (because there is only a little space to begin with). This only happens when I have your plugin activated (with the added patch to the Yanfly status thing), so my question:

    Do you happen to know where in your plugin the space between MP and MP's Value is determined? Or where I can go about fixing this little issue?

    If not, it's okay! I'll figure it out somehow, just figured I might as well save myself a headache if I can.
  14. Ronove said:
    Do you happen to know where in your plugin the space between MP and MP's Value is determined? Or where I can go about fixing this little issue?
    No problem! You can trace it through these functions (relevant part is drawText under Special_Gauge" ):

    Spoiler
    JavaScript:
    Special_Gauge.prototype.refresh = function() {
        var gy = this._y + this._window.lineHeight() - 2;
        if (this._vocab) {
            gy -= this.fontSize();
            this._window.contents.clearRect(this._x-1, gy, this._width + 2, this.fontSize() + 2);     
        } else {
            gy -= this._height;
            this._window.contents.clearRect(this._x, gy, this._width + 2, this._height);
        }
        this.drawGauge();
        this.drawText();
    }
    
    
    // and it leads to this...
    Special_Gauge.prototype.drawText = function() {
        if (this._vocab) {
            var width = this._width;
            var x = this._x;
            var storeFontSize = this._window.contents.fontSize;
            this._window.contents.fontSize = this.fontSize();
            if (this._showEHPHP) {
                this._window.changeTextColor(this._window.systemColor());
                this._window.drawText(this._text, this._x + 1, this._y + this._yOffset);
                width -= this._window.textWidth(this._text);
                x += this._window.textWidth(this._text);
            }
            if (this._showEHPText) {
                width -= textRightBuffer;
                this._window.changeTextColor(this._window.normalColor());
                if (this.critText()) {
                    if (this._curVal < this._maxVal / 10) {
                        this._window.changeTextColor(this._window.deathColor());
                    } else if (this._curVal < this._maxVal / 4) {
                        this._window.changeTextColor(this._window.crisisColor());
                    }
                }
                if (!this._maxVal || this._width < 186) {
                    this._window.drawText(Math.round(this._curVal), x, this._y + this._yOffset, width, "right");
                } else {
                    this._window.drawText(Math.round(this._curVal), x, this._y + this._yOffset, width - this._window.textWidth("/" + this._maxVal), "right");
                    this._window.changeTextColor(this._window.normalColor());
                    this._window.drawText("/", x, this._y + this._yOffset, width - this._window.textWidth(this._maxVal), "right");
                    this._window.drawText(this._maxVal, x, this._y + this._yOffset, width, "right");
                }
            }
            this._window.contents.fontSize = storeFontSize;
        }
    }

    Don't worry about the ehphp stuff or ehptext stuff-- those are on by default and are responsible for drawing the "MP" and the mp value, and are turned off through Special_Gauge.prototype.setTextVisibility
  15. mjshi said:
    No problem! You can trace it through these functions (relevant part is drawText under Special_Gauge" ):

    Spoiler
    JavaScript:
    Special_Gauge.prototype.refresh = function() {
        var gy = this._y + this._window.lineHeight() - 2;
        if (this._vocab) {
            gy -= this.fontSize();
            this._window.contents.clearRect(this._x-1, gy, this._width + 2, this.fontSize() + 2);   
        } else {
            gy -= this._height;
            this._window.contents.clearRect(this._x, gy, this._width + 2, this._height);
        }
        this.drawGauge();
        this.drawText();
    }
    
    
    // and it leads to this...
    Special_Gauge.prototype.drawText = function() {
        if (this._vocab) {
            var width = this._width;
            var x = this._x;
            var storeFontSize = this._window.contents.fontSize;
            this._window.contents.fontSize = this.fontSize();
            if (this._showEHPHP) {
                this._window.changeTextColor(this._window.systemColor());
                this._window.drawText(this._text, this._x + 1, this._y + this._yOffset);
                width -= this._window.textWidth(this._text);
                x += this._window.textWidth(this._text);
            }
            if (this._showEHPText) {
                width -= textRightBuffer;
                this._window.changeTextColor(this._window.normalColor());
                if (this.critText()) {
                    if (this._curVal < this._maxVal / 10) {
                        this._window.changeTextColor(this._window.deathColor());
                    } else if (this._curVal < this._maxVal / 4) {
                        this._window.changeTextColor(this._window.crisisColor());
                    }
                }
                if (!this._maxVal || this._width < 186) {
                    this._window.drawText(Math.round(this._curVal), x, this._y + this._yOffset, width, "right");
                } else {
                    this._window.drawText(Math.round(this._curVal), x, this._y + this._yOffset, width - this._window.textWidth("/" + this._maxVal), "right");
                    this._window.changeTextColor(this._window.normalColor());
                    this._window.drawText("/", x, this._y + this._yOffset, width - this._window.textWidth(this._maxVal), "right");
                    this._window.drawText(this._maxVal, x, this._y + this._yOffset, width, "right");
                }
            }
            this._window.contents.fontSize = storeFontSize;
        }
    }

    Don't worry about the ehphp stuff or ehptext stuff-- those are on by default and are responsible for drawing the "MP" and the mp value, and are turned off through Special_Gauge.prototype.setTextVisibility

    I'm gonna warn you I'm sometimes really dense. BUT, I did get one of the values moving! By doing this to line 724 which I now realize in my edit is under one of the EHPtext:
    Code:
    this._window.drawText(Math.round(this._curVal), x - 100, this._y + this._yOffset, width, "right");
    Capture.PNG
    But it was HP. But I did find out that if I make my window bigger to where the MP number does show up, it does move the MP number with HP. It just for whatever reason doesn't do it when my window is 150px. When I make my window bigger (I made it to 180px) MP definitely shows up and moves with HP.
    Capture2.PNG
    Which is fine I guess, I just don't need a window that big, haha.
    So, is this just me doing something wrong? Or is it just gonna be like that and tied together? I even tried a lot of numbers to see if MP would ever show up for the first example, but it just didn't. So I'm not sure where to go from here.

    I'm sorry I'm being really difficult!
  16. Ronove said:
    I'm gonna warn you I'm sometimes really dense. BUT, I did get one of the values moving! By doing this to line 724 which I now realize in my edit is under one of the EHPtext:
    Code:
    this._window.drawText(Math.round(this._curVal), x - 100, this._y + this._yOffset, width, "right");
    View attachment 151958
    But it was HP. But I did find out that if I make my window bigger to where the MP number does show up, it does move the MP number with HP. It just for whatever reason doesn't do it when my window is 150px. When I make my window bigger (I made it to 180px) MP definitely shows up and moves with HP.
    View attachment 151966
    Which is fine I guess, I just don't need a window that big, haha.
    So, is this just me doing something wrong? Or is it just gonna be like that and tied together? I even tried a lot of numbers to see if MP would ever show up for the first example, but it just didn't. So I'm not sure where to go from here.

    I'm sorry I'm being really difficult!

    Don't worry about it :)

    Try adding a check for if it's MP like so:
    Code:
    if (this._type === "mp") {
        // change x and y values
    } else {
        // keep original
    }

    You can also just add a straight check for if the type is not hp, change the location the number is being drawn.
  17. I'm too dense for that, haha. I found an alternative look I'm happy with as I don't think it's worth the headache at this point trying to figure out WHY it happens (cause it happens to HP too if the gauge is made too small, haha).

    Another question because I am on fire today: the Critical HP/MP/TP color doesn't seem to be working for me. It works without all the yanfly stuff, but when I turn on the yanfly stuff and then your patch, the critical color goes away (but if I don't have your gauges/patch, the critical color stays) and I can't figure out what exactly is the culprit for that.
  18. Hello, amazing plugin. It really changes the look of my game!

    I have a question, I would like to know if it is possible to change the text color of "HP / MP / TP" in menu and battles since they are all (horribly) blue by default. (and if possible, also Lv. and EXP). For example, I want the text "HP" to be green and "TP" to be red and so on. I attach an example image.

    Example:
    Example
    Untitled-1.png

    Is it possible and how?

    And a minor issue, I do not know if it is my custom font but when reducing the font size of the gauges to less than 28 (default), when the numbers are animated, the previous drawing remains black underneath and that causes an effect, I don't know whether to call it a black glitch behind the numbers? This effect can be seen in the attached screenshot. Look above at the "C" and the "3" of the text "Carga". It's just a minor thing for me though, I don't care that much.

    Thanks in advance and congratulations on the plugin!
  19. Zioxboy said:
    Hello, amazing plugin. It really changes the look of my game!

    I have a question, I would like to know if it is possible to change the text color of "HP / MP / TP" in menu and battles since they are all (horribly) blue by default. (and if possible, also Lv. and EXP). For example, I want the text "HP" to be green and "TP" to be red and so on. I attach an example image.

    Example:
    Example
    View attachment 155688

    Is it possible and how?

    And a minor issue, I do not know if it is my custom font but when reducing the font size of the gauges to less than 28 (default), when the numbers are animated, the previous drawing remains black underneath and that causes an effect, I don't know whether to call it a black glitch behind the numbers? This effect can be seen in the attached screenshot. Look above at the "C" and the "3" of the text "Carga". It's just a minor thing for me though, I don't care that much.

    Thanks in advance and congratulations on the plugin!

    Those are based on your windowskin colors! Check this handy reference for info: https://rmvxace.fandom.com/wiki/Howto:Use_high_color_palettized_WIndowskins_in_RPG_Maker_VX_Ace

    Look at the table for the 32/128 color column and change the colors in your window skin to match the number used by text_color.
  20. I'm not sure if I'm doing something wrong or if this is bug, but using both the Yanfly Battle Status patch and the Yanfly Absorption Barrier patch, the additional barrier HP doesn't seem to be shown on the battle screen.1b57cb0309f04f3cda28a24ac3d70491.png
    When checking HP using Yanfly In Battle Status, the barrier shows up just fine however. Absorption Barrier is working, it just can't be seen unless you flip over to the status screen.

    8c1d175593ef55dec1f22a3350a3eece.png
    I tested this using a fresh RPG Maker MV project and minimal plugins.