Lecode Tactical Battle System 0.77.2B

Myers & Sparks

Veteran
Veteran
Joined
Jan 2, 2017
Messages
99
Reaction score
4
First Language
English
Primarily Uses
RMMV
It does that sometimes
Ill be in special and cancel a skill and drop into magic choices
Its a strange glitch but idk how to fix it right now
Oh drat. Ok well thank you for the reply
 

Aezriel

Shadow Slayer
Member
Joined
Mar 28, 2019
Messages
16
Reaction score
0
First Language
English
Primarily Uses
RMMV
Whenever I'm in a battle and I press the shift key, the screen goes to the upper right corner then says "Cannot read property 'x' of null"
Anyone know whats going on?
upload_2019-8-30_19-7-53.png
Console:
upload_2019-8-30_19-8-28.png
 

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
689
Reaction score
282
First Language
English
Primarily Uses
RMMV
Whenever I'm in a battle and I press the shift key, the screen goes to the upper right corner then says "Cannot read property 'x' of null"
Anyone know whats going on?
View attachment 122352
Console:
I've seen this.
Sometimes, there's an issue where it registers "Shift" as the run key, and since there's... well no player, it crashes.
I haven't had this issue in a while, so I'm not sure how to fix it exactly.
 

Aezriel

Shadow Slayer
Member
Joined
Mar 28, 2019
Messages
16
Reaction score
0
First Language
English
Primarily Uses
RMMV
I've seen this.
Sometimes, there's an issue where it registers "Shift" as the run key, and since there's... well no player, it crashes.
I haven't had this issue in a while, so I'm not sure how to fix it exactly.
I could try finding a plugin that allows you to disable sprinting by using a script, and make that script activate every time the player battles someone/something

Edit: I found one http://www.yanfly.moe/wiki/Dash_Toggle_(YEP)
 

Doktor_Q

I'm not a real doktor, but I am a real Q
Veteran
Joined
Aug 1, 2016
Messages
758
Reaction score
459
First Language
English
Primarily Uses
RMMV
@Aezriel It goes to the upper left because it's going into the "free look" mode, which is set to move toward the last click target, even when the target isn't active- by default, it'll be in the top left corner when inactive. You can optionally just disable free look.
 

Lucary

Dreamful Newbie
Member
Joined
Oct 31, 2018
Messages
4
Reaction score
0
First Language
English
Primarily Uses
RMMV
Hi guys, I recently started a project and I would love to use this battle system but I am struggling to really understand how to make it work properly even after looking at the demo and the documentation seems to be incomplete (?). Is there any guide or tutorial for how to set up and get going with LeBTS? Any help would be highly appreciated, I've spent quite a while agonizing over this ^^'

Thanks in advance.
 

Lucary

Dreamful Newbie
Member
Joined
Oct 31, 2018
Messages
4
Reaction score
0
First Language
English
Primarily Uses
RMMV
I Mean the amount of plugins you can have
As far as I know, you have unlimited slots, to add new plugins you scroll to the bottom of the list and double click on the blank slot. Once you put something there a new blank slot will appear underneath. If that doesn't work or you want to put in many plugins at once you can also copypaste plugins into the plugin manager from another project or folder. There should always be a blank space for you to click.
 

UniqueName

Veteran
Veteran
Joined
Nov 12, 2018
Messages
46
Reaction score
7
First Language
Russian
Primarily Uses
Other
Sup guys, I noticed that "Rush" skill from demo version can be used as ranged skill if there's an obstacle between the user and the target
in other words if there's an obstacle that doesnt block line of sight it prevents character from reaching the target but does not prevent damage
is there any way to make that skill damage only if you can reach the target?
 

Adventurer_inc.

Technically a Programmer
Veteran
Joined
Sep 12, 2015
Messages
99
Reaction score
40
First Language
English
Primarily Uses
RMMV
Sup guys, I noticed that "Rush" skill from demo version can be used as ranged skill if there's an obstacle between the user and the target
in other words if there's an obstacle that doesnt block line of sight it prevents character from reaching the target but does not prevent damage
is there any way to make that skill damage only if you can reach the target?
I had the same problem, however, my solution might not be exactly what you want.
Find the "rush" sequence in the Config.js file and replace:
Code:
"effects: {aoe}_battlers, current_obj, obj_anim",
with
Code:
"script: BattleManagerTBS.activeEntity()._sequenceManager._savedCells['front'] = [BattleManagerTBS.activeEntity().getForwardCell()];",
"map_effects: saved(front), current_obj, obj_anim",
What does this do exactly?
It strikes the square directly in front of you, instead of the selected target at the cursor. This means that the object blocking you is damageable, you will attack it.

Why do this?
Although the most direct solution is conditional sequencing, if you don't strike a target, the strike animation won't play. Map_effect strikes the maps so the animation always plays.

Will this cause bugs?
This shouldn't cause bugs outside of the core scripts because none of the core scripts was touched. However, dashing through allies will cause you to indirectly damage them.

On to newer things: Have anyone figured out how to do First Strike: Counterattack strike before the initial hit. This may kill attacking targets and not allow them to attack.
 

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
689
Reaction score
282
First Language
English
Primarily Uses
RMMV
I had the same problem, however, my solution might not be exactly what you want.
Find the "rush" sequence in the Config.js file and replace:
Code:
"effects: {aoe}_battlers, current_obj, obj_anim",
with
Code:
"script: BattleManagerTBS.activeEntity()._sequenceManager._savedCells['front'] = [BattleManagerTBS.activeEntity().getForwardCell()];",
"map_effects: saved(front), current_obj, obj_anim",
What does this do exactly?
It strikes the square directly in front of you, instead of the selected target at the cursor. This means that the object blocking you is damageable, you will attack it.

Why do this?
Although the most direct solution is conditional sequencing, if you don't strike a target, the strike animation won't play. Map_effect strikes the maps so the animation always plays.

Will this cause bugs?
This shouldn't cause bugs outside of the core scripts because none of the core scripts was touched. However, dashing through allies will cause you to indirectly damage them.

On to newer things: Have anyone figured out how to do First Strike: Counterattack strike before the initial hit. This may kill attacking targets and not allow them to attack.
Do you mean you counter BEFORE the enemy attacks you?

Thats interesting
I could probably do that with my edited system.
 

Adventurer_inc.

Technically a Programmer
Veteran
Joined
Sep 12, 2015
Messages
99
Reaction score
40
First Language
English
Primarily Uses
RMMV
@Pharonix That is exactly what I meant. I couldn't figure it out months ago and decided to tackle it again. :|
 

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
689
Reaction score
282
First Language
English
Primarily Uses
RMMV
@Pharonix That is exactly what I meant. I couldn't figure it out months ago and decided to tackle it again. :|
I'm working on an idea,
It involves cloning processCounterAttack and renaming to processPreCounter
For now, it'll just counter everthing(it should anyway) with "attack" but I gotta add stuff in, and test.

I'll let you know, maybe this weekend.

EDIT: Well that didn't work at all lol.
This is gonna be much more complicated.
 
Last edited:

UniqueName

Veteran
Veteran
Joined
Nov 12, 2018
Messages
46
Reaction score
7
First Language
Russian
Primarily Uses
Other
I had the same problem, however, my solution might not be exactly what you want.
Find the "rush" sequence in the Config.js file and replace:
Code:
"effects: {aoe}_battlers, current_obj, obj_anim",
with
Code:
"script: BattleManagerTBS.activeEntity()._sequenceManager._savedCells['front'] = [BattleManagerTBS.activeEntity().getForwardCell()];",
"map_effects: saved(front), current_obj, obj_anim",
What does this do exactly?
It strikes the square directly in front of you, instead of the selected target at the cursor. This means that the object blocking you is damageable, you will attack it.

Why do this?
Although the most direct solution is conditional sequencing, if you don't strike a target, the strike animation won't play. Map_effect strikes the maps so the animation always plays.

Will this cause bugs?
This shouldn't cause bugs outside of the core scripts because none of the core scripts was touched. However, dashing through allies will cause you to indirectly damage them.

On to newer things: Have anyone figured out how to do First Strike: Counterattack strike before the initial hit. This may kill attacking targets and not allow them to attack.
Wow it really works thank you
I wonder where did you find that script part
Did you look it up in the main code?
 

Danielcross

Veteran
Veteran
Joined
Sep 27, 2017
Messages
100
Reaction score
10
First Language
English
Primarily Uses
RMMV
Does anyone know how to change the skill behind counterattack?

Specifically, to have it work when the character is attacked in square (0) instead of just circle(0)
 

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
689
Reaction score
282
First Language
English
Primarily Uses
RMMV
Does anyone know how to change the skill behind counterattack?

Specifically, to have it work when the character is attacked in square (0) instead of just circle(0)
That would be me, but I added like 100+ lines of code to fully customize my counter system.
 

Danielcross

Veteran
Veteran
Joined
Sep 27, 2017
Messages
100
Reaction score
10
First Language
English
Primarily Uses
RMMV
That would be me, but I added like 100+ lines of code to fully customize my counter system.
Wanna give me a hint on where to start? :D

I just want it so characters can counteratk enemies that hit them diagonally as well as in the four cardinal directions.
 

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
689
Reaction score
282
First Language
English
Primarily Uses
RMMV
Wanna give me a hint on where to start? :D

I just want it so characters can counteratk enemies that hit them diagonally as well as in the four cardinal directions.
First off, Do counters work in your project?
If you grabbed Chaosicaa's LeTBS 0.77.2B Demo, then you should see the function processCounterAttack in LeTBS.js

This gets the distance between the entity getting attacked, and the person attacking.
And if the "distance" is less than or equal to '1' then do counters.
Code:
BattleManagerTBS.processCounterAttack = function (targets, subject, action) {
    if (!action) return;
    this.setCursorCell(subject.getCell());
    targets.forEach(function (entity) {
        if (entity) {
            var dist = LeUtilities.distanceBetweenCells(subject.getCell(), entity.getCell());
            if (dist <= 1 && Math.random() < action.itemCnt(entity.battler())) {
                var skill = $dataSkills[entity.battler().attackSkillId()];
                subject.battler().clearResult();
                entity.lookAt(subject.getCell());
                entity.addTextPopup("Counter");
                entity.startSequence("counter");
                this.forceAction(skill, entity);
            }
        }
    }.bind(this));
};

Unfortunately, this actually treats diagonals as "2" because you can't actually... move diagonally
Because of this, you'll need to add a new function to LeUtilities


Code:
LeUtilities.isDiagonal = function (a, b) {
    return (Math.abs(a.x - b.x)==1) && (Math.abs(a.y - b.y)==1);
};
Put this right below distanceBetweenCells
upload_2019-9-13_7-9-4.png

This little function, returns whether or not the X and Y position of either entity is 1 away(covers top-left, top-right, bottom-left, bottom-right)
as all diagonals are 1-x and 1-y position away
This is needed to tell the system that "Diagonal attacks are fine for counters"

Then You'll need to update the ProcessCounterAttack function to allow for this new function to work
Here's the change,
We set var isDiag to the result of our new function, then use it as an OR gate combined with dist<=1

Code:
BattleManagerTBS.processCounterAttack = function (targets, subject, action) {
    if (!action) return;
    this.setCursorCell(subject.getCell());
    targets.forEach(function (entity) {
        if (entity) {
            var dist = LeUtilities.distanceBetweenCells(subject.getCell(), entity.getCell());
            var isDiag = LeUtilities.isDiagonal(subject.getCell(), entity.getCell());
            if ((dist <= 1 || isDiag) && Math.random() < action.itemCnt(entity.battler())) {
                var skill = $dataSkills[entity.battler().attackSkillId()];
                subject.battler().clearResult();
                entity.lookAt(subject.getCell());
                entity.addTextPopup("Counter");
                entity.startSequence("counter");
                this.forceAction(skill, entity);
            }
        }
    }.bind(this));
};
upload_2019-9-13_7-14-16.png
Now what this says is
if either distance<=1 or they're diagonal
AND The math.random thing works out
then do the counter stuff.

This should work, as it isn't nearly as... intricate as mine.
My system actually treats diagonals as >1, but I may actually add these changes in lol.
 

Jomarcenter

jomarcenter-MJM
Veteran
Joined
Apr 24, 2012
Messages
1,243
Reaction score
183
First Language
ENGLISH
Primarily Uses
RMMV
the github link give me a 404
 

pulsusego

Villager
Member
Joined
Apr 8, 2019
Messages
16
Reaction score
13
First Language
English
Primarily Uses
RMMV
Been working a lot on the, ah.. 'infrastructure' of the game while waiting for 0.8, setting up tables in google sheets that help autogenerate items and such with varied stats (to copy/paste into the game's text/database files). But I come back to check on things fairly regularly, and skimming through gave me a thought. Is it possible to make characters exert a sort of 'exclusion zone' around them that prevents movement, like an obstacle that does not block LoS? I don't think this is currently doable to be honest, given that I remember a while back that there wasn't a[t least a reasonably approachable] method of implementing 'large' units (2x2, 3x3, etc.), but as this would be based on a regular 1x1 unit simply with the surrounding tiles impassable, I thought it might be worth a shot to ask. I wouldn't be sure where to begin with trying it out though- maybe auras could be used somehow?

@Jomarcenter that's odd, hang on I'll check then edit the post..
Right, so I'd never even realized there were demo files for 0.8 available in any way, which is interesting lol.. but for now, I think you'd have to stick with the 0.77.2 Update link, the latest officially released build. That, and chaosicaa's demo setup as reference material. Maybe the 0.8 links are being replaced or some such? We'll see soon enough, I'm sure.
 
Last edited:

Users Who Are Viewing This Thread (Users: 4, Guests: 6)

Latest Threads

Latest Posts

Latest Profile Posts

tfw, I found one of my skill ability in my game is not worth picking and had to plan to buff it. But my players seemed to use it without complaining. Now, idk if I should buff it or leave it as is.
I have recently discovered a Limit breaker for RPGmaker VXA, needless to say this changes everything.also I really like the changes this website has made.
It seems that my favorite anime page finally kicked the bucket... :,c
work in progres c:

Forum statistics

Threads
97,768
Messages
946,847
Members
128,979
Latest member
Agaricia
Top