Sleek Gauges

Discussion in 'RGSS3 Scripts (RMVX Ace)' started by Vlue, Apr 5, 2014.

    Tags:
  1. Vlue

    Vlue Talent Extraordinaire

    Messages:
    589
    Likes Received:
    366
    Location:
    Canada
    First Language:
    English
    Sleek Gauges v1.0
    By Vlue
    Introduction
    Transform your gauges (hp/mp/etc bars) with different looks and special effects.
    Styles include regular, rounded border, or fancy slant. Oooh, ahhh.

    Features
    - Slightly different gauge styles!
    - Special effects like non-static numbers and gradual fall!

    Screenshots
    [​IMG]

    A picture alone can't show much, this video can help though:
    How to Use
    Plug and play and customize as needed.

    Script
    Script can be found on the pastebin here: http://pastebin.com/AGYN7e6V

    Patches:
    Yanfly Ace Engine - Ace Battle Engine and Sleek Gauges: http://pastebin.com/ezuqBw0x

    Credit and Thanks
    - By Vlue
    - Free to use in any project, commercial or non-commercial, with credit given.

    Author's Notes
    This is optional. (It still is)
     
    Last edited by a moderator: Apr 8, 2014
    #1
  2. highvoltage

    highvoltage Veteran

    Messages:
    72
    Likes Received:
    2
    First Language:
    italian
    i'm using this, it's awesome!

    just a point: in battle, fps drops to 14-17 because of this script... nothing important, just a report.
     
    #2
  3. ??????

    ?????? Diabolical Codemaster

    Messages:
    6,056
    Likes Received:
    1,657
    Location:
    Your OS
    First Language:
    Binary
    If the FPS is truly dropping from 60 down to 14-17 then this is something important. VERY much so...

    Are you sure that its being caused by this script ? that seems rather drastic for a gauge...
     
    #3
  4. highvoltage

    highvoltage Veteran

    Messages:
    72
    Likes Received:
    2
    First Language:
    italian
    ye, of course this happens only during battles, but frame drops
     
    #4
  5. ??????

    ?????? Diabolical Codemaster

    Messages:
    6,056
    Likes Received:
    1,657
    Location:
    Your OS
    First Language:
    Binary
    That is madness :/

    Maybe its because its still using the default fill_rect method. I  have found that to be relatively slow compared to alternative methods of doing the same thing :/

    Still seems like a cool script though.
     
    #5
  6. Vlue

    Vlue Talent Extraordinaire

    Messages:
    589
    Likes Received:
    366
    Location:
    Canada
    First Language:
    English
    I'm glad you like it, but yah a drop of over 40 frames is quite a lot...


    I'll look into optimizing it but I can only assume if it worked. I still get 60 fps as it is.
     
    #6
  7. ??????

    ?????? Diabolical Codemaster

    Messages:
    6,056
    Likes Received:
    1,657
    Location:
    Your OS
    First Language:
    Binary
    There must be something else affecting it.

    I have never heard of a gauge eating up over 40FPS :/
     
    #7
  8. Megablackdragon31

    Megablackdragon31 Veteran

    Messages:
    215
    Likes Received:
    34
    Location:
    Argentina
    First Language:
    Spanish
    ON: Nice Work mr Vlue,it love that gradual fall effect.

    OFF: It is posible to disable the gauge change?

    I made some changes to the default Ace bars and your script override them.

    Excuse me for my bad English and thanks you very much for this great script.
     
    Last edited by a moderator: Apr 7, 2014
    #8
  9. Vlue

    Vlue Talent Extraordinaire

    Messages:
    589
    Likes Received:
    366
    Location:
    Canada
    First Language:
    English
    Gauge change, as in the style (slanted, rounded etc.)?


    If so, you can try changing line 118 from


    draw_gauge(@x,@y,@width,@cur_rate,@color1,@color2)


    to


    @window.draw_gauge(@x,@y,@width,@cur_rate,@color1,@color2)
     
    #9
  10. Lars Ulrika

    Lars Ulrika I punch Therefore I am Harvest the land Taking the

    Messages:
    1,349
    Likes Received:
    385
    Location:
    Bengkulu Indonesia
    First Language:
    French
    AWESOME! Thanks!
     
    #10
    Vlue likes this.
  11. kerbonklin

    kerbonklin Ace Intermediate

    Messages:
    1,722
    Likes Received:
    272
    First Language:
    English
    The issue is common to many gauge-drawing scripts, and the cause is usually because it's being told to re-draw the gauge (checking for changes like via healing or damage) way too often, like once every frame or two even if nothing is happening.
     
    Last edited by a moderator: Apr 7, 2014
    #11
  12. JohnnyR

    JohnnyR Dungeon Master

    Messages:
    274
    Likes Received:
    128
    Location:
    My very own private hell!
    First Language:
    English
    Primarily Uses:
    RMMV
    Nice script, Vlue! Thanks! You're awesome as always! xD
     
    #12
    Vlue likes this.
  13. BlackLiquidSorrow

    BlackLiquidSorrow Pixel Artist

    Messages:
    480
    Likes Received:
    85
    First Language:
    English
    I can see the gauges before the HUD pops up in a battle, is that normal?
     
    #13
  14. Vlue

    Vlue Talent Extraordinaire

    Messages:
    589
    Likes Received:
    366
    Location:
    Canada
    First Language:
    English
    Hmm, probably not. I don't see it in my project though, perhaps it's an incompatibility (of sorts) with another script you are using as well?
     
    #14
  15. AtomosomotA

    AtomosomotA GRODE Leader

    Messages:
    38
    Likes Received:
    3
    Location:
    Granseal
    First Language:
    English
    I love your scripts, if you didnt notice :p   

    Is it possible to patch this into XS - Menu Delux?

    Thank you Vlue!

    Edit:

    Also, doesnt seem to be working correctly with Yanfly - Victory Aftermath ...

    The gauge never fills up...
     
    Last edited by a moderator: Aug 27, 2014
    #15
  16. StikElLoco

    StikElLoco Villager

    Messages:
    6
    Likes Received:
    0
    Location:
    Greece
    First Language:
    Greek
    Well this is silly, but how you get it to work for the "bosses" so it's bigger? In the script you say to put the ID in array format. (lines 96-97)
     
    #16
  17. ZServ

    ZServ Veteran

    Messages:
    208
    Likes Received:
    57
    Reviving this post with a fix, courtesy of TamFey of reddit, a blessed soul amongst mankind.

    def open super @dummy_window.open if @dummy_windowendAdding the above to the YBE patch Window_BattleStatus class will fix an issue where showing text during a fight would stop the gauges from being redrawn.

    This issue can be replicated by having the YBE, Sleek Gauges, and patch in a new project followed by a combat where the troop is set to show text at any point during the fight. The above snippet fixes this issue.

    Thanks again to TamFey,  sorry for the necropost, Shaz. :)
     
    #17
  18. ZServ

    ZServ Veteran

    Messages:
    208
    Likes Received:
    57
    Sorry for the double post, please don't shoot me. I come bearing patches?

    Well, kind of. This "patch" is exclusively for people using the Yanfly Battle Engine.

    First off, you'll need to replace the Sleek Gauges script with the following:

    http://pastebin.com/tdN3H8rD

    Otherwise, go to the Sleek Gauges script, then copy and paste the "hide" and "show" functions from the "Window_BattleStatusAid" class over to the "Window_BattleStatus" class.

    Afterwards, go over to the YBE, and use CTRL+F to find

    scene_battle_select_actor_selection_abeAfter you've located it, insert this below it:

    @actor_window.activateThere's still some kinks in there, but it works pretty well for the most part. Again, thanks to TamFey for the amazing help on fixing this thing up.

    It is worth noting that this script has issues with the Text Cache script, however.

    [​IMG]

    No idea how to fix that one.

    Edit: Fixed, courtesy of TamFey of reddit.

     
    Last edited by a moderator: Sep 1, 2015
    #18
  19. Mithran

    Mithran Global Moderators

    Messages:
    405
    Likes Received:
    207
    First Language:
    English
    Vlue appears to be currently inactive so I'll drop this here. The text cache interaction issue is due to the bar text overlays overdrawing by two pixels when the bar is less than 96 pixels in width and is only noticeable under certain fonts. The fix is really simple, find this line near the bottom of the script:

    Code:
      @window.draw_text(xr - 40, y, 42, @window.line_height, @cur_val.to_i, 2)
    Change that first 40 to a 42. What is happening here is that text is being drawn starting 40 pixels from the left of the right edge of the bar but with a width of 42 pixels, meaning it will overdraw by two pixels. Changing the 40 to a 42 has the draw begin 42 pixels left of the right edge, with a width of 42 pixels, bringing everything in line.
     
    #19
  20. plasmatorture

    plasmatorture Warper

    Messages:
    4
    Likes Received:
    0
    First Language:
    English
    Still seems broken with Yanfly's Battle Engine even with all available fixes. Is there any solution for this?

    [​IMG]

    To be precise, any time you're in the item screen/targeting a party member it permanently creates that extra set of bars.

    The problem doesn't occur without your extra patch script, but then, of course, the bars barely function as intended.
     
    Last edited by a moderator: Sep 18, 2015
    #20

Share This Page