- Joined
- Feb 22, 2016
- Messages
- 2,788
- Reaction score
- 2,236
- First Language
- English
- Primarily Uses
- RMMV
Thanks! U seriously made my day, lol.There is a Mana Ball skill in the demo. It should work in a similar way.
Thanks! U seriously made my day, lol.There is a Mana Ball skill in the demo. It should work in a similar way.
makeScope()
& getObjectSequenceData()
functions! These are edited versions of @Pharonix's edits to LeCode's original functions. This will allow for custom/conditional scopes & sequences! I merely fixed it so it no longer throws errors, which I experienced w/ the original PHX_LeMod.js. You can use the edited plugin extension, or directly edit LeTBS.js as I have.BattleManagerTBS.makeScope = function (data, center, param) { //Edited by Frostorm
var str, min, size;
var e = param.user;
if (e)
var a = e.battler();
if (data.match(/(circle|line|square|cross)\((.+)\)/i)) {
var R1 = RegExp.$2;
if (RegExp.$2.includes(",")) {
str = RegExp.$2.split(",");
size = Math.floor(Number(eval(str[0])));
min = Math.floor(Number(eval(str[1])));
} else if (RegExp.$2.match(/(\(.*\))/i)) {
var R2 = eval(R1);
if (R2.includes(",")) {
str = R2.split(",");
size = Math.floor(Number(eval(str[0])));
min = Math.floor(Number(eval(str[1])));
} else {
size = Math.floor(Number(eval(RegExp.$2)));
}
} else {
size = Math.floor(Number(eval(RegExp.$2)));
}
}
if (data.match(/custom\((.+)\)/i)) {
var scopeData = Lecode.S_TBS.Config.Custom_Scopes[String(RegExp.$1)];
scope = this.getScopeFromRawData(scopeData, center, param);
} else if (data.match(/circle\((.+)\)/i)) {
scope = this.makeCircleScope(center, size, min, param);
} else if (data.match(/line\((.+)\)/i)) {
scope = this.makeLineScope(center, size, min, param);
} else if (data.match(/square\((.+)\)/i)) {
scope = this.makeSquareScope(center, size, min, param);
} else if (data.match(/cross\((.+)\)/i)) {
scope = this.makeCrossScope(center, size, min, param);
} else if (data.match(/path/i)) {
scope = this.makePathScope(param);
} else {
var cx = center.x;
var cy = center.y;
var aoe = eval("[" + data + "]");
for (var i = 0; i < aoe.length; i++) {
var cell = this.getCellAt(aoe[i][0], aoe[i][1]);
if (cell)
scope.push(cell);
}
}
return LeUtilities.uniqArray(scope);
};
TBSEntity.prototype.getObjectSequenceData = function (obj) { //Modified by PHX //Edited by Frostorm
var defaultSeqId = DataManager.isSkill(obj) ? Lecode.S_TBS.defaultSkillSequence : Lecode.S_TBS.defaultItemSequence;
var e = BattleManagerTBS.activeEntity();
//Check if the obj has a sequence
if (obj.TagsLetbs.sequence) {
//If it does, collect it into a variable, and check if it is a function.
//Added Regex to check if function has variables
//var regex =
objSequence = obj.TagsLetbs.sequence;
if (objSequence.includes("projectile")) {
return obj.TagsLetbs.sequence || defaultSeqId;
} else if (objSequence.includes("()") || objSequence.match(/(\(.*\))/i)) {
//console.log(objSequence);
//If it is a function, evaluate it, and return the sequence
str = eval(objSequence);
return str;
}
return obj.TagsLetbs.sequence || defaultSeqId;
} else {
//Return normal stuff. Redundant actually as we check above if obj has a sequence and we return it if it is not a function.
//But whatever
console.log("stuff fail");
return obj.TagsLetbs.sequence || defaultSeqId;
}
};
At this point we'll be lucky to get a 1.0 version of LETBSJust a quick question. Is there plans for a height factor for this plugin (i.e., a z-axis) along with a "jump" stat to allow for height movement? Thanks in advance for any response!
EDIT: Nevermind, I noticed that Lecode is not online anymore. Hope they come back.
v1.0? Lol, I'd be ecstatic just to see v0.8!At this point we'll be lucky to get a 1.0 version of LETBS
what does this mod do?*Fixed*makeScope()
&getObjectSequenceData()
functions! These are edited versions of @Pharonix's edits to LeCode's original functions. This will allow for custom/conditional scopes & sequences! I merely fixed it so it no longer throws errors, which I experienced w/ the original PHX_LeMod.js. You can use the edited plugin extension, or directly edit LeTBS.js as I have.
JavaScript:BattleManagerTBS.makeScope = function (data, center, param) { //Edited by Frostorm var str, min, size; var e = param.user; if (e) var a = e.battler(); if (data.match(/(circle|line|square|cross)\((.+)\)/i)) { var R1 = RegExp.$2; if (RegExp.$2.includes(",")) { str = RegExp.$2.split(","); size = Math.floor(Number(eval(str[0]))); min = Math.floor(Number(eval(str[1]))); } else if (RegExp.$2.match(/(\(.*\))/i)) { var R2 = eval(R1); if (R2.includes(",")) { str = R2.split(","); size = Math.floor(Number(eval(str[0]))); min = Math.floor(Number(eval(str[1]))); } else { size = Math.floor(Number(eval(RegExp.$2))); } } else { size = Math.floor(Number(eval(RegExp.$2))); } } if (data.match(/custom\((.+)\)/i)) { var scopeData = Lecode.S_TBS.Config.Custom_Scopes[String(RegExp.$1)]; scope = this.getScopeFromRawData(scopeData, center, param); } else if (data.match(/circle\((.+)\)/i)) { scope = this.makeCircleScope(center, size, min, param); } else if (data.match(/line\((.+)\)/i)) { scope = this.makeLineScope(center, size, min, param); } else if (data.match(/square\((.+)\)/i)) { scope = this.makeSquareScope(center, size, min, param); } else if (data.match(/cross\((.+)\)/i)) { scope = this.makeCrossScope(center, size, min, param); } else if (data.match(/path/i)) { scope = this.makePathScope(param); } else { var cx = center.x; var cy = center.y; var aoe = eval("[" + data + "]"); for (var i = 0; i < aoe.length; i++) { var cell = this.getCellAt(aoe[i][0], aoe[i][1]); if (cell) scope.push(cell); } } return LeUtilities.uniqArray(scope); };
JavaScript:TBSEntity.prototype.getObjectSequenceData = function (obj) { //Modified by PHX //Edited by Frostorm var defaultSeqId = DataManager.isSkill(obj) ? Lecode.S_TBS.defaultSkillSequence : Lecode.S_TBS.defaultItemSequence; var e = BattleManagerTBS.activeEntity(); //Check if the obj has a sequence if (obj.TagsLetbs.sequence) { //If it does, collect it into a variable, and check if it is a function. //Added Regex to check if function has variables //var regex = objSequence = obj.TagsLetbs.sequence; if (objSequence.includes("projectile")) { return obj.TagsLetbs.sequence || defaultSeqId; } else if (objSequence.includes("()") || objSequence.match(/(\(.*\))/i)) { //console.log(objSequence); //If it is a function, evaluate it, and return the sequence str = eval(objSequence); return str; } return obj.TagsLetbs.sequence || defaultSeqId; } else { //Return normal stuff. Redundant actually as we check above if obj has a sequence and we return it if it is not a function. //But whatever console.log("stuff fail"); return obj.TagsLetbs.sequence || defaultSeqId; } };
Are you familiar w/ the features of @Pharonix's PHX_LeMod.js? All I did was tweak his code so that it no longer throws errors under certain circumstances.what does this mod do?
v1.0? Lol, I'd be ecstatic just to see v0.8!
I mean yeah true. Would love the big monsters that take up multiple cells as well as the sprite overlay it is supposed to have.
Are you familiar w/ the features of @Pharonix's PHX_LeMod.js? All I did was tweak his code so that it no longer throws errors under certain circumstances.
These modifications allow you to utilize custom and conditional scopes/sequences. So for example, if you wanted a skill to have a range of circle(3,1) normally, but increases to circle(4,1) when skill X is learned, you can do that!
And regarding the sequences, PHX_LeMod.js was giving me errors whenever I tried anything w/ a "projectile" in it (e.g. "projectile(dagger)" or projectile(bow_arrow)"). This is now fixed.
Target rate doesn't do anything in LeTBS (it's not supposed to). Here's the page on AI, if u haven't read it already.
On another note, I've refined the edit I made to the.getObjectSequenceData()
function:
More efficient and less error-prone now. Use "JavaScript:TBSEntity.prototype.getObjectSequenceData = function (obj) { var defaultSeqId = DataManager.isSkill(obj) ? Lecode.S_TBS.defaultSkillSequence : Lecode.S_TBS.defaultItemSequence; var e = BattleManagerTBS.activeEntity(); if (obj.TagsLetbs.sequence.includes("e.")) { var customSeq = eval(obj.TagsLetbs.sequence); return customSeq; } else { return obj.TagsLetbs.sequence || defaultSeqId; } };
e.insertnamehere
" for custom sequences.
._currentAction()
? Or if there's an LeTBS equivalent? I've tried looking, to no avail... I basically need BattleManagerTBS.activeEntity()._battler.currentAction()
or BattleManagerTBS.activeEntity()._battler._actions[0]
, thx!What are you trying to accomplish? There might be another way around this if there's more infro to go on.Does anyone know if LeTBS uses._currentAction()
? Or if there's an LeTBS equivalent? I've tried looking, to no avail... I basically needBattleManagerTBS.activeEntity()._battler.currentAction()
orBattleManagerTBS.activeEntity()._battler._actions[0]
, thx!
<Custom Battle Effect>
user.addState(204);
</Custom Battle Effect>
<swordANDshield>
<Custom Passive Condition>
if (user.isStateAffected(204) && user.isStateAffected (205)) {
condition = true;
} else {
condition = false;
}
</Custom Passive Condition>
Like an ATB gauge that unlocks special abilities based on number of turns passed/ability use?I'm trying to add an Active Time / Time Progress Battle mechanic to LeTBS. I already figured out what I need to manipulate, but obviously, it's easier said than done...