DOUBLEX'S PROFILE

Just a nameless weakling who's incredibly nub at everything

Search

Filter

DoubleX RMMV Status Bars

Updates
*      v1.01a(GMT 1400 12-8-2017):                                           
 *      1. Lets you set the status bars to show the stat change processes via 
 *         showProc, procUpdateRate, procColor1 and procColor2 in SBX         
 *      2. Fixed crashes for status bars having the same minimum and maximum

Basic knowledge on using Javascript ES5 access modifiers and inheritance

I've made the following changes:
1. Changed the name of the 2nd pattern from Private Function to Composable Revealing Module.
This change leads to a better indication that the 2nd pattern's a special case of the revealing module pattern.
2. Changed the name of the 3rd pattern from Protected Class to Parasitic Inheritance, which supports multiple inheritance.
I feel very sorry for not realizing that I've just reinvented the wheel.

DoubleX RMMV Confusion Edit

author=Kyusef
Hi, this script is awesome, but unfortunally doesn't work with YEP_Taunt.js Plugin. Can you make an update version on future, please? :D

May you please specify how these 2 plugins not working with each other?

DoubleX RMMV Death Records

May you please use English instead?

[RMMV] Help: DoubleX Unison item doesn't work!

author=Kyusef
Perfect, thank you very much! ;)
I can combine it with yanfly ctb system?
It now supports Yanfly CTB although unison skills/items needing to be charged might be buggy sometimes:
You may want to check the Unison Item plugins now, as they've been updated :)

DoubleX RMMV Confusion Edit

author=emelian65
Hey again I maybe am having a problem with this Plug-In.
I have tried to use the Tag

<confusion edit: reverse, excludeSelf>

I tried with Attack Ally, Attack Any and even Attack Enemy but the reverse doesn't act at all, i tried with skills with all types of target setting but none of the where reversed, no the healing ones and not the danaging ones, Do you have any Idea as to why this is happening?

Also as no crash happened I don't know what to do exactly to show you more of it

*    # State Notetags:                                                       
 *      1. <confusion edit: reverse, excludeSelf>                             
 *         - Sets the confusion state to reverse the ally/foe identification  
 *           only instead of restricting the battler to be merely using the   
 *           1st skill in the database if reverse is true and the actions     
 *           aren't forced                                                    
 *         - Reversal will never take place for state Restriction as Attack an
 *           Enemy nor skill/item scope as The User                           
 *         - Reversal will have 50% chance to take place for state Restriction
 *           as Attack Anyone                                                 
 *         - Reversal will always take place for state Restriction as Attack  
 *           an Ally                                                          
 *         - Sets the confusion state to make the battler never targeting self
 *           if excludeSelf is true and the actions aren't forced             
 *         - Only the effective notetag with the highest priority will be used

To apply reverse, substitute reverse with true.
To apply excludeSelf, substitute excludeSelf with true.
For example:
<confusion edit: true, true> means both reverse and excludeSelf will be applied :)

[RMMV] Help: DoubleX Unison item doesn't work!

author=Kyusef
Perfect, thank you very much! ;)
I can combine it with yanfly ctb system?

Probably not, as unison item default only works with the default RMMV battle system, while unison item config won't work on its own.
Later I'll try to write something like unison item yanfly ctb :)

[RMMV] Help: DoubleX Unison item doesn't work!

author=Kyusef
Thank you for your reply. I have placed "Unison Item Default" below "Unison Item Config" (in the same plug in, right?) and i have added your code in the end of plugin, but it doesn't work: the character use the unison skill individually, and the next characters can attack as the plugin is turned off...

I've just updated both the config and default to v1.00e. Both of them should work now:

[RMMV] Help: DoubleX Unison item doesn't work!

First, please make sure you've placed Unison Item Default below Unison Item Config.
If that's the case, then please place this diagnose right below Unison Item Default and check what's logged on the console:
(function(UI) {

    var BM = UI.BattleManager;

    BM.addUnisonActors = function() {
        console.log("BM.addUnisonActors");
        var actor = this.actor(), act, item;
        if (actor) { act = actor.inputtingAction(); }
        if (act) { item = act.item(); }
        if (item) { console.log("item.meta.unisonItemActors", item.meta.unisonItemActors, "actor.actorId()", actor.actorId()); }
        if (!item || item.meta.unisonItemActors.length <= 1) { return; }
        var actorIds = item.meta.unisonItemActors.filter(function(actorId) {
            return actorId !== actor.actorId();
        });
        console.log("actorIds", actorIds, "actor.index()", actor.index(), "actor.actionInputIndex", actor.actionInputIndex);
        // Stores the action-invokee pair and reserves 1 action for each of them
        BM.unisonActors[[actor.index(), actor.actionInputIndex]] = actorIds;
        actorIds.forEach(function(actorId) {
            $gameActors.actor(actorId).unisonItemNumInputs += 1;
            console.log("actorId", actorId, "$gameActors.actor(actorId).unisonItemNumInputs", $gameActors.actor(actorId).unisonItemNumInputs);
        });
        //
    }; // BM.addUnisonActors

    // actor: The currently selected actor
    BM.eraseUnisonActors = function(actor) {
        console.log("BM.eraseUnisonActors");
        var actorIds = BM.unisonActors[[actor.index(), actor.actionInputIndex]];
        console.log("actor.actorId()", actor.actorId(), "actorIds", actorIds, "actor.index()", actor.index(), "actor.actionInputIndex", actor.actionInputIndex);
        if (!actorIds) { return; }
        // Voids the action-invokee pair and frees 1 action for each of them
        BM.unisonActors[[actor.index(), actor.actionInputIndex]] = null;
        actorIds.forEach(function(actorId) {
            $gameActors.actor(actorId).unisonItemNumInputs -= 1;
            console.log("actorId", actorId, "$gameActors.actor(actorId).unisonItemNumInputs", $gameActors.actor(actorId).unisonItemNumInputs);
        });
        //
    }; // BM.eraseUnisonActors

    BM.clearUnisonActors = function() {
        console.log("BM.clearUnisonActors");
        BM.unisonActors = {};
        // Ensures the unison action usability check will pass upon using it
        $gameParty.movableMembers().forEach(function(mem) {
            mem.unisonItemNumInputs = -1;
            console.log("mem.name()", mem.name(), "mem.unisonItemNumInputs", mem.unisonItemNumInputs);
        });
        //
    }; // BM.clearUnisonActors

    var GBB = UI.Game_BattlerBase;

    Game_BattlerBase.prototype.canInput = function() {
        console.log("Game_BattlerBase.prototype.canInput");
        // Rewritten to check if at least 1 action slot isn't reserved
        console.log("GBB.canInput.apply(this, arguments)", GBB.canInput.apply(this, arguments));
        if (!GBB.canInput.apply(this, arguments)) { return false; }
        if (this.isActor() && $gameParty.inBattle()) {
            console.log("this._unisonItemNumInputs", this._unisonItemNumInputs, "this._actions.length", this._actions.length);
            return this._unisonItemNumInputs < this._actions.length;
        }
        return true;
        //
    }; // Game_BattlerBase.prototype.canInput

    Game_BattlerBase.prototype.canUse = function(item) {
        console.log("Game_BattlerBase.prototype.canUse");
        // Rewritten to check if all unison actors can use the unison skill/item
        console.log("item.meta.unisonItemActors", item.meta.unisonItemActors, "this.actorId()", this.actorId());
        if (!this.isActor() || item.meta.unisonItemActors.length <= 0) {
            return GBB.canUse.apply(this, arguments);
        } else if (item.meta.unisonItemActors.indexOf(this.actorId()) < 0) {
            return false;
        }
        console.log("GBB.canUse.apply(this, arguments)", GBB.canUse.apply(this, arguments));
        if (!GBB.canUse.apply(this, arguments)) { return false; }
        if (DataManager.isSkill(item)) { return GBB.canUseUnisonSkill(item); }
        return DataManager.isItem(item) && GBB.canUseUnisonItem(item);
        //
    }; // Game_BattlerBase.prototype.canUse

    GBB.canUseUnisonSkill = function(skill) {
        console.log("GBB.canUseUnisonSkill");
        var inBattle = $gameParty.inBattle();
        var actor, actorIds = skill.meta.unisonItemActors;
        // Checks if all needed actors can use the skill and have empty actions
        for (var index = 0, length = actorIds.length; index < length; index++) {
            if (actorIds[index] === this.actorId()) { continue; }
            actor = $gameParty.members().filter(function(mem) {
                return mem.actorId() === actorIds[index];
            })[0];
            if (!actor || inBattle && !actor.canInput()) { return false; }
            console.log("actor.meetsSkillConditions(skill)", actor.meetsSkillConditions(skill));
            if (!actor.meetsSkillConditions(skill)) { return false; }
            if (actor.skills().every(function(s) { return s !== skill; })) {
                console.log("actor.skills().every(function(s) { return s !== skill; })");
                return false;
            }
        }
        //
        return true;
    }; // GBB.canUseUnisonSkill

})(DoubleX_RMMV.Unison_Item);

DoubleX RMMV Equip Prerequisites

Updates
v1.01g(GMT 0100 18-1-2016):
1. <stat req: stat, operator, val> only support battler getters
2. Fixed Number is not a function bug