Front Combat that changes images depending on action and effects.

rivelle

Villager
Member
Joined
Jan 16, 2023
Messages
26
Reaction score
2
First Language
English
Primarily Uses
RMMZ
Hello!

Basically I'm planning to do a front combat where when you hit an enemy, they change the image of said enemy from the neutral pose to a blocking or being hit pose or whatever pose I want it to be.

Same thing if they attack, the image should change when they do a normal or a skill to the actor.

I'm thinking I can do this via YanFly's Buff and States.
My idea basically is when an enemy attack, the attack itself grants the enemy a state in which they "transform" into an attacking pose, and then hit the actor with said attack. The attack itself also gives the actor a state in which they also "transform" into a blocking or being hit pose and vice versa.

In theory it should work right?
by "transform" I'm referring to this tutorial.

But I want to also have an "armor break" system where, once triggered, it should change the image of the enemy or actor to show their armor breaking. Of course, implementing this means I have to use more images of the attack/block transform stated above, for immersion.

If there's a better way to do this without using 20 states/skill per character, can anyone direct me to it?
 

SGHarlekin

Orc Jester
Veteran
Joined
Jun 29, 2020
Messages
1,126
Reaction score
1,378
First Language
German
Primarily Uses
RMMV
Just use sideview... To create a "fake" front view. Place your SV battlers wherever they would be on your frontview, then make them invisible or replace them with cool actor image from the back or whatever.

With that you can take full advantage of action sequencing and the sideview battler sheets. No need for weird states and transformations, just use the fitting motion from the sheet instead. Just put your different front view enemy sprites on the SV battler sheet.
 

rivelle

Villager
Member
Joined
Jan 16, 2023
Messages
26
Reaction score
2
First Language
English
Primarily Uses
RMMZ
Just use sideview... To create a "fake" front view. Place your SV battlers wherever they would be on your frontview, then make them invisible or replace them with cool actor image from the back or whatever.

With that you can take full advantage of action sequencing and the sideview battler sheets. No need for weird states and transformations, just use the fitting motion from the sheet instead. Just put your different front view enemy sprites on the SV battler sheet.
I don't quite understand how this works, do you have a video somewhere to show how it works in practice?
 

SGHarlekin

Orc Jester
Veteran
Joined
Jun 29, 2020
Messages
1,126
Reaction score
1,378
First Language
German
Primarily Uses
RMMV
You use yanfly's battle engine core to put your sideview battlers wherever you want. Making them invisible is as easy as just assigning an empty SV actor sheet to them and disabling their shadows in the battle engine core.

Action sequences are done vie yanfly's action sequence plugins. Putting your custom battlers on a battler sheet is done via any image manipulation software. (Read up on asset standards I suppose)

I don't have any videos, but I'm sure google can lead the way.
 

rivelle

Villager
Member
Joined
Jan 16, 2023
Messages
26
Reaction score
2
First Language
English
Primarily Uses
RMMZ
You use yanfly's battle engine core to put your sideview battlers wherever you want. Making them invisible is as easy as just assigning an empty SV actor sheet to them and disabling their shadows in the battle engine core.

Action sequences are done vie yanfly's action sequence plugins. Putting your custom battlers on a battler sheet is done via any image manipulation software. (Read up on asset standards I suppose)

I don't have any videos, but I'm sure google can lead the way.
Oh! I kinda get what you mean, but doesn't that hinder the size of the sprites? My images for front battlers are kinda big.
 

SGHarlekin

Orc Jester
Veteran
Joined
Jun 29, 2020
Messages
1,126
Reaction score
1,378
First Language
German
Primarily Uses
RMMV
Oh! I kinda get what you mean, but doesn't that hinder the size of the sprites? My images for front battlers are kinda big.
That's why I said read up on asset standards. In general your battlers can be as big as you want them to be. The cells just need to be the same size each and of course the placement determines which motion is used for what.


!SV Refrence.png
 

cheef

dumb but trying
Veteran
Joined
Nov 30, 2019
Messages
31
Reaction score
7
First Language
English
Primarily Uses
RMMV
I've spent the past week trying to sort out how to do this using Dragonbones and I've got a way that finally works great, but it will take you a bit of learning the free Dragonbones software if interested. Also, this is not the best way to create from an existing spritesheet: You'll want to only use this method for animation that has every frame exported as PNG, or puppet animation.

You'll need to follow some instructions on how to get DragonBones working with RMMV that includes adding some libs files and editing the index.html. These were fairly straight-forward for me.

On to DB - Luckily, you wont need to learn armature stuff for exported PNG, just follow some steps after downloading and opening DragonBones:

When creating a new file, I pick Armature just because it's the safest option, movie clip likely wont work and I don't know the other option: If at any time you can't perform an action mentioned, check the top left of the screen and make sure you're set to Armature. If it's in Animation, you wont be able to move around objects in the Library.

The Armature mode is what you will see by default if you have no animation. So if you have a character visible in Armature, every single animation will have that character visible by default. If you scale up a bone in Armature mode, you'll scale up that bone for every animation. If you make an image invisible and an animation hasn't explicitly set a key to make the image visible, it will be invisible for that animation.

SAVE OFTEN - Program is somewhat prone to crashing, particularly when importing.

1. Create a bone (top right of the screen, a little pointer icon)
1a. Create a Slot (same button as bone) and drag/drop it in that bone

2. Import your animation PNGs to library using File > Import Assets to Library: Choose Duplicate library if you like, this will make a duplicated folder named library that is int he same folder as the saved file.

3. This will create a 'Slot' and 'attachment'. The 'slot' acts like a folder for the image (attachment) so drag any images related to an animation in those separate slots and put them all into one slot.

4. Time to 'animate'! : Swap to Animation mode using the button in top left of the stage. Now you can alter the timeline. The timeline is where you will hide or show which image will be displayed on which frame. First time you're in this mode, you'll want to turn on "Auto Key" (Icon is a little flag with an A). This will key any changes you make. Expand the bone/slot to see all your images and press the circle next to the image to hide or show them. Only one image can be visible at a time PER SLOT. If you want more than one image visible at the same time, create a new slot for the image.

5. When you have all your images in the frames you want, name your animation (it can be anything using alphanumeric characters BUT no spaces, use underscore if you have to) and this is what will be called by the Action Sequencing.

6. At the top right in the library, it will show as "Armature" by default, double-click this to change the name to your character/monster. Again, no spaces in the name. Save your project if you haven't.

7. Now you can export your project. Choose File > Export. By default, you'll be in the Animation Data + Texture tab. This is the one you want. Below are the settings to double-check. Anything not mentioned are default settings that you can leave alone.

7a. Data Config Type: DragonBones JSON
Data Version: 5.0
Image type: Texture Atlas ----go into Settings--> and make sure you have "Power of Two" and "Square" on. Beware that as you add more images for more animations later, with Auto Size on, this may toggle Square to be off as the export adjusts the texture size. Always make sure Square is ON.

Mobile games should aim to be no bigger than 1024x1024 and computer games should be no bigger than 2048x2048. These dimensions I haven't confirmed personally as problematic, but my previous game job had this limit and so have other people on this board. Since the next size up is 4096 x 4096, I'm inclined to believe RPG maker might have trouble there.

At this point, it's a matter of going into RPG Maker (with the appropriate Yanfly Action Sequencing addons and pre-requisite engines) following the notetag suggestions for Dragonbones. In the Enemies tab, you will want to point to the Battler that has the same name as the 'Armature' you renamed in step 6.
Lets say the enemy armature is "Slime", and the animations you included are 'hit' and 'attack' - you'd have a tab like this:

<DragonBone Settings>
Battler: Slime
Replace Sprite
Ani Attack: attack
Ani Hit: hit
Ani Backflip: hit
</DragonBone Settings>

The word after Ani is for Yanfly's Action Sequence to use as an identifier. The word after the : is in relation to the animation name in DragonBones.

This will allow you to use the ActSeq command:

animation backflip: target

to cause the target to play the animation assigned to 'backflip'. Currently it's hit, but maybe later you'll want to create a backflip anim. Include it in DB, name it appropriately, export (re-check that Square is ON). Ani Backflip: hit to Ani Backflip: backflip.

I chose 'backflip' to show that you can apply any animation in DB to any random name for the ActSeq plugin.

Other than all that, just make sure you follow the setup tips in KELYEP_DragonBones docs and vids and set the Preload Assets to ON in the Plugin manager. There looks like a lot here but it works like a charm and the only worries you will have about sprite sizes and animations will be if all your anims will fit in your DB export and battle load speed.

OH also, regarding animation loops (like a forever repeating idle animation), you have to set this inside DB. With the Animation tab active, look at the 'Play Times:' number in the bottom right. Set to 0 for infinite looping, and any other number for that many plays.

That's all I know about it, but it's an option. Good luck!
 
Last edited:

rivelle

Villager
Member
Joined
Jan 16, 2023
Messages
26
Reaction score
2
First Language
English
Primarily Uses
RMMZ
I've spent the past week trying to sort out how to do this using Dragonbones and I've got a way that finally works great, but it will take you a bit of learning the free Dragonbones software if interested. Also, this is not the best way to create from an existing spritesheet: You'll want to only use this method for animation that has every frame exported as PNG, or puppet animation.

You'll need to follow some instructions on how to get DragonBones working with RMMV that includes adding some libs files and editing the index.html. These were fairly straight-forward for me.

On to DB - Luckily, you wont need to learn armature stuff for exported PNG, just follow some steps after downloading and opening DragonBones:

When creating a new file, I pick Armature just because it's the safest option, movie clip likely wont work and I don't know the other option: If at any time you can't perform an action mentioned, check the top left of the screen and make sure you're set to Armature. If it's in Animation, you wont be able to move around objects in the Library.

The Armature mode is what you will see by default if you have no animation. So if you have a character visible in Armature, every single animation will have that character visible by default. If you scale up a bone in Armature mode, you'll scale up that bone for every animation. If you make an image invisible and an animation hasn't explicitly set a key to make the image visible, it will be invisible for that animation.

SAVE OFTEN - Program is somewhat prone to crashing, particularly when importing.

1. Create a bone (top right of the screen, a little pointer icon)
1a. Create a Slot (same button as bone) and drag/drop it in that bone

2. Import your animation PNGs to library using File > Import Assets to Library: Choose Duplicate library if you like, this will make a duplicated folder named library that is int he same folder as the saved file.

3. This will create a 'Slot' and 'attachment'. The 'slot' acts like a folder for the image (attachment) so drag any images related to an animation in those separate slots and put them all into one slot.

4. Time to 'animate'! : Swap to Animation mode using the button in top left of the stage. Now you can alter the timeline. The timeline is where you will hide or show which image will be displayed on which frame. First time you're in this mode, you'll want to turn on "Auto Key" (Icon is a little flag with an A). This will key any changes you make. Expand the bone/slot to see all your images and press the circle next to the image to hide or show them. Only one image can be visible at a time PER SLOT. If you want more than one image visible at the same time, create a new slot for the image.

5. When you have all your images in the frames you want, name your animation (it can be anything using alphanumeric characters BUT no spaces, use underscore if you have to) and this is what will be called by the Action Sequencing.

6. At the top right in the library, it will show as "Armature" by default, double-click this to change the name to your character/monster. Again, no spaces in the name. Save your project if you haven't.

7. Now you can export your project. Choose File > Export. By default, you'll be in the Animation Data + Texture tab. This is the one you want. Below are the settings to double-check. Anything not mentioned are default settings that you can leave alone.

7a. Data Config Type: DragonBones JSON
Data Version: 5.0
Image type: Texture Atlas ----go into Settings--> and make sure you have "Power of Two" and "Square" on. Beware that as you add more images for more animations later, with Auto Size on, this may toggle Square to be off as the export adjusts the texture size. Always make sure Square is ON.

Mobile games should aim to be no bigger than 1024x1024 and computer games should be no bigger than 2048x2048. These dimensions I haven't confirmed personally as problematic, but my previous game job had this limit and so have other people on this board. Since the next size up is 4096 x 4096, I'm inclined to believe RPG maker might have trouble there.

At this point, it's a matter of going into RPG Maker (with the appropriate Yanfly Action Sequencing addons and pre-requisite engines) following the notetag suggestions for Dragonbones. In the Enemies tab, you will want to point to the Battler that has the same name as the 'Armature' you renamed in step 6.
Lets say the enemy armature is "Slime", and the animations you included are 'hit' and 'attack' - you'd have a tab like this:

<DragonBone Settings>
Battler: Slime
Replace Sprite
Ani Attack: attack
Ani Hit: hit
Ani Backflip: hit
</DragonBone Settings>

The word after Ani is for Yanfly's Action Sequence to use as an identifier. The word after the : is in relation to the animation name in DragonBones.

This will allow you to use the ActSeq command:

animation backflip: target

to cause the target to play the animation assigned to 'backflip'. Currently it's hit, but maybe later you'll want to create a backflip anim. Include it in DB, name it appropriately, export (re-check that Square is ON). Ani Backflip: hit to Ani Backflip: backflip.

I chose 'backflip' to show that you can apply any animation in DB to any random name for the ActSeq plugin.

Other than all that, just make sure you follow the setup tips in KELYEP_DragonBones docs and vids and set the Preload Assets to ON in the Plugin manager. There looks like a lot here but it works like a charm and the only worries you will have about sprite sizes and animations will be if all your anims will fit in your DB export and battle load speed.

OH also, regarding animation loops (like a forever repeating idle animation), you have to set this inside DB. With the Animation tab active, look at the 'Play Times:' number in the bottom right. Set to 0 for infinite looping, and any other number for that many plays.

That's all I know about it, but it's an option. Good luck!
That's a lot to read, and I am comprehending only part of the stuff because I never used DB yet.

So by animations, do you mean it changes from 1 PNG image to another PNG, then go back to the original PNG?

For example, it's showing the PNG of the original "pose" (it doesn't need to move tbh, it can be a static image), and once hit by the actor, it removes that PNG, and replace it with the PNG of the enemy being hit, and then it won't stay, maybe 1-2 seconds at most, before reverting back to the original PNG pose.

Is this what is gonna happen if I use DB?
 

cheef

dumb but trying
Veteran
Joined
Nov 30, 2019
Messages
31
Reaction score
7
First Language
English
Primarily Uses
RMMV
That's a lot to read, and I am comprehending only part of the stuff because I never used DB yet.

So by animations, do you mean it changes from 1 PNG image to another PNG, then go back to the original PNG?

For example, it's showing the PNG of the original "pose" (it doesn't need to move tbh, it can be a static image), and once hit by the actor, it removes that PNG, and replace it with the PNG of the enemy being hit, and then it won't stay, maybe 1-2 seconds at most, before reverting back to the original PNG pose.

Is this what is gonna happen if I use DB?

No problem, even if you only read the first paragraph or two, I put all the info in there in case it sounds like the way you want to go, also it's there as documentation for anyone who doesn't know it's an option.

And yes, it's perfect for things like hit animations or reactions. When you use the Yanfly Action Sequencing, you can set what animation you want to play. If you have the 'Play Times' set to 1 for an animation, it will play the animation once when called and revert back to what was there previous. You just have to set the keys in the Animation tab in Dragonbones. If you want it to be a permanent loop, like a character that's poisoned or something, set the 'Play Times' in Dragonbones to 0.

So far, I'm not sure if you'll need to use a new action sequence command to change the permanent loop or if it can be done simply with state changes but I'm still learning and it looks very promising all around for me.

---
edit: I should mention that this means of animating has a downside for use with enemies. While the 'wait for animation' sequence command works for player actor animations and waits until the animation is complete before moving to the next step; It doesn't seem to work for enemies so if there are animations that you require this delay for on the enemy side, you'll need to use a wait command for a number of frames. Not a big problem but still something.
 
Last edited:

rivelle

Villager
Member
Joined
Jan 16, 2023
Messages
26
Reaction score
2
First Language
English
Primarily Uses
RMMZ
No problem, even if you only read the first paragraph or two, I put all the info in there in case it sounds like the way you want to go, also it's there as documentation for anyone who doesn't know it's an option.

And yes, it's perfect for things like hit animations or reactions. When you use the Yanfly Action Sequencing, you can set what animation you want to play. If you have the 'Play Times' set to 1 for an animation, it will play the animation once when called and revert back to what was there previous. You just have to set the keys in the Animation tab in Dragonbones. If you want it to be a permanent loop, like a character that's poisoned or something, set the 'Play Times' in Dragonbones to 0.

So far, I'm not sure if you'll need to use a new action sequence command to change the permanent loop or if it can be done simply with state changes but I'm still learning and it looks very promising all around for me.

---
edit: I should mention that this means of animating has a downside for use with enemies. While the 'wait for animation' sequence command works for player actor animations and waits until the animation is complete before moving to the next step; It doesn't seem to work for enemies so if there are animations that you require this delay for on the enemy side, you'll need to use a wait command for a number of frames. Not a big problem but still something.
Thanks again!
 

Latest Threads

Latest Profile Posts

1iVi6I.png


Continuing our countdown with Capsule Monster #13 Tomey Thomas! I loved the idea of a tiny book gaining sentience and being a little wizard. It’s a shame none of his spells are useful XD
Have to be more organised and serious. It helps that im running out of time at work :|. so much to do. Trying to make game studio professional. www.bmpgames.com
imgur links are back!
now I CAN keep getting away with NOT replacing them with updated renders!
yay!
I forgot RPG Maker even existed. Such good memories. Might boot up steam and download MV one more time
10 pieces of KFC chicken for US$12.30, delivery included. Cheap or expensive? :aswt:

Forum statistics

Threads
131,549
Messages
1,220,773
Members
173,220
Latest member
ZecaVn
Top