Draft
Conversation
Reusing the sprite_frames_exported_textures addon. This behavior node can be configured with an array of textures, and provides a tool button to randomize the parent AnimatedSprite2D texture.
Only if this parameter is passed, the existing safeguard is checked. That is, that the new texture and the old one share the same base texture.
…xiliary function This parameter is not used by the auxiliary function at all. Also, remove the double negation and check for FileAccess.file_exists() directly.
To be able to call it from other scripts.
A single button to randomize various aspects of a character. For now, the skin tone and the textures of a stack of AnimatedSprite2D that compose the character with parts like: legs, body, head, hair, head prop. Also provides a way to flip the character horizontally. And a way to start the current animation of each part at a random frame, but all using the same random frame. The caveat of having multiple parts is that existing logic like the RandomFrameSpriteBehavior don't work for an array of sprites, so some things have to be reimplemented.
|
Play this branch at https://play.threadbare.game/branches/endlessm/random-townies. (This launches the game from the start, not directly at the change(s) in this pull request.) |
Draw the character in Aseprite as layers. Each layer has a part variant and offset encoded in its name. For example: - "head_003" for variant 3 of the character head. - "body_002.dy_-12" for variant 2 of the character body, and an offset of -12 in the Y axis. Export each part variant as PNG. Create a scene with one AnimatedSprite2D node per part. Use the character sprite randomizer to randomly set the multiple PNGs of each part. Also use the cel-shading node and material in each part with skin. Add the character randomizer to the root node. Also add a test scene with multiple townies instantiated. Add talker behavior to them and some dialogue explanation.
3923e25 to
6d47ab6
Compare
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See discussion: #1802