Devlog #2: Movement and Summons
In the last progress update, I had implemented support for "grid selection". That is, you were able to select a tile on the grid directly instead of selecting actors or enemies.
Consider this cross-shaped area of effect:
The yellow tile is the "main target", and the red tiles are just caught in the area of effect. Without grid selection, you wouldn't be able to select that empty space and therefore wouldn't be able to attack all four bats at the same time.
Empty Tile Selection
Area of effect simply hid a problem: an empty space is STILL not a valid target. Consider the classic "move" command, where you want to move to an empty space on the board.
The "move" command is just a skill. When you use it, it'll consume skill costs like MP or TP, possibly HP or anything else depending on what plugins you're using.
When the game goes and performs your action, it'll see that there's no targets, and then just do nothing. The game doesn't understand that an empty space should be treated as a VALID target.
So I went and implemented some code that allows empty spaces to be treated as a valid space. Now, when you select an empty space, it will actually perform the action
Everything is a Skill
This system doesn't provide pre-defined commands such as movement. It does provide some convenient functions that you can use in damage formulas.
For example, movement can be defined as
1: get the position of the target tile
var pos = b.getPosition()
2: set the position of the user to that tile
Remember that "b" is the target of the skill, and "a" is the user of the skill. In this example, "b" is the targeted empty tile, while "a" is the actor that used the "move" skill.
Another example is the summon skill
1. get the position of the target tile
var pos = b.getPosition()
2. create new summon
var summon = SUMMON_SOMETHING
3. set summon position to that tile
The actual "summoning" instructions would be provided by the summoning plugin. Everything else just uses standard position functions that the grid system provides.
You'll likely be working with position a lot in many of your formulas in the grid battle system, so my goal would be to provide as many useful functions as possible to make it easier to create complex behavior so that you have lots of customization over exactly how you want the skills to behave.
Empty space messages
Although you could perform actions on empty spaces, it also comes with the caveat that it's still treated as a battler at this point. The engine doesn't distinguish between an actor vs an enemy vs an empty tile. So for example, when I moved to an empty tile, it displayed this message
So that's something I'll have to figure out. I did notice that if you set the skill damage type to "None", it won't display a message. Maybe that's good enough?
Inkarnate + Big Maps
Also, I was recently suggested Inkarnate which is a fantastic online mapping tool. There's a subreddit for it where people share maps they've made, and I think there's some sort of repository of maps available for download somewhere that I haven't found.
The size of the grid is fully customization, so you could make it 32x32, 48x48, 64x64, etc which is perfect for these kinds of grid based maps.
The maps can be quite large, so I was thinking I'll provide a plugin that will let you choose WHICH PART of the image you'd like to use for the battle.
Or perhaps, the battlefield could even SCROLL around, so you're not limited to just a fixed screen.
Anyways I think the maps are much better in terms of visuals, so I'll be using them for my battle backgrounds moving forward.
If you're looking for some map tools, Inkarnate might be useful.
Get Grid Battle System for RPGMaker
Leave a comment
Log in with itch.io to leave a comment.