Difference between revisions of "Example xml"

From Starsonata Wiki
Jump to: navigation, search
m (Spelling!)
(edited some of the galaxy xml and comments)
Line 8: Line 8:
 
   <!-- ALL ALL_DRONES TEMPORARY_USER_DRONES and a few others which I still have to look up -->  
 
   <!-- ALL ALL_DRONES TEMPORARY_USER_DRONES and a few others which I still have to look up -->  
 
   <USER_BUILDING permission="TEMPORARY_USER_DRONES"/>
 
   <USER_BUILDING permission="TEMPORARY_USER_DRONES"/>
   <!-- Not sure what these do -->
+
   <!-- Position of the galaxy on the starmap or relative to other gals within an instance -->
  <ID>1</ID>
 
 
   <RPOSX>0</RPOSX>
 
   <RPOSX>0</RPOSX>
 
   <RPOSY>0</RPOSY>
 
   <RPOSY>0</RPOSY>
Line 18: Line 17:
 
   <!-- Only AI above that level may enter the galaxy -->
 
   <!-- Only AI above that level may enter the galaxy -->
 
   <BAD4AI>999</BAD4AI>
 
   <BAD4AI>999</BAD4AI>
   <!-- It is not possible to own the galaxy -->
+
   <!-- Doesn't count towards number of owned gals needed for Emp run -->
 
   <NODOMINATION>1</NODOMINATION>
 
   <NODOMINATION>1</NODOMINATION>
 
 

Revision as of 16:41, 8 April 2011

Example Galaxy:

File: data/customgals/foobargalaxy.xml

<GALAXY>
  <!-- Name of the galaxy, in this case it's called "Hello Galaxy" -->
  <NAME>Hello Galaxy</NAME>
  <!-- Self explanatory. -->
  <!-- ALL ALL_DRONES TEMPORARY_USER_DRONES and a few others which I still have to look up --> 
  <USER_BUILDING permission="TEMPORARY_USER_DRONES"/>
  <!-- Position of the galaxy on the starmap or relative to other gals within an instance -->
  <RPOSX>0</RPOSX>
  <RPOSY>0</RPOSY>
  <!-- Color of the stars in the background, AARRGGBB. In this case, they are red -->
  <STARCOLOR>ffff0000</STARCOLOR>
  <!-- Not sure -->
  <STARDISTANCE>10.000000</STARDISTANCE>
  <!-- Only AI above that level may enter the galaxy -->
  <BAD4AI>999</BAD4AI>
  <!-- Doesn't count towards number of owned gals needed for Emp run -->
  <NODOMINATION>1</NODOMINATION>
	
  <!-- AI team that is present in the galaxy -->
  <!-- id needs to be unique unless it is supposed to be the same team that's somewhere else as well -->
  <!-- Apart from NAME and FLAGIMAGEINDEX, the tags are usually not important -->
  <TEAM id="45">
    <NAME>Earthforce Alliance</NAME>
    <BORN>0</BORN>
    <CREDITS>0</CREDITS>
    <TITHE>0.01</TITHE>
    <TRADES>0</TRADES>
    <TITHETOT>0</TITHETOT>
    <AIBASETRADEIN>0</AIBASETRADEIN>
    <AIBASETRADEOUT>0</AIBASETRADEOUT>
    <BOUNTYMUL>0.000000</BOUNTYMUL>
    <BOUNTYCAP>50000</BOUNTYCAP>
    <SWARMFREQ>120</SWARMFREQ>
    <FLAGIMAGEINDEX>2018</FLAGIMAGEINDEX>
  </TEAM>

  <!-- A wormhole to somewhere -->
  <SOB type="8" typename="Wormhole" id="2">
    <WORMHOLE>
      <SPACEOBJECT>
        <!-- The position of the wormhole, in this case it's 1000 pixel to the right, 2000 pixel to the top -->
        <POS x="1000" y="-2000"/>
	<!-- How big the wormhole is. -->
        <SIZE x="96" y="96"/>
	<!-- How visible the wormhole is. Negative values mean that it's always visible -->
        <VISIBILITY>-100.0</VISIBILITY>
	<!-- Not sure -->
        <BORN>1</BORN>
	<!-- Visages define how something looks. More about them later -->
        <VISAGE typeid="6">
          <VISAGE name="wormholes/warp0-0-0"/>  
	</VISAGE>
      </SPACEOBJECT>
      <!-- Color of the particles when you jump -->
      <JUMPCOLOR>ff6666ff</JUMPCOLOR>
      <!-- Default destination of the wormhole. In this case: nothing. The server will assign it automatically -->
      <NODESTINATION galid="0" holeid="0"/>
    </WORMHOLE>
  </SOB>

  <!-- A sun -->
  <SOB type="3" typename="Sun" id="3">
    <SOLARBODY>
      <SPACEOBJECT>
        <!-- A sun called "Sun", how ironic -->
        <NAME>Sun</NAME>
        <!-- The angle the object starts at -->
        <ANGLE>1.311032</ANGLE>
	<!-- The speed (and direction) with which the object rotates, in radians/milliseconds -->
        <ROTATION>0.000243</ROTATION>
        <!-- 0/0 is the middle of the galaxy -->
        <POS x="0" y="0"/>
        <SIZE x="256" y="256"/>
        <VISIBILITY>-100.000000</VISIBILITY>
        <BORN>1</BORN>
        <!-- How much and how far the sun affects visibility -->
        <ILLUME quant="1.0000" dist="1000.0"/>
        <!-- How the sun looks. In this case, the sun uses the image Sun/Sun8.png -->
        <VISAGE typeid="6">
          <VISAGE typeid="1">
            <FACEPLATE>8</FACEPLATE>
          </VISAGE>
        </VISAGE>
        <!-- If the object has an aura, it's defined here --> 
        <AURALIST>
          <!-- 50% resistance aura to surgical damage with a range of 155. More about auras later -->
          <AURAEMANATION Magnitude="-0.50" Percent="true" NoTweak="true" Range="155.0" PulseFrequency="500" TimeBestowed="1000"
                         Expires="false" Friend="false" Foe="false" Everyone="true" AffectCapShip="true">COP_SURGERY</AURAEMANATION>
	</AURALIST>
      </SPACEOBJECT>
      <DAMAGENUM>10</DAMAGENUM> <!-- sun damage done -->
      <DAMAGEINTERVAL>10000</DAMAGEINTERVAL> <!-- in milliseconds -->
      <CHARGEMULTIPLIER>1.0</CHARGEMULTIPLIER> <!-- for solar panels -->
    </SOLARBODY>
  </SOB>  


Example Visage:

Visages are the most fun part, they define how something looks, including animations and particles.

Basic wormhole:

file: data\visages\wormholes\warp0-0-0.xml

typeid 1 = Indexed Visage - used for most non-ship visages. An indexed visage will take the visage number you give it,
and look for the image on the client side at the location img\sobtype\sobtype#.png - for example an asteroid with indexedvisage(2)
will look for the image in img\asteroid\asteroid2.png

<VISAGE typeid="1">
  <!-- The following tag defines the appearence of the object during 0 and 7500 milliseconds, then resets at 15000 milliseconds. -->
  <!-- In that time period, the image is scaled (80% to 100%) and changes color from white (or no color change) to a transparent, light blue -->
  <ANIMATRIX startTime="0" duration="7500" startSize="0.80" endSize="1.0" rotation="0.0" loop="15000" startColor="ffffffff" 
             endColor="bbbbbbff" offx="0" offy="0" endx="0" endy="0" angle="0.0"/>
 <!-- in the time between 7500 and 15000 milliseconds, the image shrinks (100% to 80%) and changes its color from a transparent, light blue to white again -->


  <ANIMATRIX startTime="7500" duration="7500" startSize="1.0" endSize="0.80" rotation="0.0" loop="15000" startColor="bbbbbbff" 
             endColor="ffffffff" offx="0" offy="0" endx="0" endy="0" angle="0.0"/>

  <FACEPLATE>0</FACEPLATE>
</VISAGE>

Complex wormhole (Red Photon Research Entry Way to Red Photon Research Complex):

typeid 6 = Composite Visage - This is a combined visage, this means you add multiple visages into the same visage and they will
 all get drawn.

typeid 7 = Named Visage - You can pass a specific path location to this type of visage. For example if for some reason you wanted
a base to use a sun graphic, you could give it a named visage with the tag <NAME>Sun/Sun2.png</NAME> and it would use that
graphic instead. You can also put a <MOD> tag on this type of visage for the same effect as a mod visage.

<VISAGE typeid="6">
  <VISAGE typeid="7">
    <ANIMATRIX startTime="0" duration="0" startSize="1.5" endSize="1.5" rotation="-0.001417" loop="0" startColor="ffffffff"
               endColor="ffffffff" offx="0" offy="0" endx="0" endy="0"/>
    <NAME>fx/nebula2</NAME>
    <MOD>ffffffff</MOD> 
  </VISAGE>
  <VISAGE typeid="7">
    <ANIMATRIX startTime="0" duration="0" startSize="1.2" endSize="1.2" rotation="0.001417" loop="0" startColor="ffffffff"
               endColor="ffffffff" offx="0" offy="0" endx="0" endy="0"/>
    <NAME>fx/nebula2</NAME>
    <MOD>ffffffff</MOD>
  </VISAGE>
  <VISAGE typeid="7">
    <NAME>Wormhole/gray1</NAME>
    <MOD>ff0099ff</MOD>
  </VISAGE>
  <VISAGE typeid="7">
    <ANIMATRIX startTime="0" duration="50" startSize="1.000000" endSize="1.100000" rotation="0.000000" loop="5800" 
               startColor="ffffffff" endColor="ffffffff" offx="0" offy="0" endx="0" endy="0"/>
    <!-- the color "1" is no change, the color "2" is invisible -->
    <ANIMATRIX startTime="50" duration="5750" startSize="1.100000" endSize="1.000000" rotation="0.001110" loop="5800"
               startColor="1" endColor="2" offx="0" offy="0" endx="0" endy="0"/>
    <NAME>fx/lightning1</NAME>
    <MOD>ffffffff</MOD>
  </VISAGE>
</VISAGE>