Lecode Tactical Battle System 0.77.2B

UniqueName

Veteran
Veteran
Joined
Nov 12, 2018
Messages
66
Reaction score
9
First Language
Russian
Primarily Uses
Other
I'm hoping Pharonix will chime in...he seem's to be the guy who most grasps LTBS out of the active members. Also praying for v0.8 but not getting my hopes up lol.

I hope I'm not forced to switch to Tactics System 1.1... I really like all the features available in LTBS. Sigh...

SRPG wouldn't work for me cuz a big feature of my game is seamless combat transitions. Basically going from exploring a dungeon to fighting a battle happens on the same map in my game. SRPG seems like you're always in tactical combat mode...unless I just haven't figured it all out yet. Also, I don't want the attacks to play Fire Emblem style, I want it to happen on the grid, like in FF Tactics.

Does anyone know how to use an eval/formula for Move Points btw?
so I made this
1592241681918.png
and it worked out fine so it is possible to use variables in a config file
but the problem is that the config file doesn't read $data or $game
so var = $gameActors.actor(1).atk for example doesn't work same with $data, "a.atk" and "user.atk"
and ofc
var asd = 3;
if ($gameActors.actor(1).isLearnedSkill(42)) asd = 4;
also doesnt work
 

Frostorm

[]D[][]V[][]D aka "Staf00"
Veteran
Joined
Feb 22, 2016
Messages
1,116
Reaction score
809
First Language
English
Primarily Uses
RMMV
And also lecode abandoned the plugin so i doubt 0.8 will ever come out =(
For how long do you use letbs?
I use it for 1.5 year so i can tell you all the bugs and limitations i found so far so you could determine if you gonna use it till the end or find smth else
I've actually have LTBS installed for about a year now, but kept myself from truly delving into it, hoping v0.8 would be just around the corner. Basically been working on all other parts of my project up till now. What serious limitations have you encountered btw? Despite LTBS not being updated, it still seems more powerful than the other tactical systems out there...

Also, thanks for the screenshot! That'll help me make auras in general ^.^
But why is the size "circle(1)" if it's an aura? Is the intention not to affect a wide aoe?
 

deathsia

Pegisister
Veteran
Joined
Feb 26, 2014
Messages
641
Reaction score
55
First Language
English
Primarily Uses
So I ran into this oddball of an error when I was setting up my troops for a battle:

Any idea what caused this and is there a fix?
 

UniqueName

Veteran
Veteran
Joined
Nov 12, 2018
Messages
66
Reaction score
9
First Language
Russian
Primarily Uses
Other
I've actually have LTBS installed for about a year now, but kept myself from truly delving into it, hoping v0.8 would be just around the corner. Basically been working on all other parts of my project up till now. What serious limitations have you encountered btw? Despite LTBS not being updated, it still seems more powerful than the other tactical systems out there...

Also, thanks for the screenshot! That'll help me make auras in general ^.^
But why is the size "circle(1)" if it's an aura? Is the intention not to affect a wide aoe?
ok this is what I found so far:
1) battle lags on enemy turn (its when "out of range" thingy comes out)
2) some features like directional damage don't work
3) the starting cells are static so you can't randomize their location or spawn more cells
4) the <actor cell: x> note tag is buggy as hell you can't start a battle if all your actors deployed with this notetag, when withdraw them from assigned cell you can't put them back and sometimes it causes "cannot read property of 'y'" thing
5) if you cast a spell that gives extra turn at your ally the game may crash
6) the main documentation for this plugin doesnt show all notetags and plugin commands and stuff and some notetags are different (like in documentation this "move_points: x" but in reality its "move_points+: x"
7) if you use character sprites as your battler sprites (use_chara notetag) when your actors get killed they don't get replaced with dead body sprites but for some reason it isnt the case with enemies
8) letbs only uses regions to define collision and its really inconvinient to me
 

UniqueName

Veteran
Veteran
Joined
Nov 12, 2018
Messages
66
Reaction score
9
First Language
Russian
Primarily Uses
Other
So I ran into this oddball of an error when I was setting up my troops for a battle:

Any idea what caused this and is there a fix?
go to line 2330 of LeTBS.js (version .76b) or line 2523 (version .77.1) for the function BattleManagerTBS.getNextActorPositioningCell.
Go to line 2334 (version .76b) or 2527 (version .77.1) where it says:

if (currentIndex === -1) {
return this.allyStartCells()[0];
}

DELETE THIS.
 

Frostorm

[]D[][]V[][]D aka "Staf00"
Veteran
Joined
Feb 22, 2016
Messages
1,116
Reaction score
809
First Language
English
Primarily Uses
RMMV
go to line 2330 of LeTBS.js (version .76b) or line 2523 (version .77.1) for the function BattleManagerTBS.getNextActorPositioningCell.
Go to line 2334 (version .76b) or 2527 (version .77.1) where it says:

if (currentIndex === -1) {
return this.allyStartCells()[0];
}

DELETE THIS.
Should I do this as well as a pre-emptive measure? What are those lines of code supposed to do anyway?

6) the main documentation for this plugin doesnt show all notetags and plugin commands and stuff and some notetags are different (like in documentation this "move_points: x" but in reality its "move_points+: x"
Btw, any useful notetags I should be aware of that are not on the documentation?
 
Last edited:

UniqueName

Veteran
Veteran
Joined
Nov 12, 2018
Messages
66
Reaction score
9
First Language
Russian
Primarily Uses
Other
Should I do this as well as a pre-emptive measure? What are those lines of code supposed to do anyway?


Btw, any useful notetags I should be aware of that are not on the documentation?
This bug doesnt always happen
check if this bug happens in your game and remove this line if it does
This line has smth to do with character indexing but the game would work fine without it
And if you want to find some useful notetags search for them in the demo or in plugin code itself
 

deathsia

Pegisister
Veteran
Joined
Feb 26, 2014
Messages
641
Reaction score
55
First Language
English
Primarily Uses
go to line 2330 of LeTBS.js (version .76b) or line 2523 (version .77.1) for the function BattleManagerTBS.getNextActorPositioningCell.
Go to line 2334 (version .76b) or 2527 (version .77.1) where it says:

if (currentIndex === -1) {
return this.allyStartCells()[0];
}

DELETE THIS.
I'm running version 72b... and i can't find that line where. Also your kinda confusing. Is this two separate parts of the plugin or the same one?

Edit: Okay yeah, removing that part of the script COMPLETELY BREAKS IT. It doesn't fling up any errors but it throws me into my default combat system which is Yanfly's atb system. So that won't work.

Another issue i'm encountering is that when an enemy dies, it blocks the player actor's movement path. atm one of my character is locked in to a position despite one enemy being dead behind them but since she has enemies on all sides, she can't move. Any fix for this?
 
Last edited:

UniqueName

Veteran
Veteran
Joined
Nov 12, 2018
Messages
66
Reaction score
9
First Language
Russian
Primarily Uses
Other
I'm running version 72b... and i can't find that line where. Also your kinda confusing. Is this two separate parts of the plugin or the same one?
I dont get what you mean but if your version is 72b this line gotta be somewhere near
Search under the function "BattleManagerTBS.getNextActorPositioningCell"
 

Frostorm

[]D[][]V[][]D aka "Staf00"
Veteran
Joined
Feb 22, 2016
Messages
1,116
Reaction score
809
First Language
English
Primarily Uses
RMMV
I'm running version 72b... and i can't find that line where. Also your kinda confusing. Is this two separate parts of the plugin or the same one?
I found it on line 2545 running 77.2b, but I haven't deleted it yet since it looks a bit different from the post (it's got more lines of code)
 

UniqueName

Veteran
Veteran
Joined
Nov 12, 2018
Messages
66
Reaction score
9
First Language
Russian
Primarily Uses
Other
I found it on line 2545 running 77.2b, but I haven't deleted it yet since it looks a bit different from the post (it's got more lines of code)
do you even have that bug?
As I said before not everyone has it
dont delete this line if you dont have the "cannot read property of 'y'" bug
 

Frostorm

[]D[][]V[][]D aka "Staf00"
Veteran
Joined
Feb 22, 2016
Messages
1,116
Reaction score
809
First Language
English
Primarily Uses
RMMV
do you even have that bug?
As I said before not everyone has it
dont delete this line if you dont have the "cannot read property of 'y'" bug
That's why I haven't deleted it lol. I'm just trying to learn at the same time. :p

Btw, would you happen to know how to use conditionals for a skill's scope? Or using a formula/eval to determine Move Points?
 

UniqueName

Veteran
Veteran
Joined
Nov 12, 2018
Messages
66
Reaction score
9
First Language
Russian
Primarily Uses
Other
That's why I haven't deleted it lol. I'm just trying to learn at the same time. :p

Btw, would you happen to know how to use conditionals for a skill's scope? Or using a formula/eval to determine Move Points?
You already asked that
I doubt that its possible unless you change the code =/
 

Frostorm

[]D[][]V[][]D aka "Staf00"
Veteran
Joined
Feb 22, 2016
Messages
1,116
Reaction score
809
First Language
English
Primarily Uses
RMMV
What the deuce?! Please help! What did I do wrong? I'm finally getting around to setting up my battles the way I want and this happens...
My 1st Error.png
 

UniqueName

Veteran
Veteran
Joined
Nov 12, 2018
Messages
66
Reaction score
9
First Language
Russian
Primarily Uses
Other
What the deuce?! Please help! What did I do wrong? I'm finally getting around to setting up my battles the way I want and this happens...
View attachment 148015
Are you sure you did everything right?
Do you have actors cells and enemies cells?
Do all of your actors have sprites set up?
 

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
747
Reaction score
340
First Language
English
Primarily Uses
RMMV
Modified by MakeScope function to support a function that returns a string such as (4,2)
This allows the creation of skills that would normally be 3,2, but the character has a state that increases this range by 1.
This doesn't work with base code, as a function that returns a string is not evaluated in the "range" version, as e.getSquareRange() does not contain a comma, so it evaluates it in the single range version, and crashes

With this, I just make new TBSEntity functions, and have it return the results

Currently this code is hard-coded in my LeTBS.js file,


This only replaces the if statement for
if (data.match(/(circle|line|square|cross)\((.+)\)/i)) {
up to its closing bracket,
I recomment cloning the function and commenting out the original when you make changes, so you can easily revert.

JavaScript:
    if (data.match(/(circle|line|square|cross)\((.+)\)/i)) {
        console.log(data);
        if (RegExp.$2.includes(",")) {
            str = RegExp.$2.split(",");
            size = Math.floor(Number(eval(str[0])));
            min = Math.floor(Number(eval(str[1])));
        } else if(RegExp.$2.includes("()"))
        {
            //This checks if a function is used instead of the normal circle(x)/circle(x,y) format to return a number or x,y
            //This will only be used if it does not use function(),function() as that will get picked up by the first statement.
            //Afterwards, it essentially clones the original function with checking if comma delimited, or not.
        R2 = eval(RegExp.$2);
               if (R2.includes(",")) {
                str = R2.split(",");
               size = Math.floor(Number(eval(str[0])));
               min = Math.floor(Number(eval(str[1])));
        }
        else {
            size = Math.floor(Number(eval(RegExp.$2)));
            }
        }
        else {
            size = Math.floor(Number(eval(RegExp.$2)));
        }
    }


Additionally I added some code to TBSEntity.prototype.getObjectSequenceData
Which should in theory allow you to write things like
sequence: e.skillNameSequence()

in which skillNameSequence() is a function under TBSEntity.prototype
that returns a string that matches a sequence name.

In theory this will allow me to write functions for skills that change the skill based on variables, and in theory, allow the Evolution of skills

One idea I got is actually from Xenoblade Chronicles, from a gem called "double attack" that gives a 50% chance of double attack when auto-attacking.
I can now add this onto all my basic "attack" skills
and if the user is afflcited with any form of "double attack" (i plan on 5 levels each adding 10% chance)
then it uses random numbers to determine if the user "double attacked"
and returns my sequences of
atk2 if they can, or atk if they can't

Since I do have some weapons that don't use the atk sequence (i have bows and staves) some of them use the default "skill" sequence, so for these, I cloned the skill sequence, and call it skill2 which effectively just adds the effect damage twice.

I will let you all know how the testing goes.

I did want to add a Vorpal Sword or so to speak, that gives a chance to attack up to 5 times, but without my extra code, it didn't really seem possible. now I can just set
sequence: e.vorpalSword()
and it should return either atk, atk2, atk3, atk4 or atk5

Basically its description will say something like
"Mystic Blade that has the ability to attack multiple times (up to 5)"
and will have a 25% chance of triggering each level.

This is also great for creating skills that should attack a random number of times.

Once again,
I will keep everyone posted on whether or not my code actually works how I want it.
All the stuff for conditional scopes worked in all my testing however.
 

eaufidrane

Villager
Member
Joined
May 11, 2020
Messages
27
Reaction score
0
First Language
english
Primarily Uses
RMMV
And also lecode abandoned the plugin so i doubt 0.8 will ever come out =(
For how long do you use letbs?
I use it for 1.5 year so i can tell you all the bugs and limitations i found so far so you could determine if you gonna use it till the end or find smth else
sir may i ask if how can i fix the error saying cannot read property height undefined?
 

Frostorm

[]D[][]V[][]D aka "Staf00"
Veteran
Joined
Feb 22, 2016
Messages
1,116
Reaction score
809
First Language
English
Primarily Uses
RMMV
Are you sure you did everything right?
Do you have actors cells and enemies cells?
Do all of your actors have sprites set up?
Actor cells: check
Enemy cells: check

IGNORE EVERYTHING BEFORE EDIT5!

But can someone give me an example of a simple monster's sprite config (w/e you put in their notebox).
This is what I'm using:

<letbs>
use_character
character_name: Monster
character_index: 1
sequence(dead): dead_vanish
has_no_corpse
</letbs>


Edit: Ok, I fixed the sprite issue, but now I get this when I try to enter a battle...
My 1st Error.png
So I get this right when I get to where the player placement phase should happen. The error doesn't show up until I click on the actor to place him on the map.

Is this still a sprite setup issue? Cuz I'm using this for the monster now:
<letbs_sprite>
pose(idle): use_chara, Monster, 1
pose(dead): use_chara, Damage2, 0, 0
turn_order: auto
status_sprite: auto
sequence(dead): dead_vanish
</letbs_sprite>

And this for the actor:
<letbs_sprite>
pose(idle): _idle, 1
pose(move): _move, 8
pose(cast): _cast, 6
pose(atk): _atk, 5
pose(hit): _hit, 3
pose(dead): _dead, 1
turn_order: auto
status_sprite: auto
</letbs_sprite>

I made sure to have all the actor's img files properly named and such. Seems like it probably is a sprite setup issue, but I can't discern if it's the actor or monster that I didn't setup right...

Edit: I think it's probably an enemy sprite issue... Can someone show me what they are using in their enemies' notebox? Thx!

Edit2: Ok, I created a clean slate new project and got the same "Cannot read property 'position' of undefined" error. I copy-pasted all the actors, enemies, troops, & events from the LTBS demo project onto this new project. I made sure to copy-paste the leTBS img folder and all the plugins as well. What am I doing wrong??

Hell, I even copy-pasted the entire map!

Edit3: Eureka! It was because I was missing the "Entity Appears" animation in the database!

Edit4: Omg, now I get this error after I put down the actors and hit "Confirm" during the "Begin Battle?" prompt...
My 1st Error.png

Edit5: Fixed this issue as well! I forgot to actually add the enemy in the troop lol. But now the game crashes upon reaching the victory screen...sigh I think I need a break for today.
 
Last edited:

deathsia

Pegisister
Veteran
Joined
Feb 26, 2014
Messages
641
Reaction score
55
First Language
English
Primarily Uses
Modified by MakeScope function to support a function that returns a string such as (4,2)
This allows the creation of skills that would normally be 3,2, but the character has a state that increases this range by 1.
This doesn't work with base code, as a function that returns a string is not evaluated in the "range" version, as e.getSquareRange() does not contain a comma, so it evaluates it in the single range version, and crashes

With this, I just make new TBSEntity functions, and have it return the results

Currently this code is hard-coded in my LeTBS.js file,


This only replaces the if statement for
if (data.match(/(circle|line|square|cross)\((.+)\)/i)) {
up to its closing bracket,
I recomment cloning the function and commenting out the original when you make changes, so you can easily revert.

JavaScript:
    if (data.match(/(circle|line|square|cross)\((.+)\)/i)) {
        console.log(data);
        if (RegExp.$2.includes(",")) {
            str = RegExp.$2.split(",");
            size = Math.floor(Number(eval(str[0])));
            min = Math.floor(Number(eval(str[1])));
        } else if(RegExp.$2.includes("()"))
        {
            //This checks if a function is used instead of the normal circle(x)/circle(x,y) format to return a number or x,y
            //This will only be used if it does not use function(),function() as that will get picked up by the first statement.
            //Afterwards, it essentially clones the original function with checking if comma delimited, or not.
        R2 = eval(RegExp.$2);
               if (R2.includes(",")) {
                str = R2.split(",");
               size = Math.floor(Number(eval(str[0])));
               min = Math.floor(Number(eval(str[1])));
        }
        else {
            size = Math.floor(Number(eval(RegExp.$2)));
            }
        }
        else {
            size = Math.floor(Number(eval(RegExp.$2)));
        }
    }


Additionally I added some code to TBSEntity.prototype.getObjectSequenceData
Which should in theory allow you to write things like
sequence: e.skillNameSequence()

in which skillNameSequence() is a function under TBSEntity.prototype
that returns a string that matches a sequence name.

In theory this will allow me to write functions for skills that change the skill based on variables, and in theory, allow the Evolution of skills

One idea I got is actually from Xenoblade Chronicles, from a gem called "double attack" that gives a 50% chance of double attack when auto-attacking.
I can now add this onto all my basic "attack" skills
and if the user is afflcited with any form of "double attack" (i plan on 5 levels each adding 10% chance)
then it uses random numbers to determine if the user "double attacked"
and returns my sequences of
atk2 if they can, or atk if they can't

Since I do have some weapons that don't use the atk sequence (i have bows and staves) some of them use the default "skill" sequence, so for these, I cloned the skill sequence, and call it skill2 which effectively just adds the effect damage twice.

I will let you all know how the testing goes.

I did want to add a Vorpal Sword or so to speak, that gives a chance to attack up to 5 times, but without my extra code, it didn't really seem possible. now I can just set
sequence: e.vorpalSword()
and it should return either atk, atk2, atk3, atk4 or atk5

Basically its description will say something like
"Mystic Blade that has the ability to attack multiple times (up to 5)"
and will have a 25% chance of triggering each level.

This is also great for creating skills that should attack a random number of times.

Once again,
I will keep everyone posted on whether or not my code actually works how I want it.
All the stuff for conditional scopes worked in all my testing however.
I have a question for you, is the version of the combat system you are using that you have heavily modified, compatible with version 1.5.2 of RPG maker MV? And is it by all accounts, stable without relying on any other plugins beyond the ones it already uses? If so, can you release your build to everyone in this thread?

I'm sure everyone here would be grateful for a stable and bug free version of this plugin assuming it retains its previous functionality of working interdependently so another combat system can be used along side of it.
 

Frostorm

[]D[][]V[][]D aka "Staf00"
Veteran
Joined
Feb 22, 2016
Messages
1,116
Reaction score
809
First Language
English
Primarily Uses
RMMV
Pharonix's modifications are probably too extensive for anyone to use out of the box, I have gone through the thread and picked out all the snippets of code I wanted tho. I suggest you do as well if you want these modifications. You can search/filter by his username. It will also be helpful to read the posts in the context of said code so you learn how/why to use it.
 

Users Who Are Viewing This Thread (Users: 1, Guests: 8)

Latest Threads

Latest Profile Posts

Stream will be live shortly with some Darkest Dungeon! Feel free to drop by!
I made a battle results screen for my minigame.. any feedback? :)
Things I thought would never happen but just did: I needed to use my snow shovel. In August. In the Northern Hemisphere.
So I finished Cupcake, now I need to figure out my next project!
Do I pick up one of my incomplete games?
Do I start something entirely new???
The possibilities are endless!
Am I the only one who keeps thinking TPBS means "Turn Press Battle System" and not "Time Progress Battle System?"

Forum statistics

Threads
100,678
Messages
978,348
Members
132,301
Latest member
Rumplestiller
Top