RMMV Grid Battle System (early access test: tile states)

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
A good Idea is put a option to Random Positions for Enemies.
It will add more strategie options, and a easy configuration for Random Battles.
And for Bosses, use the option for set-up positions for script command.
I haven't thought of a way to make it easy to set up random battles.

It's the same issue with the default battle system: how do you make random encounters that aren't basically the same enemies?

I never came up with a good solution for that before.

Someone did this thing where you set up like 10 different troop configurations, and then the random encounter just picks a random troop. Which is alright. So maybe you would just set up 10 troops, each with their own position configurations defined in the troop itself?
 

ChatS

Villager
Member
Joined
Mar 6, 2015
Messages
20
Reaction score
11
First Language
French
Primarily Uses
RMMV
I haven't thought of a way to make it easy to set up random battles.

It's the same issue with the default battle system: how do you make random encounters that aren't basically the same enemies?

I never came up with a good solution for that before.

Someone did this thing where you set up like 10 different troop configurations, and then the random encounter just picks a random troop. Which is alright. So maybe you would just set up 10 troops, each with their own position configurations defined in the troop itself?
I think your plugin "Random Encounter Events" Would handle this just fine!

 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Here's an update for multi-grid, when it comes to grid selection, and skill ranges.

In a single-grid system, grid selection and skill ranges are simple: all of the tiles are on the same grid, distance calculation is easy, etc.

However, in a multi-grid system, suddenly we're back to the problem where we don't know what the relationship is between tiles on different grids. There also wasn't an easy way to select between different grids with a keyboard, because what does it mean to "cross to a different grid"?

The solution I've developed is to create a "virtual" grid, which would be a representation of what the grids would look like if all the tiles were to be placed on the same grid.


With this virtual grid, we can now say that two tiles on different grids are "adjacent" to each other, even if visually they are on opposite sides of the screen.

So if your units were standing on the front row and using melee weapons that allowed them to only hit units one tile away, they would only be able to reach targets on the front row of the other grid. You'd have to introduce ranged fighters to be able to hit the back row.

With this virtual grid implemented, we should be able to get some new mechanics up for multi-grid systems, whether it's the classic two grid



Perhaps a 3-grid pincer attack



Or even a 5-grid surround attack where the party is being hit from all 4 sides!
No picture, but you could probably imagine how it looks.

Anyways now I should be able to finish the grid-based target selection, as well as multi-grid skill ranges, and also line-of-sight obstruction that prevents you from targeting enemies "behind" until you defeat the ones in front.

I think your plugin "Random Encounter Events" Would handle this just fine!

Oh ya I completely forgot about that lol
I remembered there was such an idea but forgot who implemented it.
 
Last edited:

Raphael Lourenço

Infinity Door Studio's Lead Designer
Member
Joined
Mar 30, 2017
Messages
20
Reaction score
26
First Language
Portuguese
Primarily Uses
RMMV
There's a bug:

For some reason, theres a error with the position of the enemies in the Grid and the position in Battle Plugin. In this Picture, Uxeoid is the bigger enemy, butthe system change the name with another enemy, I don't know why.


EDIT:It's because the YEP_BattleEngineCore. For some reason he messes up the name of the enemies.
1598301861850.png
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
There's a bug:

For some reason, theres a error with the position of the enemies in the Grid and the position in Battle Plugin. In this Picture, Uxeoid is the bigger enemy, butthe system change the name with another enemy, I don't know why.


EDIT:It's because the YEP_BattleEngineCore. For some reason he messes up the name of the enemies.
View attachment 157049
What are you using for that battle window? Is it the default enemy selection window?

Yanfly's battle core has a fancy "visual enemy selector" vs the plain old selection window. I noticed there is some sprite renaming based on their screen position...which my grid position might affect since I also change the sprite's screen position.
 
Last edited:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Got a few things done

Initial version of tile states is complete. Comes with plugin parameter support, so you can add tile states to your grid configs. Currently available for early access testing.


I took the virtual grid idea and applied it to my grid-based target selection plugin.
It seems to work rather well actually, allowing me to control which grids are available for selection and which ones should be ignored, which allows AoE to obey grid-separation rules (an attack that can only affect one grid, won't spill over to other grids)


The code's a bit rough and doesn't feel very nice to work with when I tried to implement multi-grid skill ranges (eg: melee fighters would only be able to reach the "front row" on the other grid).

Because we're going to be moving towards tactics battle engines, I wanted to provide some plugins that will offer different kinds of gameplay. In particular, a very common feature is the ability perform multiple actions in one turn, which is usually something like

1. Move to a new position
2. Perform a skill (attack, heal, item, etc), based on the new position
3. Optionally, change direction to take advantage of the cliff behind you so enemies can't back attack you for critical damage.

So I built the "Instant Action" battle plugin that does exactly that: it changes the battle logic so that when you select an action, you perform the action immediately. Currently, I've made it so that actors act before enemies (fire emblem/disgaea style), but we could potentially change that to be based on battler speeds as well (final fantasy tactics style)


There are a few more things that I think we need before we can start building tactics battle games

1. Line of sight. This is basically the skill ranges plugin.
2. Line of sight obstruction. This is the other side of skill ranges: targets that will "block" your range. Maybe there's a tree between you and the enemy, which effectively prevents any attacks from passing through the tree.

3. Free order turn. Instead of automatically determining the order that battlers perform actions (whether it's actors first then enemies, or based on speed), there's the other type of system where you basically choose whichever order you want your actors to make their actions.

And of course, the actual visual stuff. I haven't built any support for things like "movement animations" where actors visually walk from one space to another. This is easier to do with map-battle using map character sprites (because they already have 4-direction AND walking animations). For side-view battle, probably just have like a sliding animation, with possible extension to have you create a "walking" motion for your animated battler.
 

Raphael Lourenço

Infinity Door Studio's Lead Designer
Member
Joined
Mar 30, 2017
Messages
20
Reaction score
26
First Language
Portuguese
Primarily Uses
RMMV
There's a new bug: Every time I create a new game, the battle occurs normal.
But when I save the game, close and load a save file, I got this error.

1598489757568.png

EDIT: Without the FilterController, I have the same error.
EDIT2: Tested in a Blank Project with only the Grid System Plugins, the same error.
 
Last edited:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
There's a new bug: Every time I create a new game, the battle occurs normal.
But when I save the game, close and load a save file, I got this error.

View attachment 157702

EDIT: Without the FilterController, I have the same error.
EDIT2: Tested in a Blank Project with only the Grid System Plugins, the same error.
Thanks for the report. I found the issue, but I will need to understand how to solve it.

 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Here's how line of sight will work in my grid battle engine.
There are three concepts

1: Range
2: Range Shape
3: Range Cover

The range is just a number. 3. 5. 8. etc.
This represents how far your can see.

1598648593076.png

The range shape controls HOW you see things.
Maybe you can only select "diagonal" tiles.
So even if all of those dark blue tiles are in range, you can only select the light blue tiles.
In the game, the dark blue tiles won't be highlighted, and you would only see the light blue tiles for selection.

1598648798743.png

Finally, we add some "covers" that will block your range. Imagine a wall behind the green unit: you can't go through it at all. So if there's something behind the wall, there's no way to target anything behind the wall until you get past the wall, which could be an enemy that covers the entire column, effectively forcing you to defeat the enemies in front, before you can reach enemies in the back.

1598649012374.png

So with the diagonal example, if I'm only able to attack diagonally and there's a big wall behind me, this means that I will only be able to attack the two light-blue tiles, because none of the other tiles "in range" can be targeted.

The idea is pretty rough and might be confusing at this point, but I'll explain it more with actual battle examples when it's built.

Here's a video demonstrating how you'll set up the range shapes and range covers.


For an actual application, think about how the knight moves in a chess game.
1. First you have a skill range of 3, which is all the dark blue tiles.
2. Then you add on your "range shape", which are those 8 light blue tiles that form L-shapes from where the knight is currently standing.

This will let you easily set up "movement types" for your game by combining range and range shapes.

1598649405126.png
 
Last edited:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Some updates for ranges. This video basically summarizes a lot of it


1. I implemented skill ranges for multi-grid system. In the earliest version (public test #2), I only had support for one grid.

Now you're able to apply skill ranges even if your game uses multiple grids.

This could be useful for example if you had a battle system where each battler could only attack the person in the same row or column, so they had to move left or right in order to attack other rows/columns.

Here are some pictures of how they look, in a one-grid, two-grid, and three-grid config.

1598928763729.png

The range search basically just spreads out from your current position and looks for all tiles that are "within range"

2. I added support for range shapes. I basically re-used the area of effect shapes that I had already set up for my AOE, and applied them to range.

With range shapes, you can now control which tiles are selectable for a skill. For example, maybe you can only move horizontally/vertically, or perhaps you can only move diagonally.


3. I'm still adding support for range covers. The very basics is done (like you can't walk through a tree), but there are some other types of mechanics that I would like to implement but haven't managed to do so, such as being able to "jump over" a tree.

Or in the context of checkers, allow you to jump over an enemy and attack them while doing so.

Another thing you can do with range covers is to prevent actors from targeting units behind them. So for example, we have five bats, some of them are in front of other bats. My attack has a range of 99, but despite being able to hit every tile on the grid, I can't hit any of the bats that are being "covered" by a bat in front. The blue tiles shows the tiles I can select, the red tiles shows the enemies I can target, and the unhighlighted tiles are basically unselectable.

1598935566207.png

4. Someone brought up the issue of area of effect skills hitting one target at a time and it's kind of annoying, so I wrote a small plugin to let you choose to "play all animations at once" or just do the usual one-by-one. You can control it for each skill/item basically.


5. I needed something to make it easier to test AI, so I built an auto testplay tool that plays the game for me and sends me data on what's happening in the game. This is mostly for faster debugging but if anyone's interested we could probably start a new topic about it.


6. I've also fixed various bugs that were reported since the release. I haven't updated them because there were tons of changes to my code so I figured might as well wait until it's in a more stable form.

So a basic summary of what I have built so far. You can

- create a grid, or multiple grids
- choose the tile size
- choose how many rows/columns you want, for each grid
- choose the highlight colors
- place actors/enemies on each grid
- apply area of effect to skills

And new stuff that will be available for early access testers

- create skills to move battlers around the grid. This can be used for movement, pushing, pulling, etc.
- add states to each tile
- grid-based target selection, with support for multiple grids
- perform each action immediately when you select them
- perform multiple actions per turn, such as moving and then attacking
- choose to play multi-target animations simultaneously instead of one by one, for each skill
- adding ranges to skills
- controlling the shape of each skill
 
Last edited:

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

Latest Threads

Latest Profile Posts

My dynamic weather system grows... now with cloud cover influenced by wind speed! (4x playback) (Not final cloud image/map)
Wrote a plugin today that allows you to assign BGM, Battlebacks, and even Battle Entry SE's on a per-troop basis. Introducing a random encounter with a high-pitched Chicken Squeal is worth it all by itself.
Stream will be live shortly with some game development! Feel free to drop by!
Asphodelethe wrote on skybluehair's profile.
Hi! I loe your desert NPCs for adding some variety. I've used them in a free game (The Snow Elf on Itch.io) and I'd love to use them in the new game I'm working on, which I hope to release commercially. I'd love your permission if I could have it!


So I figured out how to put words and pictures in the screen transition. It even wipes away from both the top and bottom. The possibilities are endless! :LZSexcite: I'm going to devise secret messages now for them because I'm a terrible wonderful person like that. :kaopride:

Forum statistics

Threads
105,760
Messages
1,016,231
Members
137,448
Latest member
Drovac
Top