Lecode Tactical Battle System 0.77.2B

Sorry, for disappearing for awhile. I did resolve my counter-attack conflict. I somehow caused endOfSequence to never activate.

New question though.

Why is it, when I inflict a state that lasts 5 turns, it doesn't work?

I had an enemy inflict me with poison, I saw the "Poisoned" state popup, but my character didn't suffer from it

It is possible that the state appears off-screen. Try going to your plugin manager in LeTBSWindows under Status Window Height and add 32 (default icon size) to whatever you had there.
Sorry, for disappearing for awhile. I did resolve my counter-attack conflict. I somehow caused endOfSequence to never activate.



It is possible that the state appears off-screen. Try going to your plugin manager in LeTBSWindows under Status Window Height and add 32 (default icon size) to whatever you had there.

Yeah it wasnt displaying. And my passive healed 20 percent the original heal. So at max health i couldnt notice an increase in health

All good.
Hi there guys, does anyone know if the size of each tile can be set to more than 48x48? i tried changing the scope grid size in the plugin options and the grid size of rpg maker itself but that didnt affect the grid of the battle system. Or alternatively is is possible for a battler to occupy more than one tile?
Hi there guys, does anyone know if the size of each tile can be set to more than 48x48? i tried changing the scope grid size in the plugin options and the grid size of rpg maker itself but that didnt affect the grid of the battle system. Or alternatively is is possible for a battler to occupy more than one tile?
I believe @Lecode has multiple spaces occupy on his to-do list. I'd wait for him to do it since it'll almost definitely bring in a host of possible bugs.

Yeah it wasnt displaying. And my passive healed 20 percent the original heal. So at max health i couldnt notice an increase in health

All good.
Glad it worked out. I'm in the process of figuring how to trigger TBS methods using Yanfly Battle scripts and vice-versa. It's going relatively well since they both depend heavily on the default scripts.
So, I found this plugin and it seems great, but I am having a hard time with it. When ever I try and start a battle, I get this error:

I have try looking back and forth between my game and the demo but can't find what I am doing wrong. I am trying to set up a test battle, but I am running out of ideas. Can anybody help?
Hi there guys, does anyone know if the size of each tile can be set to more than 48x48? i tried changing the scope grid size in the plugin options and the grid size of rpg maker itself but that didnt affect the grid of the battle system. Or alternatively is is possible for a battler to occupy more than one tile?

Lecode, I believe is working on the multi tile part, as for the larger grid, chaosiica posted something a while back about isometric grid, but that's the only thing that might help you. It might be possible to modify to make a larger grid

I know there's a plugin for larger tiles somewhere but I don't know if it is compatible
So, I found this plugin and it seems great, but I am having a hard time with it. When ever I try and start a battle, I get this error:

I have try looking back and forth between my game and the demo but can't find what I am doing wrong. I am trying to set up a test battle, but I am running out of ideas. Can anybody help?

Please send the stack trace.
What is the stack trace and how do I do it?

Edit: K, found out what was wrong, had to move plugins around. Order matters I guess. Now I get the 'position' error.
Hey again, I just moved to a new house and got into a new job so I didn't get much time to work on my project, but now I'm back at it.

I've completed a demo, here's the download link:
https://mega.nz/#!gBh0zJ7T!V2wJSRahpIt-yaZReC6ukfwg4xyxL6ezdQjFMgD_PXM
Its a Pokémon fan-game called POKéMON WORLD LEAGUE, and its basically pokémon with fire emblem battles, theres also a bit of exploration and side-quests.

In this demo I've experimented with lots of different skill types and battle conditions, and most of things work 100% (some are a bit finniky).

This project is mostly a test to see if I could work on a more "serious" game using Lecode's system, and I'm very satisfied.

Anyways if anyone have questions related to my project, please ask me! I'm really happy to be able to do something like this, so thanks to Lecode and everyone who helped me!
Hey again, I just moved to a new house and got into a new job so I didn't get much time to work on my project, but now I'm back at it.

I've completed a demo, here's the download link:
https://mega.nz/#!gBh0zJ7T!V2wJSRahpIt-yaZReC6ukfwg4xyxL6ezdQjFMgD_PXM
Its a Pokémon fan-game called POKéMON WORLD LEAGUE, and its basically pokémon with fire emblem battles, theres also a bit of exploration and side-quests.

In this demo I've experimented with lots of different skill types and battle conditions, and most of things work 100% (some are a bit finniky).

This project is mostly a test to see if I could work on a more "serious" game using Lecode's system, and I'm very satisfied.

Anyways if anyone have questions related to my project, please ask me! I'm really happy to be able to do something like this, so thanks to Lecode and everyone who helped me!
I'll give a look shortly since I'm curious as to what you could possibly mean by Fire Emblem like. I recently got the Attack + Counter + Follow-Up Attack system working so I'm curious as to how you tackled that, if you implemented it.

@Pharonix
Question for you sir, since you seem to experience a lot. Do you happen to know how to make a skill only able to target that is affected by a specific state? I've seen the flag entity thing, but I'm not sure if that can be applied via state. Do you know?
I'll give a look shortly since I'm curious as to what you could possibly mean by Fire Emblem like. I recently got the Attack + Counter + Follow-Up Attack system working so I'm curious as to how you tackled that, if you implemented it.

@Pharonix
Question for you sir, since you seem to experience a lot. Do you happen to know how to make a skill only able to target that is affected by a specific state? I've seen the flag entity thing, but I'm not sure if that can be applied via state. Do you know?

Do you mean target only those affected by state X?
It doesn't look like you can flag entities with states.

But you can do something else.
put something like this in the damage formula:

if (b.isStateAffected(###)){5000} else {0}
using this in the damage formula would make the skill do 5000 damage if b in inflicted with state ###, otherwise it would do 0

OR if you use yanfly skill core and the such:

<Pre-Damage Eval>
if (target.isStateCategoryAffected('doom'){value = Math.ceil(value * 1.50);}
</Pre-Damage Eval>

I have 15 doom states for 1-10 turns, 12,15,25,50,99 so i assigned them the Doom category, but if you don't use that then this is easier;

<Pre-Damage Eval>
if (target.isStateAffected(###){value = (eval here);}
else {eval here;}
</Pre-Damage Eval>
What is the stack trace and how do I do it?

Edit: K, found out what was wrong, had to move plugins around. Order matters I guess. Now I get the 'position' error.
position error is usually due to not having the correct events with notetags.

For enemy cell:
upload_2018-2-2_21-58-25.png


Ally Cell:
upload_2018-2-2_21-58-41.png



=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=



In other News, I feel like I mentioned this before, but i got super fancy and added Variable evaluation here:

upload_2018-2-2_21-59-8.png


So whatever number I store in variable 504, that actor gets displayed.
if no actor exists, it functions like a normal cell.

i have a map where you separate parties, and can set each one up. The actors for the 'Secondary" party get stored in variables 501-504.
then get displayed on the other side of the map.
So, I have the event set up right but nothing changes. Maybe I have something wrong with a sprite? Or config file? This is confusing.
I'll give a look shortly since I'm curious as to what you could possibly mean by Fire Emblem like. I recently got the Attack + Counter + Follow-Up Attack system working so I'm curious as to how you tackled that, if you implemented it.

@Pharonix
Question for you sir, since you seem to experience a lot. Do you happen to know how to make a skill only able to target that is affected by a specific state? I've seen the flag entity thing, but I'm not sure if that can be applied via state. Do you know?

Ok buddy, I figured this out.
Wall of Text, so Spoiler Tags 🙂
[be careful, I do not take responsibility for exploded projects 😉]
Edit: Going off of this, in theory, we can add conditions for actors/enemies with a specific skill learned, actors with a specific weapon (not enemies though) or maybe even actors/ enemies with a specific name.

Spoiler: Target only States
In the javascript file LeTBS.js.

find this function:
BattleManagerTBS.selectScopeTargets


scroll down. and you should see this:
upload_2018-2-2_22-17-50.png


This is what determines if scope_select is actorID.

i added a new one, you'll want to do this too:

Add this right after the highlighted }; above:

else if (type.match(/AstateId\((.+)\)/i)) {
AstateId= Number(RegExp.$1);
condition = function (e) {
return e && e.battler().isActor() && e.battler().isStateAffected(AstateId);
};
But that's only actors. let's add enemies, by using the enemyId match as an base

It'll look like this:
upload_2018-2-2_22-22-34.png



Basically what we did here was add 2 conditions, one for actors, one for enemies that say:
Actor one:
If this battler is an actor, and they are affected by stateid, make them the target
enemy is same only checks if enemy.

The notetag looks like this:

<letbs>
scope_select: AstateId(220)
sequence: heal
pass_on_use
scope_options: include_center
aoe: circle(0)
</letbs>
<Cooldown: 1>

My state 220 is a very specific state called "Second Wind" for my char named Yume:
upload_2018-2-2_22-24-35.png


No passive here, lets check battle,

I put that tag on my Heal Skill for Xion
upload_2018-2-2_22-27-8.png


Nobody is selectable: 🙁 sad

Lets add a few levels (40 to be exact)

upload_2018-2-2_22-28-2.png

Now Yume has second Wind:

Lets check battle again:


upload_2018-2-2_22-28-44.png


Well Lookie here, only Yume is selectable.
We DID iT!!!!!!!!!!!!!!!!!!


Spoiler: skillID scope
In fact, I just added the skill select to my scopes.
it stinks you can only have 1 scope type.
upload_2018-2-2_22-42-5.png
New post to keep things "clean"

If anyone needs help with my above about adding restrictions for scope_select:
for
actor / enemy state affliction
actor / enemy skill learned.

Feel free to PM. i do not mind you sending me your LeTBS.js file and me editing it for you.
My LeTBS.js, the commands one and maybe one other are heavily modified by me.
I modified the conditions one to support multiple extra skills due to weapons/armor/states etc.

The LETBS one is modified to allow for
variable cell (use the actor that the vairable matches)

scope select for
actor / enemy state affliction
actor / enemy skill learned.

once more, I am happy to assist.
New post to keep things "clean"

If anyone needs help with my above about adding restrictions for scope_select:
for
actor / enemy state affliction
actor / enemy skill learned.

Feel free to PM. i do not mind you sending me your LeTBS.js file and me editing it for you.
My LeTBS.js, the commands one and maybe one other are heavily modified by me.
I modified the conditions one to support multiple extra skills due to weapons/armor/states etc.

The LETBS one is modified to allow for
variable cell (use the actor that the vairable matches)

scope select for
actor / enemy state affliction
actor / enemy skill learned.

once more, I am happy to assist.
You're one smart dude, I must say. I'm curious though, while Actor/Enemy differentiation makes sense, is there not a way to make it so that it's 'Opposite Team'? What I mean by that is if used by an Actor, it will only check enemies, whereas if used by an Enemy, it would only check Actors. Likewise, is 'Same Team' not something available? I'm curious about that, as I believe I've seen such used in Yanfly's targeting systems, but I don't know if that's available with the default engine.
So, I was just looking around, trying to put together how to get the battle system working. Then, I noticed something, in the LeTBS plugin, it says animation 124 is played when enemies or actors are placed. Went to setting, upped the max animations from 122 to 200, tested it and my game worked. I don't understand but it works.
Also, I agree with Sissel Cabanela, you sir, are smart. Would love to learn a thing or two from you.
So, I was just looking around, trying to put together how to get the battle system working. Then, I noticed something, in the LeTBS plugin, it says animation 124 is played when enemies or actors are placed. Went to setting, upped the max animations from 122 to 200, tested it and my game worked. I don't understand but it works.
Also, I agree with Sissel Cabanela, you sir, are smart. Would love to learn a thing or two from you.
This is because it was an "Out of range" error.
If MAX = 122 (like you originally had) and it's looking for 124, then you'll have issues.


You're one smart dude, I must say. I'm curious though, while Actor/Enemy differentiation makes sense, is there not a way to make it so that it's 'Opposite Team'? What I mean by that is if used by an Actor, it will only check enemies, whereas if used by an Enemy, it would only check Actors. Likewise, is 'Same Team' not something available? I'm curious about that, as I believe I've seen such used in Yanfly's targeting systems, but I don't know if that's available with the default engine.

If you look at the base for type === "allies"

it actually says this:


It uses lecodes system to determine if e is an ally of user, so this is what you want.
Using scope_select; allies will work for both enemy and actor teams.

To make this only affect certain states, CLONE this. and you need to update the pattern matching
I'm going to use our new custom AstateId as a base (for pattern)

if (type.match(/AllystateId\((.+)\)/i)) {
AstateId= Number(RegExp.$1);
condition = function (e) {
return e && LeUtilities.isAlly(user.battler(), e.battler()) && e.battler().isStateAffected(AstateId); ;
};
}

in theory this should then say

if e(is not null) AND e is an ally of the current user, AND e is affected by this state, return true, else return false

In the below, i'm using the enemy version of the above:
scope_select: EnemystateId(220)
which uses the condition:
return e && LeUtilities.isEnemy(user.battler(), e.battler()) && e.battler().isStateAffected(EstateId);
upload_2018-2-3_0-6-0.png


Now it is worth noting that we should add a neutral check for the stateID

Which would be:

if (type.match(/StateId\((.+)\)/i)) {
StateId= Number(RegExp.$1);
condition = function (e) {
return e && e.battler().isStateAffected(StateId);
};
}
Which here, it states, as long as e is an entity and e is affected by StateId, then it is a valid target.


It is also worth noting that you may be able to use
scope_select: eval(Put your evaluation in here)

it is listed as a valid match, but I do not know how "finished" it is.

For proof anyway, I have both yume and the enemy inflicted with "Second Wind"
and I set my heal skill to: scope_select; StateId(220)

And now, you see that both dudes can be targeted.

upload_2018-2-3_0-20-7.png
Im not sure if there's some reason for this, but no-one's responded to the message I posted on page 64. Could someone please help me sort that out? I've tried just about everything I can think of and I keep getting the exact same error.
I was just about to suggest eval(). :LZYgrin:
eval(b.isStateAffected(StateId)) should add the restriction you are looking for.

I would strongly advise against editing the script directly; especially regular expressions.
For example:
var string1 = "Astring";
string1.match(/string/i); // is not false

Original thread: https://forums.rpgmakerweb.com/threads/lecode-tactical-battle-system-0-77-2b.71572/