Creating an RPG-esque Equipment Paperdoll

What I am trying to do is create a 2D character in 3D space. I have been able to achieve this by actually using the tutorials here: null - YouTube

Complete with the state machine.

Unfortunately, this seems to be completely unsuited for if ever this 2D actor ever needs to have paperdolled sprites/sprite sheets for, say, classic RPG equipment.

I currently set the main flipbook of my character to an int converted to an enum, as determined by such things as direction.

However, I need to be able to change 4 different flipbooks, and 2 different sprites to different graphics/animations basically per item equipped by the player.

All I want to do is change the texture that the sprites are taken from and thus the final flipbook animation.

I have taken a look at the Flappy example (which being a 2D game example ironically doesn’t use Paper2D), but it looks like extending that to multiple types of equipment all overlayed on a character sprite would be an immense task.

Can anyone point me in the right direction? At this point I am totally lost.

There are a couple of different approaches you can take, but they all boil down the same general concept of having a record for each ‘paper doll’ with the associated assets and any other parameters you want to change.

You can create a base Blueprint class with public members for each different asset you want to swap out, e.g., public variables of type PaperFlipbook named WalkForwards, RunForwards, Idle, Crouch, etc… You can then create a child blueprint for each different set of flipbooks, setting up the correct values in the defaults editor. At runtime you pick the correct one and read the values from it into local variables on your instance that are the ones you actually use in your state machine.

You can also create a custom Blueprint struct containing those variables and make an array of those structs in your BP, which is slightly less flexible but would be quick to get up and running. I’d probably try this approach first to get things going.

Cheers,
Michael Noland

Thank you, Michael, for your reply. I believe I will attempt your first suggestion, as I think I understand how to accomplish that.

So basically, in the end, I will have to create each set of animations by hand? I know I can do it, it’s just that I would think there to be an easier way if just using 2D sprites.

Yes, right now you’d need unique assets.

One useful tool is the Property Matrix, which makes it easy to bulk-edit assets (right-click on the selected assets in the content browser, it’s in the ‘Asset Actions’ submenu). You can duplicate the individual frames of an animation into another directory in the CB, then use the property matrix to point all of them to a new texture at once, and then recreate flipbooks from them.

Cheers,
Michael Noland

I did find that tool. It simplifies the process greatly.

Again, I appreciate the replies. When I’m further ahead I anticipate showing off what I’ve got so far!

Sorry to double post, but I do have a question: would creating a base blueprint class with an Actor Component parent be the most useful of the basic blueprints? I’d imagine it doesn’t matter too much, but I wanted to ask anyway.

I suspect you’ll find something here :slight_smile:

I see you are trying to make it like the first 3d games that could not afford using animated 3d models and instead had images from each angle. I suspect that you can use a hardpoint for each frame:

Hardpoint is basically a point where the weapon/equipment attaches on your sprite. You have a hardpoint with rotation-data for the tool or whatever and the prop follows your model.
Now, based on how it looks like you are making it: I suspect you’ll have say: your animated character from all angles with HARDPOINTDATA and you’ll also have your animated equipment from all angles and put them on top. Sorry if this is all a bit unclear, but I’m open for discussion mostly all day, so ask whatever questions you like.

Excuse my English if it’s bad. Im from Norway and only 13 years old so I haven’t even finished my education.