Job Points in the correct place

● ARCHIVED · READ-ONLY
Started by Tatsumaro 6 posts View original ↗
  1. this should be easy to anyone whit coding skills. sadly that is not my case. my game mechanics uses Job Points from yanfly and Equipment Learning from Moogle_X, its all working and i'm rely pleased whit the outcome off this :thumbsup-left:.

    But not all are roses, when a batel end the players must endure YEP_VictoryAftermath exp | Ap Gain After Battle | JP window | YEP_VictoryAftermath drops. What i need is:

    Window_VictoryJp
    //=============================================================================
    // Window_VictoryJp
    //=============================================================================

    if (Imported.YEP_VictoryAftermath && Yanfly.Param.JpEnableAftermath) {

    function Window_VictoryJp() {
    this.initialize.apply(this, arguments);
    }

    Window_VictoryJp.prototype = Object.create(Window_VictoryExp.prototype);
    Window_VictoryJp.prototype.constructor = Window_VictoryJp;

    Window_VictoryJp.prototype.drawActorGauge = function(actor, index) {
    this.clearGaugeRect(index);
    var rect = this.gaugeRect(index);
    this.changeTextColor(this.normalColor());
    this.drawActorName(actor, rect.x + 2, rect.y);
    this.drawLevel(actor, rect);
    this.drawJpGained(actor, rect);
    };

    Window_VictoryJp.prototype.drawJpGained = function(actor, rect) {
    var wy = rect.y + this.lineHeight() * 1;
    this.changeTextColor(this.systemColor());
    this.drawText(Yanfly.Param.JpAftermathEarn, rect.x + 2, wy, rect.width - 4,
    'left');
    var bonusJp = 1.0 * actor.battleJp() * this._tick /
    Yanfly.Param.VAGaugeTicks;
    var value = Yanfly.Util.toGroup(parseInt(bonusJp));
    var fmt = Yanfly.Param.JpAftermathFmt;
    var icon = '\\i[' + Yanfly.Icon.Jp + ']';
    var JpText = fmt.format(value, Yanfly.Param.Jp, icon);
    this.changeTextColor(this.normalColor());
    wx = rect.x + rect.width - this.textWidthEx(JpText);
    this.drawTextEx(JpText, wx, wy);
    };

    in the Equipment Learning so in only one window the player can see Jp and Ap.
    The code shod be placed in this part, i think:

    EqlVictoryAp
    //=============================================================================
    // Window_EqlVictoryAp
    //=============================================================================

    if (Imported.YEP_VictoryAftermath && Moogle_X.EQL.useAft) {

    function Window_EqlVictoryAp() {
    this.initialize.apply(this, arguments);
    }

    Window_EqlVictoryAp.prototype = Object.create(Window_VictoryExp.prototype);
    Window_EqlVictoryAp.prototype.constructor = Window_EqlVictoryAp;

    Window_EqlVictoryAp.prototype.drawActorGauge = function(actor, index) {
    this.clearGaugeRect(index);
    var rect = this.gaugeRect(index);
    this.changeTextColor(this.normalColor());
    this.drawActorName(actor, rect.x + 2, rect.y);
    this.drawLevel(actor, rect);
    this.drawApGained(actor, rect);
    this.drawGainedSkills(actor, rect);
    };

    Window_EqlVictoryAp.prototype.drawApGained = function(actor, rect) {
    var wy = rect.y + this.lineHeight() * 1;
    this.changeTextColor(this.systemColor());
    this.drawText(Moogle_X.EQL.aftApGainText, rect.x + 2, wy, rect.width - 4,
    'left');
    var bonusAp = 1.0 * actor.eqlBattleAp() * this._tick /
    Yanfly.Param.VAGaugeTicks;
    var value = Yanfly.Util.toGroup(parseInt(bonusAp));
    var fmt = Moogle_X.EQL.aftApFmt;
    var apText = fmt.format(value, Moogle_X.EQL.apVocab);
    this.changeTextColor(this.normalColor());
    wx = rect.x + rect.width - this.textWidthEx(apText);
    this.drawTextEx(apText, wx, wy);
    };

    Any suggestions? SumRndmDde as a tone off this things on is plugins but i just don't have the knowledge to copy is process and apply it to this situation.
  2. 1eb2osV.jpg
    Equipment Learning
    +

    88QjYkg.jpg
    Job Points
    =

    cgQacYo.jpg

    PERFECT :mrsatan:
  3. You need to do 3 things:

    1. Turn off "Enable Aftermath" parameter from YEP_JobPoints. Yanfly specifically state to type "false" which actually doesn't actually turning off the parameter (bug). You need to type empty string instead (don't type anything) in order to prevent the JP Aftermath window to show up after battle.

    2. Add new line of code below "this.drawApGained(actor, rect);" (line 1381)
    You need to put "this.drawJpGained(actor, rect);" code below it. The end result is like this.
    Spoiler
    fPa9E37.png

    3. You need add this new function. Copy paste this new code directly at line 1385 (refer to picture above).

    New Code
    Window_EqlVictoryAp.prototype.drawJpGained = function(actor, rect) {
    var wy = rect.y + this.lineHeight() * 2;
    this.changeTextColor(this.systemColor());
    this.drawText(Yanfly.Param.JpAftermathEarn, rect.x + 2, wy, rect.width - 4,
    'left');
    var bonusJp = 1.0 * actor.battleJp() * this._tick /
    Yanfly.Param.VAGaugeTicks;
    var value = Yanfly.Util.toGroup(parseInt(bonusJp));
    var fmt = Yanfly.Param.JpAftermathFmt;
    var icon = '\\i[' + Yanfly.Icon.Jp + ']';
    var JpText = fmt.format(value, Yanfly.Param.Jp, icon);
    this.changeTextColor(this.normalColor());
    wx = rect.x + rect.width - this.textWidthEx(JpText);
    this.drawTextEx(JpText, wx, wy);
    };

    Spoiler
    NWOnoNn.png

    This will be the final scene. Enjoy! ;)

    Spoiler
    yeJv4hT.png
  4. OMG thank you, for this and for this amazing plugin. Mate you :rock-left:rock:rock-right:

    PS: Moogle_X himself, i never imagine this outcome. THANKS
  5. Sorry, wrong topic. If you are a moderator, please delete this comment.