-
Notifications
You must be signed in to change notification settings - Fork 11
How to: use Spore animations
It is possible to use Spore animations for creature abilities, vignettes and cut-scenes. When trying to do it for the first time, however, it can be a bit confusing.
If you have ever modded Spore, you will have seen a folder called animations~
. Even though it contains many more things, the name is pretty clear: it contains animations. And fortunately for us, most of them have names that let us easily recognize them: it's clear that com_bite_lvl02.animation
is the animation for the level 2 Bite ability.
But if you go to the file that defines the Bite 2 ability, you won't see that animation name anywhere; instead, all properties that talk about animations have hexadecimal numbers as their values.
The answer to this is the Animation List, which is just a .tlsa
file. These files (there's one for core Spore, another for Creepy and Cute, another for GA) contain a bunch of entries which define certain properties of animations and, more importantly, assign an ID for them. If you want to use com_bite_lvl02.animation
in your ability, then find com_bite_lvl02
in the text. You will see something like this:
anim 0x044DDEA7
endMode 0
allowLocomotion true
choice
animation "_final/creature/com_bite_lvl02"
end
end
0x044DDEA7
is the TLSA entry ID that must be used to call that animation. That is what is used in the Bite 2 ability.
Fortunately for everyone, Spore accepts all .tlsa
files, no matter where they are. If you want to create a mod that adds new animations, you must create a new .tlsa.tlsa_t
file so you can reference that animation. And in order to make it compatible with other mods:
- Your
.tlsa.tlsa_t
file must have a unique name to avoid name conflicts with other mods. You can use your mod name (but no whitespaces!) - Your
.tlsa.tlsa_t
file must only contain the animations you add. It's okay to look at the existing.tlsa
files for reference, but don't copy all their contents; just add the new animations your mod has.
endMode <int>
Has three possible values:
-
0
: The animation doesn't repeat, it's played once. -
1
: The animation loops indefinitely. -
2
: The animation plays and then holds on the final frame indefinitely, useful for Death animations.
allowLocomotion <boolean>
If true then a character will be able to walk while playing this animation.
idle <boolean>
If true then when this animation is played it becomes the character's new idle. The character will return to this animation after any non-idle finishes unless told to play something else.
randomizeChoicePerLoop <boolean>
If true, when there are multiple possible choices, the one that is played will be randomly chosen every time the animation loops. If false, it will only be randomly chosen the first time, then that choice will be used for the rest of the loops.
blendInTime <float>
disableToolOverlay <ints...>
The possible values are integers from 0 to 31, probably tool indices.
matchVariantForTool <ints...>
The possible values are integers from 0 to 31, probably tool indices.
priorityOverride <float>
A TLSA entry can have some randomness by providing multiple animation choices. Whenever the animation entry is played, the game will pick one of the choices randomly, so you can have some variety in the animations. If you don't want the randomness, just add one choice, the one with the animation to be played.
choice
animation "_final/creature/com_bite_lvl02"
end
After the choice
keyword you can add -probability <float>
, with a number between 0.0 and 1.0 that represents the probability that this choice gets picked. If you don't specify this, all choices have the same probability.
You can specify more than one animation inside a choice; this allows you to give different animations for different types of creatures (for example, one version for creatures with hands and another for creatures without).
Other options accepted inside a choice:
durationScale <float>
A factor that is multiplied with the duration. For example, 0.5 means the animation will last half of its time.
duration <float>
Manually override the duration of the animation. For example, 2.0 means the animation will last exactly 2 seconds.