Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0 Add Character Animation support #998

Merged
merged 2 commits into from
Jul 12, 2022

Conversation

Jowan-Spooner
Copy link
Collaborator

@Jowan-Spooner Jowan-Spooner commented Jul 12, 2022

Animations for portraits

Animations are a script file that extends the new DialogicAnimation class.
There are currently X animations:

  • fade_in_up
  • fade_out_down
  • bounce_in
  • bounce_out
  • instant_in_out
  • tada
  • heartbeat

These scripts have to have an animate() function. The class has a couple of variables that you can use, most importantly the .node which is a reference to the node that should be animated.

The animations should emit finished_once once finished. The animations above use the SceneTreeTweener for animating (except for the instant animation).

Animations on character event

The Character event has a couple of more settings, that show under different circumstances:

  • AnimationName (the path to the animation)
  • AnimationLength
  • AnimationRepeats
  • AnimationWait

In the text version they are stored as an additional shortcode.
E.g.: Join Emilio (sad) 3 [animation="Bounce In" length="2.0" wait="True"]

Animation settings

There is a settings page for animations where you can specify a custom animations folder as well as default settings for join and leave mode.
They default to:

  • Custom Animations: 'res://addons/dialogic_additions/Animations'
  • Join Animation: ['Fade In Up', length = 0.5, wait = true]
  • Leave Animation: ['Fade Out Down', length = 0.5, wait = true]

Additional changes

Resource picker

I've decided to make the resource picker more adaptable (to use it for the animations).
You can now specify a method for listing suggestions. If you give a file_extension it will default to listing all of those files.

Adds 
- an DialogicAnimations class
- some Animations
- an AnimationSettings editor
- Animation settings to the character event

Changes
- the resource picker to be less hard-coded and easier to use for other things (e.g. Animation picker in this commit)
    -  thus there are a number of changes to portrait/picker behaviour in general

Suggest the 'testy.dtl' timeline if you want to try it quickly.
@Jowan-Spooner Jowan-Spooner linked an issue Jul 12, 2022 that may be closed by this pull request
This was referenced Jul 12, 2022
@Jowan-Spooner Jowan-Spooner linked an issue Jul 12, 2022 that may be closed by this pull request
6 tasks
@coppolaemilio coppolaemilio merged commit 0b231e0 into dialogic-godot:version-2.0 Jul 12, 2022
@Jowan-Spooner Jowan-Spooner deleted the animations branch July 13, 2022 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add settings to character events 2.0 Character animations
2 participants