Lecode Tactical Battle System 0.77.2B
JS Plugin Releases (RMMV)@Pharonix
Thank you! You didn't mention it but I managed to figure out on my own that the name you put in the database has to be the same as what comes before the "_idle" tag. I got it to work just fine now. Still having some problems with changing the tilesize to 32x32, although the larger sprites don't look that good when close together on that grid anyway so I'm considering changing it back to default 48x48. We'll see.
Hm... is there anyway I can spawn enemies that face a certain direction from the get go though? They all seem to start of facing south, which is okay. But if there's a tag or something else I can do to decide the direction at the beginning of battle that would be nice.
Thank you! You didn't mention it but I managed to figure out on my own that the name you put in the database has to be the same as what comes before the "_idle" tag. I got it to work just fine now. Still having some problems with changing the tilesize to 32x32, although the larger sprites don't look that good when close together on that grid anyway so I'm considering changing it back to default 48x48. We'll see.
Hm... is there anyway I can spawn enemies that face a certain direction from the get go though? They all seem to start of facing south, which is okay. But if there's a tag or something else I can do to decide the direction at the beginning of battle that would be nice.
@Parallax Panda Shaz change tile size is compatible with LeTBS, just be sure to change the values here :
(I'm using 80x80 on this project so 79x79 looks good, if you are using 32x32 I recommend you using Scope cell width and height on 31 and 31 (but do as you wish 😛 )
If you want to use many files with the same name like "_idle" at the end of it, you can copy all your sprites and change the " - copy" with a software like "Ant Renamer" I recommend you this if you are using a lot of sprites that need to be renames (be careful this software is very light yet very powerful, I recommend you to make a back up of your project before using it if you are not really sure about the renaming options)
(I'm using 80x80 on this project so 79x79 looks good, if you are using 32x32 I recommend you using Scope cell width and height on 31 and 31 (but do as you wish 😛 )
If you want to use many files with the same name like "_idle" at the end of it, you can copy all your sprites and change the " - copy" with a software like "Ant Renamer" I recommend you this if you are using a lot of sprites that need to be renames (be careful this software is very light yet very powerful, I recommend you to make a back up of your project before using it if you are not really sure about the renaming options)
For some reason in this sequence it is NOT resetting the speed.
"play_pose: user, atk",
"wait: 10",
"effects: {aoe}_enemies, current_obj, obj_anim",
"if: isHit('{aoe}_enemies')",
"set_speed: {aoe}_enemies, +6",
"push: {aoe}_enemies, user_cell, $1",
"set_speed: {aoe}_enemies, reset",
"end_if",
"wait: 60"
EDIT: I figured out why.
This is because it's resetting the speed for enemies in the AOE.
Problem is, when blasted backwards, they no longer belong IN the AOE.
so I was able to fix this by using:
"play_pose: user, atk",
"wait: 10",
"effects: {aoe}_enemies, current_obj, obj_anim",
"if: isHit('{aoe}_enemies')",
"set_speed: {aoe}_enemies, +6",
"push: {aoe}_enemies, user_cell, $1",
"set_speed: all, reset",
"end_if",
"wait: 60"
"play_pose: user, atk",
"wait: 10",
"effects: {aoe}_enemies, current_obj, obj_anim",
"if: isHit('{aoe}_enemies')",
"set_speed: {aoe}_enemies, +6",
"push: {aoe}_enemies, user_cell, $1",
"set_speed: {aoe}_enemies, reset",
"end_if",
"wait: 60"
EDIT: I figured out why.
This is because it's resetting the speed for enemies in the AOE.
Problem is, when blasted backwards, they no longer belong IN the AOE.
so I was able to fix this by using:
"play_pose: user, atk",
"wait: 10",
"effects: {aoe}_enemies, current_obj, obj_anim",
"if: isHit('{aoe}_enemies')",
"set_speed: {aoe}_enemies, +6",
"push: {aoe}_enemies, user_cell, $1",
"set_speed: all, reset",
"end_if",
"wait: 60"
Hi. I've got a really stupid question, but what files do I transfer from the demo into my game for LeTBS? I'm still kind of new on this.
Thanks,
Thanks,
If you downloaded Chaosiica's demo, then just build it off of that and delete the things you don't need.
It's easier to do that than to copy the js files over and configure everything from scratch.
Ah, I actually stumbled across LeTBS while building a game, so I was hoping to simply grab the files and drop them into the game folder. Besides the JS files, do you know what other files would have to go over? Would it be easier dropping my game files into the demo folder? I haven't gotten too far yet.
Basically the entire LeTBS folder under img
and all JS files from the demo.
Thanks!
I think I'll test it out on a duplicate test folder of the game. Do you know if Lecode ever drops by this forum? This is a great plugin and I joined the Patreon page. Can't wait until the next update.
I think I'll test it out on a duplicate test folder of the game. Do you know if Lecode ever drops by this forum? This is a great plugin and I joined the Patreon page. Can't wait until the next update.
No, they are all set to "Same as characters".
[How do I include past quotes in a quote? E.g. quotes that have quotes?]
He drops by on occasion. He's busy with the plugins, so it might not be "every day" but he does drop by.
But there's a few of us, myself and Chaosicaa included, who can help you out if you have issues.
Let's just say about 350+ of my total posts are this thread alone.
There doesn't seem to be a way as far as I'm aware of.
Nope there is no configuration for that. I thought that was irrelevant as their direction automatically change during the positioning phase.
Okay then I'll make sure it triggers properly for 0.8.
Thanks. I drop by sometimes to answer questions and collect bugs 🙂.
Ok so I fixed the sprite issue, after I got that going I went to start the battle again and then this error went and popped up
https://gyazo.com/f8097d65649a1f41b3c581efec0071ac
not exactly sure what the issue is here
@Ygdrassill
Hello, in your sprite configuration, try to set up your character like this at first (I'm assuming you character sheets have 3 frames like it is by default, if not change the number accordingly) :
<letbs_sprite>
pose(idle): _idle, 3
pose(dead): _dead, 3
turn_order: auto
status_sprite: auto
</letbs_sprite>
(There is an alternative if you add the character index, you won't have to crop it by yourself)
And then disable the plugin LeTBS_RTPUse (just put it on "OFF")
Here is an example with "Harold", here is his _idle sprite :
(If you want him to be REALLY idle, you can delete the left and right frame just to keep the middle one and set your sprite configuration to 1 like this :

And here is his _dead sprite :
Alternatively, you can also have just 1 frame for dead pose like this :
If you set up the you configuration like this for the dead pose :
pose(dead): _dead, 1
You can also have it faced the way it died if you want like this (I have not tried this one, it might not work) :
If you do not have the damages sprite for your characters, you can also just put it in black and white like this :
Or if you do not put the dead sprites, they will be removed from the battle when they die (but can not be resurrected in battle)
For the timeline, by default it is 40x40, so you can put this inside the turn Order (Call the sprite: Harold) :
And this is for the status you can either put one frame of the character or a little bit of the face set (be careful 144x144 does not fit so you will have to reduce it a bit, 80x80 or 80x144 fits like this:
Or like this :
Put one of them in the "status" folder.
Now you are ready to go!
If you can do this for one, you can do this for all of them.
When you will be more comfortable with it, you can add more poses like _cast, _victory and so on!
Try it on your project and if it does not work, send me a PM 🙂
Hello, in your sprite configuration, try to set up your character like this at first (I'm assuming you character sheets have 3 frames like it is by default, if not change the number accordingly) :
<letbs_sprite>
pose(idle): _idle, 3
pose(dead): _dead, 3
turn_order: auto
status_sprite: auto
</letbs_sprite>
(There is an alternative if you add the character index, you won't have to crop it by yourself)
And then disable the plugin LeTBS_RTPUse (just put it on "OFF")
Here is an example with "Harold", here is his _idle sprite :
(If you want him to be REALLY idle, you can delete the left and right frame just to keep the middle one and set your sprite configuration to 1 like this :
And here is his _dead sprite :
Alternatively, you can also have just 1 frame for dead pose like this :
If you set up the you configuration like this for the dead pose :
pose(dead): _dead, 1
You can also have it faced the way it died if you want like this (I have not tried this one, it might not work) :
If you do not have the damages sprite for your characters, you can also just put it in black and white like this :
Or if you do not put the dead sprites, they will be removed from the battle when they die (but can not be resurrected in battle)
For the timeline, by default it is 40x40, so you can put this inside the turn Order (Call the sprite: Harold) :
And this is for the status you can either put one frame of the character or a little bit of the face set (be careful 144x144 does not fit so you will have to reduce it a bit, 80x80 or 80x144 fits like this:
Or like this :
Put one of them in the "status" folder.
Now you are ready to go!
If you can do this for one, you can do this for all of them.
When you will be more comfortable with it, you can add more poses like _cast, _victory and so on!
Try it on your project and if it does not work, send me a PM 🙂
@Lecode
When I create a map that has ally cell in 5,5 and enemy cell at 10,5
why is it that when I use an event to switch the event locations, LETBS still uses the original locations?
Is there any way to "Re-Cache" these locations?
EDIT:
Once more I figured it out.
So in LeTBS.js is this snippet:
BattleManagerTBS.createStartCells = function () {
this.getLayer("scopes").clear();
this._startCells = [];
$gameMap.events().forEach(function (eventObj) {
var x = eventObj.event().x;
var y = eventObj.event().y;
The weird thing is calling eventObj.event() seems to call the ORIGINAL event.
By changing this to
BattleManagerTBS.createStartCells = function () {
this.getLayer("scopes").clear();
this._startCells = [];
$gameMap.events().forEach(function (eventObj) {
var x = eventObj.x
var y = eventObj.y
We are calling the "Current" location of the event.
We now get:
Starting:
In battle
What exactly does this mean?
It now means that NOW, you can create a map where the enemies ARE the enemy positions, give them random locations, and voila! Now wherever the enemies landed, they'll now spawn.
This also means that in @Parallax Panda 's case, where he may want to change the enemy locations using an event, he can now increase the viability of his 1 map challenge.
Or anyone using region common events can also easily have it work now.
When I create a map that has ally cell in 5,5 and enemy cell at 10,5
why is it that when I use an event to switch the event locations, LETBS still uses the original locations?
Is there any way to "Re-Cache" these locations?
EDIT:
Once more I figured it out.
So in LeTBS.js is this snippet:
BattleManagerTBS.createStartCells = function () {
this.getLayer("scopes").clear();
this._startCells = [];
$gameMap.events().forEach(function (eventObj) {
var x = eventObj.event().x;
var y = eventObj.event().y;
The weird thing is calling eventObj.event() seems to call the ORIGINAL event.
By changing this to
BattleManagerTBS.createStartCells = function () {
this.getLayer("scopes").clear();
this._startCells = [];
$gameMap.events().forEach(function (eventObj) {
var x = eventObj.x
var y = eventObj.y
We are calling the "Current" location of the event.
We now get:
Starting:
In battle
What exactly does this mean?
It now means that NOW, you can create a map where the enemies ARE the enemy positions, give them random locations, and voila! Now wherever the enemies landed, they'll now spawn.
This also means that in @Parallax Panda 's case, where he may want to change the enemy locations using an event, he can now increase the viability of his 1 map challenge.
Or anyone using region common events can also easily have it work now.
Another day, another new "Hack"
Ever delete one of your enemy cell events and wish it STAYED that way?
Add
if (eventObj._erased){return;} as the first line after: $gameMap.events().forEach(function (eventObj) {
Like below.
What this does is "Skip" any event that is erased by using the "Erase Event" command.
Now mind you, events are un-erased when the map is reloaded:
BattleManagerTBS.createStartCells = function () {
this.getLayer("scopes").clear();
this._startCells = [];
$gameMap.events().forEach(function (eventObj) {
if (eventObj._erased){return;}
var x = eventObj.x//.event().x;
var y = eventObj.y//.event().y;
In Action:
Touch the top one and boom:
Touching the bottom, erases it
Now there's only ONE enemy:
Ever delete one of your enemy cell events and wish it STAYED that way?
Add
if (eventObj._erased){return;} as the first line after: $gameMap.events().forEach(function (eventObj) {
Like below.
What this does is "Skip" any event that is erased by using the "Erase Event" command.
Now mind you, events are un-erased when the map is reloaded:
BattleManagerTBS.createStartCells = function () {
this.getLayer("scopes").clear();
this._startCells = [];
$gameMap.events().forEach(function (eventObj) {
if (eventObj._erased){return;}
var x = eventObj.x//.event().x;
var y = eventObj.y//.event().y;
In Action:
Touch the top one and boom:
Touching the bottom, erases it
Now there's only ONE enemy:
Another progress update.
Interesting find! Thanks for letting us know 🙂
Can you past your configuration here ? From the error log it seems incorrect to me.
Hey thank you so much I ended up getting the battles working again 😀. One more question, what exactly does the scan feature do, It says scan an element or something for more info, but what does it mean by scan an element?
Is it possible for the turn order display to be multiple lines?
Got this working.
for top anyway...
added this after where it sets sprite.x and sprite.y.
if(i>25)
{
console.log("for testing");
sprite.x = sprite.x-(shiftX*26);
sprite.y = sprite.y+(shiftX);
}
if(i>50)
{
console.log("for testing");
sprite.x = sprite.x-(shiftX*26);
sprite.y = sprite.y+(shiftX);
}
To be honest, it's quite hideous.

Got this working.
for top anyway...
added this after where it sets sprite.x and sprite.y.
if(i>25)
{
console.log("for testing");
sprite.x = sprite.x-(shiftX*26);
sprite.y = sprite.y+(shiftX);
}
if(i>50)
{
console.log("for testing");
sprite.x = sprite.x-(shiftX*26);
sprite.y = sprite.y+(shiftX);
}
To be honest, it's quite hideous.

Original thread: https://forums.rpgmakerweb.com/threads/lecode-tactical-battle-system-0-77-2b.71572/