Charsets: Structure and Avoiding Traps!
Avery
by
Avery
on
September 22, 2020
September 15, 2020

Charsets: Structure and Avoiding Traps!

Charsets: Structure and Avoiding Traps!
by

Avery

on

September 22, 2020

Today we are going to have a closer look at characters – or charsets, sprites or character sets, as some people call them. There are some common misconceptions about how they work and some traps people run into, so we will use this chance to make sure they don‘t happen to you anymore!

Let's start with the basic structure. For an individual set, there are 4 rows and 3 columns.

The size of each cell is completely up to you and all you have to do to make sure it works is ensure that all cells are the same size. So if your individual cell size is 48px x 48px, your set has to be
3 x 48px = 144px wide and
4 x 48px = 192px high

BigMonster1 is an example for a set with a bigger cell size, here each one is 96px x 96px, and accordingly, the whole sheet is 288px x 384px.

Tip: Width and Height of the cells don‘t have to be the same, you can have any size you want (within reason), as long as all the cells are the same size and set up in the proper format. The cell size is dynamic and not a fixed value of the engine.

This also means that you can just drop Ace charsets into MV/MZ and vice versa without scaling them (though you need to own both engines for license reasons), the engine will interpret them correct and if the size issue is no problem from a design perspective, such as for with some of the monsters, this is a good source of even more things to use!

The four rows are made with the following facings from top to bottom:

  • Down
  • Left
  • Right
  • Up

That is how the engine will interpret them, so if you mix left with right, you will end up with moonwalking characters! The column in the center is the standing frame, and the two columns on the left and right are the movement frames.

The stepping animation will always go: 2 - 1 – 2 – 3 - 2 - 1 – 2 – 3 - …

...no matter what you are animating. This can be very handy for glowing lights (dim – normal – bright - normal – dim – normal-….) or other things you might not want to be static on your map.

You might have already noticed that there are sometimes ! and $ in front of the names of the sets and that most sheets contain 8 characters. Since a lot of games use a lot of charsets of the same size, you usually have 8 of the sets I described above cut into one, 4 columns, 2 rows. Again, they all have to share the same call size or this won‘t work.

The regular set without any special naming has to be in that format!

If you have a look at BigMonster1 again, you will notice, that it has a $ in front of its file name. This symbol is what makes the engine know that the charset its looking at is only a single set and not one of the sheets with 8 sets on it.

Now you might wonder, why there is a ! in front of some character‘s names. A charset is usually drawn with a slight vertical offset (6 pixels) on the map, so the humans and monsters look more natural when moving around the map. But sometimes you might not want that, especially for objects that should be placed strictly into the grid as if you mapped them there.

This is where the ! is important, if that is in front of the file name, the engine will not use the offset.

Rule of thumb:

  • $ is for single characters
  • ! is for characters without the offset
  • Combined, it‘s always !$

While it is possible to have a even bigger offset by just leaving some blank space below the actual thing you want to be displayed, there is no way to move it below the tile the event is placed.

For example, here is a quick edit I made because I wanted the Gate to have some more depth. The columns of the door frame would have to go below the border of thre tile, which is not possible. The fix would look like this:

The cell is now bigger, and the bottom line of the door has an offset of 48 pixels.

My set will be named !$BiggateEdit and looks like this:

Placed in the engine, we will need two events, the one that has the look of the gate and the one on that walls, that actually triggers it. No worry though, as you can set a move route for a different event as well, so this is perfectly workable.

In game the result will look like this:

Let‘s have a look at some more use cases. We want to have the tree boss from the BigMonster Set on our map in its idling animation.

To achieve this, we will use this setting:

The „stepping“ ensures the character has the constant „walking“ animation. In this case it is very important to use „direction fix“, because otherwise it would „turn around“ if you talk to it from the wrong side and therefore become a whole different creature.

If it turns „down“, it becomes a demon boss. Probably not what you might want here.

Talking about turning, in other cases this is just what you want. Take a look at the chest.

A constant stepping animation is not what we want here.

You might notice, that each row has a different stage of the opening process, so to „open“ it, it needs to slowly „turn“ into all these positions.

Set a move route and create one like this:

The wait command is there to make the animation go smooth and not all at the same time. You can adjust the opening speed to your liking by adjusting the time on the wait commands.

Heads up:

You cannot change columns in the set movement window, so if you are going for a more complicated behavior route, it might take up multiple sets and therefore need the change image command.

Happy game making everyone!


Recommended Posts