sanderfrenken/Universal-LPC-Spritesheet-Character-Generator

Missing Animations/Spritesheet documentation

andreas-volz opened this issue · 7 comments

Hi,

I try to find an equivalent for your spritesheet like the original one https://bztsrc.gitlab.io/lpc-refined/#animations

How does this work with the "animations" key in the json files?

e.g.
https://github.com/sanderfrenken/Universal-LPC-Spritesheet-Character-Generator/blob/master/sheet_definitions/hat_helmet_armet.json => this has "animations"
but
https://github.com/sanderfrenken/Universal-LPC-Spritesheet-Character-Generator/blob/master/sheet_definitions/hat_formal.json => this has no "animations"

Is it possible to document this specification part somewhere? Maybe more people have problems to understand this too.

Documentation is up to Sanderfrenken. The animations key:

  "animations": [
    "spellcast",
    "thrust",
    "walk",
    "slash",
    "shoot",
    "hurt",
    "watering",
    "idle",
    "jump",
    "run",
    "sit",
    "emote",
    "climb",
    "combat",
    "1h_slash",
    "1h_backslash",
    "1h_halfslash"
  ]

Is a new feature added recently, and all the older assets do not have this. Assets that DO NOT have this key just default to this:

  "animations": [
    "spellcast",
    "thrust",
    "walk",
    "slash",
    "shoot",
    "hurt",
    "watering"
  ]

Prior to the addition of the Animations filter and adding in the extra animations, the "universal" set mostly all had these animations. The filter was added to be able to allow users to filter assets that fit the animations they wanted. The newer animations have less assets and will take a long time to fill them out, so this was a workaround to make it easier for users.

However, again, the older assets ALL have the following:
spellcast
thrust
walk
slash
shoot
hurt
watering

As for this:
https://bztsrc.gitlab.io/lpc-refined/#animations

I have no idea what this is. Where did this come from? I'm not sure about this being the "original" one, as there's been many editors made for this. ULPC is actually quite old, though.

There are also custom animations possible like:

tool_whip
tool_rod
slash_reverse_oversize

and more (see https://github.com/sanderfrenken/Universal-LPC-Spritesheet-Character-Generator/blob/master/sources/custom-animations.js)

I haven't seen the site you linked before, what is the purpose of it?
As I see it now, the resulting sprite sheet that comes out of the generator should be self explanatory, but for creators of new lpc art it might not be clear what to draw. I think your style guide might provide some guidance there, so maybe we can add a link to your page in the readme here?

I think its related to this thread now that I think about it:

https://opengameart.org/forumtopic/about-a-new-well-defined-lpc-specification?page=1

I am not sure if this initiative by bzt is still alive atm.

The first thing I noticed was that the layout was different, adding sit and idle to the right of cast and climb to the right of "down". I considered a similar layout (adding more things to the right to fill in the gaps), but ULPC is designed around the idea of all animations being in separate sections, so the only time I layered multiple things next to each other was very short ones (2-3) for the two idles and for sit/emotes.

I do think we should make it clear that users don't have to feel obligated to update all assets. They can fill out as many assets as they want, and simply include the animations they opted to fill out in the "animations" key.

So looking it over, there's a description of the assets here in the main README file:

A category can exist of n-layers. For each layer, define the z-position the sheet needs to be drawn at. For an example of a multi-layered definition, refer here [here](https://github.com/sanderfrenken/Universal-LPC-Spritesheet-Character-Generator/blob/master/sheet_definitions/body_wolfman.json).

Finally, in source_index.html, add your new category at the desired position by adding a div_sheet_ like this:

div_sheet_body_robot

Make sure the name starts with div_sheet_, and match the postfix with the name of your json, in this case body_robot.

At this point, you will need to run a script that will generate the final index.html. In order to do that, run node scripts/generate_html.js from the root folder. This will generate the index.html from the source_index.html.

In case you want to push your changes, be sure to run this script and never change the index.html manually. The CI will reject any PR's that contain manual changes made on the index.html.

I can probably go ahead and add in some extra comments about the new animations entries here. Again, so people using this and adding new assets don't need to feel obligated to fill out all animations.

So this is what I am planning to include in my next PR:

You can optionally also specify the available animations the asset supports. You do not have to feel obligated to fill out all animations, and some assets may not work well on all animations anyway. In the sheet definition, you can add the "animations" array below "variants". Again, refer here here:

  "animations": [
    "spellcast",
    "thrust",
    ...etc
  ]

If you add this animations list, users can filter the results based on the animations supported. If this list is not included in your sheet definition, then it is assumed the default list of animations are all supported:

    "spellcast",
    "thrust",
    "walk",
    "slash",
    "shoot",
    "hurt",
    "watering",

As such, if you wish to include less than this list, such as only walk and slash, you should still include the animations definition to restrict it to just those assets. Users will still be able to access your asset, but it won't appear if the animations filter is used and you did not include that animation in your sheet definition.

I hope this makes this a bit easier. I really want to stress that just because I added new base body animations, it doesn't mean everyone who wants to contribute must feel obligated to fill out all assets. You can still contribute with a small number of animations and specify which animations you wish to use. In fact, you can even skip out on the original base animations--child and Muscular are both missing certain base animations anyway and probably won't be done any time soon. I even noticed some of the shields are missing Walk, Spellcast, etc, so I should probably update those lists to only include the animations they do support.

The latest PR I just opened should also include a fix for this issue. Once that gets merged we should be able to close this particular issue.