Difference between revisions of "HowTo:Edit units.csv"

From VsWiki
Jump to: navigation, search
(links fix)
 
(33 intermediate revisions by 9 users not shown)
Line 1: Line 1:
 
{{NAV_Manual |
 
{{NAV_Manual |
| previous=[[HowTo:Create Ships in Wings3D|Create Ships in Wings3D]]
+
| previous=[[HowTo:Add Per Pixel Lighting|Add Per Pixel Lighting]]
| up=[[HowTo]]
+
| up=[[HowTos]]
 
| next=[[HowTo:Edit Unit Files|Edit Unit Files]]
 
| next=[[HowTo:Edit Unit Files|Edit Unit Files]]
 
}}
 
}}
 
----
 
----
 
{{attention}}
 
{{attention}}
=UNITS.CSV=
 
The '''[http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/vegastrike/data4.x/units/units.csv?rev=HEAD&content-type=text/vnd.viewcvs-markup Units.csv]''' file contains specific information on all [[Vessels & Installations|Vessels and Installations]] and [[Upgrades|Upgrades]] in VegaStrike.
 
  
==Units File==
+
The {{CVS:units.csv}} file contains specific information on all [[Vessels & Installations|Vessels and Installations]] and [[Upgrades|Upgrades]] in VegaStrike. This has replaced the <code>[[HowTo:Edit Unit Files|xunit.xml]]</code> files.
The '''[http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/vegastrike/data4.x/units/units.csv?rev=HEAD&content-type=text/vnd.viewcvs-markup units.csv]''' is a comma delimited text file which can be edited with any spreadsheet program.
 
  
NOTE: Microsoft Works has problems with the long description columns. For a free alternative, use [http://www.openoffice.org OpenOffice].
+
=The <code>units.csv</code> file=
 +
The {{CVS:units.csv}} is a comma delimited text file which can be edited with any spreadsheet program.
  
===Columns in Units File===
+
NOTE: Microsoft Works has problems with the long description columns.  For a free alternative, try [http://www.openoffice.org OpenOffice].
The original desciption of the xunit syntax from hellcatv is located in [http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/vegastrike/data/units/description.xunit?rev=HEAD&content-type=text/vnd.viewcvs-markup CVS]
 
  
The columns of the units.csv file and their description are;
+
==Columns in the <code>units.csv</code> file==
*Key
+
The original description of the xunit syntax from hellcatv is located in [http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/vegastrike/data/units/description.xunit?view=log CVS].  The columns of the {{CVS:units.csv}} file and their description are;
*Directory
+
{{Fixme}} ''Copy Descriptions from [[HowTo:Edit Unit Files]]''
*Name
 
*FoFID
 
*Object_Type
 
*Combat_Role
 
*Textual_Description
 
*Hud_image
 
*Unit_Scale
 
*Cockpit
 
**CockpitX
 
**CockpitY
 
**CockpitZ
 
*Mesh
 
**Shield_Mesh
 
**Rapid_Mesh
 
**BSP_Mesh
 
**Use_BSP
 
**Use_Rapid
 
*Mass
 
*Moment_Of_Inertia
 
*Convex_Hull_Volume
 
*Fuel_Capacity
 
*Hull
 
**Armor_Front_Top_Right
 
**Armor_Front_Top_Left
 
**Armor_Front_Bottom_Right
 
**Armor_Front_Bottom_Left
 
**Armor_Back_Top_Right
 
**Armor_Back_Top_Left
 
**Armor_Back_Bottom_Right
 
**Armor_Back_Bottom_Left
 
**Shield_Front_Top_Right
 
**Shield_Back_Top_Left
 
**Shield_Front_Bottom_Right
 
**Shield_Front_Bottom_Left
 
**Shield_Back_Top_Right
 
**Shield_Front_Top_Left
 
**Shield_Back_Bottom_Right
 
**Shield_Back_Bottom_Left
 
**Shield_Recharge
 
**Shield_Leak
 
*Warp_Capacitor
 
*Primary_Capacitor
 
*Reactor_Recharge
 
*Jump_Drive_Present
 
*Jump_Drive_Delay
 
*Wormhole
 
*Outsystem_Jump_Cost
 
*Warp_Usage_Cost
 
*Afterburner_Type
 
*Afterburner_Usage_Cost
 
*Maneuver_Yaw
 
*Maneuver_Pitch
 
*Maneuver_Roll
 
*Yaw_Governor
 
*Pitch_Governor
 
*Roll_Governor
 
*Afterburner_Accel
 
*Forward_Accel
 
*Retro_Accel
 
*Left_Accel
 
*Right_Accel
 
*Top_Accel
 
*Bottom_Accel
 
*Afterburner_Speed_Governor
 
*Default_Speed_Governor
 
*ITTS
 
*Radar_Color
 
*Radar_Range
 
*Tracking_Cone
 
*Max_Cone
 
*Lock_Cone
 
*Hold_Volume
 
*Can_Cloak
 
*Cloak_Min
 
*Cloak_Rate
 
*Cloak_Energy
 
*Cloak_Glass
 
*Repair_Droid
 
*ECM_Rating
 
*ECM_Resist
 
*Ecm_Drain
 
*Hud_Functionality
 
*Max_Hud_Functionality
 
*Lifesupport_Functionality
 
*Max_Lifesupport_Functionality
 
*Comm_Functionality
 
*Max_Comm_Functionality
 
*FireControl_Functionality
 
*Max_FireControl_Functionality
 
*SPECDrive_Functionality
 
*Max_SPECDrive_Functionality
 
*Slide_Start
 
*Slide_End
 
*Activation_Accel
 
*Activation_Speed
 
*Upgrades
 
*Prohibited_Upgrades
 
*Sub_Units
 
*Sound
 
*Light
 
*Mounts
 
*Net_Comm
 
*Dock
 
*Cargo_Import
 
*Cargo
 
*Explosion
 
*Equipment_Space
 
*Num_Animation_Stages
 
*Upgrade_Storage_Volume
 
*Heat_Sink_Rating
 
  
 +
* Key ''(Key)''
 +
* Directory ''(String)''
 +
* Name ''(string)''
 +
* STATUS ''(string)'' - Development status, for internal use only.
 +
* <s>FoFID ''(string)''</s> (currently is not supported)
 +
* Object_Type ''(string)''
 +
* Combat_Role ''(string)'' - combat role that the ship has. It selects the row in [http://vegastrike.svn.sourceforge.net/viewvc/vegastrike/trunk/data/ai/VegaEvents.csv?view=log ai/VegaEvents.csv] and [http://vegastrike.svn.sourceforge.net/viewvc/vegastrike/trunk/data/ai/VegaPriorities.csv?view=log ai/VegaPriorities.csv] tables, defining the action choice and target priorities.
 +
* Textual_Description ''(string)''
 +
* Hud_image ''(string)'' - HUD image, a sprite format file. Extension <code>.spr</code>. See also [[HowTo:Edit HUDs]].
 +
* Unit_Scale ''(float)'' - Sets the scaling of the unit in the game
 +
* Cockpit ''(string)'' - Defines a cockpit for the ship. Points to a cockpit file. Extension <code>.cpt</code>. See also [[HowTo:Edit HUDs]].
 +
* CockpitX ''(x=float)'' - Coordinates where the Cockpit should be in the Unit/Ship
 +
* CockpitY ''(y=float)'' - Coordinates where the Cockpit should be in the Unit/Ship
 +
* CockpitZ ''(z=float(meters))'' - Coordinates where the Cockpit should be in the Unit/Ship
 +
* Mesh <code>({filename(string);frame(int);texturetime(float)})</code>
 +
** filename - Points to a xmesh-file of the ship. Extension <code>.xmesh</code>
 +
** frame - ('''optional''') Defines the starting-frame of a mesh animation. See [http://forums.vega-strike.org/viewtopic.php?p=9688#9688 forums] for more.
 +
** texturetime - ('''optional''') Defines the starting delay of a mesh animation. See [http://forums.vega-strike.org/viewtopic.php?p=9688#9688 forums] for more.
 +
** Example: <code>{llama.bfxm;;}</code>
 +
* Shield_Mesh ''(string)'' - ('''optional''') xmesh-file to use for the shield instead of a sphere. Extension <code>.xmesh</code>
 +
* Rapid_Mesh ''(string)'' - ('''optional''') xmesh-file to load and use for collisions with other units/ships/... instead of the Meshfile from above (not drawn) Extension <code>.xmesh</code>
 +
* BSP_Mesh ''(string)'' - ('''optional''') xmesh-file to use for beam and bolt collisions (not drawn) Extension <code>.xmesh</code>
 +
* Use_BSP ''(boolean)''
 +
* Use_Rapid ''(boolean)''
 +
* Mass ''(metric tons)'' - mass in metric tonnes (kkg)
 +
* Moment_Of_Inertia ''(metric tons * meters*meters)''
 +
* <s>Convex_Hull_Volume ''(meters * meters * meters)''</s>  (currently is not supported)
 +
* Fuel_Capacity ''(metric tons)''
 +
* Hull ''(VSD)'' - Specifies the ships Hull durability
 +
* Armor_Front_Top_Right ''(VSD)'' - Specifies the ships physical armor
 +
* Armor_Front_Top_Left ''(VSD)'' - Specifies the ships physical armor
 +
* Armor_Front_Bottom_Right ''(VSD)'' - Specifies the ships physical armor
 +
* Armor_Front_Bottom_Left ''(VSD)'' - Specifies the ships physical armor
 +
* Armor_Back_Top_Right ''(VSD)'' - Specifies the ships physical armor
 +
* Armor_Back_Top_Left ''(VSD)'' - Specifies the ships physical armor
 +
* Armor_Back_Bottom_Right ''(VSD)'' - Specifies the ships physical armor
 +
* Armor_Back_Bottom_Left ''(VSD)'' - Specifies the ships physical armor
 +
* Shield_Front_Top_Right ''(VSD)'' - Specifies the ships Shield (electric armor). Used for all shields.
 +
* Shield_Back_Top_Left ''(VSD)'' - Specifies the ships Shield (electric armor). Used for all shields.
 +
* Shield_Front_Bottom_Right ''(VSD)'' - Specifies the ships Shield (electric armor). Not used for dual shields.
 +
* Shield_Front_Bottom_Left ''(VSD)'' - Specifies the ships Shield (electric armor). Not used for dual shields.
 +
* Shield_Back_Top_Right ''(VSD)'' - Specifies the ships Shield (electric armor). Not used for dual or quad shields.
 +
* Shield_Front_Top_Left ''(VSD)'' - Specifies the ships Shield (electric armor). Not used for dual or quad shields.
 +
* Shield_Back_Bottom_Right ''(VSD)'' - Specifies the ships Shield (electric armor). Not used for dual or quad shields.
 +
* Shield_Back_Bottom_Left ''(VSD)'' - Specifies the ships Shield (electric armor). Not used for dual or quad shields.
 +
* Shield_Recharge ''(VSD/second)'' - Shield regeneration if not violating speed limit
 +
* Shield_Leak ''(percentage)'' - ('''optional''') how much leak these shields have (usually 0%)
 +
* Warp_Capacitor ''(800MJ)'' - SPEC energy storage, fuel with "WC Fuel Hack" on (see [[Manual:Config:Advanced:Variables#.22physics.22_section|<code>physics/fuel_equals_warp</code>]])
 +
* Primary_Capacitor ''(100MJ)''
 +
* Reactor_Recharge ''(100MJ/s)''
 +
* Jump_Drive_Present ''(Boolean )'' - boolean whether the jump drive is missing (assumed missing in absence of tag)
 +
* Jump_Drive_Delay ''(seconds)'' - seconds before jump drive initiates
 +
* Wormhole ''(boolean)'' - forces units to teleport upon touching this one
 +
* Outsystem_Jump_Cost ''(800MJ)'' - energy to use a wormhole
 +
* Warp_Usage_Cost ''(800MJ/second)'' - energy to teleport or use SPEC (the latter divided by [[Manual:Config:Advanced:Variables#.22physics.22_section|<code>physics/warpbleed</code>]])
 +
* Afterburner_Type ''(int type )'' - Specifies the ships engine. Type 1 uses fuel, 0 - reactor energy, 2 - jump fuel, 3 - "NO AFTERBURNER".
 +
* Afterburner_Usage_Cost ''(100MJ/s)''
 +
* Maneuver_Yaw ''(metric tons*degrees/second^2)'' -  Specifies the ships angular acceleration
 +
* Maneuver_Pitch ''(metric tons*degrees/second^2)'' -  Specifies the ships angular acceleration
 +
* Maneuver_Roll ''(metric tons*degrees/second^2)'' -  Specifies the ships angular acceleration
 +
* Yaw_Governor ''(degrees/sec)''  - maximum yaw
 +
* Pitch_Governor ''(degrees/sec)'' - maximum pitch
 +
* Roll_Governor ''(degrees/sec)'' - maximum roll
 +
* Afterburner_Accel ''(metric tons*m/s^2)'' - Thrust with afterburners
 +
* Forward_Accel ''(metric tons*m/s^2)'' - Thrust without afterburners
 +
* Retro_Accel ''(metric tons*m/s^2)'' - Reverse thrust
 +
* Left_Accel ''(metric tons*m/s^2)'' - Left thrust
 +
* Right_Accel ''(metric tons*m/s^2)'' - Right thrust 
 +
* Top_Accel ''(metric tons**m/s^2)'' - Top thrust 
 +
* Bottom_Accel ''(metric tons*m/s^2)'' - Bottom thrust 
 +
* Afterburner_Speed_Governor ''(meters/second)''  - Max safe speed with afterburners
 +
* Default_Speed_Governor ''(meters/second)'' - Max safe speed without afterburner
 +
* ITTS ''(boolean)'' - if the unit has ability to target track with lead
 +
* Radar_Color ''(boolean)'' - if unit has color radar
 +
* Radar_Range ''(meters)'' - maximum range of radar
 +
* Tracking_Cone ''(Degrees)'' - cone in which [[Manual:Combat:Target_tracking|autotracking]] works
 +
* Max_Cone ''(Degrees)'' - cone in which the radar sees objects. Usually is set to 180 (i.e. the full sphere).
 +
* Lock_Cone ''(Degrees)'' - cone in which missiles gain locking time
 +
* Hold_Volume ''(m^3)'' - volume in cargo units
 +
* Can_Cloak ''(boolean)''
 +
* Cloak_Min ''(percentage)'' - minimum percentage of cloakedness
 +
* Cloak_Rate ''(percentage/second)'' - time per second to cloak
 +
* Cloak_Energy ''(800MJ/s)'' - how much energy this takes.
 +
* Cloak_Glass ''(boolean)'' - boolean whether or not effect 2 is used
 +
* Repair_Droid ''(int)'' - defines the speed of repairs. Repair time = [[Manual:Config:Advanced:Variables#.22physics.22_section|<code>physics/RepairDroidTime</code>]]*(remained functionality)/Repair_Droid. Also, critical hits to the repair system decrease this by one.
 +
* ECM_Rating ''(int)'' - each simulation frame, the probability of missile losing the protected target is proportional to this.
 +
* ECM_Resist ''(int)'' {{FIXME}} - currently does nothing.
 +
* Ecm_Drain ''(800MJ/s)'' {{FIXME}} - currently does nothing.
 +
* Hud_Functionality ''(1 normalized fraction)''
 +
* Max_Hud_Functionality ''(1 normalized fraction)''
 +
* Lifesupport_Functionality ''(1 normalized fraction)''
 +
* Max_Lifesupport_Functionality ''(1 normalized fraction)''
 +
* Comm_Functionality ''(1 normalized fraction)''
 +
* Max_Comm_Functionality ''(1 normalized fraction)''
 +
* FireControl_Functionality ''(1 normalized fraction)''
 +
* Max_FireControl_Functionality ''(1 normalized fraction)''
 +
* SPECDrive_Functionality ''(1 normalized fraction)''
 +
* Max_SPECDrive_Functionality ''(1 normalized fraction)''
 +
* Slide_Start ''(seconds)'' - ('''optional''') number of tenths of seconds before fully reacting to keyboard (smoothing)
 +
* Slide_End ''(seconds)''  - ('''optional''') number of tenths of seconds to stop
 +
* Activation_Accel ''(m/s^2)'' {{FIXME}} - currently does nothing.
 +
* Activation_Speed ''(m/s)'' {{FIXME}} - currently does nothing.
 +
* Upgrades <code>({filename(string);mountoffset(int);subunoffset(int)})</code>
 +
** filename -
 +
** mountoffset -
 +
** subunoffset -
 +
** Example: <code>{skyscope1;;}{capacitor02;;}{reactor02;;}{spec_capacitor01;;}{quadshield02;;}{armor01;;}</code>
 +
* Prohibited_Upgrades ''(Semicolon delineated list of prohibited upgrades, allowing up to a certain number if specified with colon.)''
 +
* Sub_Units <code>({filename(string);x(meters);y(meters);z(meters);forex(meters);forey(meters);forez(meters);upx(meters);upy(meters);upz(meters);restricted(meters)})</code> - A Subunit is a (not necessarily) small independant part of your unit. In fact the main unit and the subunit are two different ships (units) patched together at a certain point (x,y,z see below). If a subunit is destroyed the remaining parts will fly into space like the remainings of any other ship ... e.g turrets
 +
** filename - unit file that can be referenced from toplevel units
 +
** x, y, z -  location of subunit
 +
** forex, forey, forez - ('''optional''') Forward vector of subunit (assume 0,0,1)
 +
** upx, upy, upz - ('''optional''') Up vector of subunit (assume 0,1,0)
 +
** restricted - ('''optional''') angle that the turret can turn away from the "fore" vector. Since "fore" and "up" fully define its orientation, unwanted directions are restricted by assigning zero to some of the subunit's own Maneuver_??? and ???_Governor parameters.
 +
** Example: <code>{turretpdlong;<span style="color:darkblue">0;2.2;4.5</span>;0;0;1;0;1;0;180.0}{turretpdlong;0;-4.05;10;0;0;1;0;-1;0;180.0}</code>
 +
* Sound ''(shieldhit(string);armorhit(string);hullhit(string);jump(string);explode(string);cloak(string);engine(string))''
 +
** shieldhit, armorhit, hullhit - See also [[Manual:Config:Advanced:Variables#.22unitaudio.22_section|<code>unitaudio</code>]] variables section.
 +
** jump -
 +
** explode -
 +
** cloak -
 +
** engine -
 +
** Example: <code> </code>
 +
* Light <code>({meshfile(string);x(meters);y(meters);z(meters);scale(meters);r(percentage);g(percentage);b(percentage);a(percentage);activationspeed(meters/second)})</code> - Specifies an engine-flame/light/glow/whatever on your ship
 +
** meshfile - meshfile (sans <code>.xmesh</code>) for this engine model
 +
** x, y, z - location of light (in meters)
 +
** scale -  size of engine (radius, in meters)
 +
** r, g, b, a - ('''optional''') red/blue/green/transparency colour of engine
 +
** activationspeed -
 +
** Example: <code>{supernova.bmp.bfxm;0.00000e+0;0.350000;-2.09200;2;;;;;}{supernova.bmp.bfxm;1.31600;-6.00000e-3;-1.82200;2;;;;;}{supernova.bmp.bfxm;-1.32800;-6.00000e-3;-1.82200;2;;;;;}</code>
 +
* Mounts <code>({type(string);ammo(int);volume(meters);SIZE(string);x(meters);y(meters);z(meters);xyscale(meters);zscale(meters);forex(meters);forey(meters);forez(meters);upx(meters);upy(meters);upz(meters);functionality(percentage);maxfunctionality(percentage)})</code>
 +
** type - Type of weapon (see '''[http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/vegastrike/data/weapon_list.xml?view=log weapon_list.xml]''' in the data directory)
 +
** ammo - how much ammo the gun holds. Only needed for ammo spending weapons e.g. missiles, mass-drivers, etc... Skipping it waives ammo count, as a possible hack for capships/bases.
 +
** volume - how much ammo the gun can hold - i.e. <code>ammo</code> ≤ <code>ammo.volume</code>/<code>mount.volume</code>, or at least 1 (for single-missile pylons).
 +
** SIZE - size class(es)/type(s) and if they are capable of autotracking.
 +
** x, y, z - location of weapon
 +
** xyscale, zscale - scaling of the weapon model. It's rendered only if both scales are >0 and [[Manual:Config:Advanced:Variables#.22graphics.22_section|<code>graphics/draw_weapons</code>]] is set to "true".
 +
** forex, forey, forez - ('''optional''') Forward vector of mount (assume 0,0,1)
 +
** upx, upy, upz - ('''optional''') Up vector of mount (assume 0,1,0)
 +
** Example: <code>{;;;Light Medium;1.01200;-6.80000e-2;3.40800;;;;;;;;;1;1}{;;;Light Medium;-0.964000;-6.80000e-2;3.40800;;;;;;;;;1;1}{;;;Light;0.380000;0.176000;1.07600;;;;;;;;;1;1}{;;;Light;-0.336000;0.176000;1.07600;;;;;;;;;1;1}{;0;48;light-missile medium-missile special-missile;0;0;0;;;;;;;;;1;1}{;0;48;light-missile medium-missile special-missile;0;0;0;;;;;;;;;1;1}</code>
 +
* <s>Net_Comm ''(?)''</s>  (currently is not supported)
 +
* Dock <code>({Type(int);x(meters);y(meters);z(meters);size(meters);minsize(meters)})</code>
 +
** Type(int) -  '''(optional)''' 0 - outside (the ship hangs there); 1 - inside whether (the ship disappears); 10 - connected (has a waypoint); 20 - waypoint (for autodocking). The type is defined by the ''sum'' of these values.
 +
** x, y, z -  location of dock (in meters)
 +
** size - size of dock port (radius, in meters). The ship must be smaller than the size of the dock, otherwise it will remain in open space.
 +
** minsize -
 +
** Example: <code>{;-14.13;50.99;116.67;16.0;0}{20;-18.43;257.52;-31.63;48.0;0}{10;-18.43;197.63;-31.63;32.0;0}{;-18.43;144.8;-31.63;16.0;0}</code>
 +
* Cargo_Import <code>({Cat(string);price(percentage);pricestddev(percentage);quant(percentage);quantstddev(percentage)})</code> Used by bases, etc. for generating the cargo available for purchase.
 +
** Cat - A category to use from {{CVS:MasterPartList}} - e.g "<code>Natural_Products/Natural_Resources</code>".
 +
** price - price scale (multiplied by price in list)
 +
** pricestddev - price scale variation (above adjusted by this)
 +
** quant - quantity of this sort of cargo
 +
** quantstddev -  quantity variation
 +
** Example: <code> </code>
 +
* Cargo <code>({filename(string);Category(string);price(credits);quant(int);mass(metric Tons);volume(meters*meters*meters);functionality(percentage);maxfunctionality(percentage);description(string);missionCargo(bool)})</code>
 +
** filename - name of cargo
 +
** Category - A category to use from {{CVS:MasterPartList}}.
 +
** price - price of cargo
 +
** quant - ammount of cargo
 +
** mass - mass in tonnes
 +
** volume - size of cargo in m3
 +
** functionality, maxfunctionality - {{Fixme}} ''???''
 +
** description - ('''optional/unused''')
 +
** missionCargo -  Used to mark mission cargo in saved games. As such, it's not meaningful in ruleset data.
 +
** Example: <code>{skyscope1;upgrades/Sensors/Basic;200;1;1;1;1;1;Refurbished Part;0}{capacitor02;upgrades/Capacitors/Standard;200;1;1;1;1;1;Refurbished Part;0}{reactor02;upgrades/Reactors/Standard;200;1;1;1;1;1;Refurbished Part;0}{spec_capacitor01;upgrades/SPEC_Capacitors;200;1;1;1;1;1;Refurbished Part;0}{quadshield02;upgrades/Shield_Systems/Standard_Quad_Shields;200;1;1;1;1;1;Refurbished Part;0}{armor01;upgrades/Armor;200;1;1;1;1;1;Refurbished Part;0}</code>
 +
* Explosion ''(string)''
 +
* Num_Animation_Stages ''(int)''
 +
* Upgrade_Storage_Volume ''(float)''
 +
* Heat_Sink_Rating ''(float)'' - refire delay multiplier. For all and any mounts - which is why it's currently not used, though still can be useful for turrets.
 +
* Shield_Efficiency ''(float)'' - shield recharge efficiency (1 normalized fraction). E.g. 0.5 means the shield consumes 2x energy while recharging.
 +
* Num_Chunks ''(int)'' - affects the unit shattering on destruction.
 +
* Collide_Subunits ''(boolean)'' - whether to recurse into subunits on collision.
 +
* Spec_Interdiction ''(float)'' - the unit affecting SPEC around it other than by plain mass value
 +
* Tractorability ''(text flags)'' - "p"|"P" adds push, "i"|"I" adds tractoring in, empty string assumes push-only, unrecognized gives immunity to tractors. Player ships get [[Manual:Config:Advanced:Variables#.22physics.22_section|<code>physics/PlayerTractorabilityMask</code>]] ''in addition to'' this.
 +
* Equipment_Space ''(m^3)'' - supposed to be raw internal hull volume, not ready Upgrade / Cargo storage space. (works, but not used in units.csv currently)
 +
* Hidden_Hold_Volume ''(m^3)'' - cargo storage space for contraband. (works, but not used in units.csv currently)
  
<code><'''Unit''' ...> </Unit></code> - Marks the begin and the end of the unit(file)
+
----
* <code>'''Scale'''</code> - Sets the scaling of the unit in the game
+
{{Fixme}} ''Integrate the Hint better into the description above.''<BR/>
* <code><'''Cockpit''' .../></code> - Defines a cockpit for the ship.
+
Hint ([http://forums.vega-strike.org/viewtopic.php?p=36437#36437 Source]):
** <code>file</code> - Points to a cockpit file. Extension <code>.cpt</code>
+
* The '''...Maneuver''' variables are a value that can be calculated from "metric tons*degrees/second^2".
** <code>x</code>,<code>y</code>,<code>z</code> - Coordinates where the Cockpit should be in the Unit/Ship (in meters)
+
* The '''...Governor''' variables are the maximum turn speed defined as "degrees/sec".
** See also [[HowTo:Edit HUDs]].
 
* <code><'''Meshfile''' .../></code>
 
** <code>file</code> - Points to a xmesh-file of the ship. Extension <code>.xmesh</code>
 
** <code>texturestarttime</code> - ('''optional''') Defines the starting delay of a mesh animation. See [http://vegastrike.sourceforge.net/forums/viewtopic.php?p=9688#9688 forums] for more.
 
*** <code>RANDOM</code> - Random start delay.
 
***time until mesh animation starts
 
** <code>startframe</code> - ('''optional''') Defines the starting-frame of a mesh animation. See [http://vegastrike.sourceforge.net/forums/viewtopic.php?p=9688#9688 forums] for more.
 
*** <code>RANDOM</code> - Random start-frame.
 
*** number of start-frame
 
* <code><'''ShieldMesh'''></code> - ('''optional''') xmesh-file to use for the shield instead of a sphere. Extension <code>.xmesh</code>
 
* <code><'''RapidMesh'''></code> - ('''optional''') xmesh-file to load and use for collisions with other units/ships/... instead of the Meshfile from above (not drawn) Extension <code>.xmesh</code>
 
* <code><'''BspMesh'''></code> - ('''optional''') xmesh-file to use for beam and bolt collisions (not drawn) Extension <code>.xmesh</code>
 
* <code><'''Mount''' .../></code> - ('''optional''')('''repeatable''') Specifies a weapon mount
 
** <code>weapon</code> - Type of weapon (see '''[http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/vegastrike/data4.x/weapon_list.xml?rev=HEAD&content-type=text/vnd.viewcvs-markup weapon_list.xml]''' in the data directory)
 
** <code>size</code> - size class(es)/type(s) and if they are capable of autotracking. The single entries are seperated by spaces. e.g: <code>size="LIGHT MEDIUM AUTOTRACKING"</code>
 
*** <code>LIGHT</code>
 
*** <code>MEDIUM</code>
 
*** <code>HEAVY</code>
 
*** <code>SPECIAL</code>
 
*** <code>CAPSHIP-LIGHT</code>
 
*** <code>CAPSHIP-MEDIUM</code>
 
*** <code>CAPSHIP-HEAVY</code>
 
*** <code>AUTOTRACKING</code>
 
*** <code>SPECIAL-MISSILE</code>
 
*** <code>LIGHT-MISSILE</code>
 
*** <code>MEDIUM-MISSILE</code>
 
*** <code>HEAVY-MISSILE</code>
 
*** <code>LIGHT-CAPSHIP-MISSILE</code>
 
*** <code>MEDIUM-CAPSHIP-MISSILE</code>
 
*** <code>HEAVY-CAPSHIP-MISSILE</code>
 
** <code>ammo</code> - how much ammo the gun holds (only needed for ammo needing weapons e.g. missiles,torpedos,...)
 
** <code>volume</code> - ('''optional''' see "ammo") how much ammo the gun can hold if you refill
 
** <code>x</code>,<code>y</code>,<code>z</code> - location of weapon (in meters ;-))
 
** <code>ri</code>,<code>rj</code>,<code>rk</code> - ('''optional''') R-vector forward vector) of gun (assume 0,0,1)
 
** <code>qi</code>,<code>qj</code>,<code>qk</code> - ('''optional''') Q-vector (up vector) of gun (assume 0,1,0)
 
* <code><'''Sound'''> </Sound></code> - {{Fixme}} '''nothing yet ???'''
 
* <code><'''Defense''' ...> </Defense></code> - {{Fixme}}
 
** <code>HudImage</code> - sprite file to use when targetted {{Fixme}} ''relative to what?''
 
** <code>ExplosionAni</code> - ('''optional''') special explosion to use
 
** <code>RepairDroid</code> - ('''optional''') strength of repair system (0-6)
 
** <code>ECM</code> - ('''optional''') type of ECM (Electronic Counter Measure)
 
** <code><'''Armor''' .../></code> - Specifies the ships physical armor
 
*** <code>front</code> - Forward max armor in VSD
 
*** <code>right</code> - Right armor in VSD
 
*** <code>left</code> - Left armor in VSD
 
*** <code>back</code> - Back armor in VSD
 
** <code><'''Shields''' .../></code> - Specifies the ships Shield (electric armor)
 
*** <code>front</code> - Forward max shields in VSD
 
*** <code>back</code> - Back shields in VSD
 
*** <code>recharge</code> - Shield regeneration if not violating speed limit in VSD/s
 
*** <code>leak</code> - ('''optional''') how much leak these shields have (usually 0%) between 0 and 100
 
*** <code>left</code> - ('''optional''') Left shields in VSD
 
*** <code>right</code> - ('''optional''') Right shields in VSD
 
*** <code>top</code> - ('''optional''') Top shields) in VSD
 
*** <code>bottom</code> - ('''optional''')bottom shields in VSD
 
** <code><'''Hull''' .../></code> - Specifies the ships Hull
 
*** <code>strength</code> - Max hull in VSD
 
** <code><'''Cloak''' .../></code> - ('''optional''') Specifies the ships cloak device
 
*** <code>missing</code> - if 1, then no cloak is here. also missing in abserce of optional tag
 
*** <code>cloakmin</code> - minimum percentage of cloakedness
 
*** <code>cloakglass</code> - boolean whether or not effect 2 is used
 
*** <code>cloakrate</code> - time per second to cloak in decimal per second
 
*** <code>cloakenergy</code> - how much energy this takes in 100kJ
 
* <code><'''Stats''' .../></code> -  Specifies the statics of the ship
 
** <code>mass</code> - mass in metric tonnes (kkg)
 
** <code>momentofinertia</code> - mass*m*m in (metric tonnes * meter * meter)
 
** <code>fuel</code> - amount of fuel
 
* <code><'''Thrust'''>...</Thrust></code> - Specifies the ships thrust
 
** <code><'''Engine''' /></code> - Specifies the ships engine
 
*** <code>Afterburner</code> - Thrust with afterburners in metric tonnes meters per second squared
 
*** <code>Forward</code> - Thrust without afterburners in kkg*m/s^2
 
*** <code>Retro</code> - Reverse thrust in kkg*m/s^2
 
*** <code>Left</code> - Left thrust  in kkg*m/s^2
 
*** <code>Right</code> - Right thrust  in kkg*m/s^2
 
*** <code>Top</code> - Top thrust  in kkg*m/s^2
 
*** <code>Bottom</code> - Bottom thrust in kkg*m/s^2
 
** <code><'''Maneuver''' .../></code> - Specifies the ships maneuver data
 
*** <code>yaw</code> - Right yaw in metric tonnes degrees per second squared
 
*** <code>pitch</code> - Right pitch in kkg*deg/s^2
 
*** <code>roll</code> - Right roll in kkg*deg/s^2
 
* <code><'''Computer''' ...> ... </Computer></code>-
 
** <code>yaw</code> - max yaw in degrees per second
 
** <code>pitch</code> - max pitch in dps
 
** <code>roll</code> - max roll in dps
 
** <code>afterburner</code> - Max safe speed with afterburners in m/s
 
** <code>maxspeed</code> - Max safe speed without afterburner in m/s
 
** <code>slidestart</code> - ('''optional''') number of tenths of seconds before fully reacting to keyboard (smoothing)
 
** <code>slideend</code> - ('''optional''') number of tenths of seconds to stop
 
** <code><'''Radar''' .../></code> - Specifies the ships radar system
 
*** <code>itts</code> - if the unit has ability to target track with lead
 
*** <code>color</code> - if unit has color radar
 
*** <code>range</code> - maximum range of radar
 
*** <code>error</code> - ('''optional''') currently unused
 
*** <code>trackingCone</code> - cosine of cone at which guns may track
 
*** <code>lockcone</code> - cosine of cone at which missiles gain locking time
 
*** <code>mintargetsize</code> - unused...but supposedly minimum target this can do
 
* <code><'''Energy'''> ...  </Energy></code> -
 
** <code><'''Reactor''' .../></code> - Specifies the ships poer unit (reactor)
 
*** <code>recharge</code> -  recharging of reactor in 100 MJ/s
 
*** <code>limit</code> - max storage of reactor in 100 MJ/s
 
* <code><'''Jump''' .../></code> - ('''optional''')
 
** <code>delay</code> - seconds before jump drive initiates
 
*** <code>jumpenergy</code> - energy to jump
 
** <code>wormhole</code> - forces units to teleport upon touching this one
 
** <code>missing</code> - boolean whether the jump drive is missing (assumed missing in absence of tag)
 
* <code><'''description''' ...>...  </description></code> - ('''repeatable''')
 
** <code>combatrole</code> - combat role that the ship has (see [http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/vegastrike/data4.x/ai/VegaPriorities.csv?rev=HEAD&content-type=text/plain ai/VegaPriorities.csv] )
 
** <code>lang</code> - ('''optional''') Language code for the language the description is written in.
 
*** e.g <code>lang='DE'</code> for german language
 
*** See [http://www.xs4all.nl/~margjos/langen.htm this link] for all codes:
 
*** If no lang attribute is specified the description is meant to be english. (''is this correct'?')
 
** Some cool description of the ship.
 
* <code><'''Hold''' ...> ... </Hold></code>
 
** <code>volume</code> - volume in cargo units
 
** <code><'''Category''' ...> ... </Category></code> - ('''optional''')('''repeatable''') A category to use from the Vs-MasterPartList''''.
 
*** <code>file</code> -
 
**** e.g. <code>file="Natural_Products/Natural_Resources"</code>
 
*** <code><'''import''' .../></code> ('''optional''')
 
**** <code>price</code> - price scale (multiplied by price in list)
 
**** <code>pricestddev</code> - price scale variation (above adjusted by this)
 
**** <code>quantity</code> - quantity of this sort of cargo
 
**** <code>quantitystddev</code> - quantity variation
 
*** <code><'''Cargo''' .../></code> ('''optional''')('''repeatable''')
 
**** <code>file</code> - name of cargo
 
**** <code>price</code> - price of cargo
 
**** <code>quantity</code> - ammount of cargo
 
**** <code>mass</code> - mass in tonnes
 
**** <code>volume</code> - size of cargo in cargo units
 
**** <code>description</code> - ('''optional/unused''')
 
* <code><'''Light''' .../></code> - ('''optional''')('''repeatable''') Specifies an engine-flame/light/glow/whatever on your ship
 
** <code>file</code> - meshfile (sans .xmesh) for this engine model
 
*** e.g. "supernova.bmp"    it's actually a xmesh file
 
** <code>x</code>,<code>y</code>,<code>z</code> - location of light (in meters ;-))
 
** <code>size</code> -  size of engine (radius, in meters ;-))
 
** <code>red</code>,<code>blue</code>,<code>green</code> - ('''optional''')red/blue/green dye of engine
 
* <code><'''Dock''' .../></code> - ('''optional''')('''repeatable''') A place where another unit can dock.
 
** <code>x</code>,<code>y</code>,<code>z</code> - location of dock (in meters ;-))
 
** <code>size</code> - size of dock port (radius, in meters ;-))
 
** <code>dockinternal</code> - ('''optional/unused''') whether the dock port makes the ship disappeared. The ship must be smaller than the size of the dock, otherwise it will remain in open space.
 
* <code><'''SubUnit''' .../></code> - ('''optional''')('''repeatable''') A Subunt is a (not necessarily) small independant part of your unit. In fact the main unit and the subunit are two different ships (units) patched together at a certain point (x,y,z see below). If a subunit is destroyed the remaining parts will fly into space like the remainings of any other ship ... e.g turrets
 
** <code>file</code> - unit file that can be referenced frmo toplevel units
 
** <code>siz</code> - size class (which sizes it can hold)
 
** <code>x</code>,<code>y</code>,<code>z</code> - location of subunit (in meters ;-))
 
** <code>ri</code>,<code>rj</code>,<code>rk</code> - ('''optional''') R-vector (forward vector) of subunit (assume 0,0,1)
 
** <code>qi</code>,<code>qj</code>,<code>qk</code> - ('''optional''') Q-vector (up vector) of subunit (assume 0,1,0)
 
** <code>restricted</code> - ('''optional''') minimum dot with rj that the turret can have so it can't turn inside itself
 
* <code><'''CockpitDamage''' .../></code> - ('''optional''')('''repeatable''' up to 1+NUMGAUGES+MAXVDUS or 29)
 
** NOTE: If you have more, strange things may happen, as it will probably overrun the cockpitdamage buffer.
 
** <code>damage</code> - float between 0 and 1 depending on the amount of static the vdu has.
 
* <code><'''Upgrade''' .../></code> - ('''optional''')('''repeatable''') an upgrade unit that adds its stats onto this unit (as if you had bought it from the shop).
 
** <code>file</code> - the file to upgrade it with.
 
  
===Editing Units.csv File===
+
==Editing the <code>units.csv</code> file==
* Open the '''[http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/vegastrike/data4.x/units/units.csv?rev=HEAD&content-type=text/vnd.viewcvs-markup units.csv]''' file in a spreadsheet application and if you are adding a new item, add a new line.
+
* Open the {{CVS:units.csv}} file in a spreadsheet application and if you are adding a new item, add a new line.
* {{fixme}} ''ADD INFO''
+
* {{Fixme}} ''ADD INFO''
 
* Save the file as a csv file.
 
* Save the file as a csv file.
  
  
===Example Row===
+
==Example: Llama.begin==
 
<pre>
 
<pre>
  
Line 302: Line 213:
  
 
=See also=
 
=See also=
* '''[http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/vegastrike/data4.x/units/units.csv?rev=HEAD&content-type=text/vnd.viewcvs-markup Units.csv]''' in CVS
+
* {{CVS:units.csv}} in CVS
* [[HowTo:Edit Unit Files|Edit Unit Files]]
+
* [[HowTo:Edit Unit Files|HowTo:Edit XUNIT files]]
* [[HowTo:Add Descriptions|Add Descriptions]]   
+
* [[HowTo:Add Descriptions]]   
* [[HowTo:Add Cargo|Adding Cargo]]
+
* [[HowTo:Add Cargo]]
* [[HowTo:Add Upgrades|Adding Upgrades]]
+
* [[HowTo:Add Upgrades]]
* [[HowTo:Edit master_part_list.csv|Editing Master_part_list.csv]]
+
* [[HowTo:Edit master_part_list.csv]]
  
 
----
 
----
 
{{NAV_Manual |
 
{{NAV_Manual |
| previous=[[HowTo:Create Ships in Wings3D|Create Ships in Wings3D]]
+
| previous=[[HowTo:Add Per Pixel Lighting|Add Per Pixel Lighting]]
| up=[[HowTo]]
+
| up=[[HowTos]]
 
| next=[[HowTo:Edit Unit Files|Edit Unit Files]]
 
| next=[[HowTo:Edit Unit Files|Edit Unit Files]]
 
}}
 
}}
  
[[Category:HowTo|Editing units.csv]]
+
[[Category:HowTos|Editing units.csv]]
 
[[Category:Development|Editing units.csv]]
 
[[Category:Development|Editing units.csv]]

Latest revision as of 07:23, 9 February 2014

arrow_left.png Add Per Pixel Lighting arrow_up.png HowTos Edit Unit Files arrow_right.png

The Units.csv file contains specific information on all Vessels and Installations and Upgrades in VegaStrike. This has replaced the xunit.xml files.

The units.csv file

The Units.csv is a comma delimited text file which can be edited with any spreadsheet program.

NOTE: Microsoft Works has problems with the long description columns. For a free alternative, try OpenOffice.

Columns in the units.csv file

The original description of the xunit syntax from hellcatv is located in CVS. The columns of the Units.csv file and their description are; FIXME Copy Descriptions from HowTo:Edit Unit Files

  • Key (Key)
  • Directory (String)
  • Name (string)
  • STATUS (string) - Development status, for internal use only.
  • FoFID (string) (currently is not supported)
  • Object_Type (string)
  • Combat_Role (string) - combat role that the ship has. It selects the row in ai/VegaEvents.csv and ai/VegaPriorities.csv tables, defining the action choice and target priorities.
  • Textual_Description (string)
  • Hud_image (string) - HUD image, a sprite format file. Extension .spr. See also HowTo:Edit HUDs.
  • Unit_Scale (float) - Sets the scaling of the unit in the game
  • Cockpit (string) - Defines a cockpit for the ship. Points to a cockpit file. Extension .cpt. See also HowTo:Edit HUDs.
  • CockpitX (x=float) - Coordinates where the Cockpit should be in the Unit/Ship
  • CockpitY (y=float) - Coordinates where the Cockpit should be in the Unit/Ship
  • CockpitZ (z=float(meters)) - Coordinates where the Cockpit should be in the Unit/Ship
  • Mesh ({filename(string);frame(int);texturetime(float)})
    • filename - Points to a xmesh-file of the ship. Extension .xmesh
    • frame - (optional) Defines the starting-frame of a mesh animation. See forums for more.
    • texturetime - (optional) Defines the starting delay of a mesh animation. See forums for more.
    • Example: {llama.bfxm;;}
  • Shield_Mesh (string) - (optional) xmesh-file to use for the shield instead of a sphere. Extension .xmesh
  • Rapid_Mesh (string) - (optional) xmesh-file to load and use for collisions with other units/ships/... instead of the Meshfile from above (not drawn) Extension .xmesh
  • BSP_Mesh (string) - (optional) xmesh-file to use for beam and bolt collisions (not drawn) Extension .xmesh
  • Use_BSP (boolean)
  • Use_Rapid (boolean)
  • Mass (metric tons) - mass in metric tonnes (kkg)
  • Moment_Of_Inertia (metric tons * meters*meters)
  • Convex_Hull_Volume (meters * meters * meters) (currently is not supported)
  • Fuel_Capacity (metric tons)
  • Hull (VSD) - Specifies the ships Hull durability
  • Armor_Front_Top_Right (VSD) - Specifies the ships physical armor
  • Armor_Front_Top_Left (VSD) - Specifies the ships physical armor
  • Armor_Front_Bottom_Right (VSD) - Specifies the ships physical armor
  • Armor_Front_Bottom_Left (VSD) - Specifies the ships physical armor
  • Armor_Back_Top_Right (VSD) - Specifies the ships physical armor
  • Armor_Back_Top_Left (VSD) - Specifies the ships physical armor
  • Armor_Back_Bottom_Right (VSD) - Specifies the ships physical armor
  • Armor_Back_Bottom_Left (VSD) - Specifies the ships physical armor
  • Shield_Front_Top_Right (VSD) - Specifies the ships Shield (electric armor). Used for all shields.
  • Shield_Back_Top_Left (VSD) - Specifies the ships Shield (electric armor). Used for all shields.
  • Shield_Front_Bottom_Right (VSD) - Specifies the ships Shield (electric armor). Not used for dual shields.
  • Shield_Front_Bottom_Left (VSD) - Specifies the ships Shield (electric armor). Not used for dual shields.
  • Shield_Back_Top_Right (VSD) - Specifies the ships Shield (electric armor). Not used for dual or quad shields.
  • Shield_Front_Top_Left (VSD) - Specifies the ships Shield (electric armor). Not used for dual or quad shields.
  • Shield_Back_Bottom_Right (VSD) - Specifies the ships Shield (electric armor). Not used for dual or quad shields.
  • Shield_Back_Bottom_Left (VSD) - Specifies the ships Shield (electric armor). Not used for dual or quad shields.
  • Shield_Recharge (VSD/second) - Shield regeneration if not violating speed limit
  • Shield_Leak (percentage) - (optional) how much leak these shields have (usually 0%)
  • Warp_Capacitor (800MJ) - SPEC energy storage, fuel with "WC Fuel Hack" on (see physics/fuel_equals_warp)
  • Primary_Capacitor (100MJ)
  • Reactor_Recharge (100MJ/s)
  • Jump_Drive_Present (Boolean ) - boolean whether the jump drive is missing (assumed missing in absence of tag)
  • Jump_Drive_Delay (seconds) - seconds before jump drive initiates
  • Wormhole (boolean) - forces units to teleport upon touching this one
  • Outsystem_Jump_Cost (800MJ) - energy to use a wormhole
  • Warp_Usage_Cost (800MJ/second) - energy to teleport or use SPEC (the latter divided by physics/warpbleed)
  • Afterburner_Type (int type ) - Specifies the ships engine. Type 1 uses fuel, 0 - reactor energy, 2 - jump fuel, 3 - "NO AFTERBURNER".
  • Afterburner_Usage_Cost (100MJ/s)
  • Maneuver_Yaw (metric tons*degrees/second^2) - Specifies the ships angular acceleration
  • Maneuver_Pitch (metric tons*degrees/second^2) - Specifies the ships angular acceleration
  • Maneuver_Roll (metric tons*degrees/second^2) - Specifies the ships angular acceleration
  • Yaw_Governor (degrees/sec) - maximum yaw
  • Pitch_Governor (degrees/sec) - maximum pitch
  • Roll_Governor (degrees/sec) - maximum roll
  • Afterburner_Accel (metric tons*m/s^2) - Thrust with afterburners
  • Forward_Accel (metric tons*m/s^2) - Thrust without afterburners
  • Retro_Accel (metric tons*m/s^2) - Reverse thrust
  • Left_Accel (metric tons*m/s^2) - Left thrust
  • Right_Accel (metric tons*m/s^2) - Right thrust
  • Top_Accel (metric tons**m/s^2) - Top thrust
  • Bottom_Accel (metric tons*m/s^2) - Bottom thrust
  • Afterburner_Speed_Governor (meters/second) - Max safe speed with afterburners
  • Default_Speed_Governor (meters/second) - Max safe speed without afterburner
  • ITTS (boolean) - if the unit has ability to target track with lead
  • Radar_Color (boolean) - if unit has color radar
  • Radar_Range (meters) - maximum range of radar
  • Tracking_Cone (Degrees) - cone in which autotracking works
  • Max_Cone (Degrees) - cone in which the radar sees objects. Usually is set to 180 (i.e. the full sphere).
  • Lock_Cone (Degrees) - cone in which missiles gain locking time
  • Hold_Volume (m^3) - volume in cargo units
  • Can_Cloak (boolean)
  • Cloak_Min (percentage) - minimum percentage of cloakedness
  • Cloak_Rate (percentage/second) - time per second to cloak
  • Cloak_Energy (800MJ/s) - how much energy this takes.
  • Cloak_Glass (boolean) - boolean whether or not effect 2 is used
  • Repair_Droid (int) - defines the speed of repairs. Repair time = physics/RepairDroidTime*(remained functionality)/Repair_Droid. Also, critical hits to the repair system decrease this by one.
  • ECM_Rating (int) - each simulation frame, the probability of missile losing the protected target is proportional to this.
  • ECM_Resist (int) FIXME - currently does nothing.
  • Ecm_Drain (800MJ/s) FIXME - currently does nothing.
  • Hud_Functionality (1 normalized fraction)
  • Max_Hud_Functionality (1 normalized fraction)
  • Lifesupport_Functionality (1 normalized fraction)
  • Max_Lifesupport_Functionality (1 normalized fraction)
  • Comm_Functionality (1 normalized fraction)
  • Max_Comm_Functionality (1 normalized fraction)
  • FireControl_Functionality (1 normalized fraction)
  • Max_FireControl_Functionality (1 normalized fraction)
  • SPECDrive_Functionality (1 normalized fraction)
  • Max_SPECDrive_Functionality (1 normalized fraction)
  • Slide_Start (seconds) - (optional) number of tenths of seconds before fully reacting to keyboard (smoothing)
  • Slide_End (seconds) - (optional) number of tenths of seconds to stop
  • Activation_Accel (m/s^2) FIXME - currently does nothing.
  • Activation_Speed (m/s) FIXME - currently does nothing.
  • Upgrades ({filename(string);mountoffset(int);subunoffset(int)})
    • filename -
    • mountoffset -
    • subunoffset -
    • Example: {skyscope1;;}{capacitor02;;}{reactor02;;}{spec_capacitor01;;}{quadshield02;;}{armor01;;}
  • Prohibited_Upgrades (Semicolon delineated list of prohibited upgrades, allowing up to a certain number if specified with colon.)
  • Sub_Units ({filename(string);x(meters);y(meters);z(meters);forex(meters);forey(meters);forez(meters);upx(meters);upy(meters);upz(meters);restricted(meters)}) - A Subunit is a (not necessarily) small independant part of your unit. In fact the main unit and the subunit are two different ships (units) patched together at a certain point (x,y,z see below). If a subunit is destroyed the remaining parts will fly into space like the remainings of any other ship ... e.g turrets
    • filename - unit file that can be referenced from toplevel units
    • x, y, z - location of subunit
    • forex, forey, forez - (optional) Forward vector of subunit (assume 0,0,1)
    • upx, upy, upz - (optional) Up vector of subunit (assume 0,1,0)
    • restricted - (optional) angle that the turret can turn away from the "fore" vector. Since "fore" and "up" fully define its orientation, unwanted directions are restricted by assigning zero to some of the subunit's own Maneuver_??? and ???_Governor parameters.
    • Example: {turretpdlong;0;2.2;4.5;0;0;1;0;1;0;180.0}{turretpdlong;0;-4.05;10;0;0;1;0;-1;0;180.0}
  • Sound (shieldhit(string);armorhit(string);hullhit(string);jump(string);explode(string);cloak(string);engine(string))
    • shieldhit, armorhit, hullhit - See also unitaudio variables section.
    • jump -
    • explode -
    • cloak -
    • engine -
    • Example:
  • Light ({meshfile(string);x(meters);y(meters);z(meters);scale(meters);r(percentage);g(percentage);b(percentage);a(percentage);activationspeed(meters/second)}) - Specifies an engine-flame/light/glow/whatever on your ship
    • meshfile - meshfile (sans .xmesh) for this engine model
    • x, y, z - location of light (in meters)
    • scale - size of engine (radius, in meters)
    • r, g, b, a - (optional) red/blue/green/transparency colour of engine
    • activationspeed -
    • Example: {supernova.bmp.bfxm;0.00000e+0;0.350000;-2.09200;2;;;;;}{supernova.bmp.bfxm;1.31600;-6.00000e-3;-1.82200;2;;;;;}{supernova.bmp.bfxm;-1.32800;-6.00000e-3;-1.82200;2;;;;;}
  • Mounts ({type(string);ammo(int);volume(meters);SIZE(string);x(meters);y(meters);z(meters);xyscale(meters);zscale(meters);forex(meters);forey(meters);forez(meters);upx(meters);upy(meters);upz(meters);functionality(percentage);maxfunctionality(percentage)})
    • type - Type of weapon (see weapon_list.xml in the data directory)
    • ammo - how much ammo the gun holds. Only needed for ammo spending weapons e.g. missiles, mass-drivers, etc... Skipping it waives ammo count, as a possible hack for capships/bases.
    • volume - how much ammo the gun can hold - i.e. ammoammo.volume/mount.volume, or at least 1 (for single-missile pylons).
    • SIZE - size class(es)/type(s) and if they are capable of autotracking.
    • x, y, z - location of weapon
    • xyscale, zscale - scaling of the weapon model. It's rendered only if both scales are >0 and graphics/draw_weapons is set to "true".
    • forex, forey, forez - (optional) Forward vector of mount (assume 0,0,1)
    • upx, upy, upz - (optional) Up vector of mount (assume 0,1,0)
    • Example: {;;;Light Medium;1.01200;-6.80000e-2;3.40800;;;;;;;;;1;1}{;;;Light Medium;-0.964000;-6.80000e-2;3.40800;;;;;;;;;1;1}{;;;Light;0.380000;0.176000;1.07600;;;;;;;;;1;1}{;;;Light;-0.336000;0.176000;1.07600;;;;;;;;;1;1}{;0;48;light-missile medium-missile special-missile;0;0;0;;;;;;;;;1;1}{;0;48;light-missile medium-missile special-missile;0;0;0;;;;;;;;;1;1}
  • Net_Comm (?) (currently is not supported)
  • Dock ({Type(int);x(meters);y(meters);z(meters);size(meters);minsize(meters)})
    • Type(int) - (optional) 0 - outside (the ship hangs there); 1 - inside whether (the ship disappears); 10 - connected (has a waypoint); 20 - waypoint (for autodocking). The type is defined by the sum of these values.
    • x, y, z - location of dock (in meters)
    • size - size of dock port (radius, in meters). The ship must be smaller than the size of the dock, otherwise it will remain in open space.
    • minsize -
    • Example: {;-14.13;50.99;116.67;16.0;0}{20;-18.43;257.52;-31.63;48.0;0}{10;-18.43;197.63;-31.63;32.0;0}{;-18.43;144.8;-31.63;16.0;0}
  • Cargo_Import ({Cat(string);price(percentage);pricestddev(percentage);quant(percentage);quantstddev(percentage)}) Used by bases, etc. for generating the cargo available for purchase.
    • Cat - A category to use from Master Part List - e.g "Natural_Products/Natural_Resources".
    • price - price scale (multiplied by price in list)
    • pricestddev - price scale variation (above adjusted by this)
    • quant - quantity of this sort of cargo
    • quantstddev - quantity variation
    • Example:
  • Cargo ({filename(string);Category(string);price(credits);quant(int);mass(metric Tons);volume(meters*meters*meters);functionality(percentage);maxfunctionality(percentage);description(string);missionCargo(bool)})
    • filename - name of cargo
    • Category - A category to use from Master Part List.
    • price - price of cargo
    • quant - ammount of cargo
    • mass - mass in tonnes
    • volume - size of cargo in m3
    • functionality, maxfunctionality - FIXME ???
    • description - (optional/unused)
    • missionCargo - Used to mark mission cargo in saved games. As such, it's not meaningful in ruleset data.
    • Example: {skyscope1;upgrades/Sensors/Basic;200;1;1;1;1;1;Refurbished Part;0}{capacitor02;upgrades/Capacitors/Standard;200;1;1;1;1;1;Refurbished Part;0}{reactor02;upgrades/Reactors/Standard;200;1;1;1;1;1;Refurbished Part;0}{spec_capacitor01;upgrades/SPEC_Capacitors;200;1;1;1;1;1;Refurbished Part;0}{quadshield02;upgrades/Shield_Systems/Standard_Quad_Shields;200;1;1;1;1;1;Refurbished Part;0}{armor01;upgrades/Armor;200;1;1;1;1;1;Refurbished Part;0}
  • Explosion (string)
  • Num_Animation_Stages (int)
  • Upgrade_Storage_Volume (float)
  • Heat_Sink_Rating (float) - refire delay multiplier. For all and any mounts - which is why it's currently not used, though still can be useful for turrets.
  • Shield_Efficiency (float) - shield recharge efficiency (1 normalized fraction). E.g. 0.5 means the shield consumes 2x energy while recharging.
  • Num_Chunks (int) - affects the unit shattering on destruction.
  • Collide_Subunits (boolean) - whether to recurse into subunits on collision.
  • Spec_Interdiction (float) - the unit affecting SPEC around it other than by plain mass value
  • Tractorability (text flags) - "p"|"P" adds push, "i"|"I" adds tractoring in, empty string assumes push-only, unrecognized gives immunity to tractors. Player ships get physics/PlayerTractorabilityMask in addition to this.
  • Equipment_Space (m^3) - supposed to be raw internal hull volume, not ready Upgrade / Cargo storage space. (works, but not used in units.csv currently)
  • Hidden_Hold_Volume (m^3) - cargo storage space for contraband. (works, but not used in units.csv currently)

FIXME Integrate the Hint better into the description above.
Hint (Source):

  • The ...Maneuver variables are a value that can be calculated from "metric tons*degrees/second^2".
  • The ...Governor variables are the maximum turn speed defined as "degrees/sec".

Editing the units.csv file

  • Open the Units.csv file in a spreadsheet application and if you are adding a new item, add a new line.
  • FIXME ADD INFO
  • Save the file as a csv file.


Example: Llama.begin



See also


arrow_left.png Add Per Pixel Lighting arrow_up.png HowTos Edit Unit Files arrow_right.png