Fx
This is a copy of official Paragon documentation for .FX files, pulled from the CoH Costume Updater Program.
<html><head></head> <body> <id="Sample">
Trick Files and Flags - City of Heroes - Confluence
Trick Files and Flags - City of Heroes - Confluence
Trick Files and Flags - City of Heroes - Confluence
Trick Files and Flags - City of Heroes - Confluence\r\n
</id>
<id="FX">
FX
The FX script is a series of key names and values used to define the type and order of operations within an FX system. The FX scripts operate at 3 levels: FX, Conditions, and Events. FX Script - information affecting the entire FX script. These keys will appear only once. Unless otherwise specified, all external files called from an FX script are pathed to ...game\data\fx\ Alternately, using ":" before a filename will change the path to be relative to the path of the FX script. All FX Scripts begin with "FXInfo" tag and end with "end". Anything placed below FXInfo, but before any Condition is considered part of the FXInfo block, and applies to every Condition and Event in the entire script. Condition triggers: Time, TimeOfDay, PrimeHit, Prime1Hit, Prime2Hit, Prime3Hit, Prime4Hit, Prime5Hit, PrimeBeamHit, Force, Death.
</id>
<id="Condition">
Condition
Conditions determine when the Events will actually trigger. The events inside the Condition start when *On XXXX becomes true. Each condition needs to be ended with an end statement. Condition- details the criteria for triggering an FX event. There can be multiple Conditions set. A Condition can call multiple events. </id>
<id="Event">
Event
Event - describes the particulars of an FX event. Each event creates an FX node. </id>
<id="LifeSpan">
LifeSpan
LifeSpan 200 (set to -1 = ignore lifespan altogether) - Measured in frames (1/30s of a second). This is the simple way to specify an fx's life span. When it hits this age, it just dies. You can make more sophisticated lifespan info, and death actions by setting an age condition for death below, but this works for simple fx. It also is good as a fail safe if somehow the normal death conditions don't work (ex: the fireball has been travelling for 300 frames (10 seconds) and still hasn't hit anything, so kill it). Every FX system that is used as a one-shot effect (ie. not being used as a continuous effect) should have a Lifespan defined for it at the FX level. Otherwise, the FX script will stay in memory. </id>
<id="Flags">
Flags
Flags: InheritAlpha, IsArmor, InheritAnimScale, DontInheritBits, DontSuppress, DontInheritTexFromCostume, SoundOnly, PowerLoopingSound. Everything defined in the FX block applies to all conditions and events in the entire FX script.
InheritAlpha
Inherit the alpha value from the entity the FX is attached to
IsArmor
Is an armor-type FX... Sort of a hack. If you have an FX on you with IsArmor flag, then even though the FX turns your body is invisible, it won't make other FX on you, for examples swords, invisible.
InheritAnimScale
The FX file's animation speed will be scaled based on the scales froming from the Animation system, this consists of both a- automatic scaling based on entity size and b- Scale parameter in the sequencer
DontInheritBits
Presumably, this causes the FX script to not inherit any anim bits from the parent entity. I'm unclear on when you'd want to use this.
DontSuppress
Forces the FX script to ignore any suppression, namely from the graphic option to supress FX when close to the camera. Probably want to make sure that FX scripts for weapons or costume pieces are flagged with this.
NoReticle
Not used (replaced by a flag in the enttype file. If we ever had a situation where we wanted the reticle on a entity to be sometimes visible and sometimes not visible, we could revisit this
AdoptParentEntity
unclear but its used to apply an effect onto the parent entity. "bot_invisible.fx"
AnimScale
1.0 Scales the FX file's animation speed as if it was from inherited above. This currently scales the speed of particle systems, Geoms, and attached sequencers.
OnForceRadius
0.0. Any "On Force" conditions under this fx system use this radius for their trigger. Unfortunately, they all have to share the same radius, and they also share the same epicenter.
ClampMinScale
(X Y Z) Clamps the minimum scale value for all Events in the FX script. Useful for keeping things like an arrow from getting too big or too small when attached to a radically scalled critter. This will trump any scale values set through behavior scripts.
ClampMaxScale
(X Y Z)Same as above, but for maximum scale.
DontInheritTexFromCostume
When an FX script is attached to a costume piece, which uses the Tex tags to change it's base textures, geometry in the FX script can inherit the texture from that costume piece. This flag prevents that from happening.
NotCompatibleWithAnimalHead
Used specifically for eye auras, or effects containing eye auras. This prevents the effect from appearing on characters with animal heads, whose eye placements vary greatly from those of human heads.
SoundOnly
OBSOLETE: Sets the size of the effect to the size of the sound. This flag is overridden if other flags are present and automatically set if no other flags are present. Therefore, it is not needed.
PowerLoopingSound
OBSOLETE: Was intended to allow users to override the fade out of toggle powers. However, no option for enabling this behavior was ever exposed. Therefore, it is non-functional. </id>
<id="Repeat">
Repeat
When this condition is met, do it this many ADDITIONAL times, not just once. </id>
<id="RepeatJitter">
RepeatJitter
Takes one positive integer (below 256), jitter on the Repeat condition key, so if Repeat is 50 and RepeatJitter is 20, it will repeat between 30 and 70 times, randomly </id>
<id="Random">
Random
Random 1 Instead of doing every event under this condition, choose one at random. Works in tandem with repeat. </id>
<id="Chance">
Chance
Chance [%] - This is the chance the event will actually happen when condition is met. 0.1 = 10% chance. If you leave it zero or blank, it defaults to %100 </id>
<id="DoMany">
DoMany
Do this condition every time this condition is met instead of just the first time. </id>
<id="Time">
Time
Used with "ON Time" Or "ON Cycle" with cycle time has to be greater than 0. Starts X frames (30 frames per second) from the time the effect started. This is the default condition. </id>
<id="DayStart">
DayStart
Used with "ON TimeOfDay" and it ccurs at the time of day between [DayStart,DayEnd). Decimal numbers are allowed, and ranges across midnight are allowed. For exampl: DayStart 1.5, DayEnd 2.25. </id>
<id="DayEnd">
DayEnd
Used with "ON TimeOfDay" and it ccurs at the time of day between [DayStart,DayEnd). Decimal numbers are allowed, and ranges across midnight are allowed. For exampl: DayStart 1.5, DayEnd 2.25. </id>
<id="ForceThreshold">
ForceThreshold
Used with "ON Force" If a physForceType force (from fxbhvr files) is applied and this node is within that radius, and the power applied to this fx object exceeds the ForceThreshold (a condition parameter), the condition is satisfied. The Time parameter determines how long it waits before becoming active again. That way, several forces in the same frame don't trigger the effect several times. ForceThreshold Defaults to 0. Only used if the "On" is "Force". Power from force trigger must equal or exceed this threshold before the condition is satisfied. If it is not set or is set to 0, any force will trigger condition. The Power is the physForcePower on the bhvr force, scaled down by greater distance from the epicenter of the force. </id>
<id="TriggerBits">
TriggerBits
Used with "ON Triggerbits". Means these events happen when the MUD bit is set. This event will only happen the first time the MUD bit is presenent, unless the DoMany flag is also used. </id>
<id="On">
On
On triggers a condition or event when one of the following triggers is true
Time
Starts X frames (30 frames per second) from the time the effect started. This is the default condition.
TimeOfDay
DayStart 1.5, DayEnd 2.25. Occurs at the time of day between [DayStart,DayEnd). Decimal numbers are allowed, and ranges across midnight are allowed.
PrimeHit or Prime#Hit
Starts when the node named "Prime" arrives at it's target. Usually you will name the main part of a projectile as EName "Prime", then put the explosion part of the fx in a condition with "On PrimeHit". PrimeHit is also used by the system to track the timing of an effect that is flagged as "DelayedHit" in a PFX script. PrimeHit also works with other prime event names.
PrimeBeamHit
Starts when the geometry on the node named "Prime" has stretched to the point that it has reached it's target. (This assumes that prime actually has geometry and a beam behavior)
Cycle
needs Time # and time has to be greater than 0 or the game will have a divid by zero erro, Every # frames, trigger all of the events in this Condition. This will not trigger immediately. It's first instance will be delayed by the amount of time defined for the cycle. Also, every copy of this event will be created with the same EName. If other events refer to this events 'EName', they will use the very first instance of this event. A cycle event must have a Lifespan defined for it, otherwise it would build up indefinitely. Also, a Cycle event will get created even after a destroy all event. The only thing that will stop a Cycle event from continuing to play is having a lifespan on the FX event itself.
Force
needs ForceThreshold #. If a physForceType force (from fxbhvr files) is applied and this node is within that radius, and the power applied to this fx object exceeds the ForceThreshold (a condition parameter), the condition is satisfied. The Time parameter determines how long it waits before becoming active again. That way, several forces in the same frame don't trigger the effect several times. ForceThreshold Defaults to 0. Only used if the "On" is "Force". Power from force trigger must equal or exceed this threshold before the condition is satisfied. If it is not set or is set to 0, any force will trigger condition. The Power is the physForcePower on the bhvr force, scaled down by greater distance from the epicenter of the force.
Death
Triggered when the FX system is told to die. When this dies, then the fx system starts fading out. It is very important that this have a lifespan or the FX will never die. Once Death has started, events in the condition are done, and then no other creation events are done, even if they evaluate to true. Existing events continue till all death events are dead before they are triggered to fade out.
Triggerbits
needs Triggerbits MUD. Means these events happen when the MUD bit is set. This event will only happen the first time the MUD bit is presenent, unless the DoMany flag is also used. </id>
<id="EName">
EName
EName [NodeName], Ename serves two purposes: 1. If this event is a call to create an fx node, EName is the name to give that new fx node. This name is used in the same way the InpName is used, to refer to the node elsewhere in the file. If you don't intend to refer to this event anywhere else in the file, you don't need an EName. 2. if this event changes an fxnode: for example if it destroys it, EName is how you specify which fx node you want to destroy. </id>
"Create", "Destroy", "Local", "Posit", "PositOnly", "SetLight", "SetState", "Start", "StartPositOnly"
<id="Type">
Type
This determines how the event behaves in relation to the node it's created at. For the most part, these are functionally identical to what can be done using the Create, Inherit, and Update settings outlined below.
Create
Create a node: Specify how you want the node to inherit or update relative to the creating node with the following flags.
Destroy
Destroys the named node. Using ALL for the EName will destroy all events in the FX script
Inherit
Inherit - Works in conjunction with the Create type. Inherits these values from the node: Position, Rotation, Scale, SuperRotation, All, None
Local
Create a node: takes everything from the parent every frame.
Posit
Create a node: takes the initial rotation, scale, and position of the parent, and then updates the position every frame to match the parent
PositOnly
Create a node: takes the initial position (not rotation or scale) of the parent and then updates the position every frame to match the parent
Start
Create a node: takes the initial rotation, scale, and position of the parent, and never again gets anything from the parent
StartPositOnly
Create a node: takes the initial position (not rotation or scale) of the parent, and never again gets anything from the parent
Update
updates these values (Position, Rotation, Scale, SuperRotation, All, None) every frame after creation </id>
<id="Inherit">
Inherit
Inherit - Works in conjunction with the Create type. Inherits these values from the node: Position, Rotation, Scale, SuperRotation, All, None </id>
<id="Inherit_Position">
Inherit Position
Position Start with the position of the creating node. Inherit - Works in conjunction with the Create type. </id>
<id="Inherit_Rotation">
Inherit Rotation
Start with the rotation of the creating node. Inherit - Works in conjunction with the Create type. </id>
<id="Inherit_SuperRotation">
Inherit SuperRotation
Same as rotation (includes that flag too), but also rotates velocities and position offsets. For backwards compatibility. Inherit - Works in conjunction with the Create type. </id>
<id="Inherit_Scale">
Inherit Scale
Start with the scale of the creating node. Inherit - Works in conjunction with the Create type.
</id>
<id="Update">
Update
updates these values (Position, Rotation, Scale, SuperRotation, All, None) every frame after creation </id>
<id="Update_Position">
Update Position
Updates Position values every frame after creation. </id>
<id="Update_Rotation">
Update Rotation
Updates Rotation values every frame after creation. </id>
<id="Update_SuperRotation">
Update SuperRotation
Updates not only Rotation but also the Rotates Velocities and Position offsets values every frame after creation. For backwards compatibility. </id>
<id="Update_Scale">
Update Scale
Updates Scale values every frame after creation. </id>