RED Objects

From Red Faction Wiki

Objects can make or break a level. The addition of objects to a level helps to provide a better reference for scale, as well as giving a level a more realistic feel. Objects are classed as any 3D thing in a level that is not made from level geometry, and there are several different categories of objects, ranging from characters to vehicles to light fixtures and weapons. Objects can be manipulated in Object Mode or Group Mode.

This page lists available object types in RED. For specifics on Object Mode in RED, see the Object Mode Overview.

Regions

Climbing Region

Push Region

Gas Region

Geo Region

Non-Geo Region

Emitters

Bolt Emitter

Particle Emitter

Triggers

Trigger Door

Trigger Event

Trigger Auto

Player Spawn Points

Player Start

Multiplayer Respawn Point

Area Effects

Light

Ambient Sound

Room Effect

EAX Effect

Decal

Cutscene/AI Objects

Cutscene Camera

Cutscene Path Node

Nav Point

Nav points are used by entity to determine where they go (or pathfind) a level. If you don't lay down a network of nav points in your level, entities will just stand there and not be able to move around. The key to connect two nav points is the "J" key.

If you have Show Path Node Connections turned on (from the View Menu), you will see a box around the connections between the nodes. This box will be as wide as the smallest radius of the two connected nav points. The radius of a path node will soon be used for some important functions. Namely, if a nav point is too small, than an entity with a larger radius than the nav point WILL NOT USE THAT NAV POINT in finding paths. This will allow you to have humans following paths, but APCs will not try to follow. Furthermore, when you place a nav point, you are guaranteeing that the area within the nav point radius is clear of obstructions. And even more, you are guaranteeing that the box connecting the two nav points is ALSO clear of obstructions. This means that entities can walk anywhere within the nav points and anywhere within the boxes connecting the nav points, and they can't do something stupid (like walk off a ledge or get stuck on a corner) if they stay within those bounds. Adding width to our connections between nav points will keep the AI from piling on top of each other.

If you select two nav points and keep pressing "J", you will notice that you are toggling before 4 types of connections. Let's call the two nav points "A" and "B". If you have just plopped down these two nav points, then by default, they will not be connected. In other words, no entity can walk directly from point "A" to point "B". If you press the "J" key once, then it will connect them. In other words, you are guaranteeing the AI code that an entity can walk from point "A" to point "B" and ALSO is able to walk from point "B" to point "A". However, there may be cases where you can only walk in one direction. For instance, you may have your entities walking off of a ledge to go from point "A" to point "B". But the drop is too far for them to go directly from point "B" back to point "A". In such cases, you can keep pressing the "J" key, to toggle through both "directional" connections (i.e. point "A" to point "B" OR point "B" to point "A"). This type of connection is indicated by an arrow line which connects the two nodes in addition to the box. If you keep pressing the "J" key, you will get back to the unconnected state.

Recap:

  • Initial state: no connection between point A and point B
  • Press J once : entity can go from point A to point B AND from point B to point A
  • Press J twice: entity can only go from point A to point B
  • Press J thrice: entity can go only from point B to point A
  • Press J four+ times: go back to "no connection" and loop back through the possibilities

Here's an important restraint. Do not cross the streams. Why, you ask? Because that...would look bad. Entities will wind up following non-optimal paths if connections between nav points were to cross. When I say "cross", I mean, do not form an "X" on the ground without having a new nav point at the center of the "X".

Waypoints

The all important key for setting up waypoints is "CTRL + W". It only works in object mode. The new method for creating a waypoint list is the following. You place all of your nav points. Then you select the nav points you want to make into a waypoint list IN ORDER of how you want the entity to follow that path. Then you press CTRL + W. This will create a waypoint path with no name. A window will pop up which allows you to change the name of the waypoint list and to add and remove nav points from the waypoint list.

If the waypoint had a pause time associated with it, then the new nav point will ALSO have a pause time associated with it. Pause times associated with nav points ONLY apply to entities that are at that are using that nav point AS A WAYPOINT. In other words, you cannot assign a pause time to a nav point and expect an entity to pause at that nav point as it is doing its regular pathfinding. The pause time only affects entities using the nav point as a waypoint.

If you want to modify an existing waypoint list, then make sure that you have no objects selected. THEN press "CTRL + W". You will see a list of existing waypoint lists. Select the waypoint list that you want to modify and press OK. You will now get the same window that popped up when you created the waypoint list in the first place. Again, you will be able to modify which waypoints are in the list and which are not.

Note that a given nav point can be used by several waypoint lists. However, if you have a pause time associated with the nav point, it will affect all waypoint lists that use it.

Events

The event/scripting system for Red is very powerful, yet easy to use. The basic philosophy behind it is that you LINK a TRIGGER to an EVENT(s). This system is very versatile and will let you create an almost unlimited number of special scripted sequences.

An "Event" is a basic game action that occurs when it receives either an On and/or Off message. On messages can be sent from triggers, objects, or they can be received from other Events. Off messages are sent from the off state of events like the Switch Event, or are sent through an Invert Event. Most Events only respond to On messages (since most Events do a single thing which doesn’t need to be stopped with an Off message). Events must be linked to the trigger source so they know when to trigger. You link a trigger and event together by using the objects unique id number, or by just selecting the first object, then the second object, and hitting the "K" hot-key.

Events can also be linked to other Events to set up a "Chain reaction" of event all triggered from one source. For example, you might have a trigger which links to a Play_Sound Event (which plays a scream), and the Play_Sound Event could link to a Play_Animation Event (which plays an animation of an AI holding his head in agony).

All Events have an optional delay associated with them, which you can specify in the Event properties (CTRL-P or by right clicking over the selected event and selecting "Properties" from the pop-up menu). This will delay the action of the event by the specified amount of time, after an On or Off message is received.

Events can link to other objects, which is used to tell the Event which objects to affect. Each Event affects their linked objects in different ways, so refer to the Event list below for a detailed description of each event. The link HAS to go from the event to the object for it to work- even if the object is being used at the "trigger"!

Event Types

  • See RED Event List for a comprehensive list of event types and their functions.

Properties

Most event types have additional available options, but these are available for all event types:

  • Event Type: Event type, will always be one of the available event types.
  • Script Name: Name for event. Primarily used for level designers to help organize their events.
  • Delay (seconds): Delay in seconds this event will fire after its triggered. For example, specifying a delay of 0.5 in this field will mean that the event's action will happen 500ms after it was triggered.
  • Change Color: Open color selection dialog. Event colors have no functional purpose and are used only for helping level designers organize their events.
  • Links: Open the Object Links dialog, where you can add and delete link entries. This window controls other objects to which this event links (Event->Other Object).

Clutter

Entity

Entities include all characters, vehicles, turrets, and cameras in the game.

Entity Types

  • Creatures
    • baby_reaper
    • bat
    • Big Snake
    • fish
    • mutant1
    • mutant2
    • reeper
    • Rock Snake
    • Sea_Creature
  • Miners
    • eos
    • miner1
    • miner2
    • miner3
    • miner4
    • parker_sci
    • parker_suit
  • Robots
    • admin_bot
    • Auto Turret
    • Auto Turret Head
    • camera2
    • Cutter
    • Drone
    • Grabber
    • Meca Turret
    • multi_grabber
    • Spike
    • Stationary Turret
    • Stationary Turret_Plain
    • Tankbot
  • Ultor
    • admin_fem
    • admin_male
    • admin_male2
    • Capek
    • comp_tech
    • elite
    • env_guard
    • env_scientist
    • guard1
    • guard2
    • masako
    • medic
    • merc_com
    • merc_grunt
    • merc_heavy
    • multi_civilian
    • multi_female
    • multi_guard2
    • multi_merc
    • nurse1
    • riot_guard
    • tech1
    • ult_scientist
  • Vehicles
    • APC
    • Driller01
    • Fighter01
    • Jeep01
    • masako_fighter
    • sub
    • Transport
    • Transport_rockets

Properties

Entity Options

  • 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.
    • Unfriendly: Entity will attack the player or any other friendly entity on site
    • Neutral: Entity will not attack the player or any entity unless provoked.
    • Friendly: Entity will not attack any entity flagged as unfriendly.
    • Outcast: Entity will attack any entity and be attacked by any entity regardless of its friendliness.
  • 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.

Item

Target

Keyframe

The editor uses keyframes as the method for animating how moving groups move. They are a way to tell the game engine where the mover should go and in what order. You also use the keyframes to tell the mover how fast to go to the next keyframe, if the mover should reverse or start the process over when it finishes, and other such information.

Properties

  • Is Door: Set this flag for a Translating or Rotating Mover that's used as a door so it will block visibility when it's closed. A door is considered "closed" then the mover is at the the gold keyframe.
  • Start Moving Backwards: This flag causes a translating mover to start at its last keyframe and go backwards through the keyframe list. On a rotating mover, it will start at its final position.
  • Rotate In Place: Set this flag for creating a Rotating Mover.
  • Use Travel Time as Velocity: This flag uses the values in "Departing Travel Time" and "Return Travel Time" to set a mover's speed (meters per second).
  • Force Orient: Not Supported.
  • No Player Collide: This flag causes the mover to not do collision detection.
  • Propagate Sounds: This will make all keyframes that have the same script name as the currently selected keyframe have the same sounds. This will not affect keyframes with the script name of "keyframe".
  • Propagate Properties: This will make all keyframes that have the same script name as the currently selected keyframe have the same properties. This will not affect keyframes with the script name of "keyframe".
  • Stop Sounds: This will cause all looping sounds that have been activated by a "Preview" button to stop playing.
  • Movement Type: Defines the movement behavior for the keyframe list. The movement types are explained below:
Movement Type Translating Rotating
One Way Goes from first to the last then stops until it receives a turn on message again. e.g. 1 > 2 >3 - STOP Goes from start to finish then stops until it receives a turn on message again. e.g. START > FINISH - STOP
Ping Pong Once Goes from first to last then back again then stops until it receives a turn-on message again. e.g. 1 > 2 > 3 > 2 > 1 - STOP Goes from start to finish then back to start until it receives a turn-on message again. e.g. START > FINISH > START - STOP
Ping Pong Infinite Goes from first to last then back again until it receives a turn-off message again. e.g. 1 > 2 > 3 > 2 > 1 etc. Goes from start to finish then back to start then loops e.g. START > FINISH > START LOOP
Loop Once Goes from first to last then back to first then stops. e.g. 1 > 2 > 3 > 1 - STOP Same As Ping Pong Once
Loop Infinite Goes from first to last then back to first and repeats until it receives a turn off message. e.g. 1 > 2 > 3 > 1 > 2 > 3 etc. Goes from start to finish then loops. e.g. START > FINISH > LOOP
  • Starting Keyframe: This will determine the keyframe a mover will start at. This does not affect rotation movers. Also used conjunction with the "Preview" button to show a mover at a specific keyframe in the editor.
  • Preview: This will show the mover (in the editor) at the keyframe specified in "Starting Keyframe".
  • Start Sound: This is the sound that is played when a mover starts moving.
  • Looping Sound: This is the sound that is played when a mover is moving between any keyframes in it's keyframe list.
  • Stop Sound: This is the sound that is played when a mover either stops or pause at a keyframe.
  • Close Sound: This is the sound that is played when a mover that is flagged as a door reverses direction.
  • Volume: Each value will set the volume for the respective sounds. Default is 1.00
  • Preview: Click this button to preview the respective sound in the editor. This only works if you have extracted the sounds from the audio.vpp file.
  • Script Name: Enter a custom script name to allow sounds and properties to be propagated to other keyframes with same custom script name.
  • Pause Time: This sets the time a mover will pause at the currently select keyframe. This only works on silver keyframes.
  • Departing Travel Time: This is the time it will take a mover to go from the currently selected keyframe to the next keyframe.
  • Return Travel Time: This is the time it will take the mover to go from the previous keyframe to the currently selected keyframe.
  • Acceleration Time: This is the time it takes the mover to reach maximum velocity.
  • Deceleration Time: This is the time it will take the mover to reach zero velocity.
  • Trigger Event with UID: You can specify an event's UID so that when the mover reaches this keyframe, it will send a turn-on message to the event.
  • Contains Item UID(s): If you create a container (like a locker or crate), you have to specify the UID(s) of the object(s) here so the item(s) cannot be picked up until the container is opened.
  • Degrees About Axis: This is where you specify the amount a rotating mover rotates.
  • OK: Click this to confirm any changes you have made and close the dialog box.
  • Cancel: Click this to close the dialog box and lose any changes you have made.