HowTo:Edit HUDs
none | HowTo | none |
Contents
Editing or Creating a HUD
Image files
- To display your own graphic files in the HUD you can use every image format that is supported by vegastrike (png/jpg/bmp/...).
- The sides of the images must have a size that is a power of 2.
The cockpit directory
The cockpit directory contains all the relevant files that consist of the HUD and cockpit. These files are:
- .cpt file - FIXME PROVIDE EXPLANATION OF PURPOSE OF FILE
- .bfxm file - FIXME PROVIDE EXPLANATION OF PURPOSE OF FILE
- .xmesh file - FIXME PROVIDE EXPLANATION OF PURPOSE OF FILE
- .spr files - FIXME PROVIDE EXPLANATION OF PURPOSE OF FILE
Example
../cockpits/disabled-cockpit.cpt
Structure
disable-cockpit.cpt is the name of the subdirectory.
Description
All cockpit/HUD information is held under a single directory located as a subdirectory of the cockpits directory.
The ".cpt" file format
FIXME COMPLETE MISSING INFORMATION
Example
disabled-cockpit.cpt
Structure
FIXME INFORMATION ON STRUCTURE REQUIRED
Description
This is the .cpt file, using the same name as per the directory name. FIXME INFORMATION ON STRUCTURE REQUIRED
The ".spr" file format
FIXME REDEFINE INTO EASY TO FOLLOW INSTRUCTIONS
Example
./cockpits/disabled-cockpit.cpt/blasterpower.spr
cockpit/blasterpower.png cockpit/blasterpower.png .25 .09 0 -.5
Structure
imagename alphaname scaleX scaleY positionX positionY
Description
- imagename - path to the image to be used (e.g cockpit/blasterpower.png ... this will search in ../textures/cockpit/ for the file blasterpower.png)
- alphaname - This is the alpha map for the image. It must either be a greyscale .bmp, or a .png (where the png's alpha map is used), even if you are using the alpha-map from the first png, it must also be listed here as the source of the alphamap!
- scaleX - Scales the image on the X-Axis (1 = Fullsize, 0.5 = Halfsize, 2 = Doublesize etc)
- scaleY - Scales the image on the Y-Axis (see scaleX)
- positionX - Start drawing the image on a relative position specified by positionX
- positionY - Start drawing the image on a relative position specified by positionY
The last four options require some explanation on how Vega Strike 4.01 draws its sprites. First of all, you have to know that the resolution of the image is absolutely irrelevant, as Vega Strike works with relative coordinates and scaling, with (0,0) being the center of the screen. Imageine a picture of exactly one red pixel (1x1) in size, with scaleX=scaleY=1 ,positionX=positionY=0. The result is a red square, whose center is on the center of the screen. It fills the left, the right, the upper and the lower half of the screen. scaleX=scaleY=2 would make it exactly fullscreen. The same applies to positionX and positionY. PositonY=-1 whould start drawing it on the lower half from the center of the screen, whereas PositionY=2 whould completely draw it offscreen.
One note regarding negative values in scaleX and scaleY : Vega Strike flips the sprite on that axis, but in the case of gauges like Blasterpower will also start decreasing it flipped (not from the right, but from the left).
none | HowTo | none |