[SOLVED+Tutorial] Problem with giving events more than 3 frames of animation

Hello everyone, I'm working on a project and it's going fairly well, I've been having a lot of fun despite some difficulties in using the larger character sprite sheets from PVGames, but so far I've got them all sorted out but for one issue. I can't seem to figure out how to make the events representing the enemies use more than 3 frames of animation.

TimberWolfWalkCycle%(8).png
TimberWolfRunCycle%(8).png

These are the sprites I'm using for a Timber Wolf enemy. I have two separate spritesheets because when the player is detected by a randomly roaming enemy, its behaviour changes along with its sprite, and it begins to chase. I was also using QSprite, which is why the file names are the way they are. If I use something like Galv character frames it gets cut off, here's what that looks like:

Wolf Cut.jpg
Wolf Cut3.jpg
Wolf Cut2.jpg

Before anyone asks, I did select the upper-left part in the viewer inside RPG Maker MV itself, the same issue is there.

QSprite doesn't seem to work on events (the sprites are still working properly but only for the first three frames, if I make the main character the sprite sheet, it works perfectly, so I know the sprite sheet isn't the problem). Galv cuts off the sprites, and I feel like if I knew how to change the dimensions for that I could set it so that it uses the larger sprite correctly, but I'm stumped on where to find documentation for how to do that. If anyone had any other plugins they'd like to suggest, I would be happy to take their suggestions, but it seems hard in general to get events to use more than three frames if the sprites you're using are larger than the typical sprites.

I also am handling the detection with a separate parallel event. I'm not sure if that makes a difference, I kind of doubt it, however I did so in order to have both a randomly roaming enemy behaviour followed by a charge when the player is discovered. If I simply knew what to do to use more frames with events, I feel like I would be happy with it.
I am only familiar with galv's plugin, but the issue you're having looks like an issue of incorrect dimensions. Are your dimensions incorrect?

EDIT: I notice that you're not using $, which means that the image is formatted for 2 rows of 4, totaling character slots. Unless the plugin you're using changes this, that could be the culprit. The image does not appear to correlate to the regular dimensions of a standard RM character sheet, or a $ character sheet.
I am only familiar with galv's plugin, but the issue you're having looks like an issue of incorrect dimensions. Are your dimensions incorrect?
How do I check to make sure? I'm using a 128x128 grid for the timber wolf's sprite sheet.
How do I check to make sure? I'm using a 128x128 grid for the timber wolf's sprite sheet.
I edited my previous post, but here is what I said:

EDIT: I notice that you're not using $, which means that the image is formatted for 2 rows of 4, totaling character slots. Unless the plugin you're using changes this, that could be the culprit. The image does not appear to correlate to the regular dimensions of a standard RM character sheet, or a $ character sheet.

This may be the issue, and you'd have to fix it to get around the problem.
I am only familiar with galv's plugin, but the issue you're having looks like an issue of incorrect dimensions. Are your dimensions incorrect?

EDIT: I notice that you're not using $, which means that the image is formatted for 2 rows of 4, totaling character slots. Unless the plugin you're using changes this, that could be the culprit. The image does not appear to correlate to the regular dimensions of a standard RM character sheet, or a $ character sheet.
So I didn't use $ because that wasn't included in the plugin instructions:
GalvIssue2.jpg

However, it has given some progress, the image is no longer cut off, but now I have a new issue:
GalvIssue3.jpg

The orientation of the sprites does not matter, I can reshuffle them whenever I want so the correct order is used in game, I'm more concerned about how to remove the double since I think it assumes I only have four rows of images rather than 8. Here's what the viewer looks like now:
GalvIssue1.jpg
I edited my previous post, but here is what I said:

EDIT: I notice that you're not using $, which means that the image is formatted for 2 rows of 4, totaling character slots. Unless the plugin you're using changes this, that could be the culprit. The image does not appear to correlate to the regular dimensions of a standard RM character sheet, or a $ character sheet.

This may be the issue, and you'd have to fix it to get around the problem.
Thanks, I included a reply above it and I think I'm very close now, but it's also duplicating the images (see above) because I think it only expects 4 rows instead of 8.
I just checked the images, and if the resource standards are the issue, your sprite size would have to be 4096X1024, and just slot the sprites into the proper area.
I just checked the images, and if the resource standards are the issue, your sprite size would have to be 4096X1024, and just slot the sprites into the proper area.
Thanks, I'll try doing that now and post when it's done.
I just checked the images, and if the resource standards are the issue, your sprite size would have to be 4096X1024, and just slot the sprites into the proper area.
So I tried that out, but now it's still cycling from top to bottom, two rows at a time to use as the sprite. I'm not sure how to get it to recognise the diagonal sprites, and I'm starting to think Galv's plugins don't use diagonal sprites at all. I do have Galv Diagonal Movement (under the plugin as specified by Galv Character Frames) but I'm not sure how to get it to recognise those additions, or if it's possible.
So I tried that out, but now it's still cycling from top to bottom, two rows at a time to use as the sprite. I'm not sure how to get it to recognise the diagonal sprites, and I'm starting to think Galv's plugins don't use diagonal sprites at all. I do have Galv Diagonal Movement (under the plugin as specified by Galv Character Frames) but I'm not sure how to get it to recognise those additions, or if it's possible.
Weird. I can't think of any other reasons that it'd do that. I've not much experience with diagonal sprites, either, so . . .
Weird. I can't think of any other reasons that it'd do that. I've not much experience with diagonal sprites, either, so . . .
I found this thread: https://forums.rpgmakerweb.com/inde...ns-diagonal-movement-character-frames.101775/
I'm trying to follow the advice there now, but it's going to take a while. It seems like the $ doesn't work if you want more than up-down-left-right movement though.
Weird. I can't think of any other reasons that it'd do that. I've not much experience with diagonal sprites, either, so . . .
Oh wait, I think I got it. You were right that the size was wrong, and after I deleted the $ and tested it out, everything is almost working perfectly, I'll post more when it's a little more fixed.
Edit: Nevermind it's still wrong, it still isn't recognising the diagonal sprites, but I think I can fix it.
Weird. I can't think of any other reasons that it'd do that. I've not much experience with diagonal sprites, either, so . . .
Good news, I have it almost working perfectly. Here's the new sprites I tried for the walk cycle:
WolfWork%(8).png

So the image works perfectly for moving down, right, left and up, but I do think I have to reformat it again to use the diagonal walk in features like in Galv Character Animations, but at least I'm on the right track. If I do manage to get that working too, I'll post again.
Good news, I have it almost working perfectly. Here's the new sprites I tried for the walk cycle:
View attachment 338321
So the image works perfectly for moving down, right, left and up, but I do think I have to reformat it again to use the diagonal walk in features like in Galv Character Animations, but at least I'm on the right track. If I do manage to get that working too, I'll post again.
Congrats on the progress! Hopefully you do get it running fine. It definitely is some sort of dimension issue because I've had sprites do that when accidentally messing up dimensions. (Usually a case of accidentally removing the prefix or something, lol.)
Congrats on the progress! Hopefully you do get it running fine. It definitely is some sort of dimension issue because I've had sprites do that when accidentally messing up dimensions. (Usually a case of accidentally removing the prefix or something, lol.)
I solved it! I also figured out my problem with Galv Character Animations, and it was actually the notes feature and idle animations that were the core culprits. So I'm going to give an impromtpu tutorial for everyone who might want to use more sprites and has my same issue.

So to start off, you were right about the size issue. If you're using Galv's plugins, you must always take the size of your sprites, then multiply their width by 32, and height by 8 (because Galv uses 32 frames by 8 frames for their plugin, I was initially unaware of this). This gives the sprite sheet needed, and that's why you suggested that size.

Now the part that was really tripping me up, is that Galv Character Animations NEED idle animations, or at least an empty slot for them. There's no ifs, ands or buts about it, the first 8 columns you have MUST be dedicated to idle animations. These can just be a static image of a sprite repeated 8 times, or leave it blank so that they're invisible when still, that doesn't matter. What does matter is if you don't do this, it won't work right.

Also keep in mind that the first 8 columns will always be the idle animations and directions, the second 8 will always be the walking animations and directions, and the third 8 columns will always be running animations. The rest doesn't matter, because I'm not using jumping animations, so they can be blank. The directions your sprites must face in the following rows are as follows:

Row 1: Up
Row 2: Left
Row 3: Right
Row 4: Down
Row 5: Down Right
Row 6: Down Left
Row 7: Up Right
Row 8: Up Left

If you do not have them facing these directions, their movements will not match their sprites. You might need to re-order PVGames' sprites, or follow Mathmaster74's code change because of this, since the diagonal sprites do not follow these directions by default. If you wish to change the code, open up GALV_DiagonalMovement plugin, and do the following:
Find this:
Galv.DM.diagRow = {
3: 0,
1: 1,
9: 2,
7: 3
};
Replace it with this:
So that instead they are as follows:
Galv.DM.diagRow = {
3: 2,
1: 0,
9: 3,
7: 1
};
Then it will work. Now:
Tutorial1.jpg

I started a new project, here's the plugin order.

Tutorial2.jpg

You need to add <charAnims> in the notes for it to properly recognise the sprite sheet. I didn't even realise that was there for a while, so that also tripped me up. Without this, the events will refuse to recognise the sprite sheet no matter how you label or remake the sprite. This was what really tripped me up, and in my inexperience I didn't know what the documentation wanted me to do with the note script.

Tutorial3.jpg

Make sure everything is labeled correctly, and as a bonus, I'm also going to go over how to do a chase with a random enemy.

Tutorial4.jpg

This is a random enemy that when it touches the player, starts a battle. It moves around the map randomly, and there's nothing special about it otherwise. In the top left of the map however, is this event:
Tutorial5.jpg

This event runs parallel (that's important) and it uses Galv Event Detectors with the following settings:
Tutorial9.jpg

When a player gets within a certain range of the wolf, the condition WolfDetected is flipped, and the Wolf event changes to page 2, and the parallel event also changes to page 2. Page 2 of the parallel event is just a blank page to turn it off, however for the Wolf, the page is the following:
Tutorial7.jpg

This is literally the same script as the first page, except I swapped the running and walking animations on the sprite sheet to give it the appearance it's running. You can also turn up the speed to help with that. To chase the player I used the following custom move route script:
Tutorial8.jpg

This causes the wolf to follow the behaviour, specifically Behaviour 1 (not Behaviour 0) in Galv Event Detectors:

Tutorial9.jpg

Finally, we need a way to turn off the WolfDetected Condition, but I set that so it happens if the player runs away, and you can also tag it to the exits of a map, or safe places you want the player to hide. Here's what it looks like attached to the fleeing script you learn in MV's tutorial:

Tutorial10.jpg


For whatever reason I could not find a good tutorial on having random enemies detect the player then chase them, so I'm making my own in case/for when I forget how to do this in a few years, assuming I fall out of practice.

Lastly, when enemies swap sprites like that, there's a noticeable jitter, so to fix that get these two plugins:

Tutorial11.jpg

SRD Game Upgrade is required for SRD PreloaderCore, so now open preloader core, and choose to load the images in advance. For my purpose I simply chose all because I'm not using many character images at the moment.
Tutorial12.jpg

And that's how you use both the full list of the character sprites for events, and how you do a chase from a random behaviour with little script knowledge. As for how the player moves, that follows similar conventions, or you can use QSprite to handle that part. That one is very easy to use and learn, and there's plenty of tutorials that make it simple. This was a lot harder to figure out so that's why I went into detail.

Here's links to everything I mentioned that would be needed, since I also hate searching for plugins that people tell others to get without providing links themselves:

Galv Character Frames:
https://galvs-scripts.com/2015/12/12/mv-character-frames/

Galv Diagonal Movement:
https://galvs-scripts.com/2015/12/12/mv-diagonal-movement/

Galv Character Animations:
https://galvs-scripts.com/2015/11/03/mv-character-animations/

Game Upgrade:
http://sumrndm.site/game-upgrade/

Preloader Core:
http://sumrndm.site/preloader-core/
Also, here's Mathmaster74's tutorial:
https://docs.google.com/document/d/1lYFLIZ-lZpS5kRmSCqVptr6oA4IfSEAoGXk3YE8zkOM/edit?tab=t.0
I really wish they'd explain why you are doing the things they ask, because without being given a reason, I have a hard time knowing what the effect is, or what is going wrong if something does go wrong.

Thanks again for the assistance.
Basically what you originally ignored was that PVG's sprites add TWO new functions to the sprites - more frames AND diagonal movement.

So only adding a plugin for 8 frames alone didn't work, that was why you had 2 sprites for a while - the engine didn't know what to do with the additional rows for diagonal movement.

there are other solutions possible, not only the one above, but you would always have to have plugins for combined diagonal movement and more frame sprites.
Basically what you originally ignored was that PVG's sprites add TWO new functions to the sprites - more frames AND diagonal movement.

So only adding a plugin for 8 frames alone didn't work, that was why you had 2 sprites for a while - the engine didn't know what to do with the additional rows for diagonal movement.

there are other solutions possible, not only the one above, but you would always have to have plugins for combined diagonal movement and more frame sprites.
I wasn't originally ignoring that, the entire goal was to get both to work and I was taking my problems one step at a time. I'm not sure why you worded it that way.

Edit: also you could have at least mentioned what those other solutions were instead of just saying "they exist".
I solved it! I also figured out my problem with Galv Character Animations, and it was actually the notes feature and idle animations that were the core culprits. So I'm going to give an impromtpu tutorial for everyone who might want to use more sprites and has my same issue.

So to start off, you were right about the size issue. If you're using Galv's plugins, you must always take the size of your sprites, then multiply their width by 32, and height by 8 (because Galv uses 32 frames by 8 frames for their plugin, I was initially unaware of this). This gives the sprite sheet needed, and that's why you suggested that size.

Now the part that was really tripping me up, is that Galv Character Animations NEED idle animations, or at least an empty slot for them. There's no ifs, ands or buts about it, the first 8 columns you have MUST be dedicated to idle animations. These can just be a static image of a sprite repeated 8 times, or leave it blank so that they're invisible when still, that doesn't matter. What does matter is if you don't do this, it won't work right.

Also keep in mind that the first 8 columns will always be the idle animations and directions, the second 8 will always be the walking animations and directions, and the third 8 columns will always be running animations. The rest doesn't matter, because I'm not using jumping animations, so they can be blank. The directions your sprites must face in the following rows are as follows:

Row 1: Up
Row 2: Left
Row 3: Right
Row 4: Down
Row 5: Down Right
Row 6: Down Left
Row 7: Up Right
Row 8: Up Left

If you do not have them facing these directions, their movements will not match their sprites. You might need to re-order PVGames' sprites, or follow Mathmaster74's code change because of this, since the diagonal sprites do not follow these directions by default. If you wish to change the code, open up GALV_DiagonalMovement plugin, and do the following:
Find this:
Galv.DM.diagRow = {
3: 0,
1: 1,
9: 2,
7: 3
};
Replace it with this:
So that instead they are as follows:
Galv.DM.diagRow = {
3: 2,
1: 0,
9: 3,
7: 1
};
Then it will work. Now:
View attachment 338322
I started a new project, here's the plugin order.

View attachment 338323
You need to add <charAnims> in the notes for it to properly recognise the sprite sheet. I didn't even realise that was there for a while, so that also tripped me up. Without this, the events will refuse to recognise the sprite sheet no matter how you label or remake the sprite. This was what really tripped me up, and in my inexperience I didn't know what the documentation wanted me to do with the note script.

View attachment 338324
Make sure everything is labeled correctly, and as a bonus, I'm also going to go over how to do a chase with a random enemy.

View attachment 338325
This is a random enemy that when it touches the player, starts a battle. It moves around the map randomly, and there's nothing special about it otherwise. In the top left of the map however, is this event:
View attachment 338326
This event runs parallel (that's important) and it uses Galv Event Detectors with the following settings:
View attachment 338330
When a player gets within a certain range of the wolf, the condition WolfDetected is flipped, and the Wolf event changes to page 2, and the parallel event also changes to page 2. Page 2 of the parallel event is just a blank page to turn it off, however for the Wolf, the page is the following:
View attachment 338328
This is literally the same script as the first page, except I swapped the running and walking animations on the sprite sheet to give it the appearance it's running. You can also turn up the speed to help with that. To chase the player I used the following custom move route script:
View attachment 338329
This causes the wolf to follow the behaviour, specifically Behaviour 1 (not Behaviour 0) in Galv Event Detectors:

View attachment 338330
Finally, we need a way to turn off the WolfDetected Condition, but I set that so it happens if the player runs away, and you can also tag it to the exits of a map, or safe places you want the player to hide. Here's what it looks like attached to the fleeing script you learn in MV's tutorial:

View attachment 338331

For whatever reason I could not find a good tutorial on having random enemies detect the player then chase them, so I'm making my own in case/for when I forget how to do this in a few years, assuming I fall out of practice.

Lastly, when enemies swap sprites like that, there's a noticeable jitter, so to fix that get these two plugins:

View attachment 338332
SRD Game Upgrade is required for SRD PreloaderCore, so now open preloader core, and choose to load the images in advance. For my purpose I simply chose all because I'm not using many character images at the moment.
View attachment 338333
And that's how you use both the full list of the character sprites for events, and how you do a chase from a random behaviour with little script knowledge. As for how the player moves, that follows similar conventions, or you can use QSprite to handle that part. That one is very easy to use and learn, and there's plenty of tutorials that make it simple. This was a lot harder to figure out so that's why I went into detail.

Here's links to everything I mentioned that would be needed, since I also hate searching for plugins that people tell others to get without providing links themselves:

Galv Character Frames:
https://galvs-scripts.com/2015/12/12/mv-character-frames/

Galv Diagonal Movement:
https://galvs-scripts.com/2015/12/12/mv-diagonal-movement/

Galv Character Animations:
https://galvs-scripts.com/2015/11/03/mv-character-animations/

Game Upgrade:
http://sumrndm.site/game-upgrade/

Preloader Core:
http://sumrndm.site/preloader-core/
Also, here's Mathmaster74's tutorial:
https://docs.google.com/document/d/1lYFLIZ-lZpS5kRmSCqVptr6oA4IfSEAoGXk3YE8zkOM/edit?tab=t.0
I really wish they'd explain why you are doing the things they ask, because without being given a reason, I have a hard time knowing what the effect is, or what is going wrong if something does go wrong.

Thanks again for the assistance.
Congrats! Glad you got it to run~
Congrats! Glad you got it to run~
I am having a little issue where the enemies seem incapable of using diagonal sprites when they try to approach the player, but I think that's actually not covered by any of the plugins I'm using, including Galv Diagonal Movement, and the Galv behaviours when they detect the player also aren't using them. Perhaps I'll try to use other pathfinding plugins and see what happens.
Congrats! Glad you got it to run~
I not only figured out how to get enemies to use diagonal sprites, I figured out how to solve my issue with QSprite here: https://forums.rpgmakerweb.com/index.php?threads/solved-can-q-sprite-be-used-with-events.177164/

So now I'll be using QSprites.

Original thread: https://forums.rpgmakerweb.com/threads/solved-tutorial-problem-with-giving-events-more-than-3-frames-of-animation.177133/