Repository navigation
virtual_pofs.tbl
github-actions[bot] edited this page Oct 28, 2026
·
3 revisions
Revision information OFP Revision: #151 Set the revision to your PR when your PR changes what this page documents. Leave it alone for edits that only fix or improve the documentation.
The virtual_pofs.tbl defines virtual POF models, created from other POF files by a list of operations.
This table is one of the Modular Tables and can be extended with xxx-pof.tbm.
Code: /model/modelreplace.cpp. See Tables for every table.
Badges show the version a field or behavior was added in.
Field index (every field, one per line in table order; click one to jump to it)
The POFs defined here can be used from all other parts of the engine as if they were real, existing POF-files. It can / will be able to be used for a variety of different purposes:
- Variety without copying models, by having one base model POF with the variations defined as virtual POFs
- Better dependency on other assets, by being able to modify existing models of depending mods instead of needing a full modified copy of the model.
- To modify models in a mod without having to redefine the ship classes
- To semi-dynamically generate certain types of models, like ships with modular hardpoints for certain turrets or other parts, or large structures like asteroid fields.
- The table begins with #Virtual POFs and ends with #End; both are required, in every table.
- Each virtual POF starts with
$POF:, then+Base POF:, then one or more operations, in any order and as many as needed. - Operation names are matched exactly, capitalization included (
$Set Subobject Data:works,$Set subobject data:does not). An unknown operation is an error, and that whole virtual POF is dropped. - When an operation can't be done (for example a subobject that doesn't exist), a warning is logged and the virtual POF is left without that change.
- The virtual filename of this POF.
- If a POF of this filename already exists, this virtual POF will replace it. Virtual POFs can replace other virtual POFs as well, including those that already replace other POFs themselves.
- Accessing a POF with the same name from this definition will use the POF to-be-replaced.
- (Example: Virtual POF A overwrites the real A.pof. Accessing A.pof within the definition of the virtual POF A will yield the original A.pof. Accessing A.pof from the engine will yield virtual POF A)
- Required. The filename of the base POF to be modified.
- Here, the actual modification operations are specified. The operations that are defined here, need to be a list with elements made out of the following:
- This operation adds a subobject from a different POF to the current POF to be modified.
- The filename of the POF from which the new subobject is to be copied.
- Syntax: string, filename
- The name of the subobject in the to-be-added POF that should be copied
- Syntax: string
-
Optional: If set to true, the subobject and all of its children will be copied. If false, only the single subobject is copied. Default is true.
- Syntax: boolean
-
Optional: If set to true, all turret definitions will be copied over to the new POF. If false, only the models but not the functionality of the turrets will be copied. Default is false.
- Syntax: boolean
-
Optional: If set to true, the glowpoints on the submodels to be added will be copied. Default is false.
- Syntax: boolean
-
Optional: Can be used to rename the copied subobjects. This is optional, except if the resulting model would have two subobjects of the same name. This is not allowed, a model must always have unique submodel names.
- Syntax: See
$Rename Subobjects:
- Syntax: See
- The name of the subobject in the to-be-modified POF that will be the parent of the to-be-copied submodel
- Syntax: string
- This operation adds a turret definition (but not model data!) to a submodel on the current POF
- The filename of the POF which has the turret definition.
- Syntax: string, filename
- The name of the base subobject in the to-be-added POF that has the turret definition
- Syntax: string
- The name of the base subobject in POF that should receive the turret definition
- Syntax: string
- The name of the barrel subobject in POF that should receive the turret definition. Must be specified if the source turret is a multipart. Can be omitted otherwise.
- Syntax: string
- This operation adds an engine definition to the current POF.
- The filename of the POF which has the engine definition.
- Syntax: string, filename
- Specifies the number of the engine (1-index based) in the source POF. Either this or
+Source Engine Subsystemmust be specified.- Syntax: integer, engine number
- Specifies the subsystem name of the engine in the source POF. Only valid if the source subsystem name is not ambiguous. Either this or
+Source Enginemust be specified.- Syntax: string, subsystem name
-
Optional: If set, will move the engine by the specified amount
- Syntax: three floats, offset in x, y, z
-
Optional: Specifies the subsystem name that the engine is attached to in the combined POF. If not set, the engine will be attached to a subsystem with the same name as in the source POF. Has no effect if the engine was not attached to any subsystem in the source.
- Syntax: string, subsystem name
- This operation adds a glowpoint to the current POF.
- The filename of the POF which has the glowpoint.
- Syntax: string, filename
- Specifies the number of the glowpoint (1-index based) in the source POF.
- Syntax: integer, glowpoint number
-
Optional: If set, will move the glowpoint by the specified amount
- Syntax: three floats, offset in x, y, z
- Specifies the submodel name the glowpoint will be attached to
- Syntax: string, submodel name
- This operation adds a weapon bank to the current POF.
- The filename of the POF which has the weapon bank.
- Syntax: string, filename
- The type of the weapon bank to add
- Syntax: string, either "Primary" or "Secondary"
- The number of the source weapon bank to copy
- Syntax: integer, weapon bank number
-
Optional: If set, the number of the weapon bank to replace. If not set, this operation will append a new weapon bank to the POF
- Syntax: integer, weapon bank number
- This operation adds a dock point to the current POF.
- The filename of the POF which has the dock point.
- Syntax: string, filename
- The name of the source dock point to copy
- Syntax: string, the name of the dock point
-
Optional: If set, will rename this dock point. This can be needed, as dock point names must be unique.
- Syntax: string, the new name of the dock point
- Optional: If set, will rename a path of this dock point. This can be needed, as path names must be unique. This option can be repeated as often as required.
- Syntax: string, the old name of the path to be renamed
- Syntax: string, the new name of the path to be renamed
-
Optional: If set, will be the parent submodel of this dock point. Must be specified if the dock point had a parent submodel in the originating POF
- Syntax: string, name of the submodel on the new POF
- This operation adds a path to the current POF.
- The filename of the POF which has the path.
- Syntax: string, filename
- The name of the source path to copy
- Syntax: string, the name of the path
-
Optional: If set, will rename this path. This can be needed, as Path names must be unique.
- Syntax: string, the new name of the path
-
Optional: If set, will be the parent submodel, or, if such a submodel does not exist, the parent subsystem of this path. Must be specified if the path had a parent submodel in the originating POF. Optional if the path had no parent or just a subsystem parent. Set to
<none>to clear an existing subsystem parent.- Syntax: string, name of the submodel/subsystem on the new POF
- This operation renames subobjects. The following two entries can be repeated as often as needed
- The name of the subobject to be renamed
- Syntax: string
- The new name of the subobject
- Syntax: string
- This operation can be used to modify a specific subsystem.
- The name of the subsystem to be modified
- Syntax: string
-
Optional: If set, modifies the position of the subsystem, relative to the center of its parent
- Syntax: Vector, three floats, x, y, z respectively
-
Optional: If set, modifies the radius of the subsystem
- Syntax: Float
-
Optional: Mutually exclusive with +Append Properties:. If set, modifies the POF properties of the subsystem
- Syntax: String
-
Optional: Mutually exclusive with +Set Properties:. If set, appends properties to the existing POF properties of the subsystem
- Syntax: String
- This operation can be used to modify a specific subobject.
- The name of the subobject to be modified
- Syntax: string
-
Optional: If set, modifies the offset of the subobject, relative to the center of its parent
- Syntax: Vector, three floats, x, y, z respectively
- This operation can be used to modify the header data of a model
-
Optional: If set, modifies the radius of the model. The model can only collide with parts that lie within this radius, measured from the model center
- Syntax: float
- Optional: If set, modifies the bounding box of the model. The model can only collide with parts that lie within this bounding box
- The corner of the bounding box with lower coordinates
- Syntax: Vector, three floats, x, y, z respectively
- The corner of the bounding box with higher coordinates
- Syntax: Vector, three floats, x, y, z respectively. All values must be larger than those specified in
+Minimum:
- Syntax: Vector, three floats, x, y, z respectively. All values must be larger than those specified in
#Virtual POFs
$POF: Fighter01.pof
+Base POF: Fighter01.pof
$Add Subobject:
+POF to Add: Fenris_FS2.pof
+Source Subobject: detailbox_engines
+Destination Subobject: detail0
$Add Subobject:
+POF to Add: Fenris_FS2.pof
+Source Subobject: radar01a-dish
$Rename Subobjects:
+Replace: radar01a-dish
+With: radar
+Destination Subobject: detail0
$Set Subobject Data:
+Submodel: detailbox_engines
+Set Offset: 0, 0, -15
$Set Subobject Data:
+Submodel: radar
+Set Offset: 0, 10, 0
#End
Getting Started
Features
SEXPs
Lua Scripting
Tables
-
Tables
- ai.tbl
- Animation (-anim.tbm)
- armor.tbl
- asteroid.tbl
- autopilot.tbl
- cheats.tbl
- colors.tbl
- controlconfigdefaults.tbl
- coordinate_points.tbl
- credits.tbl
- curves.tbl
- cutscenes.tbl
- Decals (-dcl.tbm)
- default_settings.tbl
- Dynamic SEXPs (-sexp.tbm)
- editor.tbl
- fireball.tbl
- fonts.tbl
- game_settings.tbl
- generated_nebula.tbl
- glowpoints.tbl
- help.tbl
- hud_gauges.tbl
- icons.tbl
- iff_defs.tbl
- intel.tbl
- lighting_profiles.tbl
- lightning.tbl
- mainhall.tbl
- medals.tbl
- messages.tbl
- mflash.tbl
- mission_profiles.tbl
- music.tbl
- nebula.tbl
- objecttypes.tbl
- Particle Effects (-part.tbm)
- post_processing.tbl
- props.tbl
- rank.tbl
- scripting.tbl
- ships.tbl
- sounds.tbl
- species_defs.tbl
- ssm.tbl
- stars.tbl
- strings.tbl
- tips.tbl
- traitor.tbl
- tstrings.tbl
- virtual_pofs.tbl
- weapons.tbl