Lecode Tactical Battle System 0.77.2B

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
747
Reaction score
340
First Language
English
Primarily Uses
RMMV
Been working a lot on the, ah.. 'infrastructure' of the game while waiting for 0.8, setting up tables in google sheets that help autogenerate items and such with varied stats (to copy/paste into the game's text/database files). But I come back to check on things fairly regularly, and skimming through gave me a thought. Is it possible to make characters exert a sort of 'exclusion zone' around them that prevents movement, like an obstacle that does not block LoS? I don't think this is currently doable to be honest, given that I remember a while back that there wasn't a[t least a reasonably approachable] method of implementing 'large' units (2x2, 3x3, etc.), but as this would be based on a regular 1x1 unit simply with the surrounding tiles impassable, I thought it might be worth a shot to ask. I wouldn't be sure where to begin with trying it out though- maybe auras could be used somehow?
I was actually working on something like this.
It's still in-progress but it works like this:

I have the state
RESTRICT MOVE


In order to do this, I take the 8 surrounding cells of the cell that is being tested in the isCellReachable function
and have the BattleManager pull any entities in them, and checks
IF there is an entity, is that entity possessing the [RESTRICT MOVE] state
If yes, then return false -> This cell is affected.

I need to run some more tests, and line out some more javascript, but it should be done sometime next week.
I'll post a video when its done.
 

Danielcross

Veteran
Veteran
Joined
Sep 27, 2017
Messages
100
Reaction score
10
First Language
English
Primarily Uses
RMMV
Thanks again Pharonix, I'll give it a shot!

Edit: Thanks, it worked like a charm!
 
Last edited:

Jomarcenter

jomarcenter-MJM
Veteran
Joined
Apr 24, 2012
Messages
1,269
Reaction score
205
First Language
ENGLISH
Primarily Uses
RMMV
@Jomarcenter that's odd, hang on I'll check then edit the post..
Right, so I'd never even realized there were demo files for 0.8 available in any way, which is interesting lol.. but for now, I think you'd have to stick with the 0.77.2 Update link, the latest officially released build. That, and chaosicaa's demo setup as reference material. Maybe the 0.8 links are being replaced or some such? We'll see soon enough, I'm sure.
Who manages the script? I really need to know since I am planning to try to program additional custom features into the scripts. and I cannot see the documentation since the github link is not worrking
 

kmack

Villager
Member
Joined
Nov 21, 2018
Messages
5
Reaction score
7
First Language
English
Primarily Uses
RMMV
I am having issues getting the Console plugin from the demo to run with my game files. I double-checked the plugin order vs the demo, attempted to resize the window, however still receive the following errors:

YEP_CoreEngine.js:1098 TypeError: Cannot read property 'resizeTo' of undefined
at Scene_Boot.initialize (Console.js:61)
at new Scene_Boot (rpg_scenes.js:337)
at Function.SceneManager.goto (rpg_managers.js:2071)
at Function.SceneManager.run (rpg_managers.js:1803)
at Function.SceneManager.run (YEP_CoreEngine.js:1371)
at window.onload (main.js:8)
Any ideas on how to fix?

EDIT: For now I have disabled the Console.js and am testing compatibility of LeCodeTBS with many of Yanfly's scripts. The game seems to boot fine with this disabled.
 
Last edited:

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
747
Reaction score
340
First Language
English
Primarily Uses
RMMV
Edit: Tagged the Wrong Person: :)
@pulsusego

Hey man,

My script is coming along nicely

Check this out:
The blonde soldier, is affected with state 100 (the default I chose for "Influence")

If a unit is affected with this state, and is found in the list of 8 directions around a cell in the "Moveables" list so to speak
it gets blacked out, and can't be used, as it is under the influence of that enemy

upload_2019-9-16_11-49-58.png

The trickier part was making sure allies/enemies weren't affected.
I decided that even if brainwashed/charmed/confused, I don't want allies to be affected by their friends, same for enemies:
Though I could add this in the future

upload_2019-9-16_11-55-30.png
In this second picture, our partner is also under the passive for "Influence"
Lets check it out
upload_2019-9-16_12-7-30.png
Now, normally the enemy would run right up to you.
Let's hope it works:

upload_2019-9-16_12-10-34.png
upload_2019-9-16_12-11-0.png
As we can see, the enemies are simply surrounding our Trusty Knight.
Since they carry only swords, they need to be within 1 cell surrounding an enemy to attack, but unfortunately for them,
they can't get into position.
I'd say my tests are successful from both a ally and enemy side.

Feel Free to test it out:
https://www.dropbox.com/s/0gadzi6o4oafkx7/PHX_LeTBS_Influence.js?dl=0

Make sure it is underneath every LeTBS script
There's a param for Influence 2, but that will take me a little longer
Let me know if it causes any issues.
I've had to tread carefully because my LeTBS version is heavily modified, so it'll be nice to know if I made this one compatible with more
vanilla versions.
 

Attachments

pulsusego

Villager
Member
Joined
Apr 8, 2019
Messages
16
Reaction score
13
First Language
English
Primarily Uses
RMMV
I've been editing my project pretty heavily and have gutted it a bit, so it's not actually playable up to the point of a battle anymore lol, but the bits I've got together outside of that don't have any issues (not that I'd really expect it to be relevant outside of battle tbh, but still).Once I actually get to the point where I can start a battle again I'll let you know how it goes lol. Very cool addition though, well done. :)
 

kmack

Villager
Member
Joined
Nov 21, 2018
Messages
5
Reaction score
7
First Language
English
Primarily Uses
RMMV
I'm having issues with Yanfly compatibility.

I keep receiving an error stating: "Cannot read property 'pose' of undefined". The log refers me to this line of code... but I'm not sure what I'm missing. Any help would be appreciated.

TBSEntity_Sprite.prototype.getConfig = function () {
var battler = this._battler;
var object = battler.rpgObject().TagsLetbsSprite.pose;
var config = [];
for (var key in object) {
if (object.hasOwnProperty(key)) {
var element = object[key];
config.push({
pose: key,
data: element
});
}
 

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
747
Reaction score
340
First Language
English
Primarily Uses
RMMV
I'm having issues with Yanfly compatibility.

I keep receiving an error stating: "Cannot read property 'pose' of undefined". The log refers me to this line of code... but I'm not sure what I'm missing. Any help would be appreciated.

TBSEntity_Sprite.prototype.getConfig = function () {
var battler = this._battler;
var object = battler.rpgObject().TagsLetbsSprite.pose;
var config = [];
for (var key in object) {
if (object.hasOwnProperty(key)) {
var element = object[key];
config.push({
pose: key,
data: element
});
}
You're going to need post the actual console output.
 

Sacrifyx

Veteran
Veteran
Joined
Oct 16, 2012
Messages
79
Reaction score
7
First Language
English
Primarily Uses
RMMV
Need some help here. This is the specific situation.
I have 3 spaceships doing battle. The player ship and enemy ships all use a laser cannon. I need this weapon to only fire in a straight line in the direction the ship is facing.
I have a graphic for the attack in the img\letbs\projectiles folder named lasercannon. I used the setup for "dagger throw" from the demo.

When I fire this attack, I get an error: TypeError: Cannot read property 'slice' of undefined
I'm attaching the console output to this post. I'm pretty positive there's some database work to be done but I'm not sure exactly what.
 
Last edited:

Pharonix

Shadow Walker
Veteran
Joined
Apr 22, 2012
Messages
747
Reaction score
340
First Language
English
Primarily Uses
RMMV
Need some help here. This is the specific situation.
I have 3 spaceships doing battle. The player ship and enemy ships all use a laser cannon. I need this weapon to only fire in a straight line in the direction the ship is facing.
I have a graphic for the attack in the img\letbs\projectiles folder named lasercannon. I used the setup for "dagger throw" from the demo.

When I fire this attack, I get an error: TypeError: Cannot read property 'slice' of undefined
I'm attaching the console output to this post. I'm pretty positive there's some database work to be done but I'm not sure exactly what.
Can you post:

1. The skill notebox
2. The sequence for the skill
3. the projectile config
 

Sacrifyx

Veteran
Veteran
Joined
Oct 16, 2012
Messages
79
Reaction score
7
First Language
English
Primarily Uses
RMMV
Actually I restarted and went a different route, just modifying the demo and I have it in a working state right now. My only remaining question now is if this there's a way to make the attack only possible in the direction the character is facing.
 

Doktor_Q

I'm not a real doktor, but I am a real Q
Veteran
Joined
Aug 1, 2016
Messages
852
Reaction score
536
First Language
English
Primarily Uses
RMMV
Actually I restarted and went a different route, just modifying the demo and I have it in a working state right now. My only remaining question now is if this there's a way to make the attack only possible in the direction the character is facing.
It's the reverse, usually- the character will face in the direction they attack. The engine is built with that in mind, so you'd have to do your fair share of modding to make it check their current facing direction before the attack.
 

Ygdrassill

Game dev
Veteran
Joined
Nov 17, 2013
Messages
105
Reaction score
11
First Language
English
Primarily Uses
Hi! So im trying to figure out how to setup with the AoE Creator., but I cant figure out how to get 2 types of skills to work.

1 is like a sweeping strike, it targets 3 tiles of the first row infront of the user, and then hits all 3, like a sword sweep.
"[cx+1,cy-1],[cx+1,cy],[cx+1,cy+1]". But when I use this, it will hit all 3, but it still only lets the cursor choose one
and I cant change the direction the character is facing so the attack only hits the first row on the right side :/

2 is a dash, where u dash THRU the enemy but you hit the enemy in the dash. So like u dash 2tiles it hits the enemy and then 2 more tiles past the
enemy ending up on the other side of him, I just cant figure this one out at all :/

If anyone has any help it would be greatly appreciated ^^
 

Doktor_Q

I'm not a real doktor, but I am a real Q
Veteran
Joined
Aug 1, 2016
Messages
852
Reaction score
536
First Language
English
Primarily Uses
RMMV
@Ygdrassill for the first, it sounds like you specified a scope (target range) instead of an AoE (effect around the target)

For the second, try making a skill with a linear scope that requires you to target an empty cell, and ignores line of sight. Next, give it a "path" AoE, so it hits each cell in a path between the caster and the target.
Lastly, use a sequence that moves the user to the destination and deals damage- there should be a lightning jump skill in the demo you can grab the basic design from.
 

Ygdrassill

Game dev
Veteran
Joined
Nov 17, 2013
Messages
105
Reaction score
11
First Language
English
Primarily Uses
@Ygdrassill for the first, it sounds like you specified a scope (target range) instead of an AoE (effect around the target)

For the second, try making a skill with a linear scope that requires you to target an empty cell, and ignores line of sight. Next, give it a "path" AoE, so it hits each cell in a path between the caster and the target.
Lastly, use a sequence that moves the user to the destination and deals damage- there should be a lightning jump skill in the demo you can grab the basic design from.

Ok so for the first skill I made a scope
"sweep": {
data: "[cx+1,cy-1],[cx+1,cy],[cx+1,cy+1]"
},
and in the notetags for the skill I have

<letbs>

scope: custom(sweep)

aoe: circle(1)

</letbs>

but it still doesnt seem to work right.


For the 2nd one Idk enough to really go off the other ones, this is what I tried

"light_dash": [

but it just crashes and gives me this error

TypeError: Cannot read property 'match' of undefined
at TBSSequenceManager.readAnimation (file:///C:/Users/green_000/Documents/LeTBS_0772B/js/plugins/LeTBS.js:8173:13)
at TBSSequenceManager.commandEffects (file:///C:/Users/green_000/Documents/LeTBS_0772B/js/plugins/LeTBS.js:7212:24)
at TBSSequenceManager.runCommand (file:///C:/Users/green_000/Documents/LeTBS_0772B/js/plugins/LeTBS.js:7039:26)
at TBSSequenceManager.update (file:///C:/Users/green_000/Documents/LeTBS_0772B/js/plugins/LeTBS.js:6986:14)
at file:///C:/Users/green_000/Documents/LeTBS_0772B/js/plugins/LeTBS.js:3053:33
at Array.forEach (native)
at Function.BattleManagerTBS.updateSequences (file:///C:/Users/green_000/Documents/LeTBS_0772B/js/plugins/LeTBS.js:3052:24)
at Function.BattleManagerTBS.updateBattleProcessing (file:///C:/Users/green_000/Documents/LeTBS_0772B/js/plugins/LeTBS.js:2882:10)
at Function.BattleManagerTBS.updatePhase (file:///C:/Users/green_000/Documents/LeTBS_0772B/js/plugins/LeTBS.js:2207:18)
at Function.BattleManagerTBS.update (file:///C:/Users/green_000/Documents/LeTBS_0772B/js/plugins/LeTBS.js:2082:10)rpg_managers.js:1949 SceneManager.catchExceptionrpg_managers.js:1910 SceneManager.update
"set_frame: user, atk, 0",
"wait:15",
"play_pose: user, atk",
"directional_anim: user, user, 126, 127, 128, 129",
"look_at: user, cursor_cell",
"set_speed: user, +6",
"effects: {aoe}_battlers, current_obj",
"move_straight: user, 4",
"set_speed: user, reset",
"wait: 15",
"play_pose: user, idle",
],
 

Ygdrassill

Game dev
Veteran
Joined
Nov 17, 2013
Messages
105
Reaction score
11
First Language
English
Primarily Uses
Ok so for the first skill I made a scope
"sweep": {
data: "[cx+1,cy-1],[cx+1,cy],[cx+1,cy+1]"
},
and in the notetags for the skill I have

<letbs>

scope: custom(sweep)

aoe: circle(1)

</letbs>

but it still doesnt seem to work right.


For the 2nd one Idk enough to really go off the other ones, this is what I tried

"light_dash": [

but it just crashes and gives me this error

TypeError: Cannot read property 'match' of undefined
at TBSSequenceManager.readAnimation (file:///C:/Users/green_000/Documents/LeTBS_0772B/js/plugins/LeTBS.js:8173:13)
at TBSSequenceManager.commandEffects (file:///C:/Users/green_000/Documents/LeTBS_0772B/js/plugins/LeTBS.js:7212:24)
at TBSSequenceManager.runCommand (file:///C:/Users/green_000/Documents/LeTBS_0772B/js/plugins/LeTBS.js:7039:26)
at TBSSequenceManager.update (file:///C:/Users/green_000/Documents/LeTBS_0772B/js/plugins/LeTBS.js:6986:14)
at file:///C:/Users/green_000/Documents/LeTBS_0772B/js/plugins/LeTBS.js:3053:33
at Array.forEach (native)
at Function.BattleManagerTBS.updateSequences (file:///C:/Users/green_000/Documents/LeTBS_0772B/js/plugins/LeTBS.js:3052:24)
at Function.BattleManagerTBS.updateBattleProcessing (file:///C:/Users/green_000/Documents/LeTBS_0772B/js/plugins/LeTBS.js:2882:10)
at Function.BattleManagerTBS.updatePhase (file:///C:/Users/green_000/Documents/LeTBS_0772B/js/plugins/LeTBS.js:2207:18)
at Function.BattleManagerTBS.update (file:///C:/Users/green_000/Documents/LeTBS_0772B/js/plugins/LeTBS.js:2082:10)rpg_managers.js:1949 SceneManager.catchExceptionrpg_managers.js:1910 SceneManager.update
"set_frame: user, atk, 0",
"wait:15",
"play_pose: user, atk",
"directional_anim: user, user, 126, 127, 128, 129",
"look_at: user, cursor_cell",
"set_speed: user, +6",
"effects: {aoe}_battlers, current_obj",
"move_straight: user, 4",
"set_speed: user, reset",
"wait: 15",
"play_pose: user, idle",
],
"light_dash": [
"set_frame: user, atk, 0",
"wait:15",
"play_pose: user, atk",
"directional_anim: user, user, 126, 127, 128, 129",
"look_at: user, cursor_cell",
"set_speed: user, +6",
"effects: {aoe}_battlers, current_obj",
"move_straight: user, 4",
"set_speed: user, reset",
"wait: 15",
"play_pose: user, idle",
],
is what i tried for 2nd skill setup
 

Doktor_Q

I'm not a real doktor, but I am a real Q
Veteran
Joined
Aug 1, 2016
Messages
852
Reaction score
536
First Language
English
Primarily Uses
RMMV
@Ygdrassill That is because you have your AoE and Scope backwards on the first skill. Scope determines the cells you can select, AoE determines the shape that radiates out from the selected cell.

For the second skill, "move_straight" has collision and won't let the user pass through, instead you should use "move_to_cell" and have the user move to the selected cell. Once again, refer to the lightning jump skill for something with a similar structure.
 

Sacrifyx

Veteran
Veteran
Joined
Oct 16, 2012
Messages
79
Reaction score
7
First Language
English
Primarily Uses
RMMV
All right, I'm back. Using the demo as a base, I remade the maps, added a character and two enemies, a troop for the battle...all was working fine, then I started getting TypeError: Cannot read property 'width' of undefined. So I redid it again, this time I didn't mess with the maps, I didn't overwrite anything in the DB, just created my main character and class (no bells and whistles, can't even attack), and my 2 enemies. On the Stop the Bandits map, I edited the Random Spawn event to spawn my created enemies, and did not make any changes to the other event on that map. The error comes up at the end of turn 2 just before the new batch of enemies is meant to spawn. My actor and the enemies are both set to use battlers, but that's the only difference between the stock bandits and mine at this time. Also, I only have the plugins that were included in the demo and none have been modified. I'm including the console output here in the hope one of you wizards might be able to spot the problem. Let me know what else you might need. Capture.PNG
 

Ygdrassill

Game dev
Veteran
Joined
Nov 17, 2013
Messages
105
Reaction score
11
First Language
English
Primarily Uses
@Ygdrassill That is because you have your AoE and Scope backwards on the first skill. Scope determines the cells you can select, AoE determines the shape that radiates out from the selected cell.

For the second skill, "move_straight" has collision and won't let the user pass through, instead you should use "move_to_cell" and have the user move to the selected cell. Once again, refer to the lightning jump skill for something with a similar structure.
ok so for the first one I switched the aoe and scope around but it just gives me this
https://gyazo.com/1351235735a0876bb1b59a9c5410cb39.
Instead of just hitting the first 3 squared behind him or ahead of him it just does the circle scope.
I want to make it to where if he is facing forward only the first 3 squares in the row are lit up, and not showing the other squares behind him or on the sides, and just attack those 3, or if he faces up then its only the first 3 squares up highlighted or down etc.

The 2nd , I dont understand the coding enough to go off of the thunder jump because it doesnt really do what I want the 2nd one to do, I dont understand the order of like where to put what, do i put speed in the middle set animation at the top, I just dont understand
 
Last edited:

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

Latest Threads

Latest Profile Posts


finally, the B-tile is added to the forum and steam!
I hope my annual #DoItForHargon contest gets lots of entries this year (since a Playstation 5 is a pretty big prize lol) XD On further news - I'm back to game devving next week after hiatus cause of that tragedy of losing everything I own.
Rome Trastevere deserve a tileset. Mumble mumble...
Before the full time job, I can make 1 MZ plugin per day, even though it's still hard; With the full time job, making 1 such plugin per week becomes just as hard lol

Forum statistics

Threads
102,989
Messages
996,505
Members
134,463
Latest member
adafon
Top