Skip to content
Matthias Mailรคnder edited this page Feb 23, 2022 · 4 revisions

All animations in OpenRA are sprite-animations. An animation, therefore, is just a sequence of sprites played from beginning to end, very much like a flip-book animation. These sprites animations, basically just a bunch of sprites in the correct order, are stored in .SHP files (which is Westwood's original sprite format). These SHPs can be found in the MIX files. These SHPS, however, may (and usually do) contain several of the sprite-animations for a particular unit. Some kind of meta-data is needed to read the sprites in, and organize them according to animation... to tell the engine how specific animations map to a range of sprites. This is where sequences.yaml comes in.

Sequences.yaml

Each top-level node in that YAML corresponds to a unit/building, with the next sub-level defining the available animations for that unit. As an example, take a look at the second node in the file called "fact". That just happens to be the internal name for the Construction Yard. The second level of nodes are: idle, make, build, build, damaged-idle, damaged-build, which represent the animations associated with the Yard. Let's take a look at them:

	idle:
		Start: 0
	make: factmake
		Start: 0
		Length: *
	build:
		Start: 1
		Length: 25
	damaged-idle:
		Start: 26
	damaged-build:
		Start: 27
		Length: 25

That's what a typical unit/building's entry in sequences.yaml looks like. While defining sequences, the 'Start' key's value points to the starting frame/sprite number in the sprite list. 'Length' is just that; it defines the number of sprites to be picked up, beginning from the start frame. 'Length' can have a value of '*' which basically means that the animation extends till the last frame available. Another property you'll find is 'Facings'. This defines the number of directions that artwork has been provided for. Typical this value is 8 in case of infantry units and 16/32 in case of vehicles. For example, see e1's entry (Rifle Infantry). Another property called 'Tick' is also available, though it's not used as frequently. It can be used to override the rate at which the sprites are update/animated. It defaults to a value of 40ms if nothing is specified. e3's (Rocket Soldier) idle1 animation, for example, sets time to 120. Which means that idle1 animation will only be updated once in three update cycles.

Players ๐ŸŽฒ

Modders โœ๏ธ

Developers ๐Ÿ”ง

Clone this wiki locally