Fx Spec Editor
This page explains use of the FxGUI, the FX Graphical User Interface for the HSL FX system, also called the Fx Spec Editor. With the FxGUI, you can create, view, and modify different effects.
An Fx is also a Spec
The FxGUI is another name for the Fx Spec Editor. Generally speaking, a Spec Oracle Editor can be used to access and modify multiple different Spec Oracles, not just the Fx Spec Oracle. In the case of the Fx Spec Oracle though, there is a custom editor, the FxGUI, which replaces the generic Spec Editor. This allows better editing of the many powerful Fx System definitions.
Accessing the FxGUI
- Open the HotSpot Menu (Press F5 when the Viewport has the focus)
- Select the Tools Tab and find the Spec Oracles section.
- Click Fx.
- Choose an existing Fx to edit, or click Add.
This section contains a description of the various panels that make up the FxGUI:
- Task browser panel
- Task properties panel
- Edit Spec Data panel
- Preview panel
The Toolbar contains panel controls and task icons. A Task is anything that can occur during the lifetime of an Fx. The Toolbar is broken up into three groupings, from left to right:
- Panel controls - Administrative section, here is where you can save the Fx, or click icons to hide and unhide sections of the FxGUI as needed
- Basic FxTasks - Icons from here can be dragged to an FxGroup, to add such a task to the group
- Fx Tool Tasks - These are utilities which act upon FxTask instances
From left to right:
Toolbar panel controls
|Save||Allows you to save your Fx.|
|Spec||Hides\Un-hides the Edit Spec Data panel.|
|Browser||Hides\Un-hides the Fx Browser.|
|Preview||Hides\Un-hides the Preview panel.|
Basic FxTasks in the Toolbar
- Main page: Basic FxTasks
These are resources that are instantiated as 3D Objects in your 3D World, such as lightning nodes and particle emitters. Each such task has an Fx3DController section in its Properties panel, which allows you to specify where the instance will be placed, along with its rotation and scale.
|Particle Emitter||Creates an instance of a particle emitter definition. See Particle Effects|
|Lightning||Creates an instance of a Lightning object|
|Model||Creates an instance of a Model (3D Mesh)|
|Light||Creates an instance of a Light|
|3DSound||Creates an instance of an Audio asset (.wav, .sgt)|
|Lens Flare||Creates an instance of a Lens Flare object|
|Mirror||Creates an instance of a Mirror object|
|Sound (non3d)||Plays specified audio asset on the stereo channel|
Tool Tasks in the Toolbar
- Main page: Fx Tool Tasks
Unlike tasks that create instances, Tool Tasks are utilities that act upon the instantiated FxTasks. For example, the transformer moves or resizes instances of existing FxTasks, and the attacher tool attaches one FxTask to another, and so forth.
|Attacher||Tool that attaches specified 3d instance to other specified 3d instance or character|
|Transformer||Tool that Transforms position, rotation and/or scale of a 3d instance from start to target|
|TransformArc||Tool specialized to transform that moves a 3d instance from start to target in an arc shape.|
|mFader||Tool that adjusts the alpha of models allowing fade in and fade out.|
|AnimCmd||Tool that sends the specified animation command string to specified character.|
|Fx||An optional organizational container.|
|X||Closes the Fx Control Bar and all other Fx GUI panels.|
|New! Fx Script Call||Generate a call to a client-side script.|
Fx Task Browser panel
The browser shows each task that has been added to your Fx. The top level (named fxgNewFxGroup) is an FxGroup, the container object that holds all tasks for the Fx. This top-level FxGroup represents the beginning and end of the entire Fx, as no individual task can start before or live beyond the FxGroup's start time and stop time. Click the task in the task browser to view the settings for each task.
Fx Properties panel
Edit Spec Data panel
- The Preview panel allows you to audition your Fx.
- The big Preview button at the top, sends a copy of your current local version of the Fx to the Fx System to be played. Note that it is NOT necessary to Save before you Preview. This allows you to tweak and Preview as much as need, without saving to the server.
- Caster represents the starting point in 3d space.
- The SELF option uses your 3d character as the origin.
- Target represents another point in 3d space, which you may have specified to be used such as having a particle emitter chase a target.
- The SELECTION option uses any object you have selected within the 3d world.
- Unload will unload all resources loaded in the Fx System. This is needed when you are updating resources while editing (uploading a new version of a sound or model, making changes to particle specs).
|ControlScript||Optional. You may specify a script name here. If you do so the script will recieve all the events from this Fx, allowing the script to perform fancy tricks timed exactly with the events from the Fx. See FxControlScript Callbacks|
|Name||The name of the FxGroup.|
|TimerType||Determines how the FxGroup handles its timer. ONESHOT means it will start, wait the time specified in FireRate then stop. TICKER means it will start, wait the time specified in FireRate then fire a ONFXTICK event and continue. NEVERFIRE means it will start but never send a stop event. If TICKER or NEVERFIRE is used, the Fx will not stop until it reaches the specified timeout.|
|FireRate||The timeinterval that this FxGroup will wait before firing an event.|
|TimeOut||The timeinterval to wait before killing all instances that this Fx created. This should always be set just a few seconds longer than the intended length of the Fx. If you set this to 00:00:00.000 and choose a timertype of NEVERFIRE, the Fx will begin and never end (until ended manually by a system you have scripted, or the client is shutdown).|
|MultiTgtBehavior||Sets how this FxGroup will behave if it recieve multiple targets.
NORMAL means tasks that require targets will use the first target in the list of targets.
SPREAD means it will clone (make exact copies of) every task, one for each target.
SEQUENCE means it will clone each task, one for each target and fire them in sequence one after the other.
CHAIN means it will clone each task, one for each target and fire them one after the other, but each target will become the origin of the next clone.
|CloneStartMethod||If SEQUENCE or CHAINED is chosen for MultiTgtBehavior, this sets the method used to start each clone.
ONPREDECESSOREND means each successive clone will fire when the last one ends.
AFTERDELAY means each successive clone will fire after the specified delay time.
An Fx SubGroup, like the top level FxGroup, holds tasks and can be assigned a start and stop event. If you are creating a large complex set of effects, you can add Fx SubGroups to help keep things organized. For example, a fireball Fx could divided up into 3 sections, gathering energy, throwing the fireball at the target, and hitting the target. Adding two Fx containers to the FxGroup, one for the fireball throw section and one for the fireball hits target section serves to visually separate the sections, making debugging and tweaking easier.
Any task that is dropped on an Fx SubGroup, is automatically set to start when the Fx SubGroup starts.
FxEvents are discretely identifiable occurrances during the lifetime of your Fx. We use these events to tell tasks when to start and stop. Events are said to 'fire' when they occur, meaning the originator of the event fires the event into the air for all to see.
|WhenToStart||Sets the type of event to wait for to start|
|StartFxName||The task that will fire the WhenToStart event.|
|StartDelay||Time to delay starting after the above event has fired.|
|CheckDynData||If true, only start if specified name/value pairs are matched.|
|WhenToStop||Sets the type of event to wait for to stop.|
|StopFxName||The task that will fire the WhenToStop event.|
|StopDelay||Time to delay stopping after the WhenToStop event has fired.|
List of all FxEvents
|ONFXSTART||Occurs when a task starts. All tasks fire this event.|
|ONFXSTOP||Occurs when a task stops or completes it's task. Instantaneous tasks, such as Attachers and AnimCmds do not fire this event since there is no interval between their start and completion.|
|ONFXTICK||Occurs each time the specified time interval passes. Only the top level FxGroup and Fx tasks can fire this event and only if they have been set to a timertype of TICKER.|
|ONFXTIMEOUT||Occurs when the specified timeout time interval passes after the FxGroup has started, if the time interval specified is greater than zero. Only FxGroup and Fx Tasks can fire this event. Timeout's are specified when you have an Fx that may have a variable duration but should never continue to run beyond the specified timeout.|
|ONTARGETACHIEVED||Occurs when a particle emitter reaches its target. Only Particle Emitters fire this event.|
|ONEXPIRE||Occurs when a particle from a particle emitter expires. Only Particle Emitters fire this event. CURRENTLY DISABLED due to detrimental effect on framerate.|
|ONCOLLIDE||Occurs when a particle from a particle emitter collides with another poly. Only Particle Emitters fire this event. CURRENTLY DISABLED due to detrimental effect on framerate.|
|ONLOSTTARGET||Occurs when a particle emitter that is chasing a target finds that the instance it was chasing no longer exists. Only Particle Emitters fire this event.|
|ONANIMATIONNOTE||Occurs when the animation note is detected while the character is playing the animation. See [Animation System]|
|ONTRANSFORMREPEAT||Occurs when an FxTransformer begins a repeat of the its transform. Only FxTransformers fire this event and only if they have a specified RepeatCount of greater than 1.|
|ONTRANSFORMREVERSE||Occurs when an FxTransformer reverses its transform. Only FxTransformers fire this event and only if they have been set to Reverse the transform when it reaches its target.|
|ONMODELFADERREPEAT||Occurs when an FxModelFader repeats its fader. Only FxModelFaders fire this event and only if they have a RepeatCount greater than 1.|
|ONMODELFADERREVERSE||Occurs when an FxModelFader reverses its fader. Only FxModelFaders fire this event and only if they have been set to reverse the fader when it completes.|
Starting based on Dynamic Data
When playing an FX, you may pass along any number of name/value pairs. You can then setup the Fx to check this data before playing indivual parts of the Fx.
For example, if you have a fireball FX that chases a target and explodes on impact, you can specify the explosion section of the FX to only occur if "HITTARGET"="TRUE" has been passed in to the FX when played.
You can also use special string substitution tokens in the name string of a name/value pair that will be replaced at runtime with dynamic values.
The %casterID% and %targetID% tokens will be replaced by the GUID of the caster and target node, respectfully. The %casterPos% and %targetPos% tokens will be replaced by the vector3 positions given as the caster or target.
- Information on how to extend the Fx System for your game-specific needs.