Skip to content

WND file reference

The WND format is not meant to be edited by hand, but it can be edited that way with ease and precision.

WND files need to be edited and tested carefully. Corrupting the format will crash the game on startup.

Before moving any elements around, adjust the CREATIONRESOLUTION on all elements first. Set this to match your mockups. Window elements will automatically scale up or down in both X and Y with the user’s selected game resolution.

WND does not allow comments, but most elements can have custom names that help describe them: NAME = "MyWindow.wnd:MyAmazingButton"

Avoid resizing a window element to zero size. It can crash the game at runtime: SCREENRECT = UPPERLEFT: 0 0, BOTTOMRIGHT: 0 0

Hide window elements by setting the following STATUS flags: STATUS = ENABLED+HIDDEN+SEE_THRU+NOINPUT+NOFOCUS

Block screen areas from user input by placing a window element with: INPUTCALLBACK = "GameWinBlockInput"

Window elements with WINDOWTYPE = SCROLLLISTBOX cannot render large text rows correctly. Avoid using long text and/or large fonts. The standard HeaderTemplate.ini configuration displayed at 1920x1080 resolution is almost as high as it can go without breaking.

Window transition styles can be added to the Data\INI\WindowTransitions.ini file. The styles are:

Keyword Description
FLASH Fine white flash
BUTTONFLASH Bright FLASH; emits a fade sound
FULLFADE Black fade
TEXTONFRAME Used on static text with a delay
COUNTUP Used in static numbers with a delay
SCORESCALEUP Used in images on the score screen; emits tick sounds
CONTROLBARARROW Doesn’t work with screens
SCREENFADE Used by all screens
WINSCALEUP Same as SCORESCALEUP, but emits a swoosh sound
MAINMENUMEDIUMSCALEUP
REVERSESOUND Used in borders; acts like FULLFADE
WINDOWTYPE
+USER
+PUSHBUTTON
+RADIOBUTTON
+ENTRYFIELD
+STATICTEXT
+PROGRESSBAR
+SCROLLLISTBOX
+COMBOBOX
+CHECKBOX
+HORZSLIDER
+VERTSLIDER
SCREENRECT
UPPERLEFT: X Y,
BOTTOMRIGHT: X Y,
CREATIONRESOLUTION: X Y
NAME =
"WindowName.wnd:ElementName"
STATUS =
+ENABLED
+HIDDEN
+SEE_THRU
+IMAGE
+BORDER
+NOINPUT
+NOFOCUS
+DRAGABLE
+WRAP_CENTERED
+ON_MOUSE_DOWN
+HOTKEY_TEXT
+RIGHT_CLICK
+CHECK_LIKE
+TABSTOP
STYLE =
+USER
+MOUSETRACK
+PUSHBUTTON
+RADIOBUTTON
+ENTRYFIELD
+STATICTEXT
+PROGRESSBAR
+SCROLLLISTBOX
+COMBOBOX
+CHECKBOX
+HORZSLIDER
+VERTSLIDER
SYSTEMCALLBACK =
"[None]"
"PassMessagesToParentSystem"
...
INPUTCALLBACK =
"[None]"
"GameWinBlockInput"
...
TOOLTIPCALLBACK =
"[None]"
...
DRAWCALLBACK =
"[None]"
"W3DNoDraw"
"W3DGadgetPushButtonImageDraw"
"W3DGameWinDefaultDraw"
...
FONT =
NAME: "Font"
SIZE: 0..n
BOLD: 0..1
HEADERTEMPLATE =
"[None]"
"Title"
"Title"
"MainButton"
"Button"
"ButtonSmall"
"TextEntry"
"ComboBoxEntry"
"MinorTitle"
"LabelRegular"
"LabelSmall"
"LoadScreenCameos"
"LoadScreenMissionLocation"
"Arial10BoldTemplate"
"Arial12BoldTemplate"
"Arial14Template"
"Arial14BoldTemplate"
...
See Data\Language\HeaderTemplate.ini
TOOLTIPDELAY =
-1
0..n
TEXT =
"CATEGORY:StringName"
...
See Data\Language\generals.csf
TEXTCOLOR =
ENABLED: R G B A,
ENABLEDBORDER: R G B A,
DISABLED: R G B A,
DISABLEDBORDER: R G B A,
HILITE: R G B A,
HILITEBORDER: R G B A