I'm still on 77. Dont remember if using through or not
Lecode Tactical Battle System 0.77.2B
JS Plugin Releases (RMMV)I'm still on 77. Dont remember if using through or not
I love this system, but unfortunately it's not friendly for creating my own sprites due to the mess the Config.js file is.
Apart from that, it's amazing 🙂
Apart from that, it's amazing 🙂
I might have found a bug :
During a battle, when I select a special skill (defined this way : )
and cancel the action instead of selecting a target,
I end up on the skills selection window of the character.
During a battle, when I select a special skill (defined this way : )
Code:
<letbs_commands>
attack, skill[126], move, pass
</letbs_commands>
I end up on the skills selection window of the character.
Thanks 🙂. But open it with a good text editor like VS Code, Atom or Sublime Text. Nobody codes with notepad.exe.
Yes that's a behavior I noticed as well. Noted down.
I'm using scope_select: own_summons
Thanks so much for making this system, I've wanted a TBS on MV since launch. That said, could someone post an example of a confirmed working support skill? I can't get the AI to use them for love or money. In the latest demo, with no added plugins, enemies refuse to use the included example skill Evil Protection, or any support skill that I've created. If that's the only skill they have, they'll approach the player but take no actions at all.
@Aluvien I've actually swum around the AI a bit and I think I might a solution for you but I did not entirely figure out what @Lecode was trying to do so take it as that.
Your problem is most definitely the built-in ai support cooldown at specifically this line:
> if (this._entity._aiSupportCount === 0) return false;
Simply commenting it out will solve your problem.
The idea was probably to keep ai from spamming support every turn but then this line got me stomp (it's inside tag === "summon" instead of tag === "support"):
> this._entity._aiSupportCount = Lecode.S_TBS.supportCooldown + 1;
Your problem is most definitely the built-in ai support cooldown at specifically this line:
> if (this._entity._aiSupportCount === 0) return false;
Code:
TBSAiManager.prototype.func_CanUseSupport = function () {
if (this._entity._aiSupportCount === 0) return false; // < right here
if (this.getUsableSkills(this._battler).length === 0) {
this._failureCode = "no_usable_skill";
return false;
}
if (this._builtData["support"].length <= 0) {
this._failureCode = "unable_to_use_support";
return false;
}
return true;
};
The idea was probably to keep ai from spamming support every turn but then this line got me stomp (it's inside tag === "summon" instead of tag === "support"):
> this._entity._aiSupportCount = Lecode.S_TBS.supportCooldown + 1;
Code:
TBSAiManager.prototype.processBehaviors = function () {
if (!this._battler.canMove()) {
return;
}
if (this._battler.isConfused()) {
if (this.func_CanUseOffense())
this.commandCallBehavior(["use_offense"]);
return;
}
var order = Lecode.S_TBS.Config.AI.BehaviorsOrder;
for (var i = 0; i < order.length; i++) {
var tag = order[i];
if (tag === "healing" && this.func_CanUseHealing()) {
this.commandCallBehavior(["use_healing"]);
break;
} else if (tag === "escape" && this.func_CanUseEscape()) {
this._entity._aiEscapeCount = Lecode.S_TBS.escapeCooldown + 1;
this.commandCallBehavior(["escape"]);
break;
} else if (tag === "summon" && this.func_CanUseSummon()) {
this._entity._aiSupportCount = Lecode.S_TBS.supportCooldown + 1;
this.commandCallBehavior(["use_summon"]);
break;
} else if (tag === "support" && this.func_CanUseSupport()) {
this.commandCallBehavior(["use_support"]);
break;
} else if (tag === "offense") {
if (this.func_CanUseOffense())
this.commandCallBehavior(["use_offense"]);
else
this.commandCallBehavior(["cant_use_offense"]);
break;
}
}
};
That's great, thanks! Between cooldowns and use conditions I don't think I'll have an issue with the AI only using support skills, so this should be a good option.
Hello there! ive found a little problem recently with the system but im not sure if its a bug or something ive done wrong. Im using the tags no corpse and passable on death to make the enemies and playable characters dissapear once they have been defeated.
The only problem is that sometimes the game will still reference them when you step in the square they died, ive attached a pic to show what i mean. Whenever this happens your attacks will be directed towards the already dead, invisible battler, and the same if its the ai attacking you. Could this be a problem with the tags im using? or just a bug?
The only problem is that sometimes the game will still reference them when you step in the square they died, ive attached a pic to show what i mean. Whenever this happens your attacks will be directed towards the already dead, invisible battler, and the same if its the ai attacking you. Could this be a problem with the tags im using? or just a bug?
There' a sequence for death that's like
Dead_vanish. Or something
Which removes them from the battle completely I don' have time to check for you right now.
Hello guys, is there a way to change the critical hit formula? I want to have critical hits happen, but having it deal 3x more damage is too much.
I've tried using YEP's plugin for this, but unfortunately it isn't compatible with LeTBS.
Anyone knows how to make critical hits deal less damage?
I've tried using YEP's plugin for this, but unfortunately it isn't compatible with LeTBS.
Anyone knows how to make critical hits deal less damage?
@Pharonix thanks! i checked it on the config file, but it only seems to make the battler invisible, maybe could it be modified so it really vanishes the battler completely?
Edit: Maybe the problem lies with the has_no_corpse tag, because even when i use it the game still references the dead battler when i click on their square.
Edit: Maybe the problem lies with the has_no_corpse tag, because even when i use it the game still references the dead battler when i click on their square.
I just checked. There's a silly error in this part of the code:
Code:
} else if (tag === "summon" && this.func_CanUseSummon()) {
this._entity._aiSupportCount = Lecode.S_TBS.supportCooldown + 1; //<---------- This shouldn't be there
this.commandCallBehavior(["use_summon"]);
break;
} else if (tag === "support" && this.func_CanUseSupport()) {
this.commandCallBehavior(["use_support"]);
break;
}
Code:
} else if (tag === "summon" && this.func_CanUseSummon()) {
this.commandCallBehavior(["use_summon"]);
break;
} else if (tag === "support" && this.func_CanUseSupport()) {
this._entity._aiSupportCount = Lecode.S_TBS.supportCooldown + 1; //<---------- But here instead
this.commandCallBehavior(["use_support"]);
break;
}
What version are you using ? A recent version completely removes battles that have no corpse, when they die.
i think its 0.77.1, i just noticed there is a newer version avaiable, my bad! i will make a backup of my project just in case and see if the problem persists after upgrading.
Edit: just tried, the problem is still there.
That feature got introduced on the 0.77.1 patch:
I'm surprised it doesn't work properly :/. Let me see.
Are you sure you don't have any pose(dead) configuration ? Btw the no_corpse is useless now. Not having the pose(dead) instruction is the equivalent now.
@Lecode EDIT: it worked! thank you so much! 🙂
has_no_corpse is a useless tag since 0.77.1.
To specify that a battler has no corpse, simply avoid putting any configuration for the pose(dead) configuration.
For example, this guy has no corpse.
Code:
<letbs_sprite>
pose(idle): use_chara
turn_order: auto
status_sprite: auto
</letbs_sprite>
<letbs>
ai_pattern: ranged_fighter
</letbs>
@Lecode, I moved the line of code you mentioned, but it doesn't seem to fix the problem. I included a line to print something to the console when the conditions were met, but it never ran. What @Adventurer_inc. mentioned above did work, though. I don't know if this is relevant or not, but the only place I found where aiSupportCount was raised above zero was the place you listed:
But one of the if conditions, func_CanUseSupport, returns false if aiSupportCount === 0, so it seems like the if statement will never be true. I obviously don't know your code very well, and maybe you've got something going on somewhere else that handles this, but I thought I should mention it.
I might also have a couple more bug reports. First, <Enemy Cell: index> doesn't seem to place the specified enemy in the cell: rather, it behaves like a regular enemy cell.
Second, avoid_friendly_fire doesn't appear to fully work. Enemies sometimes respect it at first, but always change their mind eventually. To replicate this, I put 8 enemies on a small map and gave them a skill with the following code:
I ran this test several times. Sometimes, the AI seemed to respect the condition at the beginning of the battle; other times, it just ignored it from the start. In no case did it go through an entire battle without considerable amounts of friendly fire.
All of this is in the 0.77.2B demo with no added plugins. Let me know if you need more information.
Code:
} else if (tag === "support" && this.func_CanUseSupport()) {
this._entity._aiSupportCount = Lecode.S_TBS.supportCooldown + 1;
this.commandCallBehavior(["use_support"]);
break;
But one of the if conditions, func_CanUseSupport, returns false if aiSupportCount === 0, so it seems like the if statement will never be true. I obviously don't know your code very well, and maybe you've got something going on somewhere else that handles this, but I thought I should mention it.
I might also have a couple more bug reports. First, <Enemy Cell: index> doesn't seem to place the specified enemy in the cell: rather, it behaves like a regular enemy cell.
Second, avoid_friendly_fire doesn't appear to fully work. Enemies sometimes respect it at first, but always change their mind eventually. To replicate this, I put 8 enemies on a small map and gave them a skill with the following code:
Code:
<letbs>
scope: circle(4)
aoe: circle(2)
</letbs>
<letbs_AI>
type: offense
avoid_friendly_fire:100%
</letbs_AI>
I ran this test several times. Sometimes, the AI seemed to respect the condition at the beginning of the battle; other times, it just ignored it from the start. In no case did it go through an entire battle without considerable amounts of friendly fire.
All of this is in the 0.77.2B demo with no added plugins. Let me know if you need more information.
Let me examine the code. I wonder if what I was trying to ever got implemented. You can find bits of incomplete features here and there.
But yes, commenting the "if (this._entity._aiSupportCount === 0) return false;" will work.
Thanks for reporting them, they'll be patched on the next version.
ok so im a little new using this system(it is a really cool system btw) and i was wondering, is there a way to change my battlers sprite they are using mid-battle? for example, say i have a character, and when he gets low on hp he will transform into a monstrous entity (i would do this using a state, using the passive states yanfly plugin) now i can get the stats of the character up, and give him new abilities using yanflys plugins, but is it possible to change his sprite into the monstrous sprite during battle?
Original thread: https://forums.rpgmakerweb.com/threads/lecode-tactical-battle-system-0-77-2b.71572/