gamedata/sdktools.games/engine.ep1.txt
author Nicholas Hastings <skamonkey@gmail.com>
Wed Jul 06 17:37:35 2011 -0400 (2011-07-06)
changeset 3333 e247490894a1
parent 3290 23737ffd7cc7
child 3363 5ad5e0abe26a
permissions -rw-r--r--
Added ability in SDKTools to get/set prop values on gamerules class (bug 4983, r=fyren).
     1 /**
     2  * Do not edit this file.  Any changes will be overwritten by the gamedata
     3  * updater or by upgrading your SourceMod install.
     4  *
     5  * To override data in this file, create a subdirectory named "custom" and
     6  * place your own gamedata file(s) inside of it.  Such files will be parsed
     7  * after SM's own.
     8  *
     9  * For more information, see http://wiki.alliedmods.net/Gamedata_Updating_(SourceMod)
    10  */
    11 
    12 "Games"
    13 {
    14 	/* General Temp Entities */
    15 	"#default"
    16 	{
    17 		"#supported"
    18 		{
    19 			"game"		"ship"
    20 			"game"		"insurgency"
    21 			"game"		"sourceforts"
    22 			"game"		"FortressForever"
    23 			"game"		"hidden"
    24 			"game"		"zombie_master"
    25 			"game"		"NeotokyoSource"
    26 			"game"		"esmod"
    27 		}
    28 
    29 		"Offsets"
    30 		{
    31 			/* Offset into CBaseTempEntity constructor */
    32 			"s_pTempEntities"
    33 			{
    34 				"windows"	"17"
    35 			}
    36 			"GetTEName"
    37 			{
    38 				"windows"	"4"
    39 				"linux"		"4"
    40 			}
    41 			"GetTENext"
    42 			{
    43 				"windows"	"8"
    44 				"linux"		"8"
    45 			}
    46 			"TE_GetServerClass"
    47 			{
    48 				"windows"	"1"
    49 				"linux"		"1"
    50 			}
    51 		}
    52 
    53 		"Signatures"
    54 		{
    55 			"CBaseTempEntity"
    56 			{
    57 				"library"	"server"
    58 				"windows"	"\x8B\xC1\x8B\x4C\x24\x04\xC7\x00\x2A\x2A\x2A\x2A\x89\x48\x04\x8B\x15\x2A\x2A\x2A\x2A\x89\x50\x08\xA3\x2A\x2A\x2A\x2A\xC2\x04\x00"
    59 			}
    60 			"s_pTempEntities"
    61 			{
    62 				"library"	"server"
    63 				"linux"		"@_ZN15CBaseTempEntity15s_pTempEntitiesE"
    64 			}
    65 		}
    66 	}
    67 	
    68 	/* General GameRules */
    69 	"#default"
    70 	{
    71 		"#supported"
    72 		{
    73 			"game"		"garrysmod"
    74 			"game"		"ship"
    75 			"game"		"sourceforts"
    76 			"game"		"FortressForever"
    77 			"game"		"hidden"
    78 			"game"		"NeotokyoSource"
    79 		}
    80 		
    81 		"Offsets"
    82 		{
    83 			/* Offset into CreateGameRulesObject */
    84 			"g_pGameRules"
    85 			{
    86 				"windows"	"2"
    87 			}
    88 		}
    89 		
    90 		"Signatures"
    91 		{
    92 			/* This signature sometimes has multiple matches, but this
    93 			 * does not matter as g_pGameRules is involved in all of them.
    94 			 * The same g_pGameRules offset applies to each match.
    95 			 *
    96 			 * Sometimes this block of bytes is at the beginning of the static
    97 			 * CreateGameRulesObject function and sometimes it is in the middle
    98 			 * of an entirely different function. This depends on the game.
    99 			 */
   100 			"CreateGameRulesObject"
   101 			{
   102 				"library"	"server"
   103 				"windows"	"\x8B\x0D\x2A\x2A\x2A\x2A\x85\xC9\x74\x2A\x8B\x01\x6A\x01\xFF\x50"
   104 			}
   105 			"g_pGameRules"
   106 			{
   107 				"library"	"server"
   108 				"linux"		"@g_pGameRules"
   109 			}
   110 		}
   111 	}
   112 	
   113 	/* CGlobalEntityList */
   114 	"#default"
   115 	{
   116 		"#supported"
   117 		{
   118 			"game"		"garrysmod"
   119 			"game"		"ship"
   120 			"game"		"sourceforts"
   121 			"game"		"FortressForever"
   122 			"game"		"hidden"
   123 			"game"		"zombie_master"
   124 			"game"		"NeotokyoSource"
   125 		}
   126 		
   127 		"Signatures"
   128 		{	
   129 			/* Functions in CGlobalEntityList */
   130 			"FindEntityByClassname"
   131 			{
   132 				"library"	"server"
   133 				"windows"	"\x53\x55\x56\x8B\xF1\x8B\x4C\x24\x2A\x85\xC9\x57\x74\x2A\x8B\x01\xFF\x50\x2A\x8B\x08\x81\xE1\x2A\x2A\x2A\x2A\x83\xC1\x2A\xC1\xE1\x2A\x8B\x3C\x31\xEB\x2A\x8B\xBE\x2A\x2A\x2A\x2A\x85\xFF\x74\x2A\x8B\x5C\x24\x2A\x8B\x2D\x2A\x2A\x2A\x2A\x8D\x9B\x00\x00\x00\x00\x8B\x37\x85\xF6\x75\x2A\x68\x2A\x2A\x2A\x2A\xFF\x2A\x83\xC4\x2A\xEB\x2A\x39"
   134 				"linux"		"@_ZN17CGlobalEntityList21FindEntityByClassnameEP11CBaseEntityPKc"
   135 			}
   136 		}
   137 	}
   138 
   139 	/* Create Entity Signatures */
   140 	"#default"
   141 	{
   142 		"#supported"
   143 		{
   144 			"game"		"sourceforts"
   145 			"game"		"hidden"
   146 			"game"		"FortressForever"
   147 			"game"		"NeotokyoSource"
   148 		}
   149 
   150 		"Signatures"
   151 		{
   152 			"DispatchSpawn"
   153 			{
   154 				"library"	"server"
   155 				"linux"		"@_Z13DispatchSpawnP11CBaseEntity"
   156 				"windows"	"\x53\x55\x56\x8B\x74\x24\x10\x85\xF6\x57\x0F\x84\x2A\x2A\x2A\x2A\x8B\x1D\x2A\x2A\x2A\x2A\x8B\x03\x8B\xCB\xFF\x50\x60"
   157 			}
   158 			"CreateEntityByName"
   159 			{
   160 				"library"	"server"
   161 				"linux"		"@_Z18CreateEntityByNamePKci"
   162 				"windows"	"\x56\x8B\x74\x24\x0C\x83\xFE\xFF\x57\x8B\x7C\x24\x0C\x74\x25\x8B\x0D\x2A\x2A\x2A\x2A\x8B\x01\x56\xFF\x50\x54\x85\xC0"
   163 			}
   164 		}
   165 	}
   166 
   167 	/* IServer interface pointer */
   168 	"#default"
   169 	{
   170 		"Keys"
   171 		{
   172 			/* Signature for the beginning of IVEngineServer::CreateFakeClient.
   173 			 *
   174 			 * The engine binary is not actually scanned in order to look for
   175 			 * this. SourceHook is used to used to determine the address of the
   176 			 * function and this signature is used to verify that it contains
   177 			 * the expected code. A pointer to sv (IServer interface) is used
   178 			 * here.
   179 			 */
   180 			"CreateFakeClient_Windows"	"\x8B\x44\x24\x2A\x50\xB9\x2A\x2A\x2A\x2A\xE8"
   181 		}
   182 		
   183 		"Offsets"
   184 		{
   185 			/* Offset into IVEngineServer::CreateFakeClient */
   186 			"sv"
   187 			{
   188 				"windows"	"6"
   189 			}
   190 		}
   191 
   192 		"Signatures"
   193 		{
   194 			/* CBaseServer object for IServer interface */
   195 			"sv"
   196 			{
   197 				"library"	"engine"
   198 				"linux"		"@sv"
   199 			}
   200 		}
   201 	}
   202 	
   203 	/* EntityFactoryDictionary function */
   204 	"#default"
   205 	{
   206 		"Signatures"
   207 		{
   208 			"EntityFactory"
   209 			{
   210 				"library"	"server"
   211 				"windows"	"\xB8\x01\x00\x00\x00\x84\x2A\x2A\x2A\x2A\x2A\x75\x1D\x09\x2A\x2A\x2A\x2A\x2A\xB9\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x68\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x83\xC4\x04\xB8\x2A\x2A\x2A\x2A\xC3"
   212 				"linux"		"@_Z23EntityFactoryDictionaryv"
   213 			}
   214 		}
   215 	}
   216 	/* CBaseEntityOutput::FireOutput */
   217 	"#default"
   218 	{
   219 		"#supported"
   220 		{
   221 			"game"		"NeotokyoSource"
   222 			"game"		"zombie_master"
   223 		}
   224 		"Signatures"
   225 		{
   226 			"FireOutput"
   227 			{
   228 				"library"	"server"
   229 				"windows"	"\x81\xEC\x1C\x03\x00\x00\x53\x55\x56\x8B\x71\x14"
   230 				"linux"		"@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
   231 			}
   232 		}
   233 	}
   234 
   235 	/* SetUserInfo data */
   236 	"#default"
   237 	{
   238 		"Offsets"
   239 		{
   240 			/**
   241 			 * CBaseClient::SetUserCVar(char  const*,char  const*);
   242 			 * Linux offset straight from VTable dump.
   243 			 * Windows offset is crazy. Found the windows SetName function using string "(%d)%-0.*s"
   244 			 * Cross referenced back to the vtable and counted manually (SetUserCvar is 1 higher, offsets start from 1)
   245 			 */
   246 			"SetUserCvar"
   247 			{
   248 				"windows"	"17"
   249 				"linux"		"53"
   250 			}
   251 			/**
   252 			 * Offset into CBaseClient - Used by CBaseServer::UpdateUserSettings to determine when changes have been made.
   253 			 * Find CBaseClient::UpdateUserSettings (strings "net_maxroutable", "cl_updaterate" etc) and the offset is set to 0 near the end.
   254 			 * Linux: 	mov     byte ptr [esi+98h], 0
   255 			 * Win:	mov     byte ptr [esi+0A4h], 0
   256 			 */
   257 			"InfoChanged"
   258 			{
   259 				"windows"	"164"
   260 				"linux"		"152"
   261 			}
   262 		}
   263 	}
   264 }