Lecode Tactical Battle System 0.77.2B

Hi, i'm really happy with your system!
In my VX games i always use TBS systems.

so, i have started to use your system today but i have some sugestions for you
1) Jump move
When we have a great number of enimies, our heros can be blocked.
it is possible develop a jump move that jump through dead enimies and some objects (regions)?

2) Corpse destruition
It is possible define a default HP or number of hits needed to destroy corpses
it should turn impossible to revive this enimie (or ally)
please, add a task if the corpse can be destroid or not
=)

3) multiples (or third) teams on battle
-define an enemy team, which you must kill to win [red]
-an enemy team that you dont win if kill all (of this team) (it permits win if kill a specific mosnter) [orange]
-If you think is cool, an enemy team that is enemy of the enemies =)
-an neutral team which can move and be attacked (and each mosnter of this team attack if be attacked) [white and change color to red if attacked by you or to gray if attacked by enemies] (configure to if dead lead to lose the battle)
(neutrals can run or attack, depending its especific configuration)
-an Objects team (only to permits object interaction) [no color] (configure to if dead lead to lose the battle) (objects can be mosnters that never attack or movie)
-An ally team (that you cant control) [blue] (configure to if dead lead to lose the battle)
-And, lastly, you own team. [green]

4) Larger monsters
by default monsters have a 1x1 grid (independly of the image size)
configure larger monster (to boss for instance) can be interessant

5) AI free programing
it can be interessant to perform general actions to program our own AI.
for instance:
program (move to front, move back, jump, atack, distant atack, attack the enemy with more HP, attack the enemy with lower HP)
than, we perform specific AI for each our mosnters

6) Define "Leave battle" squares in map
if one or all heros are on these squares, automatically the theam leave the battle
(enemy scapes squares, with the same idea, but different from heroes scapes squares)

7) chose the order of horos that we will add to battle
some battles can have less entry points than heroes, in these battles it is interresant to chose who will enter to battle.

8) Anti-Magic regions (or squares)
it is interessant that some squares be free to walk but not to magic cast
i know that futurely you will add "in line" damage abilities
these "antimagic" squares should block the line of damage (Including behind this square)
can be interessant do an antimagic region that the heros cant walk to

9) Enemy metamorphosis (similar to summon, but withour corpses when the enemy change)

10) Lastly, determine two kinds of battle start (the existent one and the battle start that i will try explain) =)
when we start a battle, we have defined groups of enemies starting in specific squares

So, my idea is to use the enemies events at map to start a battles
each enemy is a individual event that start the battle at his own position
by this way, when you interact with a event (or is X squared away) a battle start
can be very interessant if each enemy has a distance to start the battle
other thing, all free-to-walk events outside the battle are "freezing" and it moves a defined number of squares (defined at event text) outside the battle at the end of the battle turn
if the outside-enemy cames from the range to start battle, it enter in the middle of battle (or if the hero Approaches him)
it is interessant define some abilities like as "Call allies) to the enemies, which increases the distance that some determined enemies can see the battle (and comes to battle) and "Call Neutres allies" that increase the distance and turn enemy the neutre events in the battle field.
the enemy scape square can be defined by a X squares of each hero (it is important configure the "run" action of some enemies"), for instance, when you attack a sheep, the sheep run away and not attack you.
kill the enemies must change the event sprite (activing a LOCAL event condition)
when the battle end, the events assuming the position of the remaining battlers (enemies that run, neutrals and allyes and objects)

I really hope that you understand it, i'm slepy and am writing directly at chrome, my english is very bad.
=)

other ideas: Teleports traps; Water move state, summon (enemy or allies), Hiden enemies, abilitie to hide
Awsome job! i love that!

I have a few questions !


1) Is there a way to make a "battleback" animation? Like those of fire emblem \ Advance wars

as in showing an animation of an attack on two platforms for the target and the selected hero



Or showing... X times that animation as in troops based on a percentage of health




2) Can you make a "summoner" that summons playable heroes for a number of turns or until they die?

3) Can you make a BGM play during enemy or ally turn or combat animation?
Hi all,
Sorry I am a complete newbie to this. I copied the demo files to the project root but got this error when I tried to run it:
error1.JPG

Any help will be appreciated, thanks!
@Rem Rem

This is not an easy script to start with rpgmaker, the best advice I can do is:

Look at the documentation here:
https://docs.google.com/document/d/1F-ToNjo2K662W9ztY90YF4hn8RPHVomcRVthCQTtPfY/edit
Everything is explained.

Observe how the demo works:
Try to set up your game from the Demo version it will help you

To start a battle you will need some empty events on the map with "ally" in the name
And some empty events with "enemy" in the name and a number in the note section : 1 then, 2, then 3 etc
With that you are set to start a battle on the map with enemy and ally places

When something do not work, it will be probably shown in the console



@cassio
Woaw great message!

1)
You can already do this, one character in the demo can jump and one other can even teleport someone elsewhere!

2) 3) 4) 6) 9)
That's a good idea but it is complicated or will probably not be implemented soon :/

5)
The I.A will be greatly improved in the next TBS version, hold on!

7)
You can actually do this, if you want only 3 actors in the battle you can use this script call :

Game_Party.prototype.maxBattleMembers = function() {
return 3;
};

That will restrict your battle number to 3 (don't forget to use it again after the battle and put it again to 4 like this :

Game_Party.prototype.maxBattleMembers = function() {
return 4;
};

The priority will be for actors with hightest agility stat (you can call it leadership)

8)
You can already do that, look at the explosive mark in letbs demo
Set the same thing with a state "No magic allowed" that will seal magic for 1 turn for the player

10)
You can probably do that with other scripts like:
https://atelierrgss.wordpress.com/rmv-event-sensor/
When enemy is close enough, then you can start the battle or it will chase you very fast



@glaucozilla
1)
Actually this is not supported by the script (it will probably be supported after the version 1.0 of letbs) but you can actually do this by using common events and set them up by showing images, make them move and so on but it is complicated and time consuming.
(You can call a common event when using a skill)

2)
You can not summon players yet, this will probably come with the version 0.7 or 0.8 of LeTBS
I do not know if there will be a turn count but once the summon system is up, you will probably be able to achieve that with others scripts (apply a state "Summoned" on the summoned ally for 3 turn, when you state "Summoned" is off, then add state "Dead")

3)
On your troop events you can set up that:
Condition : On turn 0+1*X for every turn (choose the span TURN)



@barafundle
Some people have this problem, use this link instead it might help you (this is the demo with full RTP, you just have to extract it with winrar):
https://www.dropbox.com/s/d9ujg4i73vaa7uc/V061 Lecode tbs Demo.rar?dl=0
Hi Chaosicaa

Thanks for your answers.
In fact, many of them I had not realized were already implemented.
But I still had some doubts:

1) Yes, the jump is implemented in a "Warrior" ability. But when we use it, we can skip some absurd squares, such as walls.
Or am I using it wrong?

7) Would not it be possible to make a selection screen to add the heroes in the order we want?

8) is interesting and I did not really know, but I continue with the doubt:
It would be possible to implement (or already implemented and I do not know) squares where you can not use magic in this square. The player can continue to use magic, but not in that square.
Something like: "The square can not be the target of magic"
The only ones I know can not prevent the characters from passing through, and I wish they would not stop them from passing.

10) Many thanks for the tip, I will use this plugin in my project.
But my doubt remains ...
As far as I've envisioned, the incoming battle squares of the Enemies and Allies are defined as regions on the map.
To do what I want, I would need to set the event input. (I just read that it is by events. Forget this line, but if the event can walk, the place was wrong)
I would like to use the map itself to conduct the battle just like in ABS systems, but tactically.
The idea would be a "Tatic-ABS", if I may call it that
Lol

I know some of my suggestions are difficult to implement (such as item 10), but I'm giving these ideas because I think it would add a lot in the plugin.

By the way, it was the best TBS I've ever encountered (I used VX ace before), although it's a bit confusing to learn.

Thank you very much for the answers.
=)
Hi, other thing i have tested now.
i cant start a battle at the same map...
there is a bug?
the battle start again a lot of times...
if i use local switches, the game is ok
there is no bug messege.
If your battle starts again and again on the map you are, you are probably using an autorun event or parallel process (if you are using those, the game will run your event again and again in an infinite loop) try to use action button instead or activate a local switch A and create an other page in the event with the condition: local switch A is ON

10)
Maybe you should try to set up the place events to "chase the ally" and the enemy events to "chase the enemy" so when the battle will start, they will be near your character and your enemy (have not tested, not sure it works)

7)
A new hud is coming, let's wait and see : )

Others) :
In facts there are 3 type of cell, you have to set up tile region on your walls (250 for walls) and 249 for small walls like fences, bushes etc manually

The normal cell:
You can walk and cast spell, it does not require configuration this is default behavior

The cell number 249 (half wall):
If you set up a cell with the region ID 249, you would not be able to walk on it but you will be able to cast any spell ignoring the cell

The cell number 250 (Perfect wall):
If you set up a cell with the region ID 250, you would not be able to walk on it AND it will block all your spells (even your jump spell because it can not go trough)


But be careful, you can set up your skills to ignore the perfect wall with the tag :
through_obstacles
On them.


Example, the warrior "Thunder strike" can not jump walls because it doesn't have this tag :
<letbs>
scope: circle(3)
aoe: circle(1)
scope_options: need_free_cell
sequence: bolt_jump
</letbs>

But the magician "teleportation" can pass the walls because he uses magic:
<letbs>
scope: circle(4)
sequence: teleportation
scope_options:through_obstacles, need_free_cell
</letbs>
Hi chaosicaa,
Thank you again.
You answered all my questions.

But my event start when "event touch player"
the time to start the "new battle" depends.
I'm using self switches in order to not ocurr it.
=)

I will try you suggestion to iten 10.
Thanks

Last question:
In a battle starting at the same map, the enemy start battle position is the start event position.
i wanna to start at the current event position.
do you think i use a plugin to save the event position it can be solved?
Hello @cassio

My bad I didn't tested that and yes that do not work, for some reason the placement event is locked at the event starting position
I tried some scripts (yanfly event chase player, galv MV move route extra, moghunter eventsensor) they do not work for this case, I think that's the way leTBS handle the placement phase.

When you open LeTBS script I have the feeling a little modification from line 1374 to 1387 might do the trick :

BattleManagerTBS.createStartCells = function () {
this.getLayer("scopes").clear();
this._startCells = [];
$gameMap.events().forEach(function (eventObj) {
var x = eventObj.event().x;
var y = eventObj.event().y;
var name = eventObj.event().name;
var cell = new TBSCell(x, y);
cell._event = eventObj.event();
if (name == "ally" || name == "enemy")
this.createPlacementCell(name, x, y, cell);
this._startCells.push(cell);
}.bind(this));
};

(Modifying var x and var y by the actual event position and not the starting position of the event?)

But I do not know how to do that actually, it would be an interesting feature indeed to have more freedom over the positioning phase 🙂
I want to open with that I am going to be using this script. It is the best progress I have seen so far on the front of a TBS system with RPG Maker MV. So I must say bravo and I have experience with Javascript so if you ever get stuck and need someone to bounce troubleshooting off of (as a programmer I know that there is never enough ears you can bounce ideas off of lol) let me know.

That being said I got good news and bad news with the Yanfly compatibility and I am sure you know this already. I put in Yanfly battle core and your system at the same time in your demo. When you run Yanfly battles everything works smoothly. Your system from what I can see does not break his.

However, when using your system that is when the problem arrives and I am sure you knew this already. If you put Yanfly Battle Core after LeTBS you get this when trying to start a combat:

TypeError: Cannot read property 'fittingHeight' of undefined
at Scene_Battle.adjustLowerWindow (YEP_BattleEngineCore.js:4356)
at Scene_Battle.createSkillWindow (YEP_BattleEngineCore.js:4323)
at Scene_Battle.createAllWindows (LeTBS.js:780)
at Scene_Battle.createAllWindows (LeTBS_WinConditions.js:122)
at Scene_Battle.createDisplayObjects (LeTBS.js:718)
at Scene_Battle.create (LeTBS.js:707)
at Function.SceneManager.changeScene (rpg_managers.js:1810)
at Function.SceneManager.updateMain (rpg_managers.js:1789)
at Function.SceneManager.update (rpg_managers.js:1714)

So it doesn't start. So naturally. I switched the order and put Battle Core and then LeTBS and the battle does start! Actors are able to be placed and so on and this is good. I start I take a move and do an action and this is where it breaks:
TypeError: undefined is not a function
at Game_Enemy.Game_Battler.startDamagePopup (file:///C:/Users/Edwards/Documents/Projects/demo/js/plugins/YEP_BattleEngineCore.js:3547:25)
at Game_Action.apply (file:///C:/Users/Edwards/Documents/Projects/demo/js/plugins/YEP_BattleEngineCore.js:3275:14)
at Function.<anonymous> (file:///C:/Users/Edwards/Documents/Projects/demo/js/plugins/LeTBS.js:2671:29)
at Array.forEach (native)
at Function.BattleManagerTBS.applyObjEffects (file:///C:/Users/Edwards/Documents/Projects/demo/js/plugins/LeTBS.js:2670:13)
at TBSSequenceManager.commandEffects (file:///C:/Users/Edwards/Documents/Projects/demo/js/plugins/LeTBS.js:4875:22)
at TBSSequenceManager.runCommand (file:///C:/Users/Edwards/Documents/Projects/demo/js/plugins/LeTBS.js:4754:5)
at TBSSequenceManager.update (file:///C:/Users/Edwards/Documents/Projects/demo/js/plugins/LeTBS.js:4732:14)
at file:///C:/Users/Edwards/Documents/Projects/demo/js/plugins/LeTBS.js:2281:33
at Array.forEach (native)

But it may be closer than you think though because the issues at the top have to deal with the damage pop up from Yanfly! Of course, this is from an outside perspective you may see this and say "sorry, eaed, we aren't close at all" lol Nonetheless I brought the console note for you.

The next step I ran is let's just pass and see what happens when an enemy attacks. Unfortunately, passing popped an error as well.
TypeError: Cannot read property 'missed' of undefined
at Sprite_Damage.setup (YEP_BattleEngineCore.js:3050)
at Sprite_Damage.setup (LeTBS_DamagePopupEX.js:87)
at TBSEntity_Sprite.addPopup (LeTBS.js:6951)
at TBSEntity_Sprite.addPopup (LeTBS_DamagePopupEX.js:49)
at TBSEntity.addPopup (LeTBS.js:6726)
at TBSEntity.onTurnEnd (LeTBS.js:6026)
at TBSEntity.onTurnEnd (LeTBS_TilesMarksAuraEffects.js:330)
at Function.BattleManagerTBS.turnEnd (LeTBS.js:2785)
at Function.BattleManagerTBS.validatePass (LeTBS.js:2774)
at Function.BattleManagerTBS.battlePhaseOnInputOk (LeTBS.js:2056)

So I may have to eat my own words and say maybe it is not as close as I thought. lol

Nonetheless, I went into the code myself but I ran out of time (I have a 6 month old I don't get very much time lol) but I am more than happy to report my discoveries.

I think the whole thing could work if there was a way to turn off his script and then turn it back on when need be. And I mean the script itself not the battle system because it looks like the global changes are the ones breaking the system but again I could be wrong.

I am going to continue working on my project but when I have more extended periods like I did today I will take another deep dive. I hope this helps in some way, shape, or form. But nonetheless, please keep up the good work. I look forward to additional releases! You are working at a fantastic pace!
Thanks Chaosicaa, got the demo working.

Is there any way I can disable corpses, such that the enemy disappears as soon as they are killed?
I have made astounding progress on my project and within the next week or so (tops) I will be needing to hire someone familiar with this battle system to implement a number of mechanics. It will be payed work and not a small job.

@Chaosicaa I am thinking you since Lecode probably does not want to take time away from the Battle System itself to work on my adaption of it?

If interested, contact me.
@barafundle
Actually letbs do not have a proper option to completely disable corpses but you can open the script LeTBS Config.js :

At line 7 you can see :

Lecode.S_TBS.Config.Battler_Sprites = {

// Config_name: data
"Default": [
// [pose_name,filename,frames,hue]
["idle", "_idle", 3, 0],
["dead", "_dead", 1, 0]
],

You just have to replace the number 1 to 0 for the dead option.

But that is not a perfect solution because you won't be able to go where your enemy died.
You can also let the number 1 and use a blank dead image or use a pile of ashes sprite or if you do not have the dead pose you can use the idle pose and gray them out.

It would be a nice thing to add in letbs further versions 🙂


@RetroBoy
I'm interested !
@Chaosicaa is there any way to make the common event GET the enemy ID or battler so i can show him up? i'm thinking more about using animations rather then pictures

and what can i do to call the common event when simply attacking and not using the basic attack? Can i call the common event with a weapon? otherwise, i guess i need to take out the attack and put it as a fre to cast skill
Thanks @Chaosicaa

I am more concerned about corpses clogging up movement on the map. Any way to disable corpses so that the square is no longer occupied and you can move into it?
One more suggestion:
Since the TBS system allows the use of improved battle tactics, it is possible to use weapons with ammunition (I use a YEP plugin, which proved to be compatible).
However, once the ammunition is over, we would like to change weapons (for one that does not demand ammunition)
I tested 3 plugins:
Http://yanfly.moe/2016/03/13/yep-83-change-battle-equip/
Https://forums.rpgmakerweb.com/index.php?threads/equip-battle-command.49324/
Http://mvplugins.com/plugin/Unconnected42/Change Equip On Battle
None of them proved compatible with TBS plugin.

Would it be possible to add the option to modify equipment during battle?
(Because I think compatibilizing is not very practical)

I made some changes to the script of you and realized that it is not very difficult to add this option (unfortunately I could not create the equipment selection window, so I can not help you any more)

Thank you so much!
@glaucozilla
For that you can create a state "attacked" and for each of your spells you can add the state "attacked" to the enemy then activate a common event.

In your common event you can set up like this :
If enemy 1 is affected by the state "attacked" play animation on enemy 1 (or play images or video like you want)

Do the same for all other enemy ID, you get the enemy ID by inflicting a state to them upon attack (it can be a no name state with no icon so it is invisible)

When the common event is over, remove the enemy state "attacked" (all troops) : )

@barafundle
I do not know a way to completely disable corpses with the actual version of letbs sorry (will probably be implemented later in the plugin configuration) :/

@cassio
Same here, I tried and I can add the command but I do not know how to bind the command to Yanfly change equip sorry :/
It is possible pretend the corpse disable by teleporting the died enemy to a non-passable tile.
by this way, you need use a blank dead pose (or set 0)
unfortunately, i dont know how teleport the enemy to specific tiles. =)
If you do it, say me how that i'm leaving this step for other time.

Chaosicaa, it is possible implement a "Lose Condition" (i dont know if it is implemented), to losy the battle by turns?
I know it is possible apply the dead status at a determined turn, but it is to exaggerated.

EDIT

Other thing, i saw the comand "passable" and "passable_on_dead" in the documentation. They are working?
can i place it on enemys definition? (i try but i cant do it)

it is possible implement the "fly" hability? (my bats can't fly =/ )
To pass trought objects on 249 area? (the areas that the skill trought)
@cassio
Oh my bad that was easy!

You just have to put :

<letbs>
passable_on_death
</letbs>

On actors note or enemy notes and you will be able to stop or run over them (that + blank dead pose will do the trick)

-----------------------------

For the lose condition, on your troop event, you can:
At turn 1:
Show image : You have 20 turns to complete this battle
Wait 120 frames (2 seconds)
Erase image

Then:

Condition turn 20
Show image : (in the image you can write the battle took too long...)
Wait 120 frames (2 seconds)
Erase image
Game over


You can also create a variable "lose" with +1 each turn, if this variable reach 20 or more (check the condition each turn), then :
Show image : (in the image you can write the battle took too long...)
Wait 120 frames (2 seconds)
Erase image
Game over

(The good thing with the variable is if you do specific conditions in the battle you can do : lose variable -5 so you give time to the player)

------------------------------

For the bats I do not know yet how to make them fly, if I find a solution I'll edit this post!
Thanks @Chaosicaa and @cassio for your help!

Seems like there is a bug when I use passable_on_death . When I move my character over the dead enemy corpse, my character becomes the dead enemy with 0 hp, and it becomes impossible for my character to receive damage.

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