<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://oldwiki.devbox.themanaworld.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=BasdoMouri</id>
	<title>The Mana World - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://oldwiki.devbox.themanaworld.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=BasdoMouri"/>
	<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/wiki/Special:Contributions/BasdoMouri"/>
	<updated>2026-05-06T06:05:59Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=Development:Animations&amp;diff=11272</id>
		<title>Development:Animations</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=Development:Animations&amp;diff=11272"/>
		<updated>2009-01-08T13:54:02Z</updated>

		<summary type="html">&lt;p&gt;BasdoMouri: http://mahohmie.qsh.eu/resource1624.htm&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://mahohmie.qsh.eu/resource1624.htm movie times for jarhead] [http://spfortne.qsh.eu/20090104-audio-and-video.html audio and video file formats] [http://cnavieltz.strefa.pl/comment-501.htm ac dc hell highway music video] [http://caraines.qsh.eu/zelnexr.htm movies.max] [http://qasletop.is-the-boss.com/caouchibo.html avast 4.6 crack] &lt;br /&gt;
{{Category_programming}}&lt;br /&gt;
{{Category_art}}&lt;br /&gt;
{{Status_green}}&lt;br /&gt;
&lt;br /&gt;
== Example of a sprite definition ==&lt;br /&gt;
&lt;br /&gt;
The animations of all sprites are defined by xml documents. Here follows an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;sprite name=&amp;quot;player&amp;quot; action=&amp;quot;stand&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;imageset name=&amp;quot;base&amp;quot; src=&amp;quot;graphics/sprites/player_male_base.png&amp;quot; width=&amp;quot;64&amp;quot; height=&amp;quot;64&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;action name=&amp;quot;stand&amp;quot; imageset=&amp;quot;base&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;down&amp;quot;&amp;gt;&lt;br /&gt;
		  &amp;lt;frame index=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
		  &amp;lt;frame index=&amp;quot;18&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;up&amp;quot;&amp;gt;&lt;br /&gt;
		  &amp;lt;frame index=&amp;quot;36&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;right&amp;quot;&amp;gt;&lt;br /&gt;
		  &amp;lt;frame index=&amp;quot;54&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
	&amp;lt;/action&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;action name=&amp;quot;walk&amp;quot; imageset=&amp;quot;base&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;down&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;frame index=&amp;quot;1&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;frame index=&amp;quot;2&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;frame index=&amp;quot;3&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;frame index=&amp;quot;4&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;frame index=&amp;quot;5&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;frame index=&amp;quot;6&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;sequence start=&amp;quot;19&amp;quot; end=&amp;quot;24&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;up&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;sequence start=&amp;quot;37&amp;quot; end=&amp;quot;42&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;right&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;sequence start=&amp;quot;55&amp;quot; end=&amp;quot;60&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
	&amp;lt;/action&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;action name=&amp;quot;attack&amp;quot; imageset=&amp;quot;base&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;down&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;sequence start=&amp;quot;9&amp;quot; end=&amp;quot;12&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;end /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;sequence start=&amp;quot;27&amp;quot; end=&amp;quot;30&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;end /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;up&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;sequence start=&amp;quot;45&amp;quot; end=&amp;quot;48&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;end /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;right&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;sequence start=&amp;quot;63&amp;quot; end=&amp;quot;66&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;end /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
	&amp;lt;/action&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/sprite&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if you want to load the playerset you just load player.xml and it takes care of loading all related images. Of course delays are defined in milliseconds.&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
&lt;br /&gt;
=== &amp;amp;lt;sprite&amp;amp;gt; ===&lt;br /&gt;
A sprite is an object which can carry several animations, hence we call the root element the &amp;lt;code&amp;gt;sprite&amp;lt;/code&amp;gt;. The sprite tag has two optional properties &amp;lt;code&amp;gt;variants&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;variant_offset&amp;lt;/code&amp;gt;. These are required when there are multiple very similar versions of a sprite in one spriteset. One example for this are the hairset spritesets. The &amp;lt;code&amp;gt;variants&amp;lt;/code&amp;gt; property defines the number of variants in the spriteset and the &amp;lt;code&amp;gt;variant_offset&amp;lt;/code&amp;gt; property how many sprites are between the first sprites of the variants. When defining multiple variants you only define the animation sequences of the first variant. the engine then shifts the index parameters when it needs another.&lt;br /&gt;
&lt;br /&gt;
=== &amp;amp;lt;action&amp;amp;gt; ===&lt;br /&gt;
collection of the animation in different directions that belong to an action the character can perform. the properties are the imageset the animation phases are taken from and the name of the action. &lt;br /&gt;
&lt;br /&gt;
possible names:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
               use-item*&lt;br /&gt;
                   |&lt;br /&gt;
  attack-bow  cast-magic*&lt;br /&gt;
       |           |&lt;br /&gt;
 attack-stab  attack-throw*&lt;br /&gt;
         \     /       &lt;br /&gt;
run*  attack-swing*  sleeping*  dead&lt;br /&gt;
 |          |           |        | &lt;br /&gt;
walk     attack        sit      hurt*&lt;br /&gt;
   \        \          /         /&lt;br /&gt;
               stand&lt;br /&gt;
                 |&lt;br /&gt;
              default&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
this table also specifies the substitution precedence. when a specific name is requested but it is not defined the next lower name is used instead. The actions marked with * can be definde without causing an error but there is no situation in the current client program that triggers them.&lt;br /&gt;
&lt;br /&gt;
=== &amp;amp;lt;animation&amp;amp;gt; ===&lt;br /&gt;
Defines an animation sequence that should be displayed when the sprite object faces in a specific direction (attribute &amp;quot;direction&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
the possible directions are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
up&lt;br /&gt;
down&lt;br /&gt;
left&lt;br /&gt;
right&lt;br /&gt;
default&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
when a specific direction isn&#039;t provided, the default direction is used instead. When no default direction is defined, the first defined direction is used.&lt;br /&gt;
&lt;br /&gt;
Every &amp;lt;code&amp;gt;&amp;lt;animation&amp;gt;&amp;lt;/code&amp;gt; has one or more &amp;lt;code&amp;gt;frame&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;sequence&amp;lt;/code&amp;gt; child elements and an optional &amp;lt;code&amp;gt;&amp;lt;end&amp;gt;&amp;lt;/code&amp;gt; element.&lt;br /&gt;
&lt;br /&gt;
=== &amp;amp;lt;frame&amp;amp;gt; ===&lt;br /&gt;
Defines one frame of the animation. The only required property is &amp;lt;code&amp;gt;index&amp;lt;/code&amp;gt;.  Optional properties include &amp;lt;code&amp;gt;offsetX&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;offsetY&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;delay&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;index&amp;lt;/code&amp;gt; defines the index of the graphic on the spriteset. &lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;delay&amp;lt;/code&amp;gt; property specifies the number of milliseconds the frame is displayed before it is replaced by the next frame in the sequence. The sequence restarts when the last frame is finished. When no delay is specified (or specified as &amp;quot;0&amp;quot;) the animation doesn&#039;t continue when this &amp;lt;code&amp;gt;frame&amp;lt;/code&amp;gt; is reached.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;frame&amp;lt;/code&amp;gt; element has the optional properties &amp;lt;code&amp;gt;offsetX&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;offsetY&amp;lt;/code&amp;gt; to specify an offset from the default drawing position for that frame. This allows the animation of for example the hairset (or any equipment) to reuse the same frames with different offsets.&lt;br /&gt;
&lt;br /&gt;
=== &amp;amp;lt;sequence&amp;amp;gt; ===&lt;br /&gt;
The &amp;lt;code&amp;gt;sequence&amp;lt;/code&amp;gt; tag defines one or more phases of animation. It has the required properties &amp;lt;code&amp;gt;delay&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;end&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;delay&amp;lt;/code&amp;gt; property specifies the delay in milliseconds between each phase. The &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;end&amp;lt;/code&amp;gt; properties define the first and the last indexes of the animation sequence on the spritesheet.&lt;br /&gt;
&lt;br /&gt;
=== &amp;amp;lt;end&amp;amp;gt; ===&lt;br /&gt;
When the animation sequence reaches an &amp;lt;code&amp;gt;end&amp;lt;/code&amp;gt; tag, the animation stops and the sprite animation is returned to the &amp;quot;stand&amp;quot; state. This can be used for one time action sequences like attacking. This tag has no properties.&lt;br /&gt;
&lt;br /&gt;
=== &amp;amp;lt;include&amp;amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Can be used to include another sprite definition file. If you want to override the images, you need to specify them &#039;&#039;before&#039;&#039; the include element. If you want to override any animations, you have to do so &#039;&#039;after&#039;&#039; the include element. Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;sprite&amp;gt;&lt;br /&gt;
 &amp;lt;imageset name=&amp;quot;base&amp;quot; .../&amp;gt;&lt;br /&gt;
 &amp;lt;include file=&amp;quot;other-sprite-file.xml&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;!-- possibly override or introduce new actions --&amp;gt;&lt;br /&gt;
&amp;lt;/sprite&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Suggested additions ==&lt;br /&gt;
{{Status_red}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;amp;lt;random&amp;amp;gt; childtag for &amp;amp;lt;animation&amp;amp;gt; ===&lt;br /&gt;
Also, it includes an experimental suggestion on specifying that a random frame should be chosen. This should also have an exclude_current_frame thingy, to make sure a frame isn&#039;t shown twice or more in a row. Sometimes this may be wanted though.&lt;br /&gt;
&lt;br /&gt;
== Implementation proposal of hairstyles by Modanung ==&lt;br /&gt;
&lt;br /&gt;
I think the current system with an xml file for every hairstyle with an index and offset defined for every frame is a bit too much. It also takes a lot of work to correct small errors and to add new hairstyles that may have a different frame size and with it a different offset.&lt;br /&gt;
I suggest we split hairstyles up in three catagories:&lt;br /&gt;
* Static hairstyles&lt;br /&gt;
* Standard animated hairstyles&lt;br /&gt;
* Special case hairstyles&lt;br /&gt;
On top of the current system we need a variable that defines which gender can use which hairstyles, in every hairstyle&#039;s xml-file.&lt;br /&gt;
&lt;br /&gt;
=== Static hairstyles ===&lt;br /&gt;
&lt;br /&gt;
These are hairstyles which only have one frame for each direction and death, so five. All current hairstyles would be static hairstyles. Every individual static hairstyle needs nothing more to be defined then their bitmap, their size and their offset for each direction.&lt;br /&gt;
The offset for each seperate frame would be defined in a shared file (say hairoffsets.xml), this summed with the individual hairstyle&#039;s offset is the offset for that single frame with that hairstyle. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
hairstyle1.xml&lt;br /&gt;
&amp;lt;offsetfile=&amp;quot;hairoffsets.xml&amp;quot;, framefile=&amp;quot;static_hairstyles_frames.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;sprite variants=&amp;quot;10&amp;quot; variant_offset=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;gender=&amp;quot;male&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;imageset name=&amp;quot;base&amp;quot; src=&amp;quot;graphics/sprites/hairstyle1.png&amp;quot; width=&amp;quot;40&amp;quot; height=&amp;quot;40&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;offsetX=&amp;quot;0&amp;quot; offsetY =&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
hairoffsets.xml&lt;br /&gt;
&lt;br /&gt;
&amp;lt;action name=&amp;quot;stand&amp;quot; imageset=&amp;quot;base&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;down&amp;quot;&amp;gt;&lt;br /&gt;
		  &amp;lt;offsetX=&amp;quot;0&amp;quot; offsetY =&amp;quot;-29&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
		  &amp;lt;offsetX=&amp;quot;-1&amp;quot; offsetY =&amp;quot;-29&amp;quot;/&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;up&amp;quot;&amp;gt;&lt;br /&gt;
		  &amp;lt;offsetX=&amp;quot;-1&amp;quot; offsetY =&amp;quot;-25&amp;quot;/&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;right&amp;quot;&amp;gt;&lt;br /&gt;
		  &amp;lt;offsetX=&amp;quot;1&amp;quot; offsetY =&amp;quot;-29&amp;quot;/&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
	&amp;lt;/action&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;action name=&amp;quot;walk&amp;quot; imageset=&amp;quot;base&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;down&amp;quot;&amp;gt;&lt;br /&gt;
		  &amp;lt;offsetX=&amp;quot;0&amp;quot; offsetY =&amp;quot;-28&amp;quot; delay=&amp;quot;75&amp;quot;/&amp;gt;&lt;br /&gt;
		  &amp;lt;offsetX=&amp;quot;0&amp;quot; offsetY =&amp;quot;-29&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
		  &amp;lt;offsetX=&amp;quot;0&amp;quot; offsetY =&amp;quot;-29&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
		  &amp;lt;offsetX=&amp;quot;0&amp;quot; offsetY =&amp;quot;-28&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
		  &amp;lt;offsetX=&amp;quot;0&amp;quot; offsetY =&amp;quot;-29&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
		  &amp;lt;offsetX=&amp;quot;0&amp;quot; offsetY =&amp;quot;-29&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
...etc...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
static_hairstyles_frames.xml&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;animation direction=&amp;quot;down&amp;quot;&amp;gt;&lt;br /&gt;
	  &amp;lt;frame index=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/animation&amp;gt;&lt;br /&gt;
	&amp;lt;animation direction=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
	  &amp;lt;frame index=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/animation&amp;gt;&lt;br /&gt;
	&amp;lt;animation direction=&amp;quot;up&amp;quot;&amp;gt;&lt;br /&gt;
	  &amp;lt;frame index=&amp;quot;2&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/animation&amp;gt;&lt;br /&gt;
	&amp;lt;animation direction=&amp;quot;right&amp;quot;&amp;gt;&lt;br /&gt;
	  &amp;lt;frame index=&amp;quot;3&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/animation&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
&amp;lt;action name=&amp;quot;dead&amp;quot; imageset=&amp;quot;base&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;animation direction=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;frame index=&amp;quot;4&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;/animation&amp;gt;&lt;br /&gt;
End of file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Standard animated hairstyles===&lt;br /&gt;
&lt;br /&gt;
These are hairstyles that can be compared with hair in SoM or Chrono Trigger, they move as you walk and attack. They have three frames for each direction and death, so thirteen frames all together. These three frames can be devided in a relaxed frame and two extremes. Those two extremes either being up and down or left and right, depending on the hair style. A heavily greased Evil look would wobble up and down as you walk and a pony talk would wave from left to right.&lt;br /&gt;
Standard animated hairstyles hairstyles use the same offset as static ones only they have a different file for defining the frames.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
hairstyle2.xml&lt;br /&gt;
&amp;lt;offsetfile=&amp;quot;hairoffsets.xml&amp;quot;, framefile=&amp;quot;animated_hairstyles_frames.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;sprite variants=&amp;quot;10&amp;quot; variant_offset=&amp;quot;13&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;gender=&amp;quot;both&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;imageset name=&amp;quot;base&amp;quot; src=&amp;quot;graphics/sprites/hairstyle2.png&amp;quot; width=&amp;quot;40&amp;quot; height=&amp;quot;40&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;offsetX=&amp;quot;0&amp;quot; offsetY =&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
animated_hairstyles_frames.xml&lt;br /&gt;
&lt;br /&gt;
&amp;lt;action name=&amp;quot;stand&amp;quot; imageset=&amp;quot;base&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;down&amp;quot;&amp;gt;&lt;br /&gt;
		  &amp;lt;frame index=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
		  &amp;lt;frame index=&amp;quot;3&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;up&amp;quot;&amp;gt;&lt;br /&gt;
		  &amp;lt;frame index=&amp;quot;6&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;right&amp;quot;&amp;gt;&lt;br /&gt;
		  &amp;lt;frame index=&amp;quot;9&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
	&amp;lt;/action&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;action name=&amp;quot;walk&amp;quot; imageset=&amp;quot;base&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;down&amp;quot;&amp;gt;&lt;br /&gt;
		  &amp;lt;frame index=&amp;quot;0&amp;quot; delay=&amp;quot;75&amp;quot;/&amp;gt;&lt;br /&gt;
		  &amp;lt;frame index=&amp;quot;1&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
		  &amp;lt;frame index=&amp;quot;1&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
		  &amp;lt;frame index=&amp;quot;0&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
		  &amp;lt;frame index=&amp;quot;2&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
		  &amp;lt;frame index=&amp;quot;2&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
...etc...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Special case hairstyles===&lt;br /&gt;
And then there are the odd ones, the hairstyles that need a little more freedom. Hairstyles that people want to make wave in the wind, even when the player stands still. Or a birdnest hairstyle with nestlings that constantly open and close their mouth in a random frequency nomatter what you do. I&#039;ll take as example a Medusa hairstyle.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
hairstyle3.xml&lt;br /&gt;
&amp;lt;offsetfile=&amp;quot;hairoffsets.xml&amp;quot;, framefile=0&amp;gt;&lt;br /&gt;
&amp;lt;sprite variants=&amp;quot;10&amp;quot; variant_offset=&amp;quot;13&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;gender=&amp;quot;female&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;imageset name=&amp;quot;base&amp;quot; src=&amp;quot;graphics/sprites/hairstyle3.png&amp;quot; width=&amp;quot;50&amp;quot; height=&amp;quot;60&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;offsetX=&amp;quot;-5&amp;quot; offsetY =&amp;quot;-10&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;animation direction=&amp;quot;down&amp;quot;&amp;gt;&lt;br /&gt;
	  &amp;lt;frame index=&amp;quot;0&amp;quot; delay=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
	  &amp;lt;frame index=&amp;quot;1&amp;quot; delay=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
	  &amp;lt;frame index=&amp;quot;2&amp;quot; delay=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;/animation&amp;gt;&lt;br /&gt;
	&amp;lt;animation direction=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
	  &amp;lt;frame index=&amp;quot;3&amp;quot; delay=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
	  &amp;lt;frame index=&amp;quot;4&amp;quot; delay=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
	  &amp;lt;frame index=&amp;quot;5&amp;quot; delay=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;/animation&amp;gt;&lt;br /&gt;
	&amp;lt;animation direction=&amp;quot;up&amp;quot;&amp;gt;&lt;br /&gt;
	  &amp;lt;frame index=&amp;quot;6&amp;quot; delay=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
	  &amp;lt;frame index=&amp;quot;7&amp;quot; delay=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
	  &amp;lt;frame index=&amp;quot;8&amp;quot; delay=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;/animation&amp;gt;&lt;br /&gt;
	&amp;lt;animation direction=&amp;quot;right&amp;quot;&amp;gt;&lt;br /&gt;
	  &amp;lt;frame index=&amp;quot;9&amp;quot; delay=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
	  &amp;lt;frame index=&amp;quot;10&amp;quot; delay=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
	  &amp;lt;frame index=&amp;quot;11&amp;quot; delay=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;/animation&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
&amp;lt;action name=&amp;quot;dead&amp;quot; imageset=&amp;quot;base&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;animation direction=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;frame index=&amp;quot;12&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This hairstyle showes a bunch of snakes on your head that always wave &#039;n wobble unless you&#039;re dead. The animation rolls asychronusly with the attack and walking animations and it also moves when you stand still. But the offsets are in sync. Special hairstyles might also use their own offsets ofcourse&lt;br /&gt;
I think this pretty much finished my proposal.&lt;/div&gt;</summary>
		<author><name>BasdoMouri</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=Development:Animations&amp;diff=10989</id>
		<title>Development:Animations</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=Development:Animations&amp;diff=10989"/>
		<updated>2008-12-16T21:47:05Z</updated>

		<summary type="html">&lt;p&gt;BasdoMouri: viacdron&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;rocaerc&lt;br /&gt;
{{Category_programming}}&lt;br /&gt;
{{Category_art}}&lt;br /&gt;
{{Status_green}}&lt;br /&gt;
&lt;br /&gt;
== Example of a sprite definition ==&lt;br /&gt;
&lt;br /&gt;
The animations of all sprites are defined by xml documents. Here follows an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;sprite name=&amp;quot;player&amp;quot; action=&amp;quot;stand&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;imageset name=&amp;quot;base&amp;quot; src=&amp;quot;graphics/sprites/player_male_base.png&amp;quot; width=&amp;quot;64&amp;quot; height=&amp;quot;64&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;action name=&amp;quot;stand&amp;quot; imageset=&amp;quot;base&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;down&amp;quot;&amp;gt;&lt;br /&gt;
		  &amp;lt;frame index=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
		  &amp;lt;frame index=&amp;quot;18&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;up&amp;quot;&amp;gt;&lt;br /&gt;
		  &amp;lt;frame index=&amp;quot;36&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;right&amp;quot;&amp;gt;&lt;br /&gt;
		  &amp;lt;frame index=&amp;quot;54&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
	&amp;lt;/action&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;action name=&amp;quot;walk&amp;quot; imageset=&amp;quot;base&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;down&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;frame index=&amp;quot;1&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;frame index=&amp;quot;2&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;frame index=&amp;quot;3&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;frame index=&amp;quot;4&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;frame index=&amp;quot;5&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;frame index=&amp;quot;6&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;sequence start=&amp;quot;19&amp;quot; end=&amp;quot;24&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;up&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;sequence start=&amp;quot;37&amp;quot; end=&amp;quot;42&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;right&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;sequence start=&amp;quot;55&amp;quot; end=&amp;quot;60&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
	&amp;lt;/action&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;action name=&amp;quot;attack&amp;quot; imageset=&amp;quot;base&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;down&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;sequence start=&amp;quot;9&amp;quot; end=&amp;quot;12&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;end /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;sequence start=&amp;quot;27&amp;quot; end=&amp;quot;30&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;end /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;up&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;sequence start=&amp;quot;45&amp;quot; end=&amp;quot;48&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;end /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;right&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;sequence start=&amp;quot;63&amp;quot; end=&amp;quot;66&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;end /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
	&amp;lt;/action&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/sprite&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if you want to load the playerset you just load player.xml and it takes care of loading all related images. Of course delays are defined in milliseconds.&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
&lt;br /&gt;
=== &amp;amp;lt;sprite&amp;amp;gt; ===&lt;br /&gt;
A sprite is an object which can carry several animations, hence we call the root element the &amp;lt;code&amp;gt;sprite&amp;lt;/code&amp;gt;. The sprite tag has two optional properties &amp;lt;code&amp;gt;variants&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;variant_offset&amp;lt;/code&amp;gt;. These are required when there are multiple very similar versions of a sprite in one spriteset. One example for this are the hairset spritesets. The &amp;lt;code&amp;gt;variants&amp;lt;/code&amp;gt; property defines the number of variants in the spriteset and the &amp;lt;code&amp;gt;variant_offset&amp;lt;/code&amp;gt; property how many sprites are between the first sprites of the variants. When defining multiple variants you only define the animation sequences of the first variant. the engine then shifts the index parameters when it needs another.&lt;br /&gt;
&lt;br /&gt;
=== &amp;amp;lt;action&amp;amp;gt; ===&lt;br /&gt;
collection of the animation in different directions that belong to an action the character can perform. the properties are the imageset the animation phases are taken from and the name of the action. &lt;br /&gt;
&lt;br /&gt;
possible names:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
               use-item*&lt;br /&gt;
                   |&lt;br /&gt;
  attack-bow  cast-magic*&lt;br /&gt;
       |           |&lt;br /&gt;
 attack-stab  attack-throw*&lt;br /&gt;
         \     /       &lt;br /&gt;
run*  attack-swing*  sleeping*  dead&lt;br /&gt;
 |          |           |        | &lt;br /&gt;
walk     attack        sit      hurt*&lt;br /&gt;
   \        \          /         /&lt;br /&gt;
               stand&lt;br /&gt;
                 |&lt;br /&gt;
              default&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
this table also specifies the substitution precedence. when a specific name is requested but it is not defined the next lower name is used instead. The actions marked with * can be definde without causing an error but there is no situation in the current client program that triggers them.&lt;br /&gt;
&lt;br /&gt;
=== &amp;amp;lt;animation&amp;amp;gt; ===&lt;br /&gt;
Defines an animation sequence that should be displayed when the sprite object faces in a specific direction (attribute &amp;quot;direction&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
the possible directions are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
up&lt;br /&gt;
down&lt;br /&gt;
left&lt;br /&gt;
right&lt;br /&gt;
default&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
when a specific direction isn&#039;t provided, the default direction is used instead. When no default direction is defined, the first defined direction is used.&lt;br /&gt;
&lt;br /&gt;
Every &amp;lt;code&amp;gt;&amp;lt;animation&amp;gt;&amp;lt;/code&amp;gt; has one or more &amp;lt;code&amp;gt;frame&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;sequence&amp;lt;/code&amp;gt; child elements and an optional &amp;lt;code&amp;gt;&amp;lt;end&amp;gt;&amp;lt;/code&amp;gt; element.&lt;br /&gt;
&lt;br /&gt;
=== &amp;amp;lt;frame&amp;amp;gt; ===&lt;br /&gt;
Defines one frame of the animation. The only required property is &amp;lt;code&amp;gt;index&amp;lt;/code&amp;gt;.  Optional properties include &amp;lt;code&amp;gt;offsetX&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;offsetY&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;delay&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;index&amp;lt;/code&amp;gt; defines the index of the graphic on the spriteset. &lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;delay&amp;lt;/code&amp;gt; property specifies the number of milliseconds the frame is displayed before it is replaced by the next frame in the sequence. The sequence restarts when the last frame is finished. When no delay is specified (or specified as &amp;quot;0&amp;quot;) the animation doesn&#039;t continue when this &amp;lt;code&amp;gt;frame&amp;lt;/code&amp;gt; is reached.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;frame&amp;lt;/code&amp;gt; element has the optional properties &amp;lt;code&amp;gt;offsetX&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;offsetY&amp;lt;/code&amp;gt; to specify an offset from the default drawing position for that frame. This allows the animation of for example the hairset (or any equipment) to reuse the same frames with different offsets.&lt;br /&gt;
&lt;br /&gt;
=== &amp;amp;lt;sequence&amp;amp;gt; ===&lt;br /&gt;
The &amp;lt;code&amp;gt;sequence&amp;lt;/code&amp;gt; tag defines one or more phases of animation. It has the required properties &amp;lt;code&amp;gt;delay&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;end&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;delay&amp;lt;/code&amp;gt; property specifies the delay in milliseconds between each phase. The &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;end&amp;lt;/code&amp;gt; properties define the first and the last indexes of the animation sequence on the spritesheet.&lt;br /&gt;
&lt;br /&gt;
=== &amp;amp;lt;end&amp;amp;gt; ===&lt;br /&gt;
When the animation sequence reaches an &amp;lt;code&amp;gt;end&amp;lt;/code&amp;gt; tag, the animation stops and the sprite animation is returned to the &amp;quot;stand&amp;quot; state. This can be used for one time action sequences like attacking. This tag has no properties.&lt;br /&gt;
&lt;br /&gt;
=== &amp;amp;lt;include&amp;amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Can be used to include another sprite definition file. If you want to override the images, you need to specify them &#039;&#039;before&#039;&#039; the include element. If you want to override any animations, you have to do so &#039;&#039;after&#039;&#039; the include element. Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;sprite&amp;gt;&lt;br /&gt;
 &amp;lt;imageset name=&amp;quot;base&amp;quot; .../&amp;gt;&lt;br /&gt;
 &amp;lt;include file=&amp;quot;other-sprite-file.xml&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;!-- possibly override or introduce new actions --&amp;gt;&lt;br /&gt;
&amp;lt;/sprite&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Suggested additions ==&lt;br /&gt;
{{Status_red}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;amp;lt;random&amp;amp;gt; childtag for &amp;amp;lt;animation&amp;amp;gt; ===&lt;br /&gt;
Also, it includes an experimental suggestion on specifying that a random frame should be chosen. This should also have an exclude_current_frame thingy, to make sure a frame isn&#039;t shown twice or more in a row. Sometimes this may be wanted though.&lt;br /&gt;
&lt;br /&gt;
== Implementation proposal of hairstyles by Modanung ==&lt;br /&gt;
&lt;br /&gt;
I think the current system with an xml file for every hairstyle with an index and offset defined for every frame is a bit too much. It also takes a lot of work to correct small errors and to add new hairstyles that may have a different frame size and with it a different offset.&lt;br /&gt;
I suggest we split hairstyles up in three catagories:&lt;br /&gt;
* Static hairstyles&lt;br /&gt;
* Standard animated hairstyles&lt;br /&gt;
* Special case hairstyles&lt;br /&gt;
On top of the current system we need a variable that defines which gender can use which hairstyles, in every hairstyle&#039;s xml-file.&lt;br /&gt;
&lt;br /&gt;
=== Static hairstyles ===&lt;br /&gt;
&lt;br /&gt;
These are hairstyles which only have one frame for each direction and death, so five. All current hairstyles would be static hairstyles. Every individual static hairstyle needs nothing more to be defined then their bitmap, their size and their offset for each direction.&lt;br /&gt;
The offset for each seperate frame would be defined in a shared file (say hairoffsets.xml), this summed with the individual hairstyle&#039;s offset is the offset for that single frame with that hairstyle. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
hairstyle1.xml&lt;br /&gt;
&amp;lt;offsetfile=&amp;quot;hairoffsets.xml&amp;quot;, framefile=&amp;quot;static_hairstyles_frames.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;sprite variants=&amp;quot;10&amp;quot; variant_offset=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;gender=&amp;quot;male&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;imageset name=&amp;quot;base&amp;quot; src=&amp;quot;graphics/sprites/hairstyle1.png&amp;quot; width=&amp;quot;40&amp;quot; height=&amp;quot;40&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;offsetX=&amp;quot;0&amp;quot; offsetY =&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
hairoffsets.xml&lt;br /&gt;
&lt;br /&gt;
&amp;lt;action name=&amp;quot;stand&amp;quot; imageset=&amp;quot;base&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;down&amp;quot;&amp;gt;&lt;br /&gt;
		  &amp;lt;offsetX=&amp;quot;0&amp;quot; offsetY =&amp;quot;-29&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
		  &amp;lt;offsetX=&amp;quot;-1&amp;quot; offsetY =&amp;quot;-29&amp;quot;/&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;up&amp;quot;&amp;gt;&lt;br /&gt;
		  &amp;lt;offsetX=&amp;quot;-1&amp;quot; offsetY =&amp;quot;-25&amp;quot;/&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;right&amp;quot;&amp;gt;&lt;br /&gt;
		  &amp;lt;offsetX=&amp;quot;1&amp;quot; offsetY =&amp;quot;-29&amp;quot;/&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
	&amp;lt;/action&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;action name=&amp;quot;walk&amp;quot; imageset=&amp;quot;base&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;down&amp;quot;&amp;gt;&lt;br /&gt;
		  &amp;lt;offsetX=&amp;quot;0&amp;quot; offsetY =&amp;quot;-28&amp;quot; delay=&amp;quot;75&amp;quot;/&amp;gt;&lt;br /&gt;
		  &amp;lt;offsetX=&amp;quot;0&amp;quot; offsetY =&amp;quot;-29&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
		  &amp;lt;offsetX=&amp;quot;0&amp;quot; offsetY =&amp;quot;-29&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
		  &amp;lt;offsetX=&amp;quot;0&amp;quot; offsetY =&amp;quot;-28&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
		  &amp;lt;offsetX=&amp;quot;0&amp;quot; offsetY =&amp;quot;-29&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
		  &amp;lt;offsetX=&amp;quot;0&amp;quot; offsetY =&amp;quot;-29&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
...etc...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
static_hairstyles_frames.xml&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;animation direction=&amp;quot;down&amp;quot;&amp;gt;&lt;br /&gt;
	  &amp;lt;frame index=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/animation&amp;gt;&lt;br /&gt;
	&amp;lt;animation direction=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
	  &amp;lt;frame index=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/animation&amp;gt;&lt;br /&gt;
	&amp;lt;animation direction=&amp;quot;up&amp;quot;&amp;gt;&lt;br /&gt;
	  &amp;lt;frame index=&amp;quot;2&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/animation&amp;gt;&lt;br /&gt;
	&amp;lt;animation direction=&amp;quot;right&amp;quot;&amp;gt;&lt;br /&gt;
	  &amp;lt;frame index=&amp;quot;3&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/animation&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
&amp;lt;action name=&amp;quot;dead&amp;quot; imageset=&amp;quot;base&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;animation direction=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;frame index=&amp;quot;4&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;/animation&amp;gt;&lt;br /&gt;
End of file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Standard animated hairstyles===&lt;br /&gt;
&lt;br /&gt;
These are hairstyles that can be compared with hair in SoM or Chrono Trigger, they move as you walk and attack. They have three frames for each direction and death, so thirteen frames all together. These three frames can be devided in a relaxed frame and two extremes. Those two extremes either being up and down or left and right, depending on the hair style. A heavily greased Evil look would wobble up and down as you walk and a pony talk would wave from left to right.&lt;br /&gt;
Standard animated hairstyles hairstyles use the same offset as static ones only they have a different file for defining the frames.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
hairstyle2.xml&lt;br /&gt;
&amp;lt;offsetfile=&amp;quot;hairoffsets.xml&amp;quot;, framefile=&amp;quot;animated_hairstyles_frames.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;sprite variants=&amp;quot;10&amp;quot; variant_offset=&amp;quot;13&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;gender=&amp;quot;both&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;imageset name=&amp;quot;base&amp;quot; src=&amp;quot;graphics/sprites/hairstyle2.png&amp;quot; width=&amp;quot;40&amp;quot; height=&amp;quot;40&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;offsetX=&amp;quot;0&amp;quot; offsetY =&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
animated_hairstyles_frames.xml&lt;br /&gt;
&lt;br /&gt;
&amp;lt;action name=&amp;quot;stand&amp;quot; imageset=&amp;quot;base&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;down&amp;quot;&amp;gt;&lt;br /&gt;
		  &amp;lt;frame index=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
		  &amp;lt;frame index=&amp;quot;3&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;up&amp;quot;&amp;gt;&lt;br /&gt;
		  &amp;lt;frame index=&amp;quot;6&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;right&amp;quot;&amp;gt;&lt;br /&gt;
		  &amp;lt;frame index=&amp;quot;9&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
	&amp;lt;/action&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;action name=&amp;quot;walk&amp;quot; imageset=&amp;quot;base&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;animation direction=&amp;quot;down&amp;quot;&amp;gt;&lt;br /&gt;
		  &amp;lt;frame index=&amp;quot;0&amp;quot; delay=&amp;quot;75&amp;quot;/&amp;gt;&lt;br /&gt;
		  &amp;lt;frame index=&amp;quot;1&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
		  &amp;lt;frame index=&amp;quot;1&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
		  &amp;lt;frame index=&amp;quot;0&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
		  &amp;lt;frame index=&amp;quot;2&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
		  &amp;lt;frame index=&amp;quot;2&amp;quot; delay=&amp;quot;75&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/animation&amp;gt;&lt;br /&gt;
...etc...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Special case hairstyles===&lt;br /&gt;
And then there are the odd ones, the hairstyles that need a little more freedom. Hairstyles that people want to make wave in the wind, even when the player stands still. Or a birdnest hairstyle with nestlings that constantly open and close their mouth in a random frequency nomatter what you do. I&#039;ll take as example a Medusa hairstyle.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
hairstyle3.xml&lt;br /&gt;
&amp;lt;offsetfile=&amp;quot;hairoffsets.xml&amp;quot;, framefile=0&amp;gt;&lt;br /&gt;
&amp;lt;sprite variants=&amp;quot;10&amp;quot; variant_offset=&amp;quot;13&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;gender=&amp;quot;female&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;imageset name=&amp;quot;base&amp;quot; src=&amp;quot;graphics/sprites/hairstyle3.png&amp;quot; width=&amp;quot;50&amp;quot; height=&amp;quot;60&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;offsetX=&amp;quot;-5&amp;quot; offsetY =&amp;quot;-10&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;animation direction=&amp;quot;down&amp;quot;&amp;gt;&lt;br /&gt;
	  &amp;lt;frame index=&amp;quot;0&amp;quot; delay=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
	  &amp;lt;frame index=&amp;quot;1&amp;quot; delay=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
	  &amp;lt;frame index=&amp;quot;2&amp;quot; delay=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;/animation&amp;gt;&lt;br /&gt;
	&amp;lt;animation direction=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
	  &amp;lt;frame index=&amp;quot;3&amp;quot; delay=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
	  &amp;lt;frame index=&amp;quot;4&amp;quot; delay=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
	  &amp;lt;frame index=&amp;quot;5&amp;quot; delay=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;/animation&amp;gt;&lt;br /&gt;
	&amp;lt;animation direction=&amp;quot;up&amp;quot;&amp;gt;&lt;br /&gt;
	  &amp;lt;frame index=&amp;quot;6&amp;quot; delay=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
	  &amp;lt;frame index=&amp;quot;7&amp;quot; delay=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
	  &amp;lt;frame index=&amp;quot;8&amp;quot; delay=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;/animation&amp;gt;&lt;br /&gt;
	&amp;lt;animation direction=&amp;quot;right&amp;quot;&amp;gt;&lt;br /&gt;
	  &amp;lt;frame index=&amp;quot;9&amp;quot; delay=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
	  &amp;lt;frame index=&amp;quot;10&amp;quot; delay=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
	  &amp;lt;frame index=&amp;quot;11&amp;quot; delay=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;/animation&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
&amp;lt;action name=&amp;quot;dead&amp;quot; imageset=&amp;quot;base&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;animation direction=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;frame index=&amp;quot;12&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This hairstyle showes a bunch of snakes on your head that always wave &#039;n wobble unless you&#039;re dead. The animation rolls asychronusly with the attack and walking animations and it also moves when you stand still. But the offsets are in sync. Special hairstyles might also use their own offsets ofcourse&lt;br /&gt;
I think this pretty much finished my proposal.&lt;/div&gt;</summary>
		<author><name>BasdoMouri</name></author>
	</entry>
</feed>