Lecode Tactical Battle System 0.77.2B

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
764
Reaction score
357
First Language
English
Primarily Uses
RMMV
Guys, I'm really stuck with the skill issue. I want to activate "Guard" and "Double Attack". Both of them are in the skill-list and activated in the class of the actor and in the actors menu. But they dont show up during TBS. When I open the "Special"-menu there is just a blue bar but nothing to choose. Any ideas?
thanks!
I created a custom guard that adds a 1 turn set buff.

As for not showing
Did you add letbs tags to these skills?
 

freebooter

Veteran
Veteran
Joined
Oct 20, 2017
Messages
104
Reaction score
5
First Language
German
Primarily Uses
RMMV
nope, I didnt. Using LeTBS-demo as the base for my game I just saw that skills 0001 to 0007 are not tagged. Skills between 0012 and 0100 are tagged and I can use them in battle. So thats clear now.

To get behind the system: if I create a new skill, lets call it "vampyr-slayer", when used against a vampyr the vampyr gets double damage. If I want to use this skill with LeTBS I have to define it with LeTBS-tags in the note-section. It will not work if I only define it through the skill-tab?
 

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
764
Reaction score
357
First Language
English
Primarily Uses
RMMV
nope, I didnt. Using LeTBS-demo as the base for my game I just saw that skills 0001 to 0007 are not tagged. Skills between 0012 and 0100 are tagged and I can use them in battle. So thats clear now.

To get behind the system: if I create a new skill, lets call it "vampyr-slayer", when used against a vampyr the vampyr gets double damage. If I want to use this skill with LeTBS I have to define it with LeTBS-tags in the note-section. It will not work if I only define it through the skill-tab?
Yeah, you should be using those letbs notetags regardless.
 

mojoaa13

Villager
Member
Joined
Dec 25, 2014
Messages
23
Reaction score
17
Primarily Uses
On the subject of skills, I think I found a bug. When I use the <letbs_commands> tag to add skills to the command window, they will work even if I don't have the MP to use the skill. Reading the documentation, I don't think this is how it is supposed to work.
 

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
764
Reaction score
357
First Language
English
Primarily Uses
RMMV
On the subject of skills, I think I found a bug. When I use the <letbs_commands> tag to add skills to the command window, they will work even if I don't have the MP to use the skill. Reading the documentation, I don't think this is how it is supposed to work.
This can be fixed by using yanflys skill core and using the custom show evaluation.
I use this to do a check if a character has under or over 50% hp. Or if a certain char is alive etc.
This can easily be used with the eval
A.mp>20.

For the skills you add woth let's commands, it works differently these are treated as default skills.

You can run an eval in the damage formula that if a.mp<cost it deals 0 damage. I' not familiar woth this myself however.

I'l take a look in the morning to see if there's a fix or a way around this problem of yours
 

Rem Rem

Veteran
Veteran
Joined
Apr 3, 2017
Messages
40
Reaction score
7
First Language
English
Primarily Uses
RMMV
Any news on .77?

Also has anyone used yanfly's absorption barrier with their project?
 
Last edited:

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
764
Reaction score
357
First Language
English
Primarily Uses
RMMV
@Lecode
Would it be possible to add common events to the sequences?
I need an actor to talk in the middle of his attacks.
Common events in skills only run at the end and I need them to talk at the beginning and the middle.
Yanfly Action Sequences is not compatible unfortunately.

Found that using
$gameTemp.reserveCommonEvent(id);
works, but it runs after you end your turn.
I need this to run immediately.


found another issue with script:
in the sequences
if you run a command like add(3,4);
it splits this into
add(3
4);
it is splitting the script by a comma, this should not be happening.

Using script: sequence is fine. But needs work to prevent stripping the functions inside that use parenthesis like add(a,b)
Maybe regex can be used to do that?
 
Last edited:

Rem Rem

Veteran
Veteran
Joined
Apr 3, 2017
Messages
40
Reaction score
7
First Language
English
Primarily Uses
RMMV
I do and all work well for me
Ok but specifically his absorption barrier? I had some not work for me before and his absorption barrier was one of them.
 

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
764
Reaction score
357
First Language
English
Primarily Uses
RMMV
Ok but specifically his absorption barrier? I had some not work for me before and his absorption barrier was one of them.
I found that it depends on where you put yanflys scripts.
Like item core breaks if above let's but is fine under it
 

freebooter

Veteran
Veteran
Joined
Oct 20, 2017
Messages
104
Reaction score
5
First Language
German
Primarily Uses
RMMV
Every time when I start a game test, also the program (console?) starts, which gives me the stack trace. This is because I build me project on LeTBS demo. But now each time I start a game test it show me this:
error.png
It occured after I deleted the preset tilesets. What does it mean and how can I stop this? Thanks!
 

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
764
Reaction score
357
First Language
English
Primarily Uses
RMMV
Are
Every time when I start a game test, also the program (console?) starts, which gives me the stack trace. This is because I build me project on LeTBS demo. But now each time I start a game test it show me this:
View attachment 76756
It occured after I deleted the preset tilesets. What does it mean and how can I stop this? Thanks!
Are you sure that all you deleted
 

moldy

Veteran
Veteran
Joined
Nov 15, 2015
Messages
193
Reaction score
29
First Language
English
Primarily Uses
Awesome update! Is there a to-do list for the upcoming version, LeCode?
 

freebooter

Veteran
Veteran
Joined
Oct 20, 2017
Messages
104
Reaction score
5
First Language
German
Primarily Uses
RMMV
@Pharonix is there a way to disable stack trace? As I base my project on the demo it start automatically every time I make a game test.
 

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
764
Reaction score
357
First Language
English
Primarily Uses
RMMV
@Pharonix is there a way to disable stack trace? As I base my project on the demo it start automatically every time I make a game test.
Not that I know of.
The stack trace will be there if u build and run in browser too. It' because it' technically html and JavaScript.
Only in browser, it'l be hidden inside the developer tools
 

freebooter

Veteran
Veteran
Joined
Oct 20, 2017
Messages
104
Reaction score
5
First Language
German
Primarily Uses
RMMV
Well ok, as it doesnt effect the game-test I can live with that. Thanks.

Another thing: In LeTBS you find under the default skills: Repulsive Blow. The damage formula read: this.phyDmg(120)
So Repulse Blow deals damage of 120? What exactly does "this" mean in this context?
 

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
764
Reaction score
357
First Language
English
Primarily Uses
RMMV
This
Refers to the current function in JavaScript typically.

Seeing as my repulsive blow does not do 120 damage I'm assuming Lecode has a custom damage formula
 

Chaosicaa

Veteran
Veteran
Joined
Dec 22, 2016
Messages
95
Reaction score
122
First Language
French
Primarily Uses
@freebooter In LeTBS demo there is "LeDamageFormula.js" plugin.

In this short plugin you can see that there is a physical and magical damage

For physical damage :
this.phyDmg = function (rate) {
//var rawDmg = (a.atk * 4 - b.def * 2) * rate * 0.01;
var rawDmg = a.atk * 2 * rate * 0.01;
var reduction = b.def / (b.def + 2 * rawDmg);
return Math.floor(rawDmg - reduction * rawDmg);
};

So basically if you write : this.phyDmg(120), it is a shortcut for :
1) a.atk * 2 * 120 * 0.01 = X
2) b.def / (b.def + 2 * X) = Y

THEN, the Final damage output = X - (Y * X) (if the result is a decimal number, then return to the closest lower number (example 46.74 return : 46)

So basically if you are using "LeDamageFormula.js" and do not want to use complicated formulas this is an easy tool.
If you are comfortable with JavaScript you can even edit it and use your OWN custom damages formulas!


Edit :
If you want a formula that work like the game "Dofus" here is how you do (it is not exactly the same but inspired) :
(in this game, there is a stat called "power" (lets use actor atk) that boost your attack power in% and enemies have %resistance instead flat resistance (let's use b.def))

this.phyDmg = function (rate) {
var rawDmg = a.atk * rate * 0.01;
var reduction = rawDmg * b.def * 0.01;
return Math.floor(rawDmg - reduction);
};

So if your character have 800 power and the enemy have 50% defense on a skill that deals 120 damages like this : this.phyDmg(120)
1) 800 * 120 / 100 = 960 ( "/100" and "*0.01" is the same)
2) 960 * 50 / 100 = 480 (so it is really 50% reduction) (be careful having 100% defense would make an enemy invulnerable, that might be good for a state on an enemy you can remove with a special spell like a boss that protect himself or his summons)

Final damage = 960 - 480 = 480
In this formula, if you have 0 power you will deal 0 damage (in "Dofus" if you have 0 power you will still deal 100% of the basic attack so if you want the same formula you can change :
var rawDmg = a.atk * rate * 0.01;
by
var rawDmg = (a.atk * rate * 0.01) + rate;
So even if you have 0 power, you will deal the base damage.

The really good thing with this plugin is : if you want %defense reduction AND flat defense reduction, you can by adding one variable and remove the result in the final output like that (here flat defense is on target luck)
You can also add flat damage output (lets use actor agi stat) :

this.phyDmg = function (rate) {
var rawDmg = (a.atk * rate * 0.01) + rate;
var reduction = rawDmg * b.def * 0.01;
var flatDmg = a.agi;
var flatReduction = b.luk;
return Math.floor(rawDmg + flatDmg - flatReduction - reduction);
};

So here you have a really complicated formula but very easy to use.

Be careful with the final order :

return Math.floor(rawDmg + flatDmg - flatReduction - reduction); //(good)
is NOT equal to :
return Math.floor(rawDmg + flatDmg - reduction - flatReduction); //(bad)

Because of the nature of flat attack and flat defense, it is way more effective on comparatively small numbers so adding a flat defense after the %defense or flat attack in the rawDmg might be way too OP (having a smaller number to deal with, the reduction or attack would be exponentially too effective) but you probably already know about it!

Of course this is just a sample, you can use even more complicated formula if you want : )
 
Last edited:

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

Latest Threads

Latest Posts

Latest Profile Posts

He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

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!

Forum statistics

Threads
106,035
Messages
1,018,459
Members
137,821
Latest member
Capterson
Top