Difference between revisions of "XML/Splash particle"

From MegaGlest
Jump to navigation Jump to search
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<?xml version="1.0" standalone="yes"?>
+
Splash particle systems are most commonly used to create special effects from a unit being attacked.
*<splash-particle-system>
+
<?xml version="1.0" standalone="yes"?>
**    <texture value="true|false" path=".../texture_name.bmp" luminance="true"/>
+
<splash-particle-system>
**    <model value="true|false" path=".../model_name.g3d"/>
+
                                      <font color="green">&lt;!-- An optional texture used for each particle (what does luminance do exactly?) --&gt;</font>
** <primitive value="quad|line"/>
+
    <texture value="true|false" path=".../texture_name.bmp" luminance="true"/>
** <offset x="0" y="0" z="0"/> ??
+
                                      <font color="green">&lt;!-- An optional model can be used. --&gt;</font>
** <color red="0.0" green="0.0" blue="1.0" alpha="0.5" /> Colors at epicentre
+
    <model value="true|false" path=".../model_name.g3d"/>
** <color-no-energy red="1.0" green="1.0" blue="1.0" alpha="0.0" /> Colors at edge
+
    <primitive value="quad|line"/>  <font color="green">&lt; This shows the shape of the particle.  Line is like a line, quad is like a circle. --&gt;</font>
**    <size value="1" /> Particle start size (center)
+
    <offset x="0" y="0" z="0"/>     <font color="green">&lt;!-- This can offset the entire splash from directly in front of the end of the projection where it would normally end. --&gt;</font>
**    <size-no-energy value="2" /> Ending particle size
+
                                      <font color="green">&lt;!-- Colors at epicentre (specifically of a particle when it's first created) --&gt;</font>
**    <speed value="5" /> The Maximum Radius of the explosion
+
    <color red="0.0" green="0.0" blue="1.0" alpha="0.5" />
** <gravity value="0"/> Gravity effects
+
                                      <font color="green">&lt;!-- Colors at edge (specifically, the color the particle will become when it runs
**    <emission-rate value="20" /> How many particles are emitted
+
                                          out of energy) --&gt;</font>
**    <energy-max value="30" /> Energy
+
    <color-no-energy red="1.0" green="1.0" blue="1.0" alpha="0.0" />
**    <energy-var value="10" /> Variation
+
    <size value="1" />               <font color="green">&lt;!-- Particle start size (center) --&gt;</font>
** <emission-rate-fade value="1"/> Particles last longer with a lower number / disappear quicker with a higher number
+
    <size-no-energy value="2" />     <font color="green">&lt;!-- Ending particle size --&gt;</font>
** <vertical-spread a="0" b="0"/> direction splash goes after hitting
+
    <speed value="5" />             <font color="green">&lt;!-- The Maximum Radius of the explosion --&gt;</font>
** <horizontal-spread a="1" b="0"/> direction splash goes after hitting
+
    <gravity value="0"/>             <font color="green">&lt;!-- Gravity effects --&gt;</font>
*</splash-particle-system>
+
    <emission-rate value="20" />     <font color="green">&lt;!-- How many particles are emitted --&gt;</font>
 +
    <energy-max value="30" />       <font color="green">&lt;!-- Energy --&gt;</font>
 +
    <energy-var value="10" />       <font color="green">&lt;!-- Variation --&gt;</font>
 +
    <emission-rate-fade value="1"/> <font color="green">&lt;!-- Particles last longer with a lower number / disappear quicker with a higher
 +
                                          number --&gt;</font>
 +
    <vertical-spread a="0" b="0"/>   <font color="green">&lt;!-- Direction splash goes after hitting --&gt;</font>
 +
    <horizontal-spread a="1" b="0"/> <font color="green">&lt;!-- Direction splash goes after hitting --&gt;</font>
 +
</splash-particle-system>
 +
 
 +
'''Clarifications''': The energy value is actually the number of server frames (40 per second) the particle will be "alive."  As the particle reaches it's end of life, the color will transition from the value specified by &lt;color&gt; to the value specified by &lt;color-no-energy&gt;.  Similarly, the size of each particle starts out the value specified by &lt;size&gt; and gradually decreases to &lt;size-no-energy&gt; as it runs out of energy.  (And please do correct any of this if you find it to be inaccurate.)
 +
 
 +
Back to [[XML_Definitions]]

Revision as of 07:55, 1 December 2008

Splash particle systems are most commonly used to create special effects from a unit being attacked.

<?xml version="1.0" standalone="yes"?>
<splash-particle-system>
                                     <!-- An optional texture used for each particle (what does luminance do exactly?) -->
    <texture value="true|false" path=".../texture_name.bmp" luminance="true"/>
                                     <!-- An optional model can be used. -->
    <model value="true|false" path=".../model_name.g3d"/>
    <primitive value="quad|line"/>   < This shows the shape of the particle.  Line is like a line, quad is like a circle. -->
    <offset x="0" y="0" z="0"/>      <!-- This can offset the entire splash from directly in front of the end of the projection where it would normally end. -->
                                     <!-- Colors at epicentre (specifically of a particle when it's first created) -->
    <color red="0.0" green="0.0" blue="1.0" alpha="0.5" />
                                     <!-- Colors at edge (specifically, the color the particle will become when it runs
                                          out of energy) -->
    <color-no-energy red="1.0" green="1.0" blue="1.0" alpha="0.0" />
    <size value="1" />               <!-- Particle start size (center) -->
    <size-no-energy value="2" />     <!-- Ending particle size -->
    <speed value="5" />              <!-- The Maximum Radius of the explosion -->
    <gravity value="0"/>             <!-- Gravity effects -->
    <emission-rate value="20" />     <!-- How many particles are emitted -->
    <energy-max value="30" />        <!-- Energy -->
    <energy-var value="10" />        <!-- Variation -->
    <emission-rate-fade value="1"/>  <!-- Particles last longer with a lower number / disappear quicker with a higher
                                          number -->
    <vertical-spread a="0" b="0"/>   <!-- Direction splash goes after hitting -->
    <horizontal-spread a="1" b="0"/> <!-- Direction splash goes after hitting -->
</splash-particle-system>

Clarifications: The energy value is actually the number of server frames (40 per second) the particle will be "alive." As the particle reaches it's end of life, the color will transition from the value specified by <color> to the value specified by <color-no-energy>. Similarly, the size of each particle starts out the value specified by <size> and gradually decreases to <size-no-energy> as it runs out of energy. (And please do correct any of this if you find it to be inaccurate.)

Back to XML_Definitions