Lecode Tactical Battle System 0.77.2B

someone have the demo? i cant find it or any tutorial for make it work
Is there any way to increase the grid/cell size? I'm upscaling my game to 1980x1080 and need to increase my battler/grid size to match.

someone have the demo? i cant find it or any tutorial for make it work

Does this link from the OP not work? https://www.dropbox.com/s/du45ml08yybqulf/LeTBS_0772B.rar?dl=0
Hello everybody. I am trying to insert the custom scopes for the various abilities but surely I am doing something wrong. I would like to use an ability that allows me to hit all targets in the line of fire. I put an example photo. This is the command I execute but obviously it makes the same figure appear as if the target were the center.

<letbs>
scope: square (5.4)
aoe: square (5.4)
</letbs>

What am I doing wrong? I tried to enter the parameters with the box creator but the program does not recognize them, despite using the "custom" command. Thanks so much for your help and kudos for your work and effort, it's truly an awesome plugin

Immagine.png
Hey @Pharonix or @Frostorm. Do one of you know how to make the LETBS scripting evaluate if target is dead or not. I know there should be a way to do it.

I have a combo event in my game, and I don't want the combo to continue if enemy is dead.

I am using LETBS. Config sequences for the combo. Is there a JS code that would properly express what I am looking for like a


$gametroops or foes.aliveMembers() ?

As always I appreciate any and all help

Update: after some digging I think i can use:

target.hp<=0",


but I think I did something wrong.


"play_pose: user, atk",
"wait: 40",
"effects: {aoe}_battlers, current_obj, obj_anim",
"wait: 40",
"if: target.hp<=0",
"end_if",
"else",
"if: $gameVariables.value(245) > 1 ",
"call: Light_Sword2",


Any Idea where I went wrong?
Hi experts, I'm trying to create a cut scene in the middle of a battle and I wonder is there an easy way to force move an entity backwards?

I'm aware of the ForceMove script call, but it makes the entity turn and move forward. I've thought about changing the entity sprite so that move forward actually uses images of moving backwards, but what I'd like to achieve is an actor first step back a few cells then turn and move forward. So using a different sprite also doesn't quite work for me.

Any ideas would be appreciated!
Hey @Pharonix or @Frostorm. Do one of you know how to make the LETBS scripting evaluate if target is dead or not. I know there should be a way to do it.

I have a combo event in my game, and I don't want the combo to continue if enemy is dead.

I am using LETBS. Config sequences for the combo. Is there a JS code that would properly express what I am looking for like a


$gametroops or foes.aliveMembers() ?

As always I appreciate any and all help

Update: after some digging I think i can use:

target.hp<=0",


but I think I did something wrong.


"play_pose: user, atk",
"wait: 40",
"effects: {aoe}_battlers, current_obj, obj_anim",
"wait: 40",
"if: target.hp<=0",
"end_if",
"else",
"if: $gameVariables.value(245) > 1 ",
"call: Light_Sword2",


Any Idea where I went wrong?

bump
You can find it inside the zip file, just load all the folders in your game.
someone have the demo? i cant find it or any tutorial for make it work
bumpp
Hey @Pharonix or @Frostorm. Do one of you know how to make the LETBS scripting evaluate if target is dead or not. I know there should be a way to do it.

I have a combo event in my game, and I don't want the combo to continue if enemy is dead.

I am using LETBS. Config sequences for the combo. Is there a JS code that would properly express what I am looking for like a


$gametroops or foes.aliveMembers() ?

As always I appreciate any and all help

Update: after some digging I think i can use:

target.hp<=0",


but I think I did something wrong.


"play_pose: user, atk",
"wait: 40",
"effects: {aoe}_battlers, current_obj, obj_anim",
"wait: 40",
"if: target.hp<=0",
"end_if",
"else",
"if: $gameVariables.value(245) > 1 ",
"call: Light_Sword2",


Any Idea where I went wrong?

you are calling endif before the rest of your conditional. Since the else now no longer has a linked "if" it'll just fail.

Also for things like this, instead of messing with else statements for empty if statements, you can keep it cleaner with just a reverse conditional, with no else, and just use the ending "endif"
try this:

"play_pose: user, atk",
"wait: 40",
"effects: {aoe}_battlers, current_obj, obj_anim",
"wait: 40",
"if: target.hp>0",
"if: $gameVariables.value(245) > 1 ",
"call: Light_Sword2",
"end_if",
"end_if",

with this, it'll check if target hp>0, then if variable 245>1, it'll call Light_Sword2
you are calling endif before the rest of your conditional. Since the else now no longer has a linked "if" it'll just fail.

Also for things like this, instead of messing with else statements for empty if statements, you can keep it cleaner with just a reverse conditional, with no else, and just use the ending "endif"
try this:

"play_pose: user, atk",
"wait: 40",
"effects: {aoe}_battlers, current_obj, obj_anim",
"wait: 40",
"if: target.hp>0",
"if: $gameVariables.value(245) > 1 ",
"call: Light_Sword2",
"end_if",
"end_if",

with this, it'll check if target hp>0, then if variable 245>1, it'll call Light_Sword2
Thank you SOO much I will try this when I get a Chance.
sample.jpg


Is there a way to get the LeTBSWindows.js mini Status Window to slide from Right to Left?
Or make it not slide at all?
Both options would be good.

I'd like to place the status window on the right but when changing the X position to the other side it will slide all the way from the left to where I designated it to be on the right and looks jarring.

I assume this is the part of the code in LeTBSWindows.js (in Spoiler) that controls this but can't figure it out. Thanks in advance for any advice.
Spoiler: Code
Code:
Window_TBSStatus.prototype.initialize = function () {
    var width = this.windowWidth();
    var height = this.windowHeight();
    Window_Base.prototype.initialize.call(this, 0, 0, width, height);
    var window = this;
    var x = eval(Lecode.S_TBS.Windows.statusWindowX);
    var y = eval(Lecode.S_TBS.Windows.statusWindowY);
    this.x = x;
    this.y = y;
    this._entity = null;
    this._sliding = false;
    this.refresh();
};

Window_TBSStatus.prototype.windowWidth = function () {
    var window = this;
    return eval(Lecode.S_TBS.Windows.statusWindowW);
};

Window_TBSStatus.prototype.windowHeight = function () {
    var window = this;
    return eval(Lecode.S_TBS.Windows.statusWindowH);
};

Window_TBSStatus.prototype.slide = function () {
    this._sliding = true;
    this.x = -this.width;
};

Window_TBSStatus.prototype.update = function () {
    Window_Base.prototype.update.call(this);
    var speed = 8;
    var destX = eval(Lecode.S_TBS.Windows.statusWindowX);
    if (this._sliding) {
        this.x += speed;
        if (this.x >= destX) {
            this._sliding = false;
            this.x = destX;
        }
    }
};
View attachment 243660

Is there a way to get the LeTBSWindows.js mini Status Window to slide from Right to Left?
Or make it not slide at all?
Both options would be good.

I'd like to place the status window on the right but when changing the X position to the other side it will slide all the way from the left to where I designated it to be on the right and looks jarring.

I assume this is the part of the code in LeTBSWindows.js (in Spoiler) that controls this but can't figure it out. Thanks in advance for any advice.
Spoiler: Code
Code:
Window_TBSStatus.prototype.initialize = function () {
    var width = this.windowWidth();
    var height = this.windowHeight();
    Window_Base.prototype.initialize.call(this, 0, 0, width, height);
    var window = this;
    var x = eval(Lecode.S_TBS.Windows.statusWindowX);
    var y = eval(Lecode.S_TBS.Windows.statusWindowY);
    this.x = x;
    this.y = y;
    this._entity = null;
    this._sliding = false;
    this.refresh();
};

Window_TBSStatus.prototype.windowWidth = function () {
    var window = this;
    return eval(Lecode.S_TBS.Windows.statusWindowW);
};

Window_TBSStatus.prototype.windowHeight = function () {
    var window = this;
    return eval(Lecode.S_TBS.Windows.statusWindowH);
};

Window_TBSStatus.prototype.slide = function () {
    this._sliding = true;
    this.x = -this.width;
};

Window_TBSStatus.prototype.update = function () {
    Window_Base.prototype.update.call(this);
    var speed = 8;
    var destX = eval(Lecode.S_TBS.Windows.statusWindowX);
    if (this._sliding) {
        this.x += speed;
        if (this.x >= destX) {
            this._sliding = false;
            this.x = destX;
        }
    }
};
did you try to disable this part by using "//" :
(i think this should disable the slide option )

JavaScript:
Window_TBSStatus.prototype.update = function () {
    Window_Base.prototype.update.call(this);
    var speed = 8;
    var destX = eval(Lecode.S_TBS.Windows.statusWindowX);
    //if (this._sliding) {
    //    this.x += speed;
    //    if (this.x >= destX) {
    //        this._sliding = false;
    //        this.x = destX;
    //    }
    //}
};

if that doesnt work like you wanted you could also try:
(this second option should still change the window position but hopefully without slide)
JavaScript:
Window_TBSStatus.prototype.update = function () {
    Window_Base.prototype.update.call(this);
    var speed = 8;
    var destX = eval(Lecode.S_TBS.Windows.statusWindowX);
    //if (this._sliding) {
    //    this.x += speed;
    //    if (this.x >= destX) {
    //        this._sliding = false;
    if (this.x !== destX) this.x = destX;
    //    }
    //}
};
( i dont use the plugin & cant test it myself, its just what i think about the code )
Spoiler
did you try to disable this part by using "//" :
(i think this should disable the slide option )

JavaScript:
Window_TBSStatus.prototype.update = function () {
    Window_Base.prototype.update.call(this);
    var speed = 8;
    var destX = eval(Lecode.S_TBS.Windows.statusWindowX);
    //if (this._sliding) {
    //    this.x += speed;
    //    if (this.x >= destX) {
    //        this._sliding = false;
    //        this.x = destX;
    //    }
    //}
};

if that doesnt work like you wanted you could also try:
(this second option should still change the window position but hopefully without slide)
JavaScript:
Window_TBSStatus.prototype.update = function () {
    Window_Base.prototype.update.call(this);
    var speed = 8;
    var destX = eval(Lecode.S_TBS.Windows.statusWindowX);
    //if (this._sliding) {
    //    this.x += speed;
    //    if (this.x >= destX) {
    //        this._sliding = false;
    if (this.x !== destX) this.x = destX;
    //    }
    //}
};
( i dont use the plugin & cant test it myself, its just what i think about the code )

Unfortunately:
1st code erases the status window.
2nd code produces an error.

I actually managed to get the window to stop sliding and remain static on the right side doing the following:
- Changing Status Window X to 820 (in config).
- Changing
Code:
Window_TBSStatus.prototype.slide = function () {
    this._sliding = true;
    this.x = -this.width;
};

to

Code:
Window_TBSStatus.prototype.slide = function () {
    this._sliding = true;
    this.x = this.width+600;
};

Not ideal, but I'm much happier with this current result than the previous one of sliding all the way from the left side of the screen to the right.

Note: My project width is 1104px.

My ideal result would be for the status window to animate from right to left and stay on the right side, but again I can live with a static window for the time being.


Appreciate the response.
Did not expect someone to chime in so quickly. 😊
Unfortunately:
1st code erases the status window.
2nd code produces an error.

I actually managed to get the window to stop sliding and remain static on the right side doing the following:
- Changing Status Window X to 820 (in config).
- Changing
Code:
Window_TBSStatus.prototype.slide = function () {
    this._sliding = true;
    this.x = -this.width;
};

to

Code:
Window_TBSStatus.prototype.slide = function () {
    this._sliding = true;
    this.x = this.width+600;
};

Not ideal, but I'm much happier with this current result than the previous one of sliding all the way from the left side of the screen to the right.

Note: My project width is 1104px.

My ideal result would be for the status window to animate from right to left and stay on the right side, but again I can live with a static window for the time being.


Appreciate the response.
Did not expect someone to chime in so quickly. 😊
as far i understand the update code..

"this.x" is the position of the window, and "var destX" the destination for the window..
i am not sure where the "eval" that will define "var destX" is handled.. or if it will conflict with other stuff later if changing it..
..but you could also try to define "var destX" yourself,.
with trial and error perhaps you might find a even better solution.

sorry that i cant give better advice
That original code looks good, if you were able to set the starting position to the graphics width.
To me if the starting position was the graphics width and then it would slide the windows width.
I assume that's what the -this.width does.
[outdated info]
Alright, after a few days of looking over the code, I'm throwing in the towel and posting a question here.
Is there any way to switch the starting position of the <Actor Cell> and <Enemy Cell> events to different places on the map? I'm using a large map, and want to be able to reuse the same map for multiple different fights, all at different places on the map. Any advice is greatly appreciated.
Alright, after a few days of looking over the code, I'm throwing in the towel and posting a question here.
Is there any way to switch the starting position of the <Actor Cell> and <Enemy Cell> events to different places on the map? I'm using a large map, and want to be able to reuse the same map for multiple different fights, all at different places on the map. Any advice is greatly appreciated.
does the set event placement not work?
Screenshot_1.png

i dont use lecode, but you wrote that these are events
( this should also be able to make teleport skills if using a skill common event , you only need to know the event id)

-> in srpg (another tbs) we can also use eventspawner-plugin, i guess this should also be possible for lecode
does the set event placement not work?
View attachment 243938
i dont use lecode, but you wrote that these are events
( this should also be able to make teleport skills if using a skill common event , you only need to know the event id)

-> in srpg (another tbs) we can also use eventspawner-plugin, i guess this should also be possible for lecode


Unfortunately no. My best guess looking at the code is that the plugin sets the location of the enemy and actor starting square to be the same as the events when the game is launched or when the room is loaded, and so moving the events does nothing. I linked a video I made showing the results of trying that method.

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