Entities: Difference between revisions

From Red Faction Wiki
(Created page with "Entities include all characters, vehicles, turrets, and cameras in the game. Available entity properties are listed below. *Class Name: What entity class this entity is (from...")
 
No edit summary
Line 50: Line 50:
*End Game If Killed: Game ends if this entity is killed.  When the entity is killed, the game cuts to a black screen with scrolling text.  The scriptname of the entity determines what text is displayed.  The text for various scriptnames is defined in endgame.tbl.  This means that you must have a unique scriptname for an entity that has this flag set.
*End Game If Killed: Game ends if this entity is killed.  When the entity is killed, the game cuts to a black screen with scrolling text.  The scriptname of the entity determines what text is displayed.  The text for various scriptnames is defined in endgame.tbl.  This means that you must have a unique scriptname for an entity that has this flag set.
*Start Crouched: Entity begins crouched.
*Start Crouched: Entity begins crouched.
[[Category: Red Faction]]
[[Category: RF1 Editing]]
[[Category: Tutorials]]
[[Category: Archived RF1 Content]]

Revision as of 13:26, 30 October 2020

Entities include all characters, vehicles, turrets, and cameras in the game. Available entity properties are listed below.

  • Class Name: What entity class this entity is (from entity.tbl). The list of entity classes is accessible in the editor via the "Entity" tree in the Object list.
  • Script Name: Name for entity. This is used primarily for the designer to help organize entities.
  • AI Mode: Default AI behavior for the entity:
    • Catatonic: Entity will not react to anything in the world.
    • Waiting: Entity will react to enemies that are seen, and will react to sounds (if not flagged as Deaf)
    • Waypoints: Entity is following waypoints (waypoint list is specified via Waypoint List field described below, or through a Follow_Waypoints Event)
    • Collecting: Entity is picking up and collecting clutter (usually rocks) and dropping them off at a specific location. This is currently used for grabber robots that collect rocks and deposit them in rock crushers.
    • Motion Detection: Entity will attack any moving objects that it has line of sight to. This is currently used for unmanned turrets.
  • AI Attack Style:
    • Evasive: Entity will move evasively while attacking target.
    • Direct: Entity will move directly towards target when attacking.
    • Stand Ground: Entity will stay rooted to it's current position while attacking, and will not pursue targets.
  • Min Attack Dist: The distance that an entity must be to a target to open fire (in meters). For example, if you only wanted an enemy to open fire if within 10 meters of a target, then specify 10 for the min attack dist.
  • FOV: Field-of-view for the entity. The default FOV for the entity is specified in entity.tbl ($FOV), but you can adjust it here to simulate an entity being having reduced peripheral vision.
  • Life: The hit points for the entity. The default value is their max life. You can reduce the life of an entity to simulate the entity being injured, or to make certain scripted sequences work better (e.g., you want an entity to die after being hit once).
  • Cooperation: Currently not used.
  • Friendliness: Alignment for this entity. The player and allies are Friendly. Entities hostile to the player are considered Unfriendly. Neutral is used for entities which won't attack the player on sight, but they also won't help the player when attacked. Outcast is used for entities which attack all other entites, including other Outcast entities.
  • Default Primary: Weapon class (from weapons.tbl) that the entity is using for a primary weapon.
  • Default Secondary: Weapon class (from weapons.tbl) that the entity is using for a secondary weapon. Currently only vehicles and some robots utilize secondary weapons.
  • Item Drop: Item class name (from items.tbl) that the entity will drop when killed.
  • State Anim: Animation state that entity is forced to be in. State animations are looping, so the entity will remain in this animation state until attacked or given scripted instructions.
  • Corpse Pose: If specified, entity will be created as a corpse in this position. This is how corpses are placed by the designer.
  • Death Anim: Death animation that is forced to play when entity dies.
  • Skin: Texture set to use for the entity. When you place an entity, a random skin is selected. Alternate skins are specified in entity.tbl ($Skin).
  • Team ID: Currently not used.
  • Waypont List: Name of the waypoint list that the entity will follow (if their AI mode is set to Waypoints).
  • Waypoint Method: How the entity should follow waypoints
    • One Way: go from first to last waypoint and stop
    • Loop: go from first to last waypoint, and repeat (go directly from last to first waypoint)
    • Ping Pong: go from first to last waypoint, then follow waypoints backwards back to first waypoint, and repeat
  • Path Follow Style: Currently not used.
  • Sweep Min/Max Angle: This is used by entities that sweep back and forth as part of their default behavior (security cameras, motion detecting turrets). The angle is specified in degrees, and is relative to zero degrees. The min angle must always be less than the max angle.
  • Turret UID: If specified, this is the UID for a turret that the entity should be attached to (i.e., is using).
  • Alert Camera UID: If specified, this entity will be alerted to the player when the specified camera sights the player. This is used to simulate guards being alerted to the player via security monitors.


Entity Flags

  • Only Attack Player: Entity will only attack the player. It will never attack other AI, even if attacked.
  • Weapon Is Holstered: Entity has weapon holstered by default. The weapon is still available for the entity to use, but it must be unholstered first.
  • Ready To Fire State: Entity is posed in a ready to fire animation state.
  • Ignore Terrain When Firing: Entity doesn't do collision detection with terrain when deciding to fire on targets, once target is sighted initally through line of sight. This is useful for large turrets or other weapons which you want to keep firing even if the player is hidden by cover.
  • Hidden: Entity is hidden. This means the entity isn't visible. No AI or physics of any kind is applied to the entity.
  • Cower From Weapon: Entity will flee and cower if it sees an entity of different friendliness with an unholstered weapon.
  • Question Unarmed Player: Entity will question the presence of the player if he is unarmed.
  • Deaf: Entity does not hear, so it will not investigate or react to sounds.
  • Boarded (vehicles only): Entity is boarded. This is used to indicate that vehicles are manned by AI.
  • Wear Helmet: Entity wears a helmet if one is defined for that entity class in entity.tbl ($Helmet V3D Filename).
  • End Game If Killed: Game ends if this entity is killed. When the entity is killed, the game cuts to a black screen with scrolling text. The scriptname of the entity determines what text is displayed. The text for various scriptnames is defined in endgame.tbl. This means that you must have a unique scriptname for an entity that has this flag set.
  • Start Crouched: Entity begins crouched.