Difference between revisions of "Subobject and subsystem properties"
From FreeSpace Wiki
m (intro goes above the table of contents, unless it's really long) |
(Documented $box_offset) |
||
(10 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | This page documents the properties that can be applied to subobjects. | + | This page documents the properties that can be applied to subobjects and to subsystems in their respective properties data in the [[Model files|model file]]. |
+ | |||
+ | ==Important notes== | ||
+ | * Subobject/subsystem properties data is not parsed in order. | ||
+ | * Occasionally an option may lack a trailing 'terminating character' like ':' or '=' from its description. In these cases any character can be used as the trailing 'terminating character'. | ||
+ | * Buffer size of 256 is reserved for the characters in properties data. | ||
+ | |||
+ | ==Subsystem Properties== | ||
+ | * These can be applied to subsystems both with and without separate subobject. | ||
+ | {| border=0 align=right cellpadding=2 cellspacing=1 style="margin: 0 0 1em 1em; background: #202020; border: 1px #AA2020 solid; border-collapse: collapse; font-size: 95%;" | ||
+ | ! colspan="2" style="color: white; height: 30px; background: #512020; 70%;"|'''''Key strings and their order for setting subsystems''''' | ||
+ | |- | ||
+ | | align="center"| ''engine'' | ||
+ | | Engine subsystem | ||
+ | |- | ||
+ | | align="center"| ''radar'' | ||
+ | | Radar dish subsystem | ||
+ | |- | ||
+ | | align="center"| ''turret'' | ||
+ | | Turret subsystem | ||
+ | |- | ||
+ | | align="center"| ''navigation'' | ||
+ | | Navigation subsystem | ||
+ | |- | ||
+ | | align="center"| ''communication'' | ||
+ | | Communication subsystem | ||
+ | |- | ||
+ | | align="center"| ''weapon'' | ||
+ | | Weapon control subsystem | ||
+ | |- | ||
+ | | align="center"| ''sensor'' | ||
+ | | Sensor subsystem | ||
+ | |- | ||
+ | | align="center"| ''solar'' | ||
+ | | Solar panel subsystem | ||
+ | |- | ||
+ | | align="center"| ''gas'' | ||
+ | | Gas collector subsystem | ||
+ | |- | ||
+ | | align="center"| ''activator'' | ||
+ | | '''''unused''''' | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | ===$name=== | ||
+ | *Defines the alternate name for the subsystem (''string'') | ||
+ | *Alternate subsystem names offer an alternative option for setting this via [[ships.tbl]] file or via mission data. | ||
+ | |||
+ | ===$fov=== | ||
+ | *Valid only if the true subobject name (not the alternate defined above) contains string "turret" but not strings "radar" or "engine" | ||
+ | *Defines the firing arc of the turret in degrees (''integer'') | ||
+ | *Defaults to 180 degrees if omitted. | ||
+ | |||
+ | ===$crewspot=== | ||
+ | *Valid only if the true subobject name (not the alternate defined above) contains string "turret" but not strings "radar" or "engine" | ||
+ | *Marks the turret as 'crewspot' | ||
+ | *Defines the name of the crewspot (''string'') | ||
+ | *No actual function | ||
+ | |||
+ | ===$triggered:=== | ||
+ | *Defines the subsystem as a rotating subsystem which can be triggered (animated) via [[Animation Code]] | ||
+ | |||
+ | ===$rotate=== | ||
+ | *Marks the subsystem as a rotating subsystem | ||
+ | *Defines the rotation time for the subsystem (''float'') | ||
+ | |||
+ | ====$pbank==== | ||
+ | *Marks the rotation as primary weapon rotation | ||
+ | *Defines the associated weapon bank (''integer'') | ||
+ | <!-- ANY DETAILS ?? --> | ||
+ | |||
+ | ====$stepped==== | ||
+ | *Defines the rotation as an stepped instead of continuous rotation | ||
+ | |||
+ | =====$steps===== | ||
+ | *Defines the number of steps in the animation (''integer'') | ||
+ | *Defaults to 8 | ||
+ | |||
+ | =====$t_paused===== | ||
+ | *Defines the pause time between steps (''float'') | ||
+ | *Defaults to 2 | ||
+ | |||
+ | =====$t_transit===== | ||
+ | *Defines the movement time between pauses (''float'') | ||
+ | *Defaults to 2 | ||
+ | |||
+ | =====$fraction_accel===== | ||
+ | *Defines the fraction of the stepped rotation time used for acceleration (''float'') | ||
+ | *Is between 0 .. 0.5 | ||
+ | *Defaults to 0.3 | ||
==Subobject Properties== | ==Subobject Properties== | ||
− | + | * These can be applied only to subsystem with their own separate subobject. | |
− | + | ||
− | ===$dumb_rotate=== | + | ===$dumb_rotate:=== |
+ | * Marks the subobject as 'dumb rotating object' | ||
+ | * Defines the rotation time (''float'') | ||
+ | |||
===$special=== | ===$special=== | ||
+ | * Defines special attributes for the subobject | ||
+ | * String, either '''"subsystem"''', '''"no_rotate"''' or '''"shieldpoint"''' | ||
+ | |||
+ | ===="subsystem"==== | ||
+ | * '''subsystem''' marks the subobject as an subsystem | ||
+ | |||
+ | ===="no_rotate"==== | ||
+ | * Valid option if '''subsystem''' string was not used | ||
+ | * Marks subobject as an object that should not rotate | ||
+ | |||
+ | ===="shieldpoint"==== | ||
+ | {{Table371| | ||
+ | * Only usable on special points ('''not''' on submodels). | ||
+ | * Marks the special point as a shield point, see [[Model Point Shields]].}} | ||
+ | |||
===$no_collisions=== | ===$no_collisions=== | ||
− | Prevents collision detection from occurring on this subobject and all of its children (recursively). | + | * Prevents collision detection from occurring on this subobject and all of its children (recursively). |
+ | |||
===$nocollide_this_only=== | ===$nocollide_this_only=== | ||
− | Prevents collision detection from occurring on this subobject only (children collide normally). | + | * Prevents collision detection from occurring on this subobject only (children collide normally). |
+ | |||
===$collide_invisible=== | ===$collide_invisible=== | ||
− | Allows full collision detection for things painted with the special "invisible" texture (normally ships collide but weapons do not) | + | * Allows full collision detection for things painted with the special "invisible" texture (normally ships collide but weapons do not) |
− | ===$gun_rotation=== | + | |
− | ===[[Detail box|$detail_box]]=== | + | ===$gun_rotation:=== |
− | ====[[Detail box|$box_min]]==== | + | * Marks the submodel as using gun rotation |
− | ====[[Detail box|$box_max]]==== | + | |
+ | ===[[Detail box|$detail_box:]]=== | ||
+ | * Marks the subsystem as one with detail box | ||
+ | ====[[Detail box|$box_min:]]==== | ||
+ | ====[[Detail box|$box_max:]]==== | ||
+ | ====$box_offset:==== | ||
+ | {{Table373| | ||
+ | * Optional offset of the detail box from the model center. Without this, the detail box is centered on the submodel. | ||
+ | * Example: '''$offset: 0,0,-100.5''' to make the detail box be positioned 100.5m behind the ship's center.}} | ||
+ | |||
+ | ===$detail_sphere:=== | ||
+ | {{Table3615| | ||
+ | * Marks the subsystem as one with detail sphere. Detail spheres work exactly like detail boxes (see above), except that they only define a radius instead of a box.}} | ||
+ | ====$radius:==== | ||
+ | {{Table3615| | ||
+ | * Defines the radius of the detail sphere (''float''). If not provided, defaults to the submodel radius.}} | ||
+ | ====$offset:==== | ||
+ | {{Table3615| | ||
+ | * Optional offset of the detail sphere from the model center. Without this, the detail sphere is centered on the submodel. | ||
+ | * Example: '''$offset: 0,0,-100.5''' to make the detail sphere be positioned 100.5m behind the ship's center.}} | ||
− | ===$uvec=== | + | ===$uvec:=== |
− | + | * Defines the "up" direction (vector) of a multipart turret. Usually it stands perpendicular to the ship surface. Doesn't need to be specified for multiparts with a vertical rotation axis. | |
− | ===$fvec=== | + | * Reads three comma separated ''floats'' |
− | + | * Forces turret normal into the same as the '''$uvec:'''. | |
− | ===$ | + | |
+ | ===$fvec:=== | ||
+ | * Defines the direction of the front a multipart turret will be facing. Doesn't need to be specified for multiparts with a vertical rotation axis. | ||
+ | * Reads three comma separated ''floats'' | ||
+ | |||
+ | ===$lod0_name=== | ||
+ | * Allows adding LODs to older models and changing from special points to modeled subsystems. | ||
+ | * Example $lod0_name=enginea used on a subobject named engine would allow engineb, engienc, and engined to be used while preserving backward compatibility. | ||
+ | |||
+ | ===$attach_thrusters=== | ||
+ | {{Table3615| | ||
+ | * Allows thrusters associated with this submodel to follow its rotations.}} | ||
[[Category:Modding]] | [[Category:Modding]] |
Revision as of 11:26, 28 June 2015
This page documents the properties that can be applied to subobjects and to subsystems in their respective properties data in the model file.
Contents
Important notes
- Subobject/subsystem properties data is not parsed in order.
- Occasionally an option may lack a trailing 'terminating character' like ':' or '=' from its description. In these cases any character can be used as the trailing 'terminating character'.
- Buffer size of 256 is reserved for the characters in properties data.
Subsystem Properties
- These can be applied to subsystems both with and without separate subobject.
Key strings and their order for setting subsystems | |
---|---|
engine | Engine subsystem |
radar | Radar dish subsystem |
turret | Turret subsystem |
navigation | Navigation subsystem |
communication | Communication subsystem |
weapon | Weapon control subsystem |
sensor | Sensor subsystem |
solar | Solar panel subsystem |
gas | Gas collector subsystem |
activator | unused |
$name
- Defines the alternate name for the subsystem (string)
- Alternate subsystem names offer an alternative option for setting this via ships.tbl file or via mission data.
$fov
- Valid only if the true subobject name (not the alternate defined above) contains string "turret" but not strings "radar" or "engine"
- Defines the firing arc of the turret in degrees (integer)
- Defaults to 180 degrees if omitted.
$crewspot
- Valid only if the true subobject name (not the alternate defined above) contains string "turret" but not strings "radar" or "engine"
- Marks the turret as 'crewspot'
- Defines the name of the crewspot (string)
- No actual function
$triggered:
- Defines the subsystem as a rotating subsystem which can be triggered (animated) via Animation Code
$rotate
- Marks the subsystem as a rotating subsystem
- Defines the rotation time for the subsystem (float)
$pbank
- Marks the rotation as primary weapon rotation
- Defines the associated weapon bank (integer)
$stepped
- Defines the rotation as an stepped instead of continuous rotation
$steps
- Defines the number of steps in the animation (integer)
- Defaults to 8
$t_paused
- Defines the pause time between steps (float)
- Defaults to 2
$t_transit
- Defines the movement time between pauses (float)
- Defaults to 2
$fraction_accel
- Defines the fraction of the stepped rotation time used for acceleration (float)
- Is between 0 .. 0.5
- Defaults to 0.3
Subobject Properties
- These can be applied only to subsystem with their own separate subobject.
$dumb_rotate:
- Marks the subobject as 'dumb rotating object'
- Defines the rotation time (float)
$special
- Defines special attributes for the subobject
- String, either "subsystem", "no_rotate" or "shieldpoint"
"subsystem"
- subsystem marks the subobject as an subsystem
"no_rotate"
- Valid option if subsystem string was not used
- Marks subobject as an object that should not rotate
"shieldpoint"
FS2 Open, 3.7.2:
- Only usable on special points (not on submodels).
- Marks the special point as a shield point, see Model Point Shields.
$no_collisions
- Prevents collision detection from occurring on this subobject and all of its children (recursively).
$nocollide_this_only
- Prevents collision detection from occurring on this subobject only (children collide normally).
$collide_invisible
- Allows full collision detection for things painted with the special "invisible" texture (normally ships collide but weapons do not)
$gun_rotation:
- Marks the submodel as using gun rotation
$detail_box:
- Marks the subsystem as one with detail box
$box_min:
$box_max:
$box_offset:
FS2 Open, 3.7.4:
- Optional offset of the detail box from the model center. Without this, the detail box is centered on the submodel.
- Example: $offset: 0,0,-100.5 to make the detail box be positioned 100.5m behind the ship's center.
$detail_sphere:
FS2 Open, 3.6.16:
- Marks the subsystem as one with detail sphere. Detail spheres work exactly like detail boxes (see above), except that they only define a radius instead of a box.
$radius:
FS2 Open, 3.6.16:
- Defines the radius of the detail sphere (float). If not provided, defaults to the submodel radius.
$offset:
FS2 Open, 3.6.16:
- Optional offset of the detail sphere from the model center. Without this, the detail sphere is centered on the submodel.
- Example: $offset: 0,0,-100.5 to make the detail sphere be positioned 100.5m behind the ship's center.
$uvec:
- Defines the "up" direction (vector) of a multipart turret. Usually it stands perpendicular to the ship surface. Doesn't need to be specified for multiparts with a vertical rotation axis.
- Reads three comma separated floats
- Forces turret normal into the same as the $uvec:.
$fvec:
- Defines the direction of the front a multipart turret will be facing. Doesn't need to be specified for multiparts with a vertical rotation axis.
- Reads three comma separated floats
$lod0_name
- Allows adding LODs to older models and changing from special points to modeled subsystems.
- Example $lod0_name=enginea used on a subobject named engine would allow engineb, engienc, and engined to be used while preserving backward compatibility.
$attach_thrusters
FS2 Open, 3.6.16:
- Allows thrusters associated with this submodel to follow its rotations.