Oh drat. Ok well thank you for the reply
Lecode Tactical Battle System 0.77.2B
JS Plugin Releases (RMMV)Oh drat. Ok well thank you for the reply
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?
Console:
Anyone know whats going on?
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.
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)
@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.
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.
Thanks in advance.
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.
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?
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:
with
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.
Code:
"effects: {aoe}_battlers, current_obj, obj_anim",
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.
@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.
Wow it really works thank you
I wonder where did you find that script part
Did you look it up in the main code?
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)
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.
Wanna give me a hint on where to start? 😀
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);
};
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));
};
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.
the github link give me a 404
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.
@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.
Original thread: https://forums.rpgmakerweb.com/threads/lecode-tactical-battle-system-0-77-2b.71572/