<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.empiresmod.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Xenotos</id>
	<title>Empires Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.empiresmod.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Xenotos"/>
	<link rel="alternate" type="text/html" href="https://wiki.empiresmod.com/Special:Contributions/Xenotos"/>
	<updated>2026-09-27T05:26:13Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.4</generator>
	<entry>
		<id>https://wiki.empiresmod.com/index.php?title=VGUI&amp;diff=8951</id>
		<title>VGUI</title>
		<link rel="alternate" type="text/html" href="https://wiki.empiresmod.com/index.php?title=VGUI&amp;diff=8951"/>
		<updated>2017-08-07T18:54:16Z</updated>

		<summary type="html">&lt;p&gt;Xenotos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==VGUI==&lt;br /&gt;
GUI elements in Empires are made using [https://developer.valvesoftware.com/wiki/VGUI2 VGUI2]. The layout of windows can be edited using the .res files in the resource folder.&lt;br /&gt;
&lt;br /&gt;
==HUD==&lt;br /&gt;
HUD elements in Empires are either made using C++ for performance or by using a combination of VGUI and Javascript. The positioning and layout of HUD elements is controlled by the hudlayout.res file in the scripts folder.&lt;br /&gt;
&lt;br /&gt;
=== Adding a new HUD element ===&lt;br /&gt;
# Open scripts/hudlayout.res&lt;br /&gt;
# Add an entry for your new element:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MyCustomCrosshair // The name of your element&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;fieldName&amp;quot; &amp;quot;MyCustomCrosshair&amp;quot; // This should be the same as the previous name. (required)&lt;br /&gt;
	&amp;quot;type&amp;quot; &amp;quot;javascript&amp;quot; // Indicates that this is a javascript hud element (required)&lt;br /&gt;
	&amp;quot;res&amp;quot; &amp;quot;resource/ui/emp_hud_vehicle_crosshair.res&amp;quot; // The location of your res file (required)&lt;br /&gt;
	&amp;quot;src&amp;quot; &amp;quot;resource/ui/emp_hud_vehicle_crosshair.js&amp;quot; // The location of your javascript file (required)&lt;br /&gt;
	&amp;quot;paintbackground&amp;quot; 0 //Disables the default background&lt;br /&gt;
	&amp;quot;paintborder&amp;quot; 0 // Disables the default border&lt;br /&gt;
	&lt;br /&gt;
	&amp;quot;xpos&amp;quot; &amp;quot;50&amp;quot; // Sets the x position. Position is relative to a 640x480 screen.&lt;br /&gt;
	&amp;quot;ypos&amp;quot; &amp;quot;50&amp;quot; // Sets the y position&lt;br /&gt;
	&amp;quot;wide&amp;quot;	&amp;quot;100&amp;quot; // Sets the width&lt;br /&gt;
	&amp;quot;tall&amp;quot;	&amp;quot;100&amp;quot; // Sets the height&lt;br /&gt;
	&amp;quot;autoResize&amp;quot; &amp;quot;0&amp;quot; // Disables resizing by the user&lt;br /&gt;
&lt;br /&gt;
	// debug border, enable these two to help with positioning&lt;br /&gt;
	//&amp;quot;border&amp;quot; &amp;quot;DebugBorder&amp;quot;&lt;br /&gt;
	//&amp;quot;paintborder&amp;quot; 1&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Make a copy of the res and src files and edit them. For more information, look at the [[CVguiJavascriptContext]] documentation.&lt;br /&gt;
# For more information about the position, look at the [[HUD pos]] documention.&lt;br /&gt;
&lt;br /&gt;
===HUD Hide flags===&lt;br /&gt;
&lt;br /&gt;
The player has a variable &amp;lt;code&amp;gt;m_iHideHUD&amp;lt;/code&amp;gt; that defines which hud elements should be hidden. &lt;br /&gt;
https://github.com/ValveSoftware/source-sdk-2013/blob/0d8dceea4310fde5706b3ce1c70609d72a38efdf/mp/src/game/client/hud.cpp#L948&lt;br /&gt;
&lt;br /&gt;
Each hud element can asign its self to a hide group using &amp;lt;code&amp;gt;SetHiddenBits(int group)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
There are 3 special hide flags. &lt;br /&gt;
* HIDEHUD_ALL is special because it is always asigned to every element. So calling SetHiddenBits(HIDEHUD_ALL) is pointless. &lt;br /&gt;
* HIDEHUD_PLAYERDEAD &amp;amp; HIDEHUD_NEEDSUIT are special because it does not use &amp;lt;code&amp;gt;m_iHideHUD&amp;lt;/code&amp;gt;. Seem to be a bit of a hack by valve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Borders==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DebugBorder2&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;inset&amp;quot; &amp;quot;0 0 0 0&amp;quot; // margin&lt;br /&gt;
	&amp;quot;backgroundType&amp;quot; &amp;quot;1&amp;quot; // is of type backgroundtype_e (BACKGROUND_FILLED = 0, BACKGROUND_TEXTURED = 1, BACKGROUND_ROUNDEDCORNERS = 2)&lt;br /&gt;
	Left // the side&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;1&amp;quot;  // a border can have more then 1 line. &lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;color&amp;quot; &amp;quot;0 255 0 255&amp;quot; // color of the border&lt;br /&gt;
			&amp;quot;offset&amp;quot; &amp;quot;2 1&amp;quot;  // start and end offset. skip the first 2 pixels and skip the last 1 pixel&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	Right&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;1&amp;quot;&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;color&amp;quot; &amp;quot;0 255 0 255&amp;quot;&lt;br /&gt;
			&amp;quot;offset&amp;quot; &amp;quot;1 0&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	Top&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;1&amp;quot;&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;color&amp;quot; &amp;quot;0 255 0 255&amp;quot;&lt;br /&gt;
			&amp;quot;offset&amp;quot; &amp;quot;0 0&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	Bottom&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;1&amp;quot;&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;color&amp;quot; &amp;quot;0 255 0 255&amp;quot;&lt;br /&gt;
			&amp;quot;offset&amp;quot; &amp;quot;0 0&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
To speed up testing, set the following launch options in Steam under the game&#039;s properties:&lt;br /&gt;
-dev +map con_urb +exec testing&lt;/div&gt;</summary>
		<author><name>Xenotos</name></author>
	</entry>
	<entry>
		<id>https://wiki.empiresmod.com/index.php?title=Panel_Positioning&amp;diff=8950</id>
		<title>Panel Positioning</title>
		<link rel="alternate" type="text/html" href="https://wiki.empiresmod.com/index.php?title=Panel_Positioning&amp;diff=8950"/>
		<updated>2017-08-07T18:20:49Z</updated>

		<summary type="html">&lt;p&gt;Xenotos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The position of a HUD element is determined by the following two variables:&lt;br /&gt;
# xpos&lt;br /&gt;
# ypos&lt;br /&gt;
&lt;br /&gt;
The value of both variables determine the position of the upper left corner of the HUD element relative to the upper left corner of the screen ((0,0) being the upper left corner and (640,480) being the lower right corner in a 640x480 setting).&lt;br /&gt;
&lt;br /&gt;
You may also enter a &#039;&#039;&#039;r&#039;&#039;&#039; before the value to give a position relative to the lower right corner of the HUD.&lt;/div&gt;</summary>
		<author><name>Xenotos</name></author>
	</entry>
	<entry>
		<id>https://wiki.empiresmod.com/index.php?title=VGUI&amp;diff=8949</id>
		<title>VGUI</title>
		<link rel="alternate" type="text/html" href="https://wiki.empiresmod.com/index.php?title=VGUI&amp;diff=8949"/>
		<updated>2017-08-07T17:54:03Z</updated>

		<summary type="html">&lt;p&gt;Xenotos: Added pos page link.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==VGUI==&lt;br /&gt;
GUI elements in Empires are made using [https://developer.valvesoftware.com/wiki/VGUI2 VGUI2]. The layout of windows can be edited using the .res files in the resource folder.&lt;br /&gt;
&lt;br /&gt;
==HUD==&lt;br /&gt;
HUD elements in Empires are either made using C++ for performance or by using a combination of VGUI and Javascript. The positioning and layout of HUD elements is controlled by the hudlayout.res file in the scripts folder.&lt;br /&gt;
&lt;br /&gt;
=== Adding a new HUD element ===&lt;br /&gt;
# Open scripts/hudlayout.res&lt;br /&gt;
# Add an entry for your new element:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MyCustomCrosshair // The name of your element&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;fieldName&amp;quot; &amp;quot;MyCustomCrosshair&amp;quot; // This should be the same as the previous name. (required)&lt;br /&gt;
	&amp;quot;type&amp;quot; &amp;quot;javascript&amp;quot; // Indicates that this is a javascript hud element (required)&lt;br /&gt;
	&amp;quot;res&amp;quot; &amp;quot;resource/ui/emp_hud_vehicle_crosshair.res&amp;quot; // The location of your res file (required)&lt;br /&gt;
	&amp;quot;src&amp;quot; &amp;quot;resource/ui/emp_hud_vehicle_crosshair.js&amp;quot; // The location of your javascript file (required)&lt;br /&gt;
	&amp;quot;paintbackground&amp;quot; 0 //Disables the default background&lt;br /&gt;
	&amp;quot;paintborder&amp;quot; 0 // Disables the default border&lt;br /&gt;
	&lt;br /&gt;
	&amp;quot;xpos&amp;quot; &amp;quot;50&amp;quot; // Sets the x position. Position is relative to a 640x480 screen.&lt;br /&gt;
	&amp;quot;ypos&amp;quot; &amp;quot;50&amp;quot; // Sets the y position&lt;br /&gt;
	&amp;quot;wide&amp;quot;	&amp;quot;100&amp;quot; // Sets the width&lt;br /&gt;
	&amp;quot;tall&amp;quot;	&amp;quot;100&amp;quot; // Sets the height&lt;br /&gt;
	&amp;quot;autoResize&amp;quot; &amp;quot;0&amp;quot; // Disables resizing by the user&lt;br /&gt;
&lt;br /&gt;
	// debug border, enable these two to help with positioning&lt;br /&gt;
	//&amp;quot;border&amp;quot; &amp;quot;DebugBorder&amp;quot;&lt;br /&gt;
	//&amp;quot;paintborder&amp;quot; 1&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Make a copy of the res and src files and edit them. For more information, look at the [[CVguiJavascriptContext]] documentation.&lt;br /&gt;
# For more information about the position, look at the [[HUD pos]] documention.&lt;br /&gt;
&lt;br /&gt;
===HUD Hide flags===&lt;br /&gt;
&lt;br /&gt;
The player has a variable &amp;lt;code&amp;gt;m_iHideHUD&amp;lt;/code&amp;gt; that defines which hud elements should be hidden. &lt;br /&gt;
https://github.com/ValveSoftware/source-sdk-2013/blob/0d8dceea4310fde5706b3ce1c70609d72a38efdf/mp/src/game/client/hud.cpp#L948&lt;br /&gt;
&lt;br /&gt;
Each hud element can asign its self to a hide group using &amp;lt;code&amp;gt;SetHiddenBits(int group)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
There are 3 special hide flags. &lt;br /&gt;
* HIDEHUD_ALL is special because it is always asigned to every element. So calling SetHiddenBits(HIDEHUD_ALL) is pointless. &lt;br /&gt;
* HIDEHUD_PLAYERDEAD &amp;amp; HIDEHUD_NEEDSUIT are special because it does not use &amp;lt;code&amp;gt;m_iHideHUD&amp;lt;/code&amp;gt;. Seem to be a bit of a hack by valve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Borders==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DebugBorder2&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;inset&amp;quot; &amp;quot;0 0 0 0&amp;quot; // margin&lt;br /&gt;
	&amp;quot;backgroundType&amp;quot; &amp;quot;1&amp;quot; // is of type backgroundtype_e (BACKGROUND_FILLED = 0, BACKGROUND_TEXTURED = 1, BACKGROUND_ROUNDEDCORNERS = 2)&lt;br /&gt;
	Left // the side&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;1&amp;quot;  // a border can have more then 1 line. &lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;color&amp;quot; &amp;quot;0 255 0 255&amp;quot; // color of the border&lt;br /&gt;
			&amp;quot;offset&amp;quot; &amp;quot;2 1&amp;quot;  // start and end offset. skip the first 2 pixels and skip the last 1 pixel&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	Right&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;1&amp;quot;&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;color&amp;quot; &amp;quot;0 255 0 255&amp;quot;&lt;br /&gt;
			&amp;quot;offset&amp;quot; &amp;quot;1 0&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	Top&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;1&amp;quot;&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;color&amp;quot; &amp;quot;0 255 0 255&amp;quot;&lt;br /&gt;
			&amp;quot;offset&amp;quot; &amp;quot;0 0&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	Bottom&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;1&amp;quot;&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;color&amp;quot; &amp;quot;0 255 0 255&amp;quot;&lt;br /&gt;
			&amp;quot;offset&amp;quot; &amp;quot;0 0&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Xenotos</name></author>
	</entry>
	<entry>
		<id>https://wiki.empiresmod.com/index.php?title=VGUI&amp;diff=8948</id>
		<title>VGUI</title>
		<link rel="alternate" type="text/html" href="https://wiki.empiresmod.com/index.php?title=VGUI&amp;diff=8948"/>
		<updated>2017-08-07T17:32:38Z</updated>

		<summary type="html">&lt;p&gt;Xenotos: Fixed filename.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==VGUI==&lt;br /&gt;
GUI elements in Empires are made using [https://developer.valvesoftware.com/wiki/VGUI2 VGUI2]. The layout of windows can be edited using the .res files in the resource folder.&lt;br /&gt;
&lt;br /&gt;
==HUD==&lt;br /&gt;
HUD elements in Empires are either made using C++ for performance or by using a combination of VGUI and Javascript. The positioning and layout of HUD elements is controlled by the hudlayout.res file in the scripts folder.&lt;br /&gt;
&lt;br /&gt;
=== Adding a new HUD element ===&lt;br /&gt;
# Open scripts/hudlayout.res&lt;br /&gt;
# Add an entry for your new element:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MyCustomCrosshair // The name of your element&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;fieldName&amp;quot; &amp;quot;MyCustomCrosshair&amp;quot; // This should be the same as the previous name. (required)&lt;br /&gt;
	&amp;quot;type&amp;quot; &amp;quot;javascript&amp;quot; // Indicates that this is a javascript hud element (required)&lt;br /&gt;
	&amp;quot;res&amp;quot; &amp;quot;resource/ui/emp_hud_vehicle_crosshair.res&amp;quot; // The location of your res file (required)&lt;br /&gt;
	&amp;quot;src&amp;quot; &amp;quot;resource/ui/emp_hud_vehicle_crosshair.js&amp;quot; // The location of your javascript file (required)&lt;br /&gt;
	&amp;quot;paintbackground&amp;quot; 0 //Disables the default background&lt;br /&gt;
	&amp;quot;paintborder&amp;quot; 0 // Disables the default border&lt;br /&gt;
	&lt;br /&gt;
	&amp;quot;xpos&amp;quot; &amp;quot;50&amp;quot; // Sets the x position. Position is relative to a 640x480 screen.&lt;br /&gt;
	&amp;quot;ypos&amp;quot; &amp;quot;50&amp;quot; // Sets the y position&lt;br /&gt;
	&amp;quot;wide&amp;quot;	&amp;quot;100&amp;quot; // Sets the width&lt;br /&gt;
	&amp;quot;tall&amp;quot;	&amp;quot;100&amp;quot; // Sets the height&lt;br /&gt;
	&amp;quot;autoResize&amp;quot; &amp;quot;0&amp;quot; // Disables resizing by the user&lt;br /&gt;
&lt;br /&gt;
	// debug border, enable these two to help with positioning&lt;br /&gt;
	//&amp;quot;border&amp;quot; &amp;quot;DebugBorder&amp;quot;&lt;br /&gt;
	//&amp;quot;paintborder&amp;quot; 1&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Make a copy of the res and src files and edit them. For more information, look at the [[CVguiJavascriptContext]] documentation.&lt;br /&gt;
&lt;br /&gt;
===HUD Hide flags===&lt;br /&gt;
&lt;br /&gt;
The player has a variable &amp;lt;code&amp;gt;m_iHideHUD&amp;lt;/code&amp;gt; that defines which hud elements should be hidden. &lt;br /&gt;
https://github.com/ValveSoftware/source-sdk-2013/blob/0d8dceea4310fde5706b3ce1c70609d72a38efdf/mp/src/game/client/hud.cpp#L948&lt;br /&gt;
&lt;br /&gt;
Each hud element can asign its self to a hide group using &amp;lt;code&amp;gt;SetHiddenBits(int group)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
There are 3 special hide flags. &lt;br /&gt;
* HIDEHUD_ALL is special because it is always asigned to every element. So calling SetHiddenBits(HIDEHUD_ALL) is pointless. &lt;br /&gt;
* HIDEHUD_PLAYERDEAD &amp;amp; HIDEHUD_NEEDSUIT are special because it does not use &amp;lt;code&amp;gt;m_iHideHUD&amp;lt;/code&amp;gt;. Seem to be a bit of a hack by valve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Borders==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DebugBorder2&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;inset&amp;quot; &amp;quot;0 0 0 0&amp;quot; // margin&lt;br /&gt;
	&amp;quot;backgroundType&amp;quot; &amp;quot;1&amp;quot; // is of type backgroundtype_e (BACKGROUND_FILLED = 0, BACKGROUND_TEXTURED = 1, BACKGROUND_ROUNDEDCORNERS = 2)&lt;br /&gt;
	Left // the side&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;1&amp;quot;  // a border can have more then 1 line. &lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;color&amp;quot; &amp;quot;0 255 0 255&amp;quot; // color of the border&lt;br /&gt;
			&amp;quot;offset&amp;quot; &amp;quot;2 1&amp;quot;  // start and end offset. skip the first 2 pixels and skip the last 1 pixel&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	Right&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;1&amp;quot;&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;color&amp;quot; &amp;quot;0 255 0 255&amp;quot;&lt;br /&gt;
			&amp;quot;offset&amp;quot; &amp;quot;1 0&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	Top&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;1&amp;quot;&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;color&amp;quot; &amp;quot;0 255 0 255&amp;quot;&lt;br /&gt;
			&amp;quot;offset&amp;quot; &amp;quot;0 0&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	Bottom&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;1&amp;quot;&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;color&amp;quot; &amp;quot;0 255 0 255&amp;quot;&lt;br /&gt;
			&amp;quot;offset&amp;quot; &amp;quot;0 0&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Xenotos</name></author>
	</entry>
</feed>