RPG Maker Forums

So currently, I am using a plug-in known as NeMV State Resources (which, by the way, is licensed under http://www.wtfpl.net/ so modifying it is fine on the legal side... just thought I'd mention that) for my game in order to create extra skill resources. While the plug-in works mostly fine, I have encountered one problematic issue in that if you place a cost on a skill which calls for multiple State Resources, any beyond the first will be pushed onto the next adjoining skill. To demonstrate, here's a screenshot.

1592486893423.png


As you can see I've added a skill which costs both a "Body Action" resource and a "Mind Action" resource. The problem is that, instead of following YEP Skill Core's multi-cost padding rules, the secondary State Resource cost for this skill has been pushed way across the screen. I've tested it and any additional normal skill costs (MP or TP for example) properly follow the padding rule and fit onto the skill block just fine.

This is the block of code which draws skill costs (found it thanks to the comments on the code, I'm not proficient in Javascript myself unfortunately, I do know a little HTML but that's it xD):
Code:
// SKILL COST DRAWING ---------------------------------------------------------

NeMV.SR.Window_SkillList_drawSkillCost = Window_SkillList.prototype.drawSkillCost;
Window_SkillList.prototype.drawSkillCost = function(skill, wx, wy, width) {
    var dw = NeMV.SR.Window_SkillList_drawSkillCost.call(this, skill, wx, wy, width);
    dw = this.drawSRCost(skill, wx, wy, dw);
    return dw;
};

Window_SkillList.prototype.drawSRCost = function(skill, wx, wy, dw) {
    for (var sr = 0; sr < this._actor.stateResources.length; sr++) {
        var srid = this._actor.stateResources[sr][0];
        var sricon = $dataStates[srid].iconIndex;
        var srtext = this._actor.stateResources[sr][3];
        if (this._actor.skillSRCost(skill, srid) > 0) {
            if (sricon > 0) {
              var iw = wx + dw - Window_Base._iconWidth;
              this.drawIcon(sricon, iw, wy + 2);
              dw -= Window_Base._iconWidth + 2;
            }
            var fmt = Yanfly.Param.SCCHpFormat;
            var text = fmt.format(Yanfly.Util.toGroup(this._actor.skillSRCost(skill, srid)), srtext);
            this.contents.fontSize = Yanfly.Param.SCCHpFontSize;
            this.drawText(text, wx, wy, dw, 'right');
            var returnWidth = dw - this.textWidth(text) - Yanfly.Param.SCCCostPadding;
            this.resetFontSettings();
            dw += returnWidth;
        }
    }
    return dw;
};

For the time being I've just straight deleted this code block to avoid having this plug-in draw the skill costs entirely, instead moving to keeping the action costs in the skill's description. The problem is that I don't just use this system for Action Points, but also other casting resources which would be useful to have expressed within the skill menu. So while this is not an absolutely essential request and I wouldn't have anyone prioritize this above anyone else's more important request, if anyone could help me out and rewrite this code block so skill costs are displayed properly, I'd appreciate it a TON. Thank you!

PS: Forgot to include a link to the original plug-in, my bad, here you go - http://stitchgaming.com/2016/04/nemv-state-resources/

Latest Threads

Latest Posts

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,033
Messages
1,018,441
Members
137,820
Latest member
georg09byron
Top