Lecode Tactical Battle System 0.77.2B

Psychronic

Veteran
Veteran
Joined
Aug 5, 2018
Messages
126
Reaction score
102
First Language
English
Primarily Uses
RMMV
Thanks guys!

For anybody else who's interested, this is the syntax of what goes into the notes section. It's actually called scope_select:

Screenshot_12.png

But thanks, this makes the battle system much better now.
 
Last edited:

cmcorbin

Villager
Member
Joined
Mar 14, 2019
Messages
14
Reaction score
6
First Language
english
Primarily Uses
RMMV
I am trying to create an event in battle that lets you pick up an item off the floor. I am currently using the step_on trigger to give the player a prompt asking if they want it, but the event triggers every time an enemy steps on it too. Is there anyway to have the event only be triggered when an actor steps on it? Thanks in advance for any help.
 

Sunder

Villager
Member
Joined
May 8, 2019
Messages
13
Reaction score
7
First Language
FR
Primarily Uses
RMMV
I am trying to create an event in battle that lets you pick up an item off the floor. I am currently using the step_on trigger to give the player a prompt asking if they want it, but the event triggers every time an enemy steps on it too. Is there anyway to have the event only be triggered when an actor steps on it? Thanks in advance for any help.
The easiest way is probably to add this code to LeTBS.js (or create a plugin with this code that you'll add after LeTBS in the plugin manager)

Code:
BattleManagerTBS.isActorAtCell = function(x, y) {
  e = BattleManagerTBS.getCellAt(x, y).getEntity();
  return (e && (e._battler instanceof Game_Actor));
}
Then, in your event, you just have to do a conditional branch with script `BattleManagerTBS.isActorAtCell(x, y)`. You have to replace x and y with the position of your event, of course.
Let me know if it works ! :)

----------------------------------

At the same time, I have two problems :

First, as stated in the documentation, I should be able to change the sprites tone, hue and scale by setting the appropriate tags. It doesn't seem to be working for me.
Is it just because of the new way to handle tags (like directional damage) ? If so, isn't there a way to use to old tag reading ?

Second, I still haven't figured out how to make the enemies use multiple skills per turn (as long as they have MP). Did someone try that and could help me ?
 
Last edited:

chengsta

Veteran
Veteran
Joined
Jan 14, 2019
Messages
50
Reaction score
7
First Language
english
Primarily Uses
RMMV
did you try the 'extra instant turn' tag on your skills? it'll allow them to act forever technically until they run out of whatever their skills cost. But I never tried it myself for enemies.

but in return, did you manage to get directional damage working?
 

Sunder

Villager
Member
Joined
May 8, 2019
Messages
13
Reaction score
7
First Language
FR
Primarily Uses
RMMV
Hmmm I did not think of that, but I just tried and it didn't work. I have a state that add some MP every turn, and any kind of new turn add the MP to the enemy, so it would result in an endless loop of turns !
Also, it doesn't look "clean" to see in the Turn Order HUD. Thanks for the suggestion, though :)
 

Doktor_Q

I'm not a real doktor, but I am a real Q
Veteran
Joined
Aug 1, 2016
Messages
710
Reaction score
417
First Language
English
Primarily Uses
RMMV
@Sunder You probably have "Act Once" set in the parameters, which generally stops anyone from using multiple skills in a round. It's on by default, since most tactics games use that rule.

Hue changes worked perfectly for me so far even without modification, how are you trying to format the notetags?
 

Sunder

Villager
Member
Joined
May 8, 2019
Messages
13
Reaction score
7
First Language
FR
Primarily Uses
RMMV
@Sunder You probably have "Act Once" set in the parameters, which generally stops anyone from using multiple skills in a round. It's on by default, since most tactics games use that rule.

Hue changes worked perfectly for me so far even without modification, how are you trying to format the notetags?
If you're talking about "One Time Offense", I have it set to false, it works perfectly for my actors but the AI still does only one action. If you're not, I can't find this parameter and I will feel very stupid... :(

About hue, tone and scale, I tried that :
Code:
<letbs_sprite>
pose(idle): use_chara, Evil, 0
turn_order: auto
status_sprite: auto
sprite_tone: 100, 100, 100, 100
sprite_scale: 3, 3
sprite_hue: 120
</letbs_sprite>
 
Last edited:

Doktor_Q

I'm not a real doktor, but I am a real Q
Veteran
Joined
Aug 1, 2016
Messages
710
Reaction score
417
First Language
English
Primarily Uses
RMMV
Here's one I have in a state:
<letbs>
sprite_tone: -48, -48, -48, 48
</letbs>

And another I have on an actor:
<letbs>
passable
sprite_tone: -128, -128, -128, 128
move_points: 4
</letbs>

Strangely, they're part of the basic letbs tag, not letbs_sprite.
 

Sunder

Villager
Member
Joined
May 8, 2019
Messages
13
Reaction score
7
First Language
FR
Primarily Uses
RMMV
Yup, that's it ! It works, thanks a lot. I should have tried in all tags.
 

cmcorbin

Villager
Member
Joined
Mar 14, 2019
Messages
14
Reaction score
6
First Language
english
Primarily Uses
RMMV
The easiest way is probably to add this code to LeTBS.js (or create a plugin with this code that you'll add after LeTBS in the plugin manager)

Code:
BattleManagerTBS.isActorAtCell = function(x, y) {
  e = BattleManagerTBS.getCellAt(x, y).getEntity();
  return (e && (e._battler instanceof Game_Actor));
}
Then, in your event, you just have to do a conditional branch with script `BattleManager.isActorAtCell(x, y)`. You have to replace x and y with the position of your event, of course.
Let me know if it works ! :)

----------------------------------

At the same time, I have two problems :

First, as stated in the documentation, I should be able to change the sprites tone, hue and scale by setting the appropriate tags. It doesn't seem to be working for me.
Is it just because of the new way to handle tags (like directional damage) ? If so, isn't there a way to use to old tag reading ?

Second, I still haven't figured out how to make the enemies use multiple skills per turn (as long as they have MP). Did someone try that and could help me ?
Thanks for the suggestion. I am gonna go see if that works now. Ill let you know how it goes.
 

cmcorbin

Villager
Member
Joined
Mar 14, 2019
Messages
14
Reaction score
6
First Language
english
Primarily Uses
RMMV
@Sunder Hum. Cant quite seem to get it to work. im pretty sure i put the code in the right place. also double checked to make sure i had the right position for the event. Unsure of what i could be overlooking. Also its not letting me post a screenshot of the event. I did try to though.
 

Sunder

Villager
Member
Joined
May 8, 2019
Messages
13
Reaction score
7
First Language
FR
Primarily Uses
RMMV
@cmcorbin My bad, I actually made a typo: it's not BattleManager.isActorAtCell(x, y), but BattleManagerTBS.isActorAtCell(x, y). I edited my other post.
There you have an example that I tested and works as intended :


Also, don't forget that the first cell (top left) is at position 0,0 and not 1,1.
 

pulsusego

Villager
Member
Joined
Apr 8, 2019
Messages
16
Reaction score
13
First Language
English
Primarily Uses
RMMV
Alright, so I'm really itching to get back to working on my project with this system, so anyone mind giving some quick advice? I put a hold on working on it until the new update was released by LeCode because I knew it would change how things were organized and code was structured and etc. I didn't want to build up the game around a base that might need extensive revisions later on to make it compatible with the new version.

Is it really necessary to hold off? Will the possible adjustments that would be necessary really be all that complex? If it might be a problem, is there anything you might suggest I work on that wouldn't likely cause any problems once the update drops? I'd started working a good bit on artwork for it for now but I'd like to be able to take a break from that to do more with the game itself while I'm waiting for the update. I'd really appreciate the input. Thanks!
 

Doktor_Q

I'm not a real doktor, but I am a real Q
Veteran
Joined
Aug 1, 2016
Messages
710
Reaction score
417
First Language
English
Primarily Uses
RMMV
@pulsusego It's not strictly necessary, but it will result in more work because some stuff will change, and you might not need all of the workarounds you had to implement, or may have to re-implement any non-lecode-written extensions.

My personal approach is to make a "demo" of my game in the current system, to figure it how I want it to work, get initial balancing, what kind of abilities and systems I'm using, and generally to get comfortable with things. I'll probably release it as a kind if teaser assuming it doesn't have any major bugs left.

Then, once the newer version is out, I'll start fresh on that, copying over the good, updating things, and organizing stuff better for the real project.
 

Myers & Sparks

Veteran
Veteran
Joined
Jan 2, 2017
Messages
91
Reaction score
3
First Language
English
Primarily Uses
RMMV
Trying to research the ins and outs before I commit to anything

Have two questions.

First I imagine this is only turned based.
Is there any type of “timer” associated with anything? I see in the parts of the code variables like

Lecode.S_TBS.turnOrderSpeed = 12;
What is determining “turn order speed”

Or is this merely the speed which the turns play out?


Second is there a way to make movement cost your spot in line?
 

Doktor_Q

I'm not a real doktor, but I am a real Q
Veteran
Joined
Aug 1, 2016
Messages
710
Reaction score
417
First Language
English
Primarily Uses
RMMV
Trying to research the ins and outs before I commit to anything

Have two questions.

First I imagine this is only turned based.
Is there any type of “timer” associated with anything? I see in the parts of the code variables like



What is determining “turn order speed”

Or is this merely the speed which the turns play out?


Second is there a way to make movement cost your spot in line?
It is strictly turn based. You could implement a way for movement to consume your turn or delay it, but not without writing extra code.

The timers are all related to how long animations take, or how long a pause is between two things happening.
 
Last edited:

cmcorbin

Villager
Member
Joined
Mar 14, 2019
Messages
14
Reaction score
6
First Language
english
Primarily Uses
RMMV
@Sunder Sorry it took me so long to try the fix to picking up items off the ground. Worked like a charm though. I really appreciate it. As silly as it sounds, its an important mechanic for one of the classes in my game. I am glad i dont have to scrap that class.
 

pulsusego

Villager
Member
Joined
Apr 8, 2019
Messages
16
Reaction score
13
First Language
English
Primarily Uses
RMMV
@Doktor_Q , I just wanted to say thanks for relating that, it's a good basis to work off of. :) Thinking about it, a demo of sorts is a lot less intimidating to tackle too. Almost like less pressure to get specific things working since they might need reworked anyway, so in theory I can just skip those bits entirely and move on to whatever's next if I get hung up anywhere. I'll probably just avoid trying to do too much with additional plugins or any code tweaking or the like in general, at least where I can get away with it anyway.

Thanks again for the help! Appreciate ya bunches. :)
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Testing out applying a stroke effect to things at player level to increase visibility. Thoughts?

I wonder what cat meat tastes like.
Some call him... the wacky one.

Forum statistics

Threads
95,650
Messages
930,747
Members
125,982
Latest member
MrPhantom
Top