Lecode Tactical Battle System 0.77.2B

e463gx

Villager
Member
Joined
Sep 26, 2013
Messages
27
Reaction score
8
Primarily Uses
The latest version is still 0.77.2B. If you need to download it, you can download the demo on page 1.
 

Zayriel

Villager
Member
Joined
Jul 19, 2018
Messages
25
Reaction score
7
First Language
English
Primarily Uses
RMMV
Today, I finally attempted to implement LeTBS (from the working demo) to my project, and got hit with errors upon launching it. After carefully turning off the additional plugins that I've been using, and turning them back on to identify the culprit, it seems that LeTBS has compatibility issues with some of SRDude's plugins. Two plugins in particular--Super Tools Engine (which is needed to use the Character Creator EX plugin) and Game Upgrade (which is needed to use the CCEX Dynamic Actors plugin)--won't allow you to load the project if they're turned on. This is major bummer to me, since my JS skills aren't strong enough to figure out how to make those plugins compatible with each other.

Has anyone else come across these issues?
 

Frostorm

[]D[][]V[][]D aka "Staf00"
Veteran
Joined
Feb 22, 2016
Messages
1,464
Reaction score
1,067
First Language
English
Primarily Uses
RMMV
@Zayriel Yep, a lot of SRDude's plugins are incompatible w/ LTBS...I've tried as well, quite a shame really.
 

OgreLeg

Veteran
Veteran
Joined
Nov 23, 2017
Messages
32
Reaction score
1
First Language
English
Primarily Uses
RMMV
Does anyone know how to change the move speed of an actor or enemy? I saw this in the config file:


"if: i****('{aoe}_battlers')",
"set_speed: {aoe}_battlers, +6",

Can I use that set_speed tage somewhere else? I've been trying different variations but no luck so far.
 

Frostorm

[]D[][]V[][]D aka "Staf00"
Veteran
Joined
Feb 22, 2016
Messages
1,464
Reaction score
1,067
First Language
English
Primarily Uses
RMMV
Does anyone know how to change the move speed of an actor or enemy?
In LeTBS.js line #9349 you'll find this block: (this is my edited version, just find the stock version in yours)
JavaScript:
TBSEntity.prototype.setMovePoints = function () {
    var legacyMove = this.battler().getLeTBSTagNumberValue("movePoints", Lecode.S_TBS.defaultMovePoints);
    this._movePoints = Math.ceil((this.battler().luk / this.battler().level) * 2) + legacyMove;
    if (this._movePoints < 0)
        this._movePoints = 0;
};
this._movePoints can be changed to any equation you see fit to determine how movement speed/range is calculated.
Or perhaps this tag is what you're looking for:
move_points: number
move_points: +number


All tags can be found here.
 

OgreLeg

Veteran
Veteran
Joined
Nov 23, 2017
Messages
32
Reaction score
1
First Language
English
Primarily Uses
RMMV
My bad, I don't mean the move points I meant the literal speed. Like so they move between tiles faster. I noticed when this part executes "set_speed: {aoe}_battlers, +6" that the unit is knocked back but the knockback is just a faster movement. I'm trying to make an actor/enemy move that speed all the time if I can. Similar to setting the movement speed on an event or the player's walk speed.
 

Frostorm

[]D[][]V[][]D aka "Staf00"
Veteran
Joined
Feb 22, 2016
Messages
1,464
Reaction score
1,067
First Language
English
Primarily Uses
RMMV
My bad, I don't mean the move points I meant the literal speed. Like so they move between tiles faster. I noticed when this part executes "set_speed: {aoe}_battlers, +6" that the unit is knocked back but the knockback is just a faster movement. I'm trying to make an actor/enemy move that speed all the time if I can. Similar to setting the movement speed on an event or the player's walk speed.
Go to the plugin option for LeTBS.js in your plugin manager. Then find "Battlers Move Speed" under the subcategory "-- Motions --".
 

OgreLeg

Veteran
Veteran
Joined
Nov 23, 2017
Messages
32
Reaction score
1
First Language
English
Primarily Uses
RMMV
Ah! Awesome, that's great. Don't know how I overlooked that. Very useful.

I'm left wondering, though, is it possible to change the speed for certain actors/enemies? Like maybe through a state or a <letbs> tag?

Like, there might be a big and lumbering unit that walks slower and a small, fast unit that walks faster.
 

Frostorm

[]D[][]V[][]D aka "Staf00"
Veteran
Joined
Feb 22, 2016
Messages
1,464
Reaction score
1,067
First Language
English
Primarily Uses
RMMV
I'm left wondering, though, is it possible to change the speed for certain actors/enemies? Like maybe through a state or a <letbs> tag?
Hmm, if there is then I'm not aware of it. Doesn't mean it doesn't exist or can't be done though. Hopefully @Pharonix or someone more experienced will chime in.
 

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
759
Reaction score
350
First Language
English
Primarily Uses
RMMV
Hmm, if there is then I'm not aware of it. Doesn't mean it doesn't exist or can't be done though. Hopefully @Pharonix or someone more experienced will chime in.
Im not entirely sure.
I can check the code
But i think it might be a global setting but there might be a notetag.
I can check but it might take some time.
 

Frostorm

[]D[][]V[][]D aka "Staf00"
Veteran
Joined
Feb 22, 2016
Messages
1,464
Reaction score
1,067
First Language
English
Primarily Uses
RMMV
@Pharonix Btw, have you made any headway regarding the stat block bug? It's pretty game-breaking imo lol.

Edit: How do I know which unit "entity" is referring to?
JavaScript:
BattleManagerTBS.forceAction = function (obj, entity) {
    var battler = entity.battler();
    var center = entity.getCell().toCoords();
    var action = new TBS_FloatingAction(battler, false);
    action.setItemObject(obj);
    entity.battler()._itemOnUse = obj;

    var data = obj.id === battler.attackSkillId() ? entity.getAttackScopeData() : entity.getObjectScopeData(obj);
    this.makeActionScope(entity, data, obj);

    var aoeData = obj.id === battler.attackSkillId() ? entity.getAttackAoEData() : entity.getObjectAoEData(obj);
    var aoeCenter = this._activeCell.toCoords();
    var param = this.makeObjAoEParam(obj, entity, aoeCenter);
    var aoe = this.getScopeFromData(aoeData, aoeCenter, param);
    this._actionAoE = aoe;

    var item = action.item();
    var id = action.isAttack() ? entity.getWeaponSequenceData() : entity.getObjectSequenceData(item);
    battler.useItem(item);
    action.applyGlobal();
    entity.lookAt(this._activeCell);
    entity.appendSequence(id, action);
};
My counters do 0 damage cuz the game thinks the unit receiving the counter-attack is the unit doing the counter, hence the "0" (a result of non-actors not having equipment).
JavaScript:
<Damage Formula>
if (user.isWtypeEquipped(3)) {
  value = (a.atk + a.atk + a.agi) / 2;
} else {
  value = (a.atk + a.atk + a.agi) / 3;
}
</Damage Formula>
When I change the formula to something simple like a.atk, the game uses the stats of the unit receiving the counter-attack and not the unit doing the counter. This goes back to the stat block bug from before. I believe my use of "user.isWtypeEquipped()" will work once the correct unit is selected for the counter/attack. I have an if (entity.battler().isActor()) conditional in the BattleManagerTBS.processCounterAttack function that's supposed to select the correct skill ID for the counter depending on whether the counter-attacker is an actor or not. It would work beautifully if not for the stat block bug... -.-

Edit2: I just noticed something...no matter if I use a.atk or b.atk, the result is the same. I made sure our Hero's stats are WAY higher than the enemy's so there would be no confusion. Sigh, what could the root of this problem be?!
 
Last edited:

UniqueName

Veteran
Veteran
Joined
Nov 12, 2018
Messages
76
Reaction score
10
First Language
Russian
Primarily Uses
Other
hey guys, does anyone have the following problems as well?
1. I set "passable_on_death" in notetag but if entities go through the corpse from up to down they somehow go underneath it
ezgif.com-gif-maker (3).gif
2. After I push an entity it speeds up and moves at the speed of light for the rest of the fight
ezgif.com-gif-maker (4).gif
I have the "{aoe}_battlers, reset" line so I don't understand why it doesnt work =\
1603993541415.png
 

Frostorm

[]D[][]V[][]D aka "Staf00"
Veteran
Joined
Feb 22, 2016
Messages
1,464
Reaction score
1,067
First Language
English
Primarily Uses
RMMV
Today, I finally attempted to implement LeTBS (from the working demo) to my project, and got hit with errors upon launching it. After carefully turning off the additional plugins that I've been using, and turning them back on to identify the culprit, it seems that LeTBS has compatibility issues with some of SRDude's plugins. Two plugins in particular--Super Tools Engine (which is needed to use the Character Creator EX plugin) and Game Upgrade (which is needed to use the CCEX Dynamic Actors plugin)--won't allow you to load the project if they're turned on. This is major bummer to me, since my JS skills aren't strong enough to figure out how to make those plugins compatible with each other.

Has anyone else come across these issues?
Actually, I recently reinstalled a bunch of SRD's plugins, including Super Tools Engine & HUD Maker, and got them running w/ no issues. The only SRD plugin I haven't been able to get working is the SkillExtender. How is your's setup exactly?
 

Frostorm

[]D[][]V[][]D aka "Staf00"
Veteran
Joined
Feb 22, 2016
Messages
1,464
Reaction score
1,067
First Language
English
Primarily Uses
RMMV
@Pharonix So I recently tried a skill w/ the "push" effect. I basically copy-pasted from the demo:
<letbs>
scope: line(2)
sequence: atk_push(2)
</letbs>
<letbs_AI>
type: offense, push
</letbs_AI>

However, when the monster I gave the skill to uses the skill, I get the following error:
1604123883010.png

It only appears when PHX_LeMod.js is turned on, otherwise the skill works just fine. Seems like the error is point to this:
JavaScript:
PHX_LeMod.old_getObjectSequenceData = BattleManagerTBS.getObjectSequenceData;
TBSEntity.prototype.getObjectSequenceData = function (obj) {//Modified by PHX
    var defaultSeqId = DataManager.isSkill(obj) ? Lecode.S_TBS.defaultSkillSequence : Lecode.S_TBS.defaultItemSequence;
    var e = BattleManagerTBS.activeEntity();
    //Check if the obj has a sequence
    if (obj.TagsLetbs.sequence)
    {
        //If it does, collect it into a variable, and check if it is a function.
        //Added Regex to check if function has variables
        objSequence = obj.TagsLetbs.sequence;
        //var regex =
        if(objSequence.includes("()") || objSequence.match(/(\(.*\))/i))
        {
            //console.log(objSequence);
            //If it is a function, evaluate it, and return the sequence
            str = eval(objSequence);
            return str;
        }
        return obj.TagsLetbs.sequence;
    }
    //Return normal stuff. Redundant actually as we check above if obj has a sequence and we return it if it is not a function.
    //But whatever
    console.log("stuff fail");
    return obj.TagsLetbs.sequence || defaultSeqId;
};
Btw, just so I'm sure...what's the correct plugin order for your plugin relative to LTBS and YEP_WeaponUnleash?

Edit: Oh, and I did make sure "atk_push" exists in LeTBSconfig (it's there by default).
 
Last edited:

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
759
Reaction score
350
First Language
English
Primarily Uses
RMMV
@Pharonix So I recently tried a skill w/ the "push" effect. I basically copy-pasted from the demo:
<letbs>
scope: line(2)
sequence: atk_push(2)
</letbs>
<letbs_AI>
type: offense, push
</letbs_AI>

However, when the monster I gave the skill to uses the skill, I get the following error:
View attachment 166033

It only appears when PHX_LeMod.js is turned on, otherwise the skill works just fine. Seems like the error is point to this:
JavaScript:
PHX_LeMod.old_getObjectSequenceData = BattleManagerTBS.getObjectSequenceData;
TBSEntity.prototype.getObjectSequenceData = function (obj) {//Modified by PHX
    var defaultSeqId = DataManager.isSkill(obj) ? Lecode.S_TBS.defaultSkillSequence : Lecode.S_TBS.defaultItemSequence;
    var e = BattleManagerTBS.activeEntity();
    //Check if the obj has a sequence
    if (obj.TagsLetbs.sequence)
    {
        //If it does, collect it into a variable, and check if it is a function.
        //Added Regex to check if function has variables
        objSequence = obj.TagsLetbs.sequence;
        //var regex =
        if(objSequence.includes("()") || objSequence.match(/(\(.*\))/i))
        {
            //console.log(objSequence);
            //If it is a function, evaluate it, and return the sequence
            str = eval(objSequence);
            return str;
        }
        return obj.TagsLetbs.sequence;
    }
    //Return normal stuff. Redundant actually as we check above if obj has a sequence and we return it if it is not a function.
    //But whatever
    console.log("stuff fail");
    return obj.TagsLetbs.sequence || defaultSeqId;
};
Btw, just so I'm sure...what's the correct plugin order for your plugin relative to LTBS and YEP_WeaponUnleash?

Edit: Oh, and I did make sure "atk_push" exists in LeTBSconfig (it's there by default).
What does the full console say?
My code should have some sort of console.log printing in the console. This will tell me more about what the sequence looked like and such.
 

Frostorm

[]D[][]V[][]D aka "Staf00"
Veteran
Joined
Feb 22, 2016
Messages
1,464
Reaction score
1,067
First Language
English
Primarily Uses
RMMV
Umm, is this what you're looking for? Sry, I'm still pretty noob when it comes to the console...
1604153133739.png

And this is "atk_push" in LeTBSconfig:
JavaScript:
    "atk_push": [
        "play_pose: user, atk",
        "wait: 10",
        "effects: {aoe}_battlers, current_obj, obj_anim",
        "if: i****('{aoe}_battlers')",
            "set_speed: {aoe}_battlers, +6",
            "push: {aoe}_battlers, user_cell, $1",
            "set_speed: {aoe}_battlers, reset",
        "end_if",
        "wait: 60"
    ],
Disregard the asterisks(*), that's just the forum's profanity filter lol. Oh, I also tried "skill_push(1)" instead, but got the same error so I don't think it's the config file. Btw @Pharonix, what's the recommended plugin order for your plugin extension?
 
Last edited:

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
759
Reaction score
350
First Language
English
Primarily Uses
RMMV
hmm.
I'll need to look into this.

Its possible the is Hit('{aoe}_battlers') is throwing it off,
It might take some time to be honest.
I'll need to figure out which part crashes it, and add exceptions that have it use the original function maybe.
 

Frostorm

[]D[][]V[][]D aka "Staf00"
Veteran
Joined
Feb 22, 2016
Messages
1,464
Reaction score
1,067
First Language
English
Primarily Uses
RMMV
I tried, it doesn't work.
I use this instead:

Btw, does anyone know how to get numbers to popup? Like I have a healing potion that heals some amount every turn, but it doesn't show the number amount healed above the unit. The gauges do update correctly at least.
JavaScript:
<Custom Regenerate Effect>
var hpRegen = Math.round(target.level * 10);
target.gainHp(hpRegen);
target.addTextPopup(hpRegen);
</Custom Regenerate Effect>
I've also tried entity.battler().addTextPopup(hpRegen); & entity.addTextPopup(hpRegen); & user.addTextPopup(hpRegen); to no avail...
 
Last edited:

Pootscooter

Veteran
Veteran
Joined
Jun 7, 2020
Messages
66
Reaction score
17
First Language
Mandarin
Primarily Uses
RMMV
Hello, I was wondering if it was possible to create a chain lightning spell in LeTBS? Thx
Btw, does anyone know how to get numbers to popup? Like I have a healing potion that heals some amount every turn, but it doesn't show the number amount healed above the unit. The gauges do update correctly at least.
I'd also like to know the solution to this question as well. ^.^
 

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

Latest Threads

Latest Posts

Latest Profile Posts

rux
The most words I have ever written in an entire document is in my game's script, jeez i have a lot of characters that ramble on
Yes! I finally did something! This is a picture I drew of what I wish I looked like; I hope that you guys like it!
Finished that egg-sitting mini-game I mentioned here a couple weeks back. Now to fix the weather system so it doesn't rain indoors while you're playing it. >.> A simple fix in itself; leave it to me to take it as an excuse to completely revamp the time/weather/lighting system from scratch.
I'm really tempting to pre order cyberpunk 2077... should I do it or not :/ I really want to play the game but don't want to take a big hit to my saving because of it

Forum statistics

Threads
105,485
Messages
1,014,097
Members
137,138
Latest member
DawnStar
Top