PaperZD State machine and Event system extension for Paper2D

AnimConduits are now implemented, will enter a testing period to ensure they are good to be deployed.
More info here:

After this we will be adding a TreeView to the AnimSequences and deploy version 1.2.4
This wil mark a break on development, because i need to concentrate on Creature2D support which i need to implement ASAP.

Still not sure if Creature support will be given inside the plugin itself, or as an external plugin, because i need the symbols from kestrel and updating paperzd at the same time as Creature2D could be problematic.

Most probably the best way to approach this kind of add ons will be to create a “Registration” interface which external tools can opt-in, so you can add AnimSequence and AnimBP support.

Finished Conduits and 4.19 Blueprint Compilation Manager support… i’m currently doing 4.20 support… they changed like… all the API so there’s 350+ errors i have to solve before uploading all this.

EDIT: Removed 4.19 for the moment as i found a bug… will upload it again when it’s done
Edit2: 4.19 up again, bug solved

NOTE: As always guys, remember to back up your projects before upgrading PaperZD Version. Any issues that could arise, don’t hesitate to contact me, I test the plugin thoroughly but i cannot test every edge case.

Still processing by marketplace but currently:

Uploaded version 1.2.4

Changelist:

  • Re organized compiler and added compilation manager support for 4.19

  • Added STreeView on the AnimSequences

  • Added AnimConduits

  • Fixed crash that happens when trying to use Sequencer animations on a character without an AnimBP setup

  • Fixed hiccups on non-looping AnimSequences.

happy to see Conduits implemented, but I’m running into a rather crippling problem: the game auto-crashes when it loads the PaperZD Anim BP.


Access violation - code c0000005 (first/second chance not available)

UE4Editor_Engine!UEdGraph::GetAllChildrenGraphs() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\engine\private\edgraph\edgraph.cpp:340]
UE4Editor_Engine!UBlueprint::GetAllGraphs() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\engine\private\blueprint.cpp:1542]
UE4Editor_UnrealEd!FRegenerationHelper::LinkExternalDependencies() [d:\build\++ue4+release-4.19+compile\sync\engine\source\editor\unrealed\private\kismet2\blueprinteditorutils.cpp:1096]
UE4Editor_UnrealEd!FBlueprintEditorUtils::LinkExternalDependencies() [d:\build\++ue4+release-4.19+compile\sync\engine\source\editor\unrealed\private\kismet2\blueprinteditorutils.cpp:1557]
UE4Editor_Engine!UBlueprint::RegenerateClass() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\engine\private\blueprint.cpp:649]
UE4Editor_CoreUObject!FLinkerLoad::RegenerateBlueprintClass() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\blueprint\blueprintsupport.cpp:580]
UE4Editor_CoreUObject!FLinkerLoad::FinalizeBlueprint() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\blueprint\blueprintsupport.cpp:1664]
UE4Editor_CoreUObject!FLinkerLoad::Preload() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:3353]
UE4Editor_CoreUObject!FLinkerLoad::CreateExport() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:4027]
UE4Editor_CoreUObject!FLinkerLoad::CreateExportAndPreload() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2746]
UE4Editor_CoreUObject!FLinkerLoad::LoadAllObjects() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2908]
UE4Editor_CoreUObject!LoadPackageInternal() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:1328]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImportInner() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2423]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImport() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2179]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImportInner() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2471]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImport() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2179]
UE4Editor_CoreUObject!FLinkerLoad::CreateImport() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:4173]
UE4Editor_CoreUObject!FLinkerLoad::ResolveAllImports() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\blueprint\blueprintsupport.cpp:1487]
UE4Editor_CoreUObject!FLinkerLoad::FinalizeBlueprint() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\blueprint\blueprintsupport.cpp:1577]
UE4Editor_CoreUObject!FLinkerLoad::Preload() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:3353]
UE4Editor_CoreUObject!FLinkerLoad::CreateExport() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:4027]
UE4Editor_CoreUObject!FLinkerLoad::IndexToObject() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:4250]
UE4Editor_CoreUObject!FLinkerLoad::CreateExport() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:3648]
UE4Editor_CoreUObject!FLinkerLoad::CreateExportAndPreload() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2746]
UE4Editor_CoreUObject!FLinkerLoad::LoadAllObjects() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2908]
UE4Editor_CoreUObject!LoadPackageInternal() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:1328]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImportInner() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2423]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImport() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2179]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImportInner() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2471]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImport() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2179]
UE4Editor_CoreUObject!FLinkerLoad::CreateImport() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:4173]
UE4Editor_CoreUObject!FLinkerLoad::IndexToObject() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:4285]
UE4Editor_CoreUObject!FLinkerLoad::CreateImport() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:4132]
UE4Editor_CoreUObject!FLinkerLoad::ResolveAllImports() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\blueprint\blueprintsupport.cpp:1487]
UE4Editor_CoreUObject!FLinkerLoad::FinalizeBlueprint() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\blueprint\blueprintsupport.cpp:1577]
UE4Editor_CoreUObject!FLinkerLoad::Preload() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:3353]
UE4Editor_CoreUObject!FLinkerLoad::CreateExport() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:4027]
UE4Editor_CoreUObject!FLinkerLoad::CreateExportAndPreload() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2746]
UE4Editor_CoreUObject!FLinkerLoad::LoadAllObjects() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2908]
UE4Editor_CoreUObject!LoadPackageInternal() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:1328]
UE4Editor_CoreUObject!LoadPackage() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:1436]
UE4Editor_Engine!UEngine::LoadMap() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\engine\private\unrealengine.cpp:10889]
UE4Editor_Engine!UEngine::Browse() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\engine\private\unrealengine.cpp:10373]
UE4Editor_Engine!UGameInstance::StartGameInstance() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\engine\private\gameinstance.cpp:440]
UE4Editor!FEngineLoop::Init() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\launch\private\launchengineloop.cpp:2759]
UE4Editor!GuardedMain() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\launch\private\launch.cpp:153]
UE4Editor!GuardedMainWrapper() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:144]
UE4Editor!WinMain() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:223]
UE4Editor!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:253]
kernel32
ntdll

The AnimBPs can exist in the project, but if I link one up in a character or otherwise load one in the game, it crashes as soon as it starts.

only clues I can give is that it seems to be related to 4.19 (I skipped over 4.18, so don’t know if it applies there), and it predates the recent plugin updates. I had thought it was caused by trying to convert my 4.17 project to 4.19 (because, in past, UE4 has had all the stability of a card castle on a wobble board), but having recently tried recreating the project manually, the error still hits.

Hey there @anonymous_user_2859ff1c , if you can, join us on our discord where we can exchange information faster.

Also, if you can create a repo project so i can check it out more easily it would speed up a lot the debugging.

sorry for the error, i’ll try to fix it ASAP

Following the new RevShare, and because itch.io was 5 dollars cheapier due to the revshare… i updated the price on ue4 marketplace to be the same as the itch.io, is not much of a discount but now both sites are equal in term of costs.

That’s pretty cool of you man :slight_smile: I don’t mind the previous price it was more than fair for what you guys are offering really. Paperzd truly simplifies animations in complex 2d games. Before getting this I tried literally every way to manage the huge amount of states for my character and no matter what I did it was a nightmare to deal with. This helps bring a decent level of sanity to the whole process.

Version 4.20 will take a while to complete… Epic removed access to FunctionGraphs on the Blueprint, which i needed for displaying and compiling custom functions, this was a last minute change… because it wasn’t on Preview5.

EDIT: NVM it was an evil Intellisense error…
Epic hasn’t fixed the issues with the code plugin complation (error since preview3)… so until they fix that… we will not have the plugin for 4.20

Good to know. I have been waiting on 4.20 for a minute but if we have a little more of a wait till the plugin is ready I guess I can go back to working on other aspects of this stuff. Is 4.20 relatively solid? I remember hearing something about some issues in 4.19 and that people had avoided using it. How is 4.20 looking?

I finished compiling 4.20, needed some extra work on the includes… i have to work a little extra to remove monholitic headers (which i still have included it seems).
I had to take the week to create some things for our game, so now i’m going back to 4.20 and upload it tomorrow.

I haven’t tested 4.20 too much, (more than unit testing)… i had to avoid 4.19 due to issues with our game (render targets are slow as hell there).
I think because 4.20 has a lot of changes internally, it will have to be throughly tested by everyone… personally i would hold on to 4.20 until some patches come, or work in it with a possibility of rollback on your projects.

Cheers!

Yeah that’s kind of what I expected then. I knew there was some problems in 4.19 that caused people to avoid it. I am crossing my fingers that 4.20 is solid and I can use it to build with. From the massive list of fixes though I imagine it will probably be decent enough. I can afford to rollback if needed so I guess I might as well jump in and start testing it out to see how it does.

​Added 4.20 version…

Haven’t had that much time to test it thoroughly, any issues please communicate with me

Next update i’ll fix IWYU monolithic includes… which i haven’t got the time to do…
Will also fix the issue of not being able to play on Standalone mode

Hotfix 1.2.5

  • Fixed issue with compiler, was not storing the sequences correctly inside the AnimNodes
  • Changed Editor module to DeveloperModule, now you can play in Standalone Mode… sorry for the delay

More features and hotfixes will come soon.

Sweet the 4.20 update is out! I was just checking to see where things were at :slight_smile: Guess it’s time to get setup with the new version and get back to work.

I’m having an issue while trying to get axis events from my charBP into paperZDanimBP. I cast to my MyCar and get to variables for the axis events leftright and updown. I then compare floats to find out if the char is moving up/down/left/right or is idle. but to do this I have to cast to MyChar each tick. If I leave it like that it will crash each time I play and input an movement.
I’ve attached my PaperZDAnimBP and the AnimationGraph


Am I going about this the wrong way? I’m trying to make a 8 direction movement system for a top down style game that will be expandable for attacks, actions, and other animations.

Thanks for the tool!

New found Bug:

On 4.20 (pending testing on other versions), when adding a blueprint state or blueprint notify, after recompiling it, the instance bound to the AnimSequence will be a REINST which will NOT be recovered…
There’s no much information about this, so i’m trying to understand how the recompiling works.

For the moment be careful with this,
Cheers!

Well from my understanding what it looks like your anim will do is return to idle after any other state but cannot go from one state to any other one and it should be able to. This is why animation states become insane to look at. So for example if you are walking left on screen and you roll the D-pad or stick to the Up or down position then there is never a chance for the animation state to return idle and maybe even causes the crashing? You basically need to look at every state and see which ones the character can transition into at any given time and connect them with conditions for when and how the transition can take place in between each of the states. Think of the state as the location you are reaching and the transition point in between them on those lines as a gate between the states or locations. The transition or gate allows the movement from one state or location to the next and you can use logic inside those gates to determine if movement is allowed and in which direction movement can happen. So Idle to walking left you would add simple logic looking for is left being pressed? if so allow the transition to walking left animation and start walking left. But then while in the walking left state you also need it to allow going back to idle AND to go diagonal up/left OR down/left at a minimum. And again logic to see if the player can transition to that state. It gets crazy because once in diagonal you now have to continue checking to allow going back to idle AND back to left OR to up etc etc.

As you can see it is not series of individual 2 way paths like in your example it ends up looking more like a spider web of possible states you can move through under whatever conditions you set inside the transition nodes. I find it easier to connect all the states by looking at what states the player cannot enter as once you get a complicated enough set of states you can end up having more states that can be entered than cannot. Depends on the project but if you end up getting a decent size set of states you might find that method easier I know I have in some cases.

I hope that helps explain this but if you still don’t quite get how it works maybe I can post a pic of one of mine so you can see how I have it hooked up.

Fiddy… if you get a crash, try to send me the stacktrace… if its something i can solve on my side, i’ll upload a hotpatch to fix issues as quick as i can. Normally a crash shouldn’t happen if you’re not doing anything out of the ordinary.

Thanks!

TerrorMedia, I slimmed down the connections so it wouldn’t be so hard to read. The issue was as soon as I went to test the game it would crash. But it is good to know have a complex spider web for multiple animations is completely normal :D. HeavyBullets, I just got finished building my new PC and ended up remaking the project with a bit of a different blueprint I guess because it’s not crashing currently. If I do experience any more I’ll grab the file, but I think it was something I did or didn’t do, possible a loop. Anyways thanks for the replies!

Thanks fiddy!
If you manage to find the issue please PM me and i’ll be checking it out.
I’m working out some weird crashes, so a hotfix will probably take time, unless we have something that’s critical

Be safe!

P.S. Fixing the loop is critical, so i’ll be doing my best to have a solution ASAP