Use javascript to draw an array of tiles etc...

Hello, haven't posted here in a while and I'm working on another project (finished my first, need money to upload to steam) but anyways, what I'm doing right now is working on a custom battle system which I can't seem to get working. I have looked around but seen no examples so far so I'm attempting and not so successfully trying to make a new script for grid type movement during battle in which the players can use the arrow keys to move the character during combat or during turn process which they can use to actively reposition themselves in battle rather than just remain static.

Is this possible in RPG Maker?
Theoretically anything is possible in MV because the entire engine is open.
Unfortunately some things are more difficult than others...

Tactical battle systems are among the most complex tasks possible (at least if you want the computer enemies to be more than cannon fodder)...

That said, I suggest you use a map instead of the battle screen for it. Save the current player position and map data when a battle initiates and have them transfer at that moment to a predefined battlemap. On that map turn the party into a cursor for selecting events that pretend to be the actors and enemies.
That would solve a few steps toward a tactical battle system, but the rest will still be a lot of work (there is a reason why there is only one TBS for Ace and none (yet) for MV...)
Theoretically anything is possible in MV because the entire engine is open.
Unfortunately some things are more difficult than others...

Tactical battle systems are among the most complex tasks possible (at least if you want the computer enemies to be more than cannon fodder)...

That said, I suggest you use a map instead of the battle screen for it. Save the current player position and map data when a battle initiates and have them transfer at that moment to a predefined battlemap. On that map turn the party into a cursor for selecting events that pretend to be the actors and enemies.
That would solve a few steps toward a tactical battle system, but the rest will still be a lot of work (there is a reason why there is only one TBS for Ace and none (yet) for MV...)
Ah I really wanted the battle to occur on the battle instance rather than n the map itself, rather I wanted the game to accept player input during the process turn phase of the battle.
Not sure if that's what you're after, but I have a similar custom battle system in my game. It's still a work in progress though. I'm not done with it, since I made it a lot more complex (with skill abilities and hero abilities that you can level, different AoE patterns, etc.)

Not sure if that's what you're after, but I have a similar custom battle system in my game. It's still a work in progress though. I'm not done with it, since I made it a lot more complex (with skill abilities and hero abilities that you can level, different AoE patterns, etc.)


Yeah definitely something like the green tiles you have there but the mechanic I'm thinking of is that characters can move about whilst the guage is building up.

Similar to this: But I have a few adjustments in mind. Though at this point, I'm considering learning something more advanced z.z
So there would no other party members? Unless you could switch between them.
So there would no other party members? Unless you could switch between them.
There would be switching but no other party members. It'd make the game battle scenes too confusing.
Okay, I got the general idea of your battle system. So what exactly is your problem in coding it?

Personally, I would create a grid function in which each grid is assigned a number (0 to 31 for a 4x4 grid for enemies and actors). You'll need to modify your character sprite class to add a variable representing the "grid position". Using the arrow keys modify your "grid position" property. Last thing that needs to be done is to add a function that constantly updates the characters' position on the screen based on their current "grid position" property.
Okay, I got the general idea of your battle system. So what exactly is your problem in coding it?

Personally, I would create a grid function in which each grid is assigned a number (0 to 31 for a 4x4 grid for enemies and actors). You'll need to modify your character sprite class to add a variable representing the "grid position". Using the arrow keys modify your "grid position" property. Last thing that needs to be done is to add a function that constantly updates the characters' position on the screen based on their current "grid position" property.
My complete newness to javascripting from scratch (I am familiar with coding in general).

Hence I was asking if the game engine could facilitate something like this before seriously attempting it. Don't want to make the extra effort to learn javascript when I'm already learning C++ for a rather extreme project...
Ohh, unfortunately I don't think there's something in the basic engine that builds something similar. I mean, you could modify the Sprite_Actor, but you'll still have to create a new scene for that.

To give you an idea, I built the basic functionality of my battle system (for it to work, only attacking and turns) in about 4000 lines in 2-3 days. It's now a bit above 10000+ lines (since I need to program individually each skills, abilities, enemy AI, etc.). So yeah, it can take a lot of work, but if you keep it simple, it shouldn't be too long (if you put the effort lol).
And also, javascript is extremely easy compared to C++. If you know C++, in 2-3 days of playing with Javascript you'll be good enough to build your battle system.
Ohh, unfortunately I don't think there's something in the basic engine that builds something similar. I mean, you could modify the Sprite_Actor, but you'll still have to create a new scene for that.

To give you an idea, I built the basic functionality of my battle system (for it to work, only attacking and turns) in about 4000 lines in 2-3 days. It's now a bit above 10000+ lines (since I need to program individually each skills, abilities, enemy AI, etc.). So yeah, it can take a lot of work, but if you keep it simple, it shouldn't be too long (if you put the effort lol).
Why not call the notetags from the database and program preset actions in your code? (referencing yanfly's action sequences) That should reduce your effort a great deal.

Otherwise, learning Javascript isn't the problem, it's the coupling with HTML and SQL that most tutorials seem to do that is. Heck, reading through some javascript codes, I can more or less get the gist of how they operate other than how they call specific classes outside their file... I don't get that part too well yet otherwise I gather I'd be more or less en-route about now z.z
Why not call the notetags from the database and program preset actions in your code? (referencing yanfly's action sequences) That should reduce your effort a great deal.

Otherwise, learning Javascript isn't the problem, it's the coupling with HTML and SQL that most tutorials seem to do that is. Heck, reading through some javascript codes, I can more or less get the gist of how they operate other than how they call specific classes outside their file... I don't get that part too well yet otherwise I gather I'd be more or less en-route about now z.z

Oh, I just wanted the pride to be able to say "here's a good game without any Yanfly plugins" lol. Also, I wanted the experience of building every element of my battle system. I've made every thing highly customizable. Skills can have have multiple animations, multiple hit with different targets, elements, power, variance, critical, etc., add flash effect wherever I want, add custom abilities that can be leveled to deal more dmg, increase % to inflict a state, add extra hits, etc. I needed to redo everything and build from the ground up for that level of control.

Also, why do you need to meddle with HTML and SQL in order to build your battle system? Javascript is enough to make run in the RPG Maker. What you are trying to accomplish is a lot easier than my battle system, and even a tactical battle system.

Original thread: https://forums.rpgmakerweb.com/threads/use-javascript-to-draw-an-array-of-tiles-etc.95862/