The chud_
Widget Collections and the two widgets within them all contain State Data, Placement Data, Animation Data and Render Data tag blocks; these determine when the text and bitmaps are displayed and how they are displayed. The tag blocks within Text Widgets and Bitmap Widgets refer back to their parent Widget Collection tag blocks first; for example, Placement Data can specify that an entire Widget Collection should display in the top right corner of the screen and any bitmap or text widgets within will do so unless specified otherwise within their own Placement Data tag blocks.
In addition to the Widget Collections, chud_
Widget Collections
These tag blocks are the containers for all of the others below them. They also contain several fields which further determine their use and how the widgets they contain are displayed.
The artist name field is used to give a descriptive name to the tag block.
Scripting class is an enum that determines the specific type of the widget that can be referred to by scripts to disable or enable the collection.
Base flags are used to give special traits to a collection.
Sort layer determines the order in which the widgets are displayed. For example, this is used by overshields to specify that they should display on top of the shield layers below them.
State Data
This tag block determines the states which the widget is allowed, or disallowed, to display in. For example, weapon tags will often use State Data to specify that a Widget Collection should only display when the player is of a specific species.
Placement Data
Placement Data is used to specify the location on the screen where a widget will be rendered. The anchor type enum is used to set the basis for the location and the widget origin and origin offset fields can be further used to modify where the widget is displayed. The widget scale field is used to manipulate the size of the widget, scaling it up and down along the x and y axis.
Animation Data
Widgets are able to use this tag block to perform different animations based on different states and optionally input provided by the Render Data tag block.
- Initializing
Used when the widget first becomes active.
- Active
The animation that is played when the widget is enabled and not performing any other animation
- Flashing
Played when its external input is low, for example; when a player's shields are low.
- Readying
The animation played when the widget is transitioning in to become active.
- Unreadying
The animation played when the widget is transitioning out to become inactive.
- Impulse
Unknown
Render Data
Render Data is used to display either a bitmap image or text string.
The shader type changes the way that the bitmap image is displayed on screen. Meters for example are used by Shields and Energy Meters to represent their current value.
External Inputs are used to provide data values from the game, such as the amount of health the player has or how many grenades of the currently selected type they possess. Up to two of these can be used and referred to in order to modify the output.
chud_
Custom Colors are optional colorations that can be applied to text or bitmaps that are applied differently based on the shader type that is used and, when used by Scalar Outputs; the Custom Scalars below.
Color Outputs are used to apply the colors to the output widget that is displayed on screen. These can either reference the above Custom Colors or one of the values within the chud_
Scalar Outputs are the final modifier for what will be displayed. These can be used to provide a static value from Custom Scalars or a value from either of the External Inputs. They can also output based on a Flash animation or scalar animation B (?). Bitmap Widgets and Text Widgets end the block differently. Both have a set of flags that contain different options for modifying the final output.
Bitmap Widgets can be supplied a bitmap tag to be shown and an optional sequence index, while Text Widgets have an enum that determnines the font used and a string id which can either be from the hud_
- chud_
out_ a - chud_
out_ b - chud_
out_ c - chud_
out_ d - chud_
out_ e - chud_
out_ f - chud_
variant_ name - chud_
talking_ player_ name - chud_
arming_ meter_ name - chud_
time_ left - chud_
training_ text - chud_
campaign_ objective_ text
Acknowledgements
Thanks to the following individuals for their research or contributions to this topic:
- Lord Zedd (Assembly tag definitions and comments)