Lecode Tactical Battle System 0.77.2B

I already know that much. What I want to do is to have the ai-controlled ally units to be predeployed on the map - just like the enemy troop. I don't want to spawn the units on battle start, since I want the player to be able to see the ally units while they are positioning their actors.
Use the event note tag: <Actor Cell: ID> replace ID with actor's ID
upload_2018-5-15_15-7-1.png
@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.
@Parallax Panda Shaz change tile size is compatible with LeTBS, just be sure to change the values here :
Tile size.png

(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"
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,
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,
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.
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.
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.
Because you set the priority as "bellow character". As far as I remember the engine's taking that option into account.
No, they are all set to "Same as characters".

[How do I include past quotes in a quote? E.g. quotes that have quotes?]
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.

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.
[How do I include past quotes in a quote? E.g. quotes that have quotes?]
There doesn't seem to be a way as far as I'm aware of.
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.
Nope there is no configuration for that. I thought that was irrelevant as their direction automatically change during the positioning phase.

No, they are all set to "Same as characters".
Okay then I'll make sure it triggers properly for 0.8.

Do you know if Lecode ever drops by this forum? This is a great plugin and I joined the Patreon page.
Thanks. I drop by sometimes to answer questions and collect bugs 🙂.
Yeah it has to do with loading sprites. Either the entity's sprite of the one used for the turn order.


Then try to use the win condtions command mid-battle and let us know the result 😀.


I went on the project quickly and I'll briefly explain how that work.
  • If you want to use custom sprites
Code:
<letbs_sprite>
pose(POSE_NAME): FILENAME_AFFIX, NBR_OF_FRAMES      <== THIS LINE REGISTER A STANCE
pose(POSE_NAME): FILENAME_AFFIX, NBR_OF_FRAMES       <== ANOTHER STANCE BEING REGISTERED
...
</letbs_sprite>
Example:
Code:
<letbs_sprite>
pose(idle): _idle, 1
pose(move): _move, 4
pose(cast): _cast, 3
pose(atk): _atk, 4
pose(hit): _hit, 1
pose(dead): _dead, 1
turn_order: auto
status_sprite: auto
</letbs_sprite>
  • If you want to use chara
Code:
<letbs_sprite>
pose(POSE_NAME): use_chara, CHARA_FILENAME, BLOCk_INDEX, ROW_INDEX
...
</letbs_sprite>
If only "use_chara" is used, the default actor character filename will be used.
Example:
Code:
<letbs_sprite>
pose(idle): use_chara
pose(dead): use_chara, Damage1, 3, 2
turn_order: auto
status_sprite: auto
</letbs_sprite>

Hope that helps or put you in the right road.

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 :
Harold_idle.png


(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 :
Harold_idle.png

And here is his _dead sprite :
Harold_dead.png


Alternatively, you can also have just 1 frame for dead pose like this :
Alternative.png

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) :
Alternative2.png


If you do not have the damages sprite for your characters, you can also just put it in black and white like this :
Harold_dead.png


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) :
Harold.png


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:
Harold.png


Or like this :
Harold.png


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:
upload_2018-5-18_14-40-51.png


In battle

upload_2018-5-18_14-41-3.png





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:

upload_2018-5-19_17-2-30.png

Touch the top one and boom:
upload_2018-5-19_17-2-46.png


Touching the bottom, erases it
upload_2018-5-19_17-3-13.png


Now there's only ONE enemy:
upload_2018-5-19_17-3-32.png
Another progress update.

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.
Interesting find! Thanks for letting us know 🙂

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
Can you past your configuration here ? From the error log it seems incorrect to me.
@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 :
View attachment 90186

(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 :
View attachment 90192

And here is his _dead sprite :
View attachment 90185

Alternatively, you can also have just 1 frame for dead pose like this :
View attachment 90190
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) :
View attachment 90191

If you do not have the damages sprite for your characters, you can also just put it in black and white like this :
View attachment 90193

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) :
View attachment 90187

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:
View attachment 90188

Or like this :
View attachment 90194

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 🙂


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.
upload_2018-5-21_13-22-5.png

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