kestrelm / Creature_Godot

2D Skeletal Animation Creature Runtime for Godot Engine
Apache License 2.0
84 stars 12 forks source link

Color Flags aren't exported to JSON file #21

Closed LemonadeFlashbang closed 3 years ago

LemonadeFlashbang commented 3 years ago

While working on my project, I assembled an animation like the following. I use the r/g/b levels to create a silhouette in some elements, then activate the strike effect. It's an over the top teleport attack. As part of the movement, I fling the character's sleeve/ cloak off their body. In the Creature2D editor, it appears as follows:

ex

That's not how it appears in either my game, or the web player, however.

The opacity change works- but not the color change. Therefore, the character doesn't become a silhouette- and you can instead see them in all their ugly glory.

goofus

Here are my export settings: image

I've tried by checking "Colors" and "Premultiply Alpha" but had the same results. I also opened up the json file, and can't find any references to red, blue, or green values. The opacity is being recorded fine, however.

image

I am currently on a Pro license, using the Windows version of the tool.

kestrelm commented 3 years ago

Hello, I think support for color animation isn't currently in Godot. For web, if the player supports CreaturePack then colors should be supported. Will investigate and see if it is possible to get this into the Godot Plugin. Thanks

LemonadeFlashbang commented 3 years ago

Appreciate the quick response. I'd love it if it could work because I like the effect, but if not I can replace the animation.

kestrelm commented 3 years ago

Actually for the Creature JSON format, it looks like metaData support is in there: https://github.com/kestrelm/Creature_Godot/blob/43155e0550ba8a045831015d522bd42109620dd9/creaturegodot3/creaturegodot/creaturegodot.cpp#L540

This requires the metaData file ( which is also exported in the folder ) to be referenced and then set on the plugin with the call set_metadata_filename : https://github.com/kestrelm/Creature_Godot/blob/43155e0550ba8a045831015d522bd42109620dd9/creaturegodot3/creaturegodot/creaturegodot.cpp#L507

You can give this a go and see if it works?

LemonadeFlashbang commented 3 years ago

That worked! I hadn't been using the metadata file since I thought it was just useful for skin swapping. Thank you!