Lecode Tactical Battle System 0.77.2B

Parallax Panda

Got into VxAce ~2014 and never stopped...
Veteran
Joined
Oct 29, 2015
Messages
1,009
Reaction score
1,300
First Language
Swedish
Primarily Uses
RMMV
@Pharonix
Oh! Thank you, I'm going to use that as a base for this skill if you don't mind.

I must say I don't understand squat about any of the code you've written that goes into the sequence though. Is that pure Java script or is it some advanced script calls that's been made for this system? It looks to me that the Skill calls a sequence, that then calls another sequence, that actually do the damage?
I don't understand the logic behind that, why not include the arrow damage/animation code in the first sequence? Is it because because both "Arrow Rain" and "Arrow Storm" needs that part, so you'd rather just write it down once to save space? Maybe it's also used by other bow-attack skills too?

Since I can't understand the code, I can't really comment on if it's "elegant" or not, but I'd like to know why you chose to set it up that way. :)

Again, <Cooldown> and <Warmup> must be note tags from some other plugin (I'll assume yanfly)?
 

forteller

Veteran
Veteran
Joined
Dec 2, 2013
Messages
105
Reaction score
19
First Language
English
Primarily Uses
Try this
<letbs_commands>
move 82, attack 76, [extra], skills 64, items 182, scan 75, pass 84
</letbs_commands>
This is be the default command windows
If you replace attack 76 with skill [id] the attack command will be replaced with the skill instead

Also the extra slot is for skills added by items or states
 

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
747
Reaction score
340
First Language
English
Primarily Uses
RMMV
I use this myself.
Actor Notetags.
<letbs_commands>
move 82, [extra], skills 64, items 176, pass 84
</letbs_commands>

Weapon Notetags.
<letbs_commands>
skill[1505]
</letbs_commands>

This second one is from my "Iron Bow" weapon.
It adds the skill 1505 to the actor's commands.

So when equipped with a bow, they use the bow skill, sword, gives sword skill.
For my gameplay, I needed VERY specific damage calculations for over 20 weapon types.
(I'm pretty sure I'm borderline insane at this point)

upload_2018-5-4_8-57-55.pngupload_2018-5-4_8-58-9.png

The two "Scepters" are for enemy units.
One is a ranged magic attack, the other involves them hitting you.
 

forteller

Veteran
Veteran
Joined
Dec 2, 2013
Messages
105
Reaction score
19
First Language
English
Primarily Uses
I'll give
you another examples
"miss_storm": [
"call: pre-skill",
"call: miss_storm_effects, 8",
"call: post-skill"
],

"miss_storm_effects": [
"save_cells: miss_bo, 1_cells_in_{aoe}",
"projectile: miss_arrow, user_cell, saved(miss_bo)",
"map_effects: saved(miss_bo), current_obj, obj_anim",
"wait: 30"
],
This skill picks 8 random spaces in the provided aoe and deals damage in them.

Currently you have to use 2 sequences because all the ways to cycle thou cells or eninties make you call a sequence for each one.
 

Parallax Panda

Got into VxAce ~2014 and never stopped...
Veteran
Joined
Oct 29, 2015
Messages
1,009
Reaction score
1,300
First Language
Swedish
Primarily Uses
RMMV
I didn't really understand your second skill there @forteller , but I'm sure I will once I look up all the commands and get to stare at the code for some time.

I like the way you set it up with the weapon types deciding the default attacks @Pharonix . That makes total sense to me so I'll probably end up doing something similar.

I was tired earlier but went back to (slowly and carefully) reading the documentation on the sequence's again and now that my brain is working it's starting to make sense. I still have to take some time to analyze things in detail because it's a lot of commands and stuff to take in, but it doesn't feel as hopelessly difficult as it did earlier today.:kaojoy: And I have been harassing this thread quite a lot for the last 48 hours so I'm going to lean back a little and hopefully come back with some skill formulas and get everyone's opinion on them.

But a few quick questions before I go lurk in the shadows again...

1. In the documentation's sequences's sections introduction it says this: "When a sequence isn’t defined, a default one is used." This was one thing that confused me for a while, and I still find it vague. What default sequence will be used when? And how does an undefined sequence look like? I'll assume a sequence without commands? Just want to clear this out and make sure I understand this.

2. The "Default Sequences" listed directly below what I touched upon in the previous question has a lot of stuff like: "battle_start", "turn_start", "evaded", etc. I assume these are listed so that you COULD add additional commands to them (for example make all entities heal x HP at the start of each turn or something), but for the most part it's not something you'd really touch when creating your own skills. Did I understand that right?

3. It also says I can create a sequence in a tag! Does that mean I don't NEED to dig into the "Config" and could just add the necessary sequence directly into the note box of each skill? Sure, it probably wouldn't be as clean but if that's possible I feel that would work better for me. Especially while I wait and see what will happen with the config in 0.8 (if that's a thing). So anyway assuming I understood it correctly, is this how I'd write it in the Note Box for example;

<letbs>
scope: circle(4)
aoe: circle(1)
sequence: spark
</letbs>


<letbs_Sequence>
"spark": [
"call: pre-skill",
"map_anim: cursor_cell, obj_anim",
"wait: 20",
"effects: {aoe}_battlers, current_obj, obj_anim",
"call: post-skill"
]
</letbs_Sequence>


...and this skill would work too? Even if I don't touch the Config? Or maybe I misunderstand? Either way, it seems that there is no note tag for custom scopes? :kaocry:

In any case, thanks for all the help today. I'm going to call it a day and I'll be back tomorrow to read any potential answers. Thanks! :kaoluv:
 

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
747
Reaction score
340
First Language
English
Primarily Uses
RMMV
I didn't really understand your second skill there @forteller , but I'm sure I will once I look up all the commands and get to stare at the code for some time.

I like the way you set it up with the weapon types deciding the default attacks @Pharonix . That makes total sense to me so I'll probably end up doing something similar.

I was tired earlier but went back to (slowly and carefully) reading the documentation on the sequence's again and now that my brain is working it's starting to make sense. I still have to take some time to analyze things in detail because it's a lot of commands and stuff to take in, but it doesn't feel as hopelessly difficult as it did earlier today.:kaojoy: And I have been harassing this thread quite a lot for the last 48 hours so I'm going to lean back a little and hopefully come back with some skill formulas and get everyone's opinion on them.

But a few quick questions before I go lurk in the shadows again...

1. In the documentation's sequences's sections introduction it says this: "When a sequence isn’t defined, a default one is used." This was one thing that confused me for a while, and I still find it vague. What default sequence will be used when? And how does an undefined sequence look like? I'll assume a sequence without commands? Just want to clear this out and make sure I understand this.

2. The "Default Sequences" listed directly below what I touched upon in the previous question has a lot of stuff like: "battle_start", "turn_start", "evaded", etc. I assume these are listed so that you COULD add additional commands to them (for example make all entities heal x HP at the start of each turn or something), but for the most part it's not something you'd really touch when creating your own skills. Did I understand that right?

3. It also says I can create a sequence in a tag! Does that mean I don't NEED to dig into the "Config" and could just add the necessary sequence directly into the note box of each skill? Sure, it probably wouldn't be as clean but if that's possible I feel that would work better for me. Especially while I wait and see what will happen with the config in 0.8 (if that's a thing). So anyway assuming I understood it correctly, is this how I'd write it in the Note Box for example;

<letbs>
scope: circle(4)
aoe: circle(1)
sequence: spark
</letbs>


<letbs_Sequence>
"spark": [
"call: pre-skill",
"map_anim: cursor_cell, obj_anim",
"wait: 20",
"effects: {aoe}_battlers, current_obj, obj_anim",
"call: post-skill"
]
</letbs_Sequence>


...and this skill would work too? Even if I don't touch the Config? Or maybe I misunderstand? Either way, it seems that there is no note tag for custom scopes? :kaocry:

In any case, thanks for all the help today. I'm going to call it a day and I'll be back tomorrow to read any potential answers. Thanks! :kaoluv:
nah,

If you use the <letbs_sequence> notetags, you DON'T need to say sequence: spark, nor do you need the quotes around the commands.

This is summon pixie skill from the 77.2b demo


<letbs>
scope: circle(1)
scope_options: need_free_cell
</letbs>

<letbs_Sequence>
call: pre-skill
map_anim: cursor_cell, obj_anim
wait: 15
summon: pixie, cursor_cell
call: post-skill
</letbs_Sequence>

<letbs_AI>
type: summon
</letbs_AI>

<Warmmup: 3>
<Cooldown: 12>



Edit: unrelated, but my config file is 124KB.
 

forteller

Veteran
Veteran
Joined
Dec 2, 2013
Messages
105
Reaction score
19
First Language
English
Primarily Uses
I still need some help with my error if anyone has the time

Getting error cannot set property x of undefined
The error is on line 300 of the turn order plugin

It's happening on the 5 round of battle so I don't even know where to start if it matters there are 3 actors in combat vs 6 of the same enemy.
 

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
747
Reaction score
340
First Language
English
Primarily Uses
RMMV
I still need some help with my error if anyone has the time

Getting error cannot set property x of undefined
The error is on line 300 of the turn order plugin

It's happening on the 5 round of battle so I don't even know where to start if it matters there are 3 actors in combat vs 6 of the same enemy.
Shouldn't matter if there's duplicates of the enemy.

But a few more bits of info is helpful:

Who's turn was it? actor? enemy?
Do they have a particular skill set?

Did someone add an extra turn that round?
 

forteller

Veteran
Veteran
Joined
Dec 2, 2013
Messages
105
Reaction score
19
First Language
English
Primarily Uses
The last enemy in the turn order had just ended their turn so it was about to rebuild the turn order , no use of extra or instant turns by any actor
 

Lecode

(─‿‿─)
Veteran
Joined
Dec 18, 2013
Messages
490
Reaction score
654
First Language
French
Primarily Uses
N/A
And then I have some questions regarding some of the plugins in the demo (I know @Chaosicaa made the demo but still...).
I understand that any plugin starting with "Le" or "LeTBS" is made by you and therefore your Terms of Use as well as credit to you would suffice. But what about "Tween.js"; "TweenJS_MVPatch.js", "easystar" & "Rhyme_MapSmoothScrolling.js"? Who made these and what terms of use and credits would I need to apply to my game?
easystar and tween.js are both libs under MIT license. Rhyme_MapSmoothScrolling.js is under my name as it's just a patch for Rhyme's plugin called MapSmoothScrollin (which the demo uses). Same thing for TweenJS_MVPatch, which is just a patch made by me for my utilities plugin.

hmm i have a battle with 6 enemies vs 3 actors a get like 4 turns in and the turn order thing break right after one of the units move
Got it. Seems to be related to the turnOrder using graphics not loaded yet. We won't have that sort of bugs in 0.8 as we're going full asynchronous.

If you use the "Dash Button" (Shift by default) during battle, it will crash.
Already in the bug list. Shift in battle allow to move the camera but it causes some issues sometimes.

1. I asked before but is there a special reason for the "Window2" file? Is it just there to give you an option to use another windows skin for the battle system if you want to? And it's not important in any other way? I can just make a copy of my normal windows skin and that's okay?
Window2 is used by the Skill Bubble add-on.

2. Can I rely on the regular database configurations for damage formulas, success rate, MP/TP cost(s), TP gain, repitation(s) as well as critical hit chance and additional effects? Basically, all the entry fields in the database's skill window except "Scope" (which from what I understand you have to define in the note tag) is taken into account even when using LeTBS? If not, what other configurations should I skip?
Don't have RPG Maker right now (Laptop to be repaired) but yes, scope, as well as the number of repetition, are irrelevant.

3. Can I trust most of the Note Tags and other commands on this page, or has most of them changed to something else?
You can't trust them entirely. It's not up to date.

<letbs>
scope: circle(x,y) <--- The area within which you can target enemies to attack. x = max rage, y = min range (why max range first?)
aoe: circle(x,y) <--- The area of effect after you've targeted an enemy (for single target attacks not needed?). "x"&"y" same as above?
sequence: xy <--- The actual effect of the skill being used (together with the damage formula and other database information?)
</letbs>

For a very simple AoE, I assume the above settings would work? Given that you change the "x"'s and the "y"'s to something that made sense of course.

Then if it's a skill that will be used by an AI you would add something like this to tell the game what type of skill it is, correct?

<letbs_AI>
type: offense
<--- chose one (or more) from the list of what's available: offence, healing, support, move, push, pull summon.
</letbs_AI>

I assume the AI "type:" tag tells the game what category(s) the skill belongs to so when you apply AI behaviors to enemies they know what skills to pick from?
Correct.

1a. Is it currently possible to have a skill that applies a state (or otherwise) charm/mind controls an enemy unit (and not only player being able to control enemy units but also enemy units taking control over your party members!). If not I'd like to suggest it as a feature since the confusion AI, while cool in it's own way, isn't really the same.
It's in the todo list.

2a. Is it possible to grant units attack of opportunities when two units are locked in melee and one unit tries to move away? If not, I'd suggest this feature as well since as it is by default there is no reason not to take the extra time to flank the enemy with your move points EVERY turn. And I think smart OCD players (like myself) will feel forced to take this chance whenever possible, and it'll make it more of a chore than a fun thing. Also, being able to add attack of opportunities (and configure their strength/effect) does make the strategy even more deep! :kaopride:
What do you mean by attack of opportunities ?

1.) Is there an event I can easily hook into before an attack action takes place?
Yes, with common eventing.

2.) Is it even possible to determine the result of the action in advance? Or perhaps determine what the percentage chance *would* be for success, then pick a random number based on that percentage, and force a result that matches that outcome?
Not possible because of how RPG Maker is. If you change that you'd have to overwrite how damage calculation is handled and break all the plugins out there. At least, that was the case the last time I checked it. I wanted to do something similar.

3.) How have people gotten around the fact that events are not functions that can take parameters? E.G. I would need to play specific animations for each attacker and defender, but wouldn't be able to pass that information to the event. I could set that information in global variables, but the developer in me feels icky about that
That's still a new concept and nobody seems to be playing with that yet. Not sure if I'll have enough time to improve it for 0.8 but if I do I'll make sure you'll be able to pass parameters.

Hm... Do I need to open the LeTBS_Config.js and edit the code inside it to create some skills? Like for example, any skill using a "custom" Scope?
Forget everything about the config file as it'll disappear on 0.8. You'll only rely on the database editor.

Hey what about the default attacks that you get with each new project in MV? The "attack", "guard", "dual attack", double attack", "tripple attack", "escape" & "wait". Can I go ahead and delete those entries? Do LeTBS use them as reference for anything what so ever?
Hee...I wouldn't delete attack and guard at least. Don't have RPG Maker right now so I can't be sure.

Again, <Cooldown> and <Warmup> must be note tags from some other plugin (I'll assume yanfly)?
Yes. From Yanfly.

1. In the documentation's sequences's sections introduction it says this: "When a sequence isn’t defined, a default one is used." This was one thing that confused me for a while, and I still find it vague. What default sequence will be used when? And how does an undefined sequence look like? I'll assume a sequence without commands? Just want to clear this out and make sure I understand this.
When a sequence isn't specified for a skill (abscence of the sequence: xy tag), a default sequance is used. Default sequences are located in the config file. The default sequence for skills is "skill".

2. The "Default Sequences" listed directly below what I touched upon in the previous question has a lot of stuff like: "battle_start", "turn_start", "evaded", etc. I assume these are listed so that you COULD add additional commands to them (for example make all entities heal x HP at the start of each turn or something), but for the most part it's not something you'd really touch when creating your own skills. Did I understand that right?
Yes, don't touch them unless you know what you're doing.

3. It also says I can create a sequence in a tag! Does that mean I don't NEED to dig into the "Config" and could just add the necessary sequence directly into the note box of each skill?
Yes

The last enemy in the turn order had just ended their turn so it was about to rebuild the turn order , no use of extra or instant turns by any actor
I'll check that error as soon as I can.
But my laptop is BSOD-ing all the time I can't work at all :kaocry:.
 

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
747
Reaction score
340
First Language
English
Primarily Uses
RMMV
.8 sounds like it is gonna be badass.

I may launch my game on 77 though. Thousands of skills and hundreds of enemies is a ot of work to convert.

It'll likely launch on .77 then a while revamp ith .8
 

Delsin7

Villager
Member
Joined
Sep 1, 2016
Messages
11
Reaction score
8
First Language
English
Primarily Uses
N/A
Woo, good job on the update Lecode. 0.8 sounds great so far. Also async is great. (totes needs to finish 1.1 update for metal frontier before it hits)
 

Parallax Panda

Got into VxAce ~2014 and never stopped...
Veteran
Joined
Oct 29, 2015
Messages
1,009
Reaction score
1,300
First Language
Swedish
Primarily Uses
RMMV
[EDIT; I'm thinking about maybe using something like Galv's Equip Item plugin (I've not tested if it's compatible yet though). But if so, I'd like the Party members to automatically drink HP potions instantaneously if their HP drops below a certain %.

But AI commands wouldn't work on Actors right... so would I have to resort to running a parallel process in the background constantly checking all important parameters? Hm... It's past bed time and I'm not thinking straight but I wanted to throw this idea out here anyway, in case anyone had a good idea of how to make it work in LeTBS.]


@Pharonix
If you use the <letbs_sequence> notetags, you DON'T need to say sequence: spark, nor do you need the quotes around the commands.
Thank you!

@Lecode
Sorry to hear about your laptop. :kaocry: ...but thanks for all the replies! Glad to hear about the 0.8 and the changes to the config, though I suspect it'll take some time with your computer problems and all.

What I'm referring to with an opportunity of attack is an extra (pre-defined) melee attack being granted to a unit (and processed instantly) when another unit who is currently engaged in melee with it (they're standing right next to each other, face to face) uses their move points to run away.
It's not unheard of in tactical RPG's, and being able to do this and give all entities different settings for it would be a nice addition.

The point of it is forcing the player to commit when moving into melee, and risk extra damage if they later turn their back and try to run away without finishing the fight first.
 
Last edited:

Lecode

(─‿‿─)
Veteran
Joined
Dec 18, 2013
Messages
490
Reaction score
654
First Language
French
Primarily Uses
N/A
.8 sounds like it is gonna be badass.
Yeah, honestly it will...Look how much time I've been working on it. @_@

I may launch my game on 77 though. Thousands of skills and hundreds of enemies is a ot of work to convert.
That's cool because I can use your project as a guinea pig to test out the 0.7 to 0.8 migration script. :p

Woo, good job on the update Lecode. 0.8 sounds great so far. Also async is great
Thanks. And yes async is great. We're going to have a fluid TBS finally.

But AI commands wouldn't work on Actors right... so would I have to resort to running a parallel process in the background constantly checking all important parameters? Hm... It's past bed time and I'm not thinking straight but I wanted to throw this idea out here anyway, in case anyone had a good idea of how to make it work in LeTBS.]
Using parallel processes isn't an efficient way. You can however call common events at some moments of the battle (turn start/end, action start/end, ect). That's better. So what you can do is tie a common event to your actors, set up a proper trigger (turn start for example) and check their HP and do whatever else you want.
In 0.8 you could directly add mixins to the lifecycle hooks of battles, which is better if you know how to script a little bit.
But anyway, call to common events will be improved too.

Sorry to hear about your laptop. :kaocry: ...but thanks for all the replies! Glad to hear about the 0.8 and the changes to the config, though I suspect it'll take some time with your computer problems and all.
Yeah 0.8 will take a bunch of time again :(. Maybe a few weeks, in spite of what I planned. Even without the laptop thing. I honestly can't wait to get it done.

What I'm referring to with an opportunity of attack is an extra (pre-defined) melee attack being granted to a unit (and processed instantly) when another unit who is currently engaged in melee with it (they're standing right next to each other, face to face) uses their move points to run away.
It's not unheard of in tactical RPG's, and being able to do this and give all entities different settings for it would be a nice addition.
I see. Yes that's totally doable. In LeTBS it's easy to force or request an action, either with sequences or eventing.

The point of it is forcing the player to commit when moving into melee, and risk extra damage if they later turn their back and try to run away without finishing the fight first.
That's a good addition to the "Tackle System" that's being worked on on 0.8.
 

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
747
Reaction score
340
First Language
English
Primarily Uses
RMMV
Can I give multiple events the same Flag ID?

Like if It's an "Escape" scenario, I want to make it so that stairs like this can have 3 events all acting as the "Escape" Point.
upload_2018-5-9_10-59-45.png

Edit, now that I think about it.

Could I just do this and activate all 3 flags if any of them are triggered?

upload_2018-5-9_11-5-56.png


On yet another note:

How would I go about making any of the following:

1) All actors must reach the escape point
2) Actors disappear when they reach the escape point - All actors must escape.
3) Actor X Must reach the escape point - Actor X must trigger Flag Y.

Enemy this time
4) Make an enemy retreat to a specific location, if entity makes it to the escape point, you lose (IE: prevent enemy from escaping) Also how to trigger an LETBS event when an ENTITY not an ACTOR steps on it.
 
Last edited:

Lecode

(─‿‿─)
Veteran
Joined
Dec 18, 2013
Messages
490
Reaction score
654
First Language
French
Primarily Uses
N/A
Can I give multiple events the same Flag ID?
No the function that query any "flagged" event/entity only returns the first value it finds.

Could I just do this and activate all 3 flags if any of them are triggered?
Yes.

1) All actors must reach the escape point
Add a flag win condition. When an actr espaces, increment a value. And immediatly check if that value == party size. If yes, activate the win flag.

2) Actors disappear when they reach the escape point - All actors must escape.
Use the plugin command RemoveEntity actor(ID) or RemoveEntity flaggedEntity(xyz) ect...
Not sure if that's possible in your version thought.

3) Actor X Must reach the escape point - Actor X must trigger Flag Y.
With plugin commands you can target the entity that triggered the event with "entity".
So for example to remove the entity that triggered the escape event, use RemoveEntity entity;

Also how to trigger an LETBS event when an ENTITY not an ACTOR steps on it.
That's a limit plugin commands cant solve. Things get more flexible in 0.8.
 

forteller

Veteran
Veteran
Joined
Dec 2, 2013
Messages
105
Reaction score
19
First Language
English
Primarily Uses
@Pharonix Hey when you showed me your load order earlier you had WAY_EvalText in it did you get it to eval in the Letbs combat menu?
 

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
747
Reaction score
340
First Language
English
Primarily Uses
RMMV
Ill try that stuff.

Does the system
@Pharonix Hey when you showed me your load order earlier you had WAY_EvalText in it did you get it to eval in the Letbs combat menu?
Pretty sure I got it working:


upload_2018-5-9_21-33-34.png

upload_2018-5-9_21-33-21.png
 

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
747
Reaction score
340
First Language
English
Primarily Uses
RMMV
Also @Lecode
Just a heads up, but in your "Prevent Actor Death" win condition, you are using $dataActors instead of $gameActors.
This means if a character's name changes, it will still pull the original name since $dataActors pulls the original database values..
)

I commented out your original text, and put in my replacement and
upload_2018-5-10_9-0-59.png
 

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

Latest Threads

Latest Posts

Latest Profile Posts

When you discover great tileset resources that you completely forgot that you had. :kaomad3::kaopride:
Just got a better look at the MZ RTP. I'm very happy with it, especially the sci-fi tiles and sprites. Glad I pre-ordered.
I've just checked the VisuStella Plugins for MZ and there are already 11 plugins. The Yanfly team(perhaps a big one?) really works so effectively and efficiently that some MZ users can likely use tons of Yanfly plugins right after MZ's released (still 13 days from now). I wonder if any other plugin developer(or team) will try to compete with Yanfly this time, no matter how slim the chance to win is :)
Hello! :kaopride:I am new to RPG Maker, though I have been lurking the forums for a while. :kaoswt: Hope to make some friends and learn some stuff here! :kaothx:
And now since I've got the whole game parts working, the *contents* await.

Forum statistics

Threads
100,594
Messages
977,584
Members
132,194
Latest member
linkvaovn88com
Top