Lecode Tactical Battle System 0.77.2B

Utopiablue

Veteran
Veteran
Joined
Apr 11, 2015
Messages
44
Reaction score
19
First Language
english
Primarily Uses
I know of an alternative if your interested.
In LeCode's "LeTBS_Commands.js" he forgot to add in the event call and the item call for the function, "BattleManagerTBS.onCommandInput".
Go to line 461(version 0.7.72) and replace that function with this one:

BattleManagerTBS.onCommandInput = function (command) {
if (command.match(/skill\[(\d+)\]/i)) {
this.processCommandCallSkill(Number(RegExp.$1));
return;
}
if (command.match(/event\[(\d+)\]/i)) {
this.processCommandCallEvent(Number(RegExp.$1));
return;
}
if (command.match(/item\[(\d+)\]/i)) {
this.processCommandCallItem(Number(RegExp.$1));
return;
}
Lecode.S_TBS.Commands.oldBattleManagerTBS_onCommandInput.call(this, command);
};

He also mistakenly put in the wrong code for functions, "Window_TBSCommand.prototype.addCommand_item"
and "Window_TBSCommand.prototype.addCommand_event".
Go to line 326 and replace both of these functions with this:

Window_TBSCommand.prototype.addCommand_item = function (id) {
var item = $dataItems[id];
var canUse = this._entity.battler().canUse(item);
this.addCommand(item.name, "item[" + id + "]", canUse);
};

Window_TBSCommand.prototype.addCommand_event = function (id) {
var common_event = $dataCommonEvents[id];
this.addCommand(common_event.name, "event[" + id + "]", true);
};

Now you can create an equip command for your characters!
I will give an example:

First, I go to Common Events and add an event.
View attachment 135968

Next, I went to the actor, Lucius and put this in his note box.
View attachment 135967
The one I added is event[7] 135 it will call common event 7 and 135 is the icon number.

Now, Lucius will change his weapon to Whip if it is in your party's inventory.
View attachment 135969
Here is his bow. It has a large atk range.

View attachment 135970
Now I'll equip whip, which has small atk range.

View attachment 135971

View attachment 135972
Whip is equipped and now his atk range is different, among other things.
I have updated this post for function, "Window_TBSCommand.prototype.addCommand_event".
this is how it should look:

Window_TBSCommand.prototype.addCommand_event = function (id) {
var common_event = $dataCommonEvents[id];
this.addCommand(common_event.name, "event[" + id + "]", true);
};
 

ZankokuNoYami

Veteran
Veteran
Joined
May 11, 2018
Messages
88
Reaction score
20
First Language
English
Primarily Uses
N/A
I have updated this post for function, "Window_TBSCommand.prototype.addCommand_event".
this is how it should look:

Window_TBSCommand.prototype.addCommand_event = function (id) {
var common_event = $dataCommonEvents[id];
this.addCommand(common_event.name, "event[" + id + "]", true);
};
Is there no way to make a common event that could call Yanfly's equip script? Using this method, I see I will need to actually make a series of conditional branches based on first switches. As the game progresses, you will end up being able to equip: A Sword, Pistol, Shotgun, Assault Rifle, Rifle or Magnum.



ANOTHER QUESTION! For passives... is there a way to create a passive that lets you change both range and type of range? Like... say your range on your pistol is 3. But you equip an augment that gives your gun +3 to range. Or, an augment that changes from a straight line of attack, to a circle.


EDIT: Another simple question... but I cannot seem to understand how to set up custom enemies so that I may have taller sprites. I created a sheet with the enemy, 3x4. Named it Ghoul_A. I want JUST that to be used for all of it's poses. The demo has some blank enemies that I wish I could see their graphics and understand the combustibility being used in the notes, haha.

EDIT #2: What am I doing wrong that will stop ME from taking damage? I want the attack to hit all enemies SURROUNDING you and come from the player himself. So the move HAS to start on the player, and hit only those AROUND the player.
1583467989609.png
Is there also no command that just makes friendly fire IMPOSSIBLE? I'm stupid, I know.
 
Last edited:

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
730
Reaction score
324
First Language
English
Primarily Uses
RMMV
Is there no way to make a common event that could call Yanfly's equip script? Using this method, I see I will need to actually make a series of conditional branches based on first switches. As the game progresses, you will end up being able to equip: A Sword, Pistol, Shotgun, Assault Rifle, Rifle or Magnum.



ANOTHER QUESTION! For passives... is there a way to create a passive that lets you change both range and type of range? Like... say your range on your pistol is 3. But you equip an augment that gives your gun +3 to range. Or, an augment that changes from a straight line of attack, to a circle.


EDIT: Another simple question... but I cannot seem to understand how to set up custom enemies so that I may have taller sprites. I created a sheet with the enemy, 3x4. Named it Ghoul_A. I want JUST that to be used for all of it's poses. The demo has some blank enemies that I wish I could see their graphics and understand the combustibility being used in the notes, haha.

EDIT #2: What am I doing wrong that will stop ME from taking damage? I want the attack to hit all enemies SURROUNDING you and come from the player himself. So the move HAS to start on the player, and hit only those AROUND the player.
View attachment 136095
Is there also no command that just makes friendly fire IMPOSSIBLE? I'm stupid, I know.
for the aoe,
use aoe_options: exclude_center, or try exclude_user
to exclude the center cell of the aoe or I believe exclude_user works to exclude the caster regardless.


For the augments, it's linked to the attack command or the weapon if you link the weapon to a skill.

All my weapons give a "skill" and i do not use the attack command.
Instead, it just shows "Dagger" since I use the [extra] command which shows the "Dagger" skill when a dagger is equipped.

Putting them on their own 3x4 sheet is the right thing to do.
if someone doesn't post how to do this later, I'll post it this weekend. I'm way too busy these days.
 

ZankokuNoYami

Veteran
Veteran
Joined
May 11, 2018
Messages
88
Reaction score
20
First Language
English
Primarily Uses
N/A
for the aoe,
use aoe_options: exclude_center, or try exclude_user
to exclude the center cell of the aoe or I believe exclude_user works to exclude the caster regardless.


For the augments, it's linked to the attack command or the weapon if you link the weapon to a skill.

All my weapons give a "skill" and i do not use the attack command.
Instead, it just shows "Dagger" since I use the [extra] command which shows the "Dagger" skill when a dagger is equipped.

Putting them on their own 3x4 sheet is the right thing to do.
if someone doesn't post how to do this later, I'll post it this weekend. I'm way too busy these days.
I tried using both:
aoe_options: exclude_center
aoe_options: exclude_user

And I still was murdered by my own attack, haha

I think I finally got the skill thing you mentioned working. Using the extra command is a more brilliant idea. My one issue is if you back out, it takes you to a blank skill page rather than straight back to the commands. Anyway to avoid that?

Well you do seem busy! Sounds like you pour a LOT of hours into your own game! Thank you for taking the time though to help me.
 

Sacrifyx

Veteran
Veteran
Joined
Oct 16, 2012
Messages
73
Reaction score
7
First Language
English
Primarily Uses
RMMV
Hey all,
Back again with a new thing. I have some animation troubles. Basically, I my fighter wing sequence fires off when I select it. It's a directional animation, obviously. Once it fires off, the damage popup comes up and the enemy is destroyed. Problem is, there's a separate animation attached to the skill that I need to play before the damage is applied to the enemy. For most attacks this isn't a problem, but this particular one the skill animation takes about 3.5ish seconds to play out after the attack sequence animation plays. The timing is correct in terms of how I want the animation to play (there's a small voice clip leading into it), I just need to delay the damage popup until after the skill animation plays.
So - sequence animation launches the fighters from the player ship, then the skil animation shows the fighters actually attack the target. Is there maybe a way to tie that second animation into the directional animation sequence or some other workaround?
 

CharlieMetal

Villager
Member
Joined
Mar 5, 2020
Messages
6
Reaction score
0
First Language
Spanish
Primarily Uses
RMMV
Hey all,
Back again with a new thing. I have some animation troubles. Basically, I my fighter wing sequence fires off when I select it. It's a directional animation, obviously. Once it fires off, the damage popup comes up and the enemy is destroyed. Problem is, there's a separate animation attached to the skill that I need to play before the damage is applied to the enemy. For most attacks this isn't a problem, but this particular one the skill animation takes about 3.5ish seconds to play out after the attack sequence animation plays. The timing is correct in terms of how I want the animation to play (there's a small voice clip leading into it), I just need to delay the damage popup until after the skill animation plays.
So - sequence animation launches the fighters from the player ship, then the skil animation shows the fighters actually attack the target. Is there maybe a way to tie that second animation into the directional animation sequence or some other workaround?
Maybe you could try using 3 sequences:
-A first sequence to play the voiceclip.
-The second sequence will play the fighter attacking (just an animation without an assigned skill from the database)
-And the third sequence could be the one that actually executes the skill and shows the damage popup. The actual skill wont have an animation assigned in the database in order to display only the damage.

I don't know if it's possible to do that, but it's something you could try :cool:
 

Sacrifyx

Veteran
Veteran
Joined
Oct 16, 2012
Messages
73
Reaction score
7
First Language
English
Primarily Uses
RMMV
That's sort of along the lines of what I'm thinking, just not sure if it's possible to call multiple sequences in a single skill. Not seeing any others that reference more than one sequence.
 

CharlieMetal

Villager
Member
Joined
Mar 5, 2020
Messages
6
Reaction score
0
First Language
Spanish
Primarily Uses
RMMV
That's sort of along the lines of what I'm thinking, just not sure if it's possible to call multiple sequences in a single skill. Not seeing any others that reference more than one sequence.
I think you can. Every skill executes at least two sequences. If you look in LeTBS Config, you'll notice that every skill sequence has a "call: pre_skill" and a "call: post_skill" command, these are two predefined sequences that are called by the actual skill sequence.

So, in theory, you can create a sequence with more "call:sequence" commands.
 

Sacrifyx

Veteran
Veteran
Joined
Oct 16, 2012
Messages
73
Reaction score
7
First Language
English
Primarily Uses
RMMV
I looked through and couldn't quite puzzle out how to do what you suggest other than creating another sequence, and even then I wasn't sure how to incorporate it. I decided instead to roll the dice and just add "anim: cursor_cell, 185", after my directional animation line, and it worked! Had to adjust the wait time immediately after that to get the timing just right, but all is good now. One more off the list...

I think now my only remaining irritation is how to get characters and enemies to spawn into battle facing a specific direction, also to remain facing their current direction during dialogue, so any insight anyone can provide would be a huge help. Currently in the first battle, the main character spawns with two enemies. Oddly, those two enemies are facing to the right, which they should, and they don't change.

After a couple turns, two more enemies spawn to the south (this is just a retool of the demo battle), but facing down when they should be facing up. The ally character that spawns also spawns in facing south, and, like the enemies should be facing up.

While this is happening, the main character at the top turns down to face the new arrivals unnecessarily.

The plugin commands that handle this don't really have an apparent place for directional controls, they just call the enemy/ally at specific coordinates.

Looking through the documentation, I'm not seeing anything to control the directions.
 
Last edited:

AbstractMan

Villager
Member
Joined
Jun 22, 2019
Messages
9
Reaction score
1
First Language
English
Primarily Uses
RMMV
The search function in this thread dose does not like AI ☹, but I do have another question.


I have gotten to the point in my development where I want to be more in-depth at customizing my AI, and I have been trying to play with the LETBS config file to make a ranged character that will never approach an enemy. I see the bottom of the JS script where it says “Your behaviors”, which Is where I imagine where you can make your own AI sequence, but I am unsure on how to formulate multiple different types of custom AI’s, and how you properly tag an enemy with that particular AI. Do you I make another “Your behaviors” tab and call it something else?
 

MiLo-Katergaris

Villager
Member
Joined
Apr 17, 2019
Messages
26
Reaction score
2
First Language
English
Primarily Uses
RMMV
for the aoe,
use aoe_options: exclude_center, or try exclude_user
to exclude the center cell of the aoe or I believe exclude_user works to exclude the caster regardless.


For the augments, it's linked to the attack command or the weapon if you link the weapon to a skill.

All my weapons give a "skill" and i do not use the attack command.
Instead, it just shows "Dagger" since I use the [extra] command which shows the "Dagger" skill when a dagger is equipped.

Putting them on their own 3x4 sheet is the right thing to do.
if someone doesn't post how to do this later, I'll post it this weekend. I'm way too busy these days.
For the augments, could you explain what you mean by it's linked to the attack command? Variable scopes is something I'd like to implement in my game and I'm not sure how to go about it.

Thanks!
 

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
730
Reaction score
324
First Language
English
Primarily Uses
RMMV
Basically its this:

By default, the demo uses "Attack" as the attack command, The scope/aoe is defined by this skill (ID - 1)
In my game, I don't use "attack", I use the letbs command on weapons to give an "[extra]" skill,
The top of the order of commands is usually:

Attack
[Extra]
Skill

So when you have a weapon/armor give a skill (lets say you equip Dagger which gives skill "Dagger")
this will say

Attack
Dagger
Skill

For my purposes, I removed "Attack" from the commands, because I don't need it, and also because I wanted a different skill/scope per weapon. (I have several weapons types)

It is my understanding, that unless you rewrite the code, Augments that say "add 1 to aoe size" or "range +1" won't particularly work.

However, If all weapons start with the same "range" and "aoe" then it becomes Ridiculously easy, but you would need to NOT use Attack and all these would have to be an actual "Type" skill, and not the default Attack skill. This is because Yanfly's skill progression script doesn't affect the default "attack" command, it may however affect the skills you add via weapons, but i'm not entirely sure.
Simply make Several "Attack" skills, which you will need to decide the "Default Progression" that is, the order of which skill should be the "active" skill.
Then you use:
<Hide if Learned Skill: 368>
The way I use my skills, is I use the "Skill Equip" system by yanfly, and because of that, I don't want 5 different copies of fireball. (Fireball I -> Fireball V) instead, I just use <Hide if Learned Skill: X> and each prior version is removed
So if FB1 is 367:
<Hide if Learned Skill: 368>
FB2
<Hide if Learned Skill: 369>
You only need to use <Hide if Learned Skill: 368> for the next level up, because even though it's "Hidden" it is still "Learned"

So by bringing this in, you can have augments grant Different versions of the attack, which will hide all the "earlier versions"
I haven't tested this with skills granted by states or weapons though, so this is all Theorycrafting at this point.
 

ZankokuNoYami

Veteran
Veteran
Joined
May 11, 2018
Messages
88
Reaction score
20
First Language
English
Primarily Uses
N/A
ved "Attack" from the
I had managed to get your idea set up. I made a small change. Instead of two weapons, I went with a main hand weapon and turned my 'shield' into a gun. So that way the player can always have the sword and gun equipped. The Sword acts as basic attack (I was originally going to make it so it used a skill instead... but the [extra] freaks out if I have two extras or have two things equipped that would fill extra. Its weird...).

So now they equip the gun and it gives the skill. However, if you back out... it takes you to a blank skill menu since it isnt an actual skill you can choose from, and it's under it's own category. Is there a way to make it go straight back to the commands page?

And I still cannot figure out how to make the AOE not kill me. I am thinking it MIGHT have to do with the sequence. I cannot, for the life of me, understand these sequences. I have tried to break them a part to understand them, but the information within the config script is limited and it isn't as straight forward as I am used too. I am using great wind sequence and trying to modify it to my purposes. Which is to create an explosive barrier that hits everyone in a circle around the player and sends them flying.

Oh, and I was also wondering if you could help me with line of sight. I have a shotgun that basically hits in a line of sight. However, it seems that line of sight gets screwy if say I have several enemies in front of me. At some point, it doesn't act like itself, and even seems to ignore certain enemies directly in front. I want for the shot gun to basically hit all enemies in a 1,3 square pattern
o
o o
o
With some knock back effect. But I notice the person in the very front if I line enemies up like that, does not get knocked back. I have a skill that basically does a similar pattern as the shot gun, and this is where I noticed the person in front remains in position and the people behind get shot away.
 

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
730
Reaction score
324
First Language
English
Primarily Uses
RMMV
Regarding the [extra] with multiple skills freakout, I had actually fixed that at one point.

In LeTBS_Commands, there is a function (TBSEntity.prototype.getCommandsString) that builds the command list.
It didn't properly append more than 1
It has something to do with commas.

This is my version, try it
EDIT: Posted the wrong version the first time.
JavaScript:
TBSEntity.prototype.getCommandsString = function () {
    var value = this.rpgObject().TagsLetbsCommands.toString();
    var extra = "";
    this.battler().states().forEach(function (state) {
        if (state) {
            extra += "," + state.TagsLetbsCommands.toString();
        }
    });
    if (this.battler().isActor()) {
        this.battler().equips().forEach(function (equip) {
            if (equip) {
                extra += "," + equip.TagsLetbsCommands.toString();
            }
        });
    }
    extra=extra.replace(/(^,*)|(,*$)/g,"");
    return LeUtilities.perfectStringList(value.replace("[extra]", extra));
};
 

Doktor_Q

I'm not a real doktor, but I am a real Q
Veteran
Joined
Aug 1, 2016
Messages
786
Reaction score
481
First Language
English
Primarily Uses
RMMV
Regarding the [extra] with multiple skills freakout, I had actually fixed that at one point.

In LeTBS_Commands, there is a function (TBSEntity.prototype.getCommandsString) that builds the command list.
It didn't properly append more than 1
It has something to do with commas.

This is my version, try it
EDIT: Posted the wrong version the first time.
JavaScript:
TBSEntity.prototype.getCommandsString = function () {
    var value = this.rpgObject().TagsLetbsCommands.toString();
    var extra = "";
    this.battler().states().forEach(function (state) {
        if (state) {
            extra += "," + state.TagsLetbsCommands.toString();
        }
    });
    if (this.battler().isActor()) {
        this.battler().equips().forEach(function (equip) {
            if (equip) {
                extra += "," + equip.TagsLetbsCommands.toString();
            }
        });
    }
    extra=extra.replace(/(^,*)|(,*$)/g,"");
    return LeUtilities.perfectStringList(value.replace("[extra]", extra));
};
You can work around the problem by just putting a comma at the end of every extra command you add, if you don't want to dig into the code.
 

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
730
Reaction score
324
First Language
English
Primarily Uses
RMMV
You can work around the problem by just putting a comma at the end of every extra command you add, if you don't want to dig into the code.
Good call
 

posfan12

Veteran
Veteran
Joined
Jun 4, 2014
Messages
59
Reaction score
3
First Language
English
Primarily Uses
RMMV
I just update to the latest letbs scripts and now when entering combat I get an error message:

TypeError: Cannot read property 'addChild' of undefined.

There's not a file name or line number given. How do I troubleshoot this?

[edit]

Disregard. I started a new map based on the LeTBS demo project instead.
 
Last edited:

posfan12

Veteran
Veteran
Joined
Jun 4, 2014
Messages
59
Reaction score
3
First Language
English
Primarily Uses
RMMV
I am trying to use LeTBS in conjunction with the "TDDP_BindPicturesToMap.js" plugin. It seems to work until combat starts, after which the binding of the parallax background stops functioning. Has anyone come up with a solution? Thanks.
 

ZankokuNoYami

Veteran
Veteran
Joined
May 11, 2018
Messages
88
Reaction score
20
First Language
English
Primarily Uses
N/A
I want my character to be able to create psi-clones. Part of the skill tree is allowing different types. I wanted to make them like chess pieces. How can I create move routes that reflect this for Bishop and Knight? Since Rook, Queen and Pawn would be simple enough, haha.
 

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
730
Reaction score
324
First Language
English
Primarily Uses
RMMV
I want my character to be able to create psi-clones. Part of the skill tree is allowing different types. I wanted to make them like chess pieces. How can I create move routes that reflect this for Bishop and Knight? Since Rook, Queen and Pawn would be simple enough, haha.
totally possible.
for bishop, you use "cross" i believe (this makes an "X")
As for the knight, you need to use custom, and set up a scope in the config and call the name.
In fact, this video was made using the Chess Knight's movement as a base.

EDIT: funny enough, the scope was called "Knight"

"knight": {
data: "[cx-1,cy-2],[cx+1,cy-2],[cx-2,cy-1],[cx+2,cy-1],[cx-2,cy+1],[cx+2,cy+1],[cx-1,cy+2],[cx+1,cy+2]"
},
1584194587561.png
 

Users Who Are Viewing This Thread (Users: 2, Guests: 7)

Latest Threads

Latest Profile Posts

I need to remember that if i want to learn to map like a pro, I need to spend hours doing it like a noob again and again… also, a cool map sometimes has hours/even days of work behind. I need to remember that too.
Yo there how's it going rpg community.
It's raining non stop since yesterday. The sound of the rain is so soothing.
I really miss the old style disney animated movies. I guess the last one was The Princess and the Frog from 2009. Now I am trying to collect every single one I can get on BD or DVD.
What I've seen from the MZ tiles looks pretty inconsistent, bleh. Every plant seems to be drawn in a different style.

Forum statistics

Threads
99,293
Messages
963,932
Members
130,905
Latest member
GhostAcc
Top