It's a repost since some people may not know about it. That's why I attached it.
Lecode Tactical Battle System 0.77.2B
JS Plugin Releases (RMMV)@Frostorm You still crashing out LeTBS with supertools?
I just got it working by exempting all of the leTBS windows like so:
You can just copypaste this in to the text version of that param if you don't want to hunt down all the window names.
and when I hit an error checked out the console and started tracking down errors.
For whatever I had to bypass an error check in YEP_EnhancedTP as well:
I've got supertools running, used the menu editor to edit non-LeTBS menus like yanfly item core, and LeTBS runs fine, including the debug menus to give items in the middle of battle and stuff.
I just got it working by exempting all of the leTBS windows like so:
You can just copypaste this in to the text version of that param if you don't want to hunt down all the window names.
Code:
["Window_BattleLog","Window_MapName","Window_TBSPositioning","Window_TBSConfirm","Window_TBSStatus","Window_TBSCommand","Window_TBSSkillList","Window_TBSItemList","Window_TBSEndCommand","Window_TBSAutoMode","Window_TBSEntityHud","Window_TBSScan","Window_TBSSkillBubble","Window_TBSEntityTurn","Window_TBSWinConditions","Window_TBSPositioningConfirm",""]
and when I hit an error checked out the console and started tracking down errors.
For whatever I had to bypass an error check in YEP_EnhancedTP as well:
JavaScript:
//=============================================================================
// Utilities
//=============================================================================
Yanfly.Util = Yanfly.Util || {};
if (!Yanfly.Util.toGroup) {
Yanfly.Util.toGroup = function(inVal) {
return inVal;
}
};
Yanfly.Util.getRange = function(n, m) {
var result = [];
for (var i = n; i <= m; ++i) result.push(i);
return result;
};
Yanfly.Util.onlyUnique = function(value, index, self) {
return self.indexOf(value) === index;
};
Yanfly.Util.displayError = function(e, code, message) {
console.log(message);
console.log(code || 'NON-EXISTENT');
console.error(e);
if (Utils.RPGMAKER_VERSION && Utils.RPGMAKER_VERSION >= "1.6.0") return;
if (Utils.isNwjs() && Utils.isOptionValid('test')) {
/* if (!require('nw.gui').Window.get().isDevToolsOpen()) {
require('nw.gui').Window.get().showDevTools();
} */
}
};
I've got supertools running, used the menu editor to edit non-LeTBS menus like yanfly item core, and LeTBS runs fine, including the debug menus to give items in the middle of battle and stuff.
Nope, I fixed it a long time ago. Didn't even have to make any edits. Works perfectly.
Alright awesome. Here's a puzzler for ya.
Trying to set up enemy battler sprites, right. My rat has a functioning idle sprite set and the following note tags:
Status and turn order sprites are generated properly at the beginning of the battle, but as soon as I get to the end of the first turn (As in full combat turn, after all battlers have moved) I crash out with the following on the error stack:
The line in question in LeTBS_RTPUse seems like it shouldn't have a problem assembling the sprite (indeed it did it at the start of battle):
This error seems to be telling me that fbitmap was never defined, which i don't get as the unit is obviously using its proper idle sprite all over the place before it calls this on the turn changes.
you you using LeTBS_RTPUse, and if so, does this TBSTurnOrderVisual function match yours?
Trying to set up enemy battler sprites, right. My rat has a functioning idle sprite set and the following note tags:
Code:
<letbs_sprite>
pose(idle): _idle, 4
turn_order: auto
status_sprite: auto
</letbs_sprite>
Status and turn order sprites are generated properly at the beginning of the battle, but as soon as I get to the end of the first turn (As in full combat turn, after all battlers have moved) I crash out with the following on the error stack:
Code:
TypeError: Cannot read property 'width' of undefined
at TBSTurnOrderVisual.getSpriteBitmap (LeTBS_RTPUse.js:194)
at TBSTurnOrderVisual.makeSprites (LeTBSTurnOrderA.js:241)
at TBSTurnOrderVisual.refresh (LeTBSTurnOrderA.js:204)
at TBSTurnOrderVisual.set (LeTBSTurnOrderA.js:169)
at Function.BattleManagerTBS.determineTurnOrderFair (LeTBS.js:2984)
at Function.BattleManagerTBS.determineTurnOrder (LeTBS.js:2931)
at Game_Interpreter.interpretLeTBS_AddEntity (LeTBS.js:11673)
at Game_Interpreter.pluginCommand (LeTBS.js:11185)
at Game_Interpreter.pluginCommand (LeTBS_WinConditions.js:102)
at Game_Interpreter.pluginCommand (YEP_EventMiniLabel.js:223)
The line in question in LeTBS_RTPUse seems like it shouldn't have a problem assembling the sprite (indeed it did it at the start of battle):
JavaScript:
/*-------------------------------------------------------------------------
* TBSTurnOrderVisual
-------------------------------------------------------------------------*/
Lecode.S_TBS.RTPUse.oldTBSTurnOrderVisual_getSpriteBitmap = TBSTurnOrderVisual.prototype.getSpriteBitmap;
TBSTurnOrderVisual.prototype.getSpriteBitmap = function (entity) {
var battler = entity._battler;
var object = battler.rpgObject().TagsLetbsSprite.turnOrder;
if (object && object.match(/auto/i)) {
var sprite = entity._sprite;
var fbitmap = sprite._bitmaps["idle"];
var bitmap = new Bitmap(40, 40);
var pw = fbitmap.width / (sprite._maxFrame["idle"] + 1); //<------ This one is the crash
var ph = fbitmap.height / 4;
var y = ph <= 40 ? 0 : 6;
bitmap.blt(fbitmap, pw / 2 - 20, y, 40, 40, 0, 0);
return bitmap;
}
return Lecode.S_TBS.RTPUse.oldTBSTurnOrderVisual_getSpriteBitmap.call(this, entity);
};
This error seems to be telling me that fbitmap was never defined, which i don't get as the unit is obviously using its proper idle sprite all over the place before it calls this on the turn changes.
you you using LeTBS_RTPUse, and if so, does this TBSTurnOrderVisual function match yours?
Yea, I was having issues w/ LeTBS_RTPUse.js as well, which mostly stems from my use of custom (and varying) sprite sizes. Thus, I had no other choice than to set up each enemy the normal way (tedious, I know). That is quite a strange bug you got there... add a
console.log(fbitmap) right before or after the line that says if (object && object.match(/auto/i)) {. Let's see what happens...after some further investigation it seems to be something wrong with the event the demo scene calls on turn 2, likely the sprite referenced isn't my rats but one of the units that spawns during that event. Strange, as the bandits that spawn have just the same note tags as the demo, and the scene, in general is unchanged from the demo, and was working before I replaced the default enemies in the troop with my rats.
Code:
<letbs_sprite>
pose(idle): use_chara, Evil, 0
pose(dead): use_chara, Damage2, 0, 0
turn_order: auto
status_sprite: auto
</letbs_sprite>
So umm...anyone got MZ and wanna try LeTBS w/ FOSSIL? lol...
Oh god it barely works in MV why would you do this to yourself?
Hi,may I know how to set up the enemy AI,so that he is willing to resurrect his teammates?
Pose image is set up the same as the idle pose. Its just the same sprite with the weapons equipped. In this instance I have poses and sprite sheets for _idle, _sword_Equipped, _shield_Equipped, _sword_and_shield
This was a big workaround for not having actual overlay sprites (a feature that was going to be in 0.8) and it does require actually making sprites/poses for any possible combinations you want a unit to be able to equip.
All my swords have the sword state on them, which also unseals any sword skills the unit uses, as different classes have aslightly different set of sword skills. That state automatically adds the sword_equipped state. The "equipped" state is tracked to update the sprite. Its done this way because LeTBS reads "real" adding and removal of states, but yanfly auto states are never "really" removed. Therefore all the auto states generally exist just to apply a removable "real" state at the start of battle if I need to use it for a sprite update.
This means anywhere I want to have a custom sprite I can just easily write code control for the sprite on states and all I have to do for the LeTBS setup is add another pose.
The little invisible eval state common to all units there just basically says "if this unit has both the sword and shield states, then give it the 'sword and shield' state, if it does not, remove that state" and I have versions of this for all the possible combinations of 1h weapons in my game. This means when a sword is disarmed, as in the video, it removes the state, LeTBS sees a state removed, and it runs my sprite code to check if there are any states that should override idle. In this case the unit still has the Shield_Equipped state, so it switches the sprite according to that pose since it is now the highest ordered (and only) pose with a state attached.
Those states have no icon, and generally don't do anything themselves, but my sprite code reads them and updates the sprite accordingly. For instance, only units currently effected with one of the dual wield states can be targeted with a disarm ability, as I only allow dual wielders to be disarmed.
You could use the same setup to have state combinations for "if this unit is poisoned and equipping sword/mace, then use the pose _Sword_and_mace_poisoned" or change the sprite if all the items from a set are equipped, or have an ability or item that adds a dummy state to have like a werewolf transformation or ultimate form, etc. you'd just need to make a lot more sprite sheets.
Its not as nice as having proper layers for sprites, takes more setup, but it does the job and works. It isn't really abstract enough to use outside my game since I just hardcode in any states/poses I need for the system.
I was thinking about overlay sprites... so what if we reverse engineer the
BattleManagerTBS.activeEntity().addPopup() or BattleManagerTBS.activeEntity().addTextPopup() function? Since they are able to lock onto the unit's position on the screen and display something relative to that position. Basically, instead of showing text, we show a sprite instead. Thoughts?Honestly I no longer have a use case for it since my entire workflow is optimized around discreet sprite flips now. It would be cool but I have so much to do on my project alone I can't really devote much time to features I'm not actually using.
I already posted on plugin request but I have to ask here too: Any chances to port this plugin to MZ?
Hello everyone. First time poster here.
I recently got into RPG Maker MV, and want to try making a Tactics style game.
I downloaded the demo the is available from page 1 of this thread, but when I use certain abilities the game crashes.
At first Ice Wall and Mega Spark were giving me trouble but I figured those out on my own.
I can't get Fire Support to work though. If no allies are standing next to the enemy, I can use it. If an ally is standing next to the enemy, it crashes with cannot ready property "isAttack" error.
Any ideas?
I recently got into RPG Maker MV, and want to try making a Tactics style game.
I downloaded the demo the is available from page 1 of this thread, but when I use certain abilities the game crashes.
At first Ice Wall and Mega Spark were giving me trouble but I figured those out on my own.
I can't get Fire Support to work though. If no allies are standing next to the enemy, I can use it. If an ally is standing next to the enemy, it crashes with cannot ready property "isAttack" error.
Any ideas?
Hello to anybody who's still active here,
I've been using this plugin for a few months but just now having a problem I can't seem to solve on my own. I've tried using the plugin command "LeTBS HideEntity" on an actor, which works, but when it gets to the point in the turn order when the actor should act, the game crashes with the error 'Cannot set property 'bitmap' of null'. This happens even if the actor has a state that stops it from acting.
I've been using this plugin for a few months but just now having a problem I can't seem to solve on my own. I've tried using the plugin command "LeTBS HideEntity" on an actor, which works, but when it gets to the point in the turn order when the actor should act, the game crashes with the error 'Cannot set property 'bitmap' of null'. This happens even if the actor has a state that stops it from acting.
Can you press "F8" when the error occurs and screenshot the console, please?
Is it possible to "turn off" this plugin for certain battles? Let's say I want to use this tactics system for standard mobs but use the default MV battle system for large bosses, is this possible? Or am I stuck with one or the other, but not both?
Yes, totally doable. The script call is:
Lecode.S_TBS.commandOn = true; or false if you want it off.Edit: plugin command is...
LeTBS ONLeTBS OFF
Does using
So I went and took a look at the code in LeTBS.js...
Looks like it sets
<Enemy Cell: index> instead of <Enemy Cell> work for you guys? I tried to set up a 2 enemy troop with <Enemy Cell: 0> & <Enemy Cell: 1> but it doesn't seem to have any effect. The monsters still randomly appear in either cell. So half the time they are in the wrong cell. Basically, the player will see a Spearman and a Defender on the field (visible encounters), but once you engage them, the 2 will sometimes switch spots!So I went and took a look at the code in LeTBS.js...
JavaScript:
BattleManagerTBS.createStartCells = function () {
this.getLayer("scopes").clear();
this._startCells = [];
$gameMap.events().forEach(function (eventObj) {
var x = eventObj.x;
var y = eventObj.y;
var note = eventObj.event().note;
var data = {};
if (note.match(/<Enemy Cell>/i)) {
data.type = "enemy";
} else if (note.match(/<Enemy Cell\s?:\s?(.+)>/i)) {
data.type = "enemy";
data.fixed = Number(RegExp.$1);
} else if (note.match(/<Actor Cell>/i)) {
data.type = "actor";
} else if (note.match(/<Actor Cell\s?:\s?(.+)>/i)) {
data.type = "actor";
data.fixed = Number(RegExp.$1);
}
if (data.type) {
var cell = new TBSCell(x, y);
cell._event = eventObj.event();
cell._positioningData = data;
this.createPositioningCell(data.type, x, y, cell);
this._startCells.push(cell);
if (!this._entitiesEvents[x])
this._entitiesEvents[x] = {};
this._entitiesEvents[x][y] = eventObj;
}
}.bind(this));
};
data.fixed to equal w/e index # you put in the event's note. But then it doesn't seem to do anything with data.fixed! So that explains why I'm not seeing any difference using <Enemy Cell: index> vs <Enemy Cell>. Idk what to do...please HALP!Original thread: https://forums.rpgmakerweb.com/threads/lecode-tactical-battle-system-0-77-2b.71572/