HowTo:Edit HUDs
Edit Mesh Files | HowTo | Create a Cockpit in Wings3d |
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
<Cockpit r="0" g=".75" b="1"> <Crosshairs file="crosshairs.spr" xcent="0" ycent="0" /> <Radar file="radar.spr" /> <RearRadar file="radarr.spr" /> <Speed file="radar.spr" xcent="-.23" ycent="-.52" width=".018" height=".036" /> <SetSpeed file="radar.spr" xcent=".23" ycent="-.52" width=".018" height=".036" /> <WARPFIELDSTRENGTH file="radar.spr" xcent="-.23" ycent="-.58" width=".018" height=".036" /> <Fuel file="fuelstat.spr" GaugeRight="1" xcent="0" ycent="-.6" /> <Energy file="blasterpower.spr" GaugeRight="1" /> <WarpEnergy file="jumppower.spr" GaugeRight="1" xcent="0" ycent="-.55" /> <Lock file="locklight.spr" xcent="0" ycent="-.7" /> <MissileLock file="locklight.spr" xcent=".04" ycent="-.7" /> <ECM file="locklight.spr" xcent="-.04" ycent="-.7" /> <Auto file="auto.spr" /> <Jump file="canjump.spr" /> <Eject file="eject.spr" /> <VDU TextRows="30" TextCols="25" type="Weapon Manifest Damage" file="wvdu.spr" xcent="-.8" ycent=".2" /> <VDU TextRows="15" TextCols="25" type="Target Comm View TargetManifest Nav" file="rvdu.spr" xcent=".775" ycent="-.75" /> <VDU TextRows="15" TextCols="25" type="Shield Manifest" file="lvdu.spr" xcent="-.775" ycent="-.75" /> <VDU TextRows="14" TextCols="100" type="Message" file="mvdu.spr" /> <VDU TextRows="30" TextCols="30" type="Objectives" file="objvdu.spr" /> <FPS file="radar.spr" xcent=".9" ycent=".8" width=".018" height=".036" /> </Cockpit>
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).
Edit Mesh Files | HowTo | Create a Cockpit in Wings3d |