Lecode Tactical Battle System 0.77.2B

Joined
Jan 3, 2017
Messages
6
Reaction score
0
First Language
English
Primarily Uses
Can you post the notetags you used for the crate?
Screen Shot 2020-05-19 at 9.13.25 PM.png

Under Notes:
<letbs>
see_thru
skip_auto_selection
sequence(dead): dead_vanish
</letbs>

(Leaving out "hide_status_window" allows it to be damaged like a battler, but without any place in the initiative carousel because it is a spawned "entity.")

Also, I gave the "cover" aura a shot, but I think identifying what entity to redirect the damage toward is going to require a lot more code, since it's an enemy that's adjacent to the battler on the map. A "mark" might be easier to deal with, rather than using states, because it is tied to the caster.
 

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
764
Reaction score
357
First Language
English
Primarily Uses
RMMV
View attachment 144455

Under Notes:
<letbs>
see_thru
skip_auto_selection
sequence(dead): dead_vanish
</letbs>

(Leaving out "hide_status_window" allows it to be damaged like a battler, but without any place in the initiative carousel because it is a spawned "entity.")

Also, I gave the "cover" aura a shot, but I think identifying what entity to redirect the damage toward is going to require a lot more code, since it's an enemy that's adjacent to the battler on the map. A "mark" might be easier to deal with, rather than using states, because it is tied to the caster.
Send me the code you used to spawn it.
I'll need to test it in my code.


===
On another note, my BattleSounds script is coming along nicely.
But I'm having trouble determining if its an actual item being used, but maybe some sleep will help.

Here's the list of sounds:
* start turn
* attack (physical attack)
* special attack (certain hit)
* magical attack (magical attack)
* injured (turn start)
* dying (turn start)
* is hurt
* evaded
* blocked
* escape
* victory
* death
* revive
* recover
*
* --in progress--
* use item
* level up ** Incompatible At this time, unless there's a fix for yanfly.

I think for all intents and purposes, I can leave this script for now.
I really should get back to mapping so that I can finally have a demo

But holy moly did I find so many errors today.
All stemming from the fixed checkDeath function.
for some reason, it was "killing" the entity before the last hit/ending the attack sequence which caused a whole slew of trouble (my modified yanfly battle stats where i track misses/evasions/etc) as well as my battle sounds script.
Thank God for Try/Catch, just adding that in certain areas fixed everything.
 
Joined
Jan 3, 2017
Messages
6
Reaction score
0
First Language
English
Primarily Uses
Send me the code you used to spawn it.
I'll need to test it in my code.
Here's the code below. It's in a comment inside an event on the battle map with the tag <LeTBS Random Spawn>. However, I also tried "see_thru" on Actors without any luck, so I'm not sure it's the spawn code.

entities: enemy(39), enemy(39), enemy(39), enemy(39), enemy(39), enemy(39)
amounts: 1, 1, 1, 1, 1, 1
rates: 1, 1, 1, 1, 1, 1
locations: (5,5);(5,6);(7,8);(8,5);(9,7);(8,8)

Note that the repetition in the code allows each crate to have its own HP pool. If you just did the code below, you would end up with six crates sharing one HP pool:

entities: enemy(39)
amounts: 6
rates: 1
locations: (5,5);(5,6);(7,8);(8,5);(9,7);(8,8)
 

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
764
Reaction score
357
First Language
English
Primarily Uses
RMMV
Here's the code below. It's in a comment inside an event on the battle map with the tag <LeTBS Random Spawn>. However, I also tried "see_thru" on Actors without any luck, so I'm not sure it's the spawn code.
EDIT 3: I find myself nowhere close.

I'll take another look later.
You should be fine reverting the changes you made.
 

Attachments

Last edited:

MiLo-Katergaris

Villager
Member
Joined
Apr 17, 2019
Messages
26
Reaction score
2
First Language
English
Primarily Uses
RMMV
A couple questions I was hoping to get answers for.

1.) In the demo there's a skill called devour which has a note tag "fusion_effect". Does this currently do anything, and if so, what?

2.) I was hoping to implement an invisibility skill and need some help.

2a.) How do I change actors' sprites midbattle? I am currently using the letbs battlers folder and not the 'use_character' option.

OR

Is there a way to change the sprite so that it is different- e.g. transparency, opacity, hue.
The 'change transparency' default option did not work in battle for me.

2b.) Is there a way to make enemies change sprites midbattle? Unlike the actors I would prefer if the enemies became completely invisible to the player.
 
Joined
Jan 3, 2017
Messages
6
Reaction score
0
First Language
English
Primarily Uses
EDIT 3: I find myself nowhere close.

I'll take another look later.
You should be fine reverting the changes you made.
Thanks for giving it a shot. I'm diving into learning more Javascript, so hopefully I can be of more help soon.

A completely different solution I was thinking of would be to make LOS only apply to objects that fall within the scope of an attack. That way, a gun, for example, could have a circle scope with a minimum of 1, which would allow a battler to shoot over cover while enemies that are further away could not. In this version, no "cover" aura or mark would be necessary either, just a more complicated AI instead.
 

yeahchris

Veteran
Veteran
Joined
Apr 14, 2020
Messages
89
Reaction score
24
First Language
English
Primarily Uses
RMMV
@Pharonix

Asking you since you seem to be the expert on this plugin at this point.

I'm attempting to create a "jump" skill that will allow PCs to jump over a 1 tile wide obstruction (region 249). I would like the jump to go, at most, two tiles and I would like to make sure that the player needs 2 tiles of remaining movement in order to use it. Ideally. At this point I will settle for anything that actually works.

I tried this: circle(e.getMovePoints()-2)
I also tried this: circle((e.getMovePoints()+1)/2)

The problem is that if the scope returns a 0 or a negative number, the plugin crashes. So if I select the skill with the first setting after having moved 2 or more spaces (character can move 4) -- crash. If I do the second option it crashes if I use up my full movement and then try to use it.

I assume it needs a valid target in order to not crash. It has no target on a 0 because the scope options require that the cell be free, and it crashes on a negative number because math.

Given that different characters have different movement points, status effects and equipment can add points and take away points, etc, I'm not sure how I can set up any movement skill that is based on remaining movement points with any subtraction that wont crash for one character or another under some circumstance.

Is there a way to make it not crash if the scope fails to return valid targets? Is there some better way to set this up?

For now I'll just do (e.getMovePoints()/2)+1. This wont crash, but it will allow them to move 1 space beyond their movement limit. Please let me know if there's a smarter way to do it.

Also, I think it would be cool if the community could fork this plugin and continue to develop the current version. I think it's safe to say that official development has ceased at this point. No idea whether that's allowed under the terms of use -- or what the terms of use are, for that matter, since they are a dead link. I lack the capability make anything except the most basic changes. So that's my only hope.
 
Last edited:

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
764
Reaction score
357
First Language
English
Primarily Uses
RMMV
If i understand you

If player has 2 or more movepoints, the skill should be usable, otherwise it fails?

That should be simple enough with yanfly scripts.

Ill do some testing amd let you know
 

yeahchris

Veteran
Veteran
Joined
Apr 14, 2020
Messages
89
Reaction score
24
First Language
English
Primarily Uses
RMMV
If i understand you

If player has 2 or more movepoints, the skill should be usable, otherwise it fails?

That should be simple enough with yanfly scripts.

Ill do some testing amd let you know
Thanks!

Correct, I would like the skill to be usable to hop over 1 tile as long as the character has enough remaining movement to move 2 spaces. I don't have any issues setting it up to do that, just getting it to not crash when unusable.

Ideally I would like to have the jump consume that movement as well. I tried setting it up to add a -2 move point status afterwards, but it seems like it doesn't apply the status since the user changes position. I'm assuming I can probably work around that by chaining sequences.

I have the skill added as a shortcut command on the LeTBS command menu. Don't know how that'll affect the situation with Yanfly's scripts.

On an entirely unrelated note, I'm having a hell of a time flagging defeating a particular entity as a battle objective. I'm quite likely doing it wrong. I've put this in the note tags for the enemy in my database:
Code:
<letbs>
Flag: coupler
passable_on_death
move_points: 0
</letbs>

And this is from my event that calls the encounter:
Code:
◆Plugin Command:LeTBSWinCds Clear
◆Plugin Command:LeTBSWinCds Add Defeat FlaggedEntity coupler
When I call the encounter the objective is just "Defeat undefined". Either I set up the flag wrong or I referenced the flag wrong. Documentation is minimal and there is no specific enemy flagged as an objective in the demo... so I have no working example to reference.
 

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
764
Reaction score
357
First Language
English
Primarily Uses
RMMV
In order to flag an entity, you must use the comment
<LeTBS> Flag: ID
1590102035138.png

If your flagged entity is always in the same position, simply put this comment in the box he spawns in.


EDIT:
IMPORTANT.

For those who are saying the documentation is not up-to date (which it is missing a ton of stuff)
The old documentation can be found here: https://lecodemv.github.io/leTBS/old/eventing.html


======
Found a huge bug in my regionCost script.
Turns out if you don't set a regionId, when you move it subtracts NaN from your movepoints, which completely messes up everything... whodathunk
fixed it with a simple isNan


=====

As for Jumping

1590104442392.png
1590104468374.png
Currently has 6 move

now 3
1590104494689.png

Now what if we have ONE
1590104521673.png
Hey now, we can't use it.

So to add skills that require specific amount of movement remaining, use the following in the skill notetag
(REQUIRES YANFLY SKILL CORE)

simply replace en._movePoints>=2 to any comparison you want

<Custom Show Eval>
en = BattleManagerTBS.activeEntity();
if (en._movePoints>=2) {
visible = true;
} else {
visible = false;
}
</Custom Show Eval>
 
Last edited:

yeahchris

Veteran
Veteran
Joined
Apr 14, 2020
Messages
89
Reaction score
24
First Language
English
Primarily Uses
RMMV
In order to flag an entity, you must use the comment
<LeTBS> Flag: ID
View attachment 144671

If your flagged entity is always in the same position, simply put this comment in the box he spawns in.
Err... still getting undefined.

Here is the enemy cell:
1590104479972.png

The event that calls the battle:
1590104556702.png
The event that calls the battle is in a different area from the battle. Hopefully that is fine?

And finally the enemy.

1590104638122.png
 

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
764
Reaction score
357
First Language
English
Primarily Uses
RMMV
Had that issue way way wayyyy back.
Remove the square brackets

LeTBSWinCds Add Defeat FlaggedEntity coupler
also, can you show me your battle map?
is there only the train coupler? or other enemies?
 

yeahchris

Veteran
Veteran
Joined
Apr 14, 2020
Messages
89
Reaction score
24
First Language
English
Primarily Uses
RMMV
Had that issue way way wayyyy back.
Remove the square brackets

LeTBSWinCds Add Defeat FlaggedEntity coupler
also, can you show me your battle map?
is there only the train coupler? or other enemies?
Sadly I tried it both ways.
1590106643966.png

...Still undefined.

I did try setting it up as a custom flag though, where I activate the flag using a plugin command on the troop when the enemy is at 0 health. That actually works, so maybe I'm not as stupid as this is making me feel.

I can show you the battle map, sure. There is only one enemy cell and one enemy in the troop -- the coupler.

I was hoping to have additional enemies drop in using eventing. (AddEntity, which is the next thing I need to figure out.)

Do you want the actual map files or just a picture for context?
1590107693996.png
I basically have stripped the map down to the bare minimum until I get this working. 5 actor cells - 4 are real and the 5th is for testing until I get the objective working. 1 enemy in the troop (tagged coupler), 1 enemy cell for the coupler to spawn in (also tagged coupler). That's it. The battle is called and victory conditions defined by an event on a different map.
 
Last edited:

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
764
Reaction score
357
First Language
English
Primarily Uses
RMMV
Sadly I tried it both ways.
View attachment 144679

...Still undefined.
I figured this issue out.
The plugin command for setting LeTBSWinCds seems to only work while the LeTBS engine is running, just enabling it isn't enough. So your best option is to clear condition, and re-add it in page 1 of the troop.

Ill probably need to look into this a bit..

EDIT:
Yes, it doesn't work, and all my working examples of this, funny enough occur during battles where I change the win conditions....


=======
On another note,

I might be taking another break from scripting as I focus on configuring the voices for 6 characters in my game (1 is done) and finish re-mapping this fortress invasion mission thingo (party decides to invade a fortress belonging to bad people that attacked a town after certain events happened) which is holding me back from a demo.

However, as I am now more active again, I will try to answer questions and provide assistance where I can.
If I promised you help in the past, please remind me what we were discussing and where we ended off.


Also if anyone has any ideas for more stuff to shove into this battle system, do let me know. I'm always open to new ways to procrastinate :)
 
Last edited:

yeahchris

Veteran
Veteran
Joined
Apr 14, 2020
Messages
89
Reaction score
24
First Language
English
Primarily Uses
RMMV
I figured this issue out.
The plugin command for setting LeTBSWinCds seems to only work while the LeTBS engine is running, just enabling it isn't enough. So your best option is to clear condition, and re-add it in page 1 of the troop.

Ill probably need to look into this a bit..
More info: I just realized that despite the fact it says undefined the victory condition is now working. Where does it pull the text it is supposed to display in the victory conditions banner from ? I am assuming that whatever field it's supposed to pull the enemy name from is something I didn't fill out.

I'll try adding the condition from the troop as you suggested and see if it shows a name at that point.
 
Last edited:

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
764
Reaction score
357
First Language
English
Primarily Uses
RMMV
More info: I just realized that despite the fact it says undefined the victory condition is now working. Where does it pull the text it is supposed to display in the victory conditions banner from ? I am assuming that whatever field it's supposed to pull the enemy name from is something I didn't fill out.
Hmm, that is good news.
If it works, thats not an issue then.
I'll look into the win condition popup at some point..

EDIT:

The fix is stupidly simple...

In LeTBS_WinConditions.js

go to the function: getConditionTexts

look for this:

this._defeatFlaggedEntities.forEach(function (info) {
var flagName = info[1];
texts.push("Defeat " + flagName);
}.bind(this));

The funny thing here is
info, if used for defeat flagged entities, has actually ONLY ONE element in the array, so using info[1] here causes flagName to return "undefined"
change this to
this._defeatFlaggedEntities.forEach(function (info) {
var flagName = info[0];
texts.push("Defeat " + flagName);
}.bind(this));

1590109497839.png
 
Last edited:

yeahchris

Veteran
Veteran
Joined
Apr 14, 2020
Messages
89
Reaction score
24
First Language
English
Primarily Uses
RMMV
Hmm, that is good news.
If it works, thats not an issue then.
I'll look into the win condition popup at some point..
Copy that. For now I'll just stick with my custom victory condition. It makes more sense really to have the victory condition be "break the train coupling" rather than "defeat the train coupling" anyway.

Out of curiousity, do you know if there is a way to display the victory conditions again mid battle?

As in, at battle start show victory condition as "Reach the rear of the train!" and then update the victory conditions to add "Break the coupling!" and display that mid-battle?

I'm off to try and figure out how AddEntity works. No doubt I'll have questions.
 

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
764
Reaction score
357
First Language
English
Primarily Uses
RMMV
Copy that. For now I'll just stick with my custom victory condition. It makes more sense really to have the victory condition be "break the train coupling" rather than "defeat the train coupling" anyway.

Out of curiousity, do you know if there is a way to display the victory conditions again mid battle?

As in, at battle start show victory condition as "Reach the rear of the train!" and then update the victory conditions to add "Break the coupling!" and display that mid-battle?

I'm off to try and figure out how AddEntity works. No doubt I'll have questions.
Check my post again, the fix is there.

As for showing the victory condition again... It kind of shows on battle start, and I haven't looked into getting it to display mid-battle,
In my game, when i Change the battle conditions, I just use a regular old text box.
So one thing you can do, is set up a graphic or something that

"Victory conditions have changed"
"Defeat all enemies"

and use an event to display the picture.
 

deathsia

Pegisister
Veteran
Joined
Feb 26, 2014
Messages
649
Reaction score
55
First Language
English
Primarily Uses
Project's dead. I follow the plugin dev on Pat-reon and I haven't seen ANYTHING(not even a status post) in the last 1-2yrs and the last time he was seen on this website was July 2019, damn near full year ago. If you can get this thing to work in your game, great but it caused a game breaking bug in mine where random encounters stopped working...PERIOD.
 

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
764
Reaction score
357
First Language
English
Primarily Uses
RMMV
Random encounters should only break if you don't set up the random encounters script properly and set default battle map for the encounter
I have an entire mountain dungeon that uses random encounters and works just fine.

If you gave up on the script, I'm sorry to hear that.

I may not be the Dev. but I will still do my best to support this project in my own way and create new scripts for it.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.
time for a new avatar :)

Forum statistics

Threads
106,015
Messages
1,018,351
Members
137,801
Latest member
topsan
Top