AG Modifier Reference

The Modifier System

Available Modifiers in the SDK

List of all Modifiers and details to the Parameters in the Node Details Panel.

Additive Modifier

This Modifier allows playing an animation in a higher layer in addition to the state's own animations. It can also be used to stop animations in a higher layer. Usually used for additive animations. The asset will be started upon entering of the attached state. It can either play through once or loop. If desired, the animation can be stopped when the state is left, or keep playing. In that case it will keep playing until another animation is started in that layer, or this modifier is being used to stop the animation in that layer. The Animation Name may make use of Variation Inputs. The Modifier can also be used in connection with Hub states that have no own animation.

Parameter

Description

Layer

The layer this Additive Modifier is working on

PlayMode

Decides whether the Animation should be played through once or be looped, or whether the animation in this layer should be stopped

Weight

The weight of the Additive Asset (Additives don't have to be blended with 100% weight)

BlendIn Time

The time in seconds to blend the animation in or transition over from the previous animation

Speed

The Playback Speed Multiplier of the Asset

Fade out when linked Animation State is left

If this is true, the animation will be stopped and faded out if the graph leaves

FadeOut Time

This time will be used to fade out the animation. This value will either be used if the Play Mode is set to stop the animation, or if the Animation is set to fade out when the attached state is left

Animation Name

The name of the animation as it appears in the CAL File or Character Editor. Variation Inputs in the name are supported, Parameterization is not supported.

Animation Controlled Camera Modifier

This modifier will cause the FirstPerson Camera to be controlled by the animation. The Camera position and orientation will be placed between the two eye bones. See CAnimatedCharacter::FilterView() for the actual implementation. This works in collaboration with the game code (camera implementation). This will work only with Animation Controlled Movement.

Attachment Effect

This modifier node plays a particle effect on an attachment. Size, Count and Position Offset can be manipulated.

Parameter

Description

Attachment Name

The name of the attachment on the character the particle effect is to be played upon

Particle Effect Name

The name of the Particle Effect to be attached

Position Offset (X,Y,Z)

Position Offset to the Attachment

Size Scale

The size of the Particle effect can be dynamically adjusted by this formula
(Input Value (optional) + Offset) * Multiplier

Count Scale

The particle count of the Particle effect can be dynamically adjusted by this formula
(Input Value (optional) + Offset) * Multiplier

Comment

This modifier represents a comment inside the graph, it has no actual functionality besides giving information.
It will not be exported into the binary ag file.

Parameter

Description

Notes

The text of the comment to be displayed in the view

Disable LookIK

Sets whether LookIK is allowed/disallowed in the AnimatedCharacter. Internally it calls the CAnimatedCharater::AllowLookIk() function.

Event

This modifier makes a callback to the game upon entering and leaving the state and sends a string/event to the game object. Events get handled in the CActor::HandleEvent function (or the player's). You can add custom events in the Game Objects.

Parameter

Description

Entering State

The name of the event to be send when this state is entered

Leaving State

The name of the event to be send when this state is left

Send events after state initialization/destruction

If false, the events will be send immediately upon request to enter/leave. If true, state entering/leaving has to completely finished first (meaning the animation will have already been pushed in the queue, or the transition to the next animation has already started)

Fall And Play

This modifier triggers a ragdoll event in the game that has the character fall down and then standup again. The graph will not be able to leave the attached state until the character has finished standing up. Technically this node consists of an Event and a WaitForStandup (how it was used in AnimationGraph 1.0).

Output

This modifier creates a named variable and sets it to a string value which can be requested by the game code. Once the Output Modifier is left (the linked state is left) the Variable will be destroyed again. The Output can be requested via code or FlowGraph.

Parameter

Description

name

The name of the Variable to be created

value

The string value to set the Variable to

Facial Sequence

This modifier plays a facial sequence depending on the alertness level of the character. It can randomly pick from a list, if more than one sequence is specified for a given alertness. Separate sequences with a comma to have the code choose one randomly. Upon leaving the linked state, the facial sequence is stopped.

Parameter

Description

Idle

Sequence to be played if the character is in "Idle" Alertness

Alerted

Sequence to be played if the character is in "Alerted" Alertness

Combat

Sequence to be played if the character is in "Combat" Alertness

Use the same for all

If checked, the sequence specified in the edit box below will be used for all alerted modes

Play Sound

This modifier plays a sound after a delay when entering the associated state. If everything is set up correctly, lip sync can optionally be switched on. By default, the sound is started as a 3D Sound, but custom flags can optionally be specified (see ISound.h).

Parameter

Description

Sound Name

Name of the sound file

Play after Delay

Wait time in seconds before the sound is triggered after entering the linked state

Voice Sound

If checked, this will make the character lip sync to the sound, if set up correctly

Custom Flags

Custom Flags, see ISound.h

Ragdoll

This modifier will cause the character to ragdoll. This will technically send a TurnRagdoll event to the Game Code. It is wrapped into a modifier for convenience. The character will stay in ragdoll after this, unable to play animations. The game object has to terminate this condition.

SetInput

This modifier can change an input to the animation graph and set it to a new value - and optionally restore the original value after the state or the node is left. Note: If the Modifier is linked to several states, it will not be left or re-entered while the graph is transitioning from one state to another that has this Modifier linked. Only when a state is entered that does not have this modifier linked to it will the input be restored. Accordingly, the timer is not restarted until the Modifier has been properly left once. (See the Idle Break Setup in the SDK graph for an example for this.)

Parameter

Description

Input Name

The name of the Input that is supposed to be changed

New Value

The Value the Input is to be set to

Time

Time in seconds to wait before setting the Input to the new value

Restore previous after leaving

Once the Modifier is left, the Input is restored to it's previous value

Time Alignment Group

All Animations inside States linked to this state will be using the Time Align Flag when transitioning in between. When transitioning to an Animation not inside this group, regular linear blending will be used instead. A state can be linked to several Time Alignment Group modifiers.

Parameter

Description

Group Name

The name of the group - can be freely chosen

Wait for Falling

This modifier node will keep the graph from leaving the linked state until the character has made contact with the terrain again.

Wait for StandUp

This modifier node will keep the graph from leaving the linked state until the low level animation code has finished standing up this this character after a RagDoll/FallAndPlay triggered in code. It is not needed when the FallAndPlay Modifier is already linked, because that one includes this one.

Wait for UpperBody Allowed

This modifier node will keep the graph from leaving the linked state until the fullbody animation graph is in a state that allows upper body animation.

Programming custom Modifiers

Since the Modifier System is extendable, it is possible to add more custom modifiers to the graph, and thus extending it with new functionality. For more information on how to implement a Modifier, see the Animation Graph Programming Reference.