YEP Battle Status Window Extension

● ARCHIVED · READ-ONLY
Started by DreamX 218 posts Page 1 of 11 View original ↗
  1. This is an extension plugin for YEP Battle Status Window by Yanfly.


    This plugin adds several parameters to customize the battle hud.


    I'm also very open to adding more options based on feedback.


    This plugin is used best when you know some javascript, so try asking here or in the help sections for javascript to learn more if you need to.


    Example I did using the parameters and some javascript:


    Untitled.png


    * ============================================================================
    * Actor Notetags
    * ============================================================================
    * <HideBattleStatusHp> will hide the hp gauge from the battle status window
    * for the actor.
    *
    * <HideBattleStatusMp> will hide the mp gauge from the battle status window
    * for the actor.
    *
    * <HideBattleStatusTp> will hide the tp gauge from the battle status window
    * for the actor.
    *
    * <HideBattleStatusAtb> will hide the tp gauge from the battle status window
    * for the actor.
    *
    * <BattlerPicture: x> will use x as the actor's picture. See parameters.
    * ============================================================================
    * Tips
    * ============================================================================
    * Other Yanfly plugins like Core Engine, Buffs State Core and of course
    * Battle Status will change how the battle hud looks like. Also look at those
    * parameters to customize your hud.
    *
    * The rect variable refers to the entire rectangle. It's best to use this
    * instead of basicAreaRect, gaugeRect etc if you want to change positioning.
    * ============================================================================
    * DreamX Setup Suggestion Parameter Info
    * ============================================================================
    * This parameter sets up the hud similar to my example screenshot.
    * It overrides parameters for these things:
    *
    * Face X, Width, Height
    * Gauge/Name X, Width
    *
    * Name Y
    * HP Gauge Y
    * MP Gauge Y
    *
    * Icons X, Y
    *
    * Name Alignment
    *
    * Adjust Columns set to true in YEP Battle Status Window
    *
    * Therefore, you can still use the other parameters to your liking to
    * customize further.
    *
    * You can also of course individually use the functions provided by this
    * plugin.
    * ============================================================================
    * Terms Of Use
    * ============================================================================
    * Free to use and modify for commercial and noncommercial games, with credit.
    * ============================================================================
    * Credits
    * ============================================================================
    * DreamX
    * Yanfly for YEP Battle Status Window


    Script
  2. Very nice, I always enjoy a plugin that gives some customizing features.


    Is there any way of adding that LP stat as a variable from you Permadeath plugin, say instead of the TP or something?
  3. Aidensmercy said:
    Very nice, I always enjoy a plugin that gives some customizing features.


    Is there any way of adding that LP stat as a variable from you Permadeath plugin, say instead of the TP or something?

    Will it be a gauge or just text?
  4. DreamX said:
    Will it be a gauge or just text?

    For me, I would like just the text.
  5. Aidensmercy said:
    For me, I would like just the text.



    Make a plugin, paste this code in and adjust it if you want, then turn the plugin on.


    alias_Window_BattleStatus_drawItem = Window_BattleStatus.prototype.drawItem;
    Window_BattleStatus.prototype.drawItem = function (index) {
    alias_Window_BattleStatus_drawItem.call(this, index);
    var actor = $gameParty.battleMembers()[index];
    var variableId = actor.actor().meta.NoPermadeathVariable;

    if (!variableId) {
    return;
    }

    var rect = this.itemRect(index);

    variableId = parseInt(variableId.trim());

    // adjust the text as you wish
    var text = "LP: " + $gameVariables.value(variableId);

    // adjust the x position by changing 0 to something else
    var x = rect.x + 0;

    // adjust the y position by changing 0 to something else
    var y = rect.y + 0;

    this.drawTextEx(text, x, y);
    };


    This will draw the lifepoints of the actor. The way it is in this example it is drawn on the upper left, but you can adjust it.
  6. thank you very much, it works perfectly!
  7. I really like how you set up your HUD. What settings would I have to change to emulate that?


    Thanks so much!
  8. This is nice! How can i remove the MP bar and place there only a circle bar with a counter inside showing the current amount of MP? Or just the counter without the circle bar, or something like the picture

    cross-edge-20090529080141892-000.jpg
  9. RogdagoR said:
    This is nice! How can i remove the MP bar and place there only a circle bar with a counter inside showing the current amount of MP? Or just the counter without the circle bar, or something like the picture


    View attachment 43273

    You can remove the mp bar by turning the Draw MP Gauge parameter off.


    I haven't seen a circle gauge in MV before.


    Here's how to draw the actor's current mp. Adjust x and y values as you want.


    alias_Window_BattleStatus_drawItem = Window_BattleStatus.prototype.drawItem;
    Window_BattleStatus.prototype.drawItem = function (index) {
    alias_Window_BattleStatus_drawItem.call(this, index);
    var actor = $gameParty.battleMembers()[index];

    var rect = this.itemRect(index);

    // adjust the text as you wish
    var text = "" + actor.mp;

    // adjust the x position by changing 0 to something else
    var x = rect.x + 0;

    // adjust the y position by changing 0 to something else
    var y = rect.y + 0;

    this.drawTextEx(text, x, y);
    };



    MrPurpleDreadlocks said:
    I really like how you set up your HUD. What settings would I have to change to emulate that?


    Thanks so much!



    I used these functions and put into a plugin:


    Window_BattleStatus.prototype.DXIconX = function (actor, rect) {
    if (actor.actor().meta.IsPlayer) {
    return rect.x + this.textPadding();
    }

    var availableSpace = this.DXRectFreeSpace(rect);

    var x2 = rect.x + rect.width;
    if (availableSpace < actor.allIcons().length * Window_Base._iconWidth) {
    return x2 - (actor.allIcons().length * Window_Base._iconWidth) - this.textPadding();
    } else {
    return rect.x + Window_Base._faceWidth;
    }
    };

    Window_BattleStatus.prototype.DXIconW = function (actor, rect) {
    if (actor.actor().meta.IsPlayer) {
    return rect.width - (this.textPadding() * 2);
    }

    var x2 = rect.x + rect.width;

    if (this.DXRectFreeSpace(rect) + Window_Base._iconWidth
    < actor.allIcons() * Window_Base._iconWidth) {
    return x2 - (x2 - (actor.allIcons() * Window_Base._iconWidth));
    } else {
    return this.DXRectFreeSpace(rect) + Window_Base._iconWidth;
    }
    };

    Window_BattleStatus.prototype.DXThreshold = function () {
    return 64;
    };

    Window_BattleStatus.prototype.DXGaugeNameX = function (actor, rect) {
    if (actor.actor().meta.IsPlayer) {
    return rect.x + this.textPadding();
    }

    var availableSpace = this.DXRectFreeSpace(rect);

    if (availableSpace > this.DXThreshold()) {
    return rect.x + rect.width - (this.DXRectFreeSpace(rect));
    } else {
    return rect.x + rect.width - (this.DXRectFreeSpace(rect)
    + Window_Base._iconWidth);
    }
    };

    Window_BattleStatus.prototype.DXGaugeNameWidth = function (actor, rect) {
    if (actor.actor().meta.IsPlayer) {
    return rect.width - (this.textPadding() * 2);
    }

    var availableSpace = this.DXRectFreeSpace(rect);

    if (availableSpace > this.DXThreshold()) {
    return this.DXRectFreeSpace(rect) - this.textPadding();
    } else {
    return (this.DXRectFreeSpace(rect) - this.textPadding())
    + Window_Base._iconWidth;
    }
    };


    Window_BattleStatus.prototype.DXRectFreeSpace = function (rect) {
    return rect.width - Window_Base._faceWidth;
    };




    For gauge/name x parameters:


    this.DXGaugeNameX(actor, rect)


    For gauge/name width parameters:


    this.DXGaugeNameWidth(actor, rect)


    For Hp Gauge Y:


    rect.y + this.lineHeight()


    For Mp Gauge Y:


    rect.y + this.lineHeight() * 2




    For name y:


    rect.y




    For icons x:


    this.DXIconX(actor, rect)


    For icons y:


    rect.y + rect.height - Window_Base._iconHeight - this.textPadding()


    In the screenshot I had also had adjust columns in YEP Battle Status Window turned on and I edited the gauge height/font size in YEP Core Engine.


    I didn't use TP so for that you'll have to decide what you put in. It's a good idea to learn a little programming to get things exactly the way you want.
  10. DreamX said:
    You can remove the mp bar by turning the Draw MP Gauge parameter off.


    I haven't seen a circle gauge in MV before.


    Here's how to draw the actor's current mp. Adjust x and y values as you want.



    alias_Window_BattleStatus_drawItem = Window_BattleStatus.prototype.drawItem;
    Window_BattleStatus.prototype.drawItem = function (index) {
    alias_Window_BattleStatus_drawItem.call(this, index);
    var actor = $gameParty.battleMembers()[index];

    var rect = this.itemRect(index);

    // adjust the text as you wish
    var text = "" + actor.mp;

    // adjust the x position by changing 0 to something else
    var x = rect.x + 0;

    // adjust the y position by changing 0 to something else
    var y = rect.y + 0;

    this.drawTextEx(text, x, y);
    };






    I used these functions and put into a plugin:



    Window_BattleStatus.prototype.DXIconX = function (actor, rect) {
    if (actor.actor().meta.IsPlayer) {
    return rect.x + this.textPadding();
    }

    var availableSpace = this.DXRectFreeSpace(rect);

    var x2 = rect.x + rect.width;
    if (availableSpace < actor.allIcons().length * Window_Base._iconWidth) {
    return x2 - (actor.allIcons().length * Window_Base._iconWidth) - this.textPadding();
    } else {
    return rect.x + Window_Base._faceWidth;
    }
    };

    Window_BattleStatus.prototype.DXIconW = function (actor, rect) {
    if (actor.actor().meta.IsPlayer) {
    return rect.width - (this.textPadding() * 2);
    }

    var x2 = rect.x + rect.width;

    if (this.DXRectFreeSpace(rect) + Window_Base._iconWidth
    < actor.allIcons() * Window_Base._iconWidth) {
    return x2 - (x2 - (actor.allIcons() * Window_Base._iconWidth));
    } else {
    return this.DXRectFreeSpace(rect) + Window_Base._iconWidth;
    }
    };

    Window_BattleStatus.prototype.DXThreshold = function () {
    return 64;
    };

    Window_BattleStatus.prototype.DXGaugeNameX = function (actor, rect) {
    if (actor.actor().meta.IsPlayer) {
    return rect.x + this.textPadding();
    }

    var availableSpace = this.DXRectFreeSpace(rect);

    if (availableSpace > this.DXThreshold()) {
    return rect.x + rect.width - (this.DXRectFreeSpace(rect));
    } else {
    return rect.x + rect.width - (this.DXRectFreeSpace(rect)
    + Window_Base._iconWidth);
    }
    };

    Window_BattleStatus.prototype.DXGaugeNameWidth = function (actor, rect) {
    if (actor.actor().meta.IsPlayer) {
    return rect.width - (this.textPadding() * 2);
    }

    var availableSpace = this.DXRectFreeSpace(rect);

    if (availableSpace > this.DXThreshold()) {
    return this.DXRectFreeSpace(rect) - this.textPadding();
    } else {
    return (this.DXRectFreeSpace(rect) - this.textPadding())
    + Window_Base._iconWidth;
    }
    };


    Window_BattleStatus.prototype.DXRectFreeSpace = function (rect) {
    return rect.width - Window_Base._faceWidth;
    };




    For gauge/name x parameters:



    this.DXGaugeNameX(actor, rect)


    For gauge/name width parameters:



    this.DXGaugeNameWidth(actor, rect)


    For Hp Gauge Y:



    rect.y + this.lineHeight()


    For Mp Gauge Y:



    rect.y + this.lineHeight() * 2




    For name y:



    rect.y




    For icons x:



    this.DXIconX(actor, rect)


    For icons y:



    rect.y + rect.height - Window_Base._iconHeight - this.textPadding()


    In the screenshot I had also had adjust columns in YEP Battle Status Window turned on and I edited the gauge height/font size in YEP Core Engine.


    I didn't use TP so for that you'll have to decide what you put in. It's a good idea to learn a little programming to get things exactly the way you want.



    Oh I know a bit of Javascript. I've coded and translated a lot of scripts from Ruby to Javascript. (All on my own mind you) Just didn't know where to start!


    Thanks. :D
  11. Not sure if you're still taking suggestions, but... The Battle Animations.


    Displaying them OVER the Battle Hud would be ideal for Frontview Battle Systems. By default, Yanfly has the priority of the battle animations lower than the Battle Status Window, so they're displayed behind it.
  12. thechancellor said:
    Not sure if you're still taking suggestions, but... The Battle Animations.


    Displaying them OVER the Battle Hud would be ideal for Frontview Battle Systems. By default, Yanfly has the priority of the battle animations lower than the Battle Status Window, so they're displayed behind it.

    1.1:


    Added parameter to get frontview animations displayed over battle status window


    Added parameter to help get hud looking like my example screenshot
    Added parameter to decide whether face image gets drawn for actor
    Fixed default parameter for MP Gauge Width
  13. Was NOT expecting an answer that fast. That's great work! Going to test it later on today. Thank you!
  14. Looks really nice :D  


    By the way, do you mind giving me a start on how to reposition the window and make it vertically?


    If it's not present, I would like to make it as a request then :p  


    Thank you for this plugin by the way!
  15. 1.2


    Now requires Yanfly's Battle Engine Core
    Added Battle Status Window X, Y, Width, Height parameters
    Added Actor Command X, Y, Width, Height parameters
    "Frontview Animations On Top" parameter now displays damage popup above window as well
    Added parameter for animations/popups displaying near the center of the actor's face image
    in frontview
    Added compatibility with Yanfly's Visual HP Gauge


    Edit: Note: The damage popup x value for centering doesn't account for the text length without Victor Sant's Damage Popups plugin, which I really recommend. I wrote an extension for it to get it to work with Battle Engine Core here.

    Lnik3500 said:
    Looks really nice :D  


    By the way, do you mind giving me a start on how to reposition the window and make it vertically?


    If it's not present, I would like to make it as a request then :p  


    Thank you for this plugin by the way!

    It's possible now with the parameters I added. That said, it's probably better if you give me a mock-up or example of what you want it to look like and I can help you out from there.
  16. Wow! as you requested, i did some screenshots of my previous system and I thought I would like to reproduce it using this marvelous plugin :p  


    How the party command looked:

    Spoiler
    ml6nif.jpg



    How the actor command looked:

    Spoiler
    2w2lcty.jpg





    The actor command window would change position to align with the corresponding actor:

    Spoiler
    35hgx8w.jpg





    This was done using Mog_BattleHud, but I wanted to switch to yours since it's more friendly with other plugins (mainly VE_DamagePopup)


    So I request other things, but sure is optional since it derives from your plugin's goal:


    - Align Actor Command with Actor's faces (Optional)


    - Customize Party Command Width, Height, X and Y position


    - (Very optional) Customize other windows Width, Height, X and Y position (including Help Window, Skill Window, Target Window, Item Window, etc)


    Other than that, since you did a very good effort just for satisfying my request, I will customize my windows myself using your plugin. After all, it's my turn to work on it a little bit :p  


    Customizing other windows would be nice, but please do it only if you feel it will help others or if you want to do it anyway.


    With this, thank you for your plugin and sorry for my english :D
  17. I like the extra customization given by this extension, but it seems like there is a lot of wasted space in between the actor's name, and the HP/MP bars, at least in my usage case because I don't use TP or ATB. The empty space could be filled by more state icons, but for some reason, they only ever show one single row of them. Is it possible to use this to show more than one row of state icons?


    I don't have a widescreen resolution, so I can only get a maximum of four icons to show onscreen using this setup, without using the battle status plugin I was able to show six icons by decreasing the gauge and name areas.

    battlestatus.PNG
  18. ramza said:
    I like the extra customization given by this extension, but it seems like there is a lot of wasted space in between the actor's name, and the HP/MP bars, at least in my usage case because I don't use TP or ATB.

    All of this is customizable. How much space is left can be configured by changing the x, y, width and height values of the parameters. By default without changing any parameters, the battle status window should look exactly how it would if you only used Yanfly's plugin without this extension.

    ramza said:
    The empty space could be filled by more state icons, but for some reason, they only ever show one single row of them. Is it possible to use this to show more than one row of state icons?


    I don't have a widescreen resolution, so I can only get a maximum of four icons to show onscreen using this setup, without using the battle status plugin I was able to show six icons by decreasing the gauge and name areas.


    View attachment 44262

    The default without any plugins is to also show only one row.


    But showing more than one row is a good idea so I made a new parameter for icons height. If it is an integer multiple higher than 1 of the icon height, then more than one row will be shown. For example, with the default icon height, if you wanted to show 2 rows, you'd use 64. For 3 rows, 96, etc. I've made sure it's compatible with Yanfly's turn/counters/buff rate text on the icon from their Buff States Core plugin.


    Untitled.png

    Lnik3500 said:
    Wow! as you requested, i did some screenshots of my previous system and I thought I would like to reproduce it using this marvelous plugin :p  


    How the party command looked:

    Spoiler



    How the actor command looked:

    Spoiler





    The actor command window would change position to align with the corresponding actor:

    Spoiler





    This was done using Mog_BattleHud, but I wanted to switch to yours since it's more friendly with other plugins (mainly VE_DamagePopup)


    So I request other things, but sure is optional since it derives from your plugin's goal:


    - Align Actor Command with Actor's faces (Optional)


    - Customize Party Command Width, Height, X and Y position


    - (Very optional) Customize other windows Width, Height, X and Y position (including Help Window, Skill Window, Target Window, Item Window, etc)


    Other than that, since you did a very good effort just for satisfying my request, I will customize my windows myself using your plugin. After all, it's my turn to work on it a little bit :p  


    Customizing other windows would be nice, but please do it only if you feel it will help others or if you want to do it anyway.


    With this, thank you for your plugin and sorry for my english :D

    Good idea! i'll try to implement what I can in future versions.