- Joined
- Feb 22, 2016
- Messages
- 1,626
- Reaction score
- 1,195
- First Language
- English
- Primarily Uses
- RMMV
Ok, I've been plagued w/ compatibility issues due to LTBS, so 
This is what I found in YEP_BuffsStatesCore.js:
What could be the reason for LTBS not acknowledging this block of code? I've already played w/ plugin order to no avail. That doesn't seem to be the issue anyway since all other functions of BuffStatesCore work fine. If I can't get LTBS to use Yanfly's origin stuff, I need an alternative to get the same functionality, whether it's by v[ ] or other means. Please let me know if you guys have any ideas, thx!
origin and stateOrigin(), which is from Yanfly's plugins, don't work for me. So I'm looking for an alternative to get the same functionality but w/o using origin. Is this possible? I really need this functionality, or else DoTs don't work, nor would utility scaling of any kind...This is what I found in YEP_BuffsStatesCore.js:
JavaScript:
Game_BattlerBase.prototype.stateOrigin = function(stateId) {
if (this._stateOrigin === undefined) this._stateOrigin = {};
if (!this._stateOrigin[stateId]) return this;
var arr = this._stateOrigin[stateId];
if (arr[0] === 0) return $gameActors.actor(arr[1]);
if (arr[0] === 1) return $gameTroop.members()[arr[1]];
return this;
};
Game_BattlerBase.prototype.setStateOrigin = function(stateId, battler) {
if (this._stateOrigin === undefined) this._stateOrigin = {};
if (!$gameParty.inBattle()) return;
if (!battler) {
var battler = BattleManager._subject;
if (!battler) return;
}
if (battler.isActor()) {
var arr = [0, battler._actorId];
} else {
var arr = [1, battler.index()];
}
this._stateOrigin[stateId] = arr;
};
Game_BattlerBase.prototype.clearStateOrigin = function(stateId) {
if (this._stateOrigin === undefined) this._stateOrigin = {};
this._stateOrigin[stateId] = undefined;
};
Game_BattlerBase.prototype.clearEnemyStateOrigins = function() {
var length = $dataStates.length;
for (var i = 0; i < length; ++i) {
if (this._stateOrigin === undefined) this._stateOrigin = {};
if (this._stateOrigin[i] === undefined) continue;
var data = this._stateOrigin[i];
if (data[0] === 1) this.clearStateOrigin(i);
}
};
Last edited:
