Difference between revisions of "HowTo:Make Weapons"

From VsWiki
Jump to: navigation, search
(Beam: expanded field descriptions)
(Beam: addded code tags)
Line 20: Line 20:
 
{{fixme}} ''ADD DESCRIPTIONS TO SCHEMA''
 
{{fixme}} ''ADD DESCRIPTIONS TO SCHEMA''
 
===Beam===
 
===Beam===
'''<beam ... >'''
+
<code><'''beam''' ... ></code>
** '''name'''
+
** <code>name</code>
** '''mountsize'''
+
** <code>mountsize</code>
* '''<Energy ... />'''
+
* <code><'''Energy''' ... /></code>
** '''rate''' - Energy requirement/second, in units of 100s of MJ
+
** <code>rate</code> - Energy requirement/second, in units of 100s of MJ
** '''stability''' - Maximum continuous firing duration
+
** <code>stability</code> - Maximum continuous firing duration
** '''refire''' - Rest time, in seconds, between firing
+
** <code>refire</code> - Rest time, in seconds, between firing
** '''locktime''' - N/A for beams
+
** <code>locktime</code> - N/A for beams
* '''<Damage ... />'''
+
* <code><'''Damage''' ... /></code>
** '''rate''' - Damage output/second, in units of 5.4 MJ
+
** <code>rate</code> - Damage output/second, in units of 5.4 MJ
** '''phasedamage''' - Damage/second, in units of 5.4 MJ that ignores shields
+
** <code>phasedamage</code> - Damage/second, in units of 5.4 MJ that ignores shields
** '''longrange''' - Fraction of damage applied at max range
+
** <code>longrange</code> - Fraction of damage applied at max range
* '''<Distance ... />'''
+
* <code><'''Distance''' ... /></code>
** '''speed''' - Speed at which beam travels linearly through space, in meters/second (usually rather fast)
+
** <code>speed</code> - Speed at which beam travels linearly through space, in meters/second (usually rather fast)
** '''radialspeed''' - Speed at which beam reaches full radius, and full damage, in meters/second
+
** <code>radialspeed</code> - Speed at which beam reaches full radius, and full damage, in meters/second
** '''radius''' - Beam radius, in meters
+
** <code>radius</code> - Beam radius, in meters
** '''length''' - N/A for beams
+
** <code>length</code> - N/A for beams
** '''pulsespeed''' - Controls visual wave effect in beam
+
** <code>pulsespeed</code> - Controls visual wave effect in beam
** '''range''' - Max damaging range, in meters
+
** <code>range</code> - Max damaging range, in meters
** '''detonationrange''' - N/A for beams
+
** <code>detonationrange</code> - N/A for beams
** '''volume''' - N/A for beams
+
** <code>volume</code> - N/A for beams
* '''<Appearance ... />'''
+
* <code><'''Appearance''' ... /></code>
** '''file'''
+
** <code>file</code>
** '''soundwav'''
+
** <code>soundwav</code>
** '''r'''
+
** <code>r</code>
** '''g'''
+
** <code>g</code>
** '''b'''
+
** <code>b</code>
** '''a'''
+
** <code>a</code>
  
 
===Bolt===
 
===Bolt===

Revision as of 14:15, 9 April 2005

arrow_left.png MOD arrow_up.png HowTo Add Upgrades arrow_right.png

MAKING WEAPONS

Weapon descriptons are stored in the weapon_list.xml in the data directory.

Weapons are classed as FIXME DIFFERENCES BETWEEN CATEGORIES

  • Beam
  • Bolt
  • Ball
  • Missile


Weapon XML Schema

FIXME ADD DESCRIPTIONS TO SCHEMA

Beam

<beam ... >

    • name
    • mountsize
  • <Energy ... />
    • rate - Energy requirement/second, in units of 100s of MJ
    • stability - Maximum continuous firing duration
    • refire - Rest time, in seconds, between firing
    • locktime - N/A for beams
  • <Damage ... />
    • rate - Damage output/second, in units of 5.4 MJ
    • phasedamage - Damage/second, in units of 5.4 MJ that ignores shields
    • longrange - Fraction of damage applied at max range
  • <Distance ... />
    • speed - Speed at which beam travels linearly through space, in meters/second (usually rather fast)
    • radialspeed - Speed at which beam reaches full radius, and full damage, in meters/second
    • radius - Beam radius, in meters
    • length - N/A for beams
    • pulsespeed - Controls visual wave effect in beam
    • range - Max damaging range, in meters
    • detonationrange - N/A for beams
    • volume - N/A for beams
  • <Appearance ... />
    • file
    • soundwav
    • r
    • g
    • b
    • a

Bolt

Ball

Missile

Weapon AI's

Example 1: Beam Weapon

<Beam name="LR_PminusBeamMKIV" mountsize="capship-massive">
  <Energy rate="1500" stability="8" refire="2" /> 
  <Damage rate="15000" longrange=".8" /> 
  <Distance speed="300000" radialspeed="60" radius="60" length="8" pulsespeed="36" range="150000" /> 
  <Appearance file="weapons/heavylaserbeam.png" soundwav="beam1.wav" r=".6" g=".1" b=".8" a=".6" /> 
</Beam>

Example 2: Spinning Weapon


you can make it spin as well by making it an accessory of the missle:

  • you make it a subunit (turret) at the center (i.e call it torpedo_accessory)
  • set the max_yaw, max_pitch, and max_roll to whatever you want it to spin at
  • make an invisible (or torpedo casing) main body

voilla--you have a photon torpedo


See also


arrow_left.png MOD arrow_up.png HowTo Add Upgrades arrow_right.png