DD/Misc/OA/FIFE path system

From Unknown Horizons

Jump to: navigation, search
Image:Note.png

This page is part of the Unknown Horizons design document. Please discuss everything concerning this topic on the "discussion" tab of this page. If you´re not sure whether your ideas are fitting the Unknown Horizons style, either use the discussion page, talk to us, or edit the "Questions" section of this page, but please don´t directly edit the other parts.


First of all some graphic to visually describe the OA/FIFE path system. The polar coordinate system is used (http://en.wikipedia.org/wiki/Polar_coordinate_system). Have a look at the image by means of it the file "MainShip.xml" is explained.

[[Stupid you, LinuxDonald. Embedding a german text in an image is pretty useless for a translation.]]

Image:Oa-mainhip-ani.jpg

Image text translation: A path/animation example based on the mainships from Unknown Horizons to illustrate how this is structured.

Content of MainShip.xml:

<?xml version="1.0"?>
<dataset id="mainship_ani" type="Embedded" format="1.0">
       <object id="mainship_ani" blocking="1">
               <action id="walk">
                       <animation source="openanno/datasets/sprites/ships/animations/mainship/mainship0.xml" direction='0' />
                       <animation source="openanno/datasets/sprites/ships/animations/mainship/mainship1.xml" direction='45' />
                       <animation source="openanno/datasets/sprites/ships/animations/mainship/mainship2.xml" direction='90' />
                       <animation source="openanno/datasets/sprites/ships/animations/mainship/mainship3.xml" direction='135' />
                       <animation source="openanno/datasets/sprites/ships/animations/mainship/mainship4.xml" direction='180' />
                       <animation source="openanno/datasets/sprites/ships/animations/mainship/mainship5.xml" direction='225' />
                       <animation source="openanno/datasets/sprites/ships/animations/mainship/mainship6.xml" direction='270' />
                       <animation source="openanno/datasets/sprites/ships/animations/mainship/mainship7.xml" direction='315' />
               </action>
       </object>
</dataset>


<?xml version="1.0"?>
This line appears in every XML file.


<dataset id="mainship_ani" type="Embedded" format="1.0">
id:
Contains the ID (identification) i.e. the Name of the file. This could be as well id="ships" where you might register several ships in one file. (Currently there are individual files for every ship or other object in OA to make it easier to find errors.)
type:
Description missing.
format:
Most likely the detail of the formatting version.


<object id="mainship_ani" blocking="1">
id:
The name/identification of the ship (object) or its animation is placed here. Thus makes it possible to fetch the object into the game. For example placing it on a map making the object/animation being displayed or started at a certain position.
blocking:
Blocking is for determining wether an object or tile can be passed by units or houses can be build on. Some simple example: Having a wall you do not want it to be passed by enemy units and consequently blocking has to be activated.
The following two options are available
blocking="0" //deactivated
blocking="1" //activated
<action id="walk">
id:
The name/identification of an action. Like the id in <object> the individual ID makes it possible to fetch the data for an certain action into the game.
For "idle":
Displayed image/animation when the object is not moving.
For "walk":
Displayed animation when object is moving normal.
For "ship": (will be used soon in OA - might be called "sail" as well)
Displayed animation for a moving ship.
<animation source="openanno/datasets/sprites/ships/animations/mainship/mainship0.xml" direction='0' />
animation source:
The correct path to the single animation datasets where the path to the single animation images is determined. Those datasets/images are bond to the final animation by the FIFEngine automatically in game.
direction:
Having 8 different directions to be considered for animations it has to be determined which animation is played when an object is moving into a certain direction.
Personal tools
Unknown Horizons
Design Document