gamedata/sdktools.games/engine.ep2.txt
author Nicholas Hastings <skamonkey@gmail.com>
Tue Mar 09 18:29:31 2010 -0500 (2010-03-09)
changeset 2930 7adf91d0bd7b
parent 2918 70bfb1e60dd0
child 2938 5da587408e5a
permissions -rw-r--r--
Updated PVKII support for PVKII 2.3 (bug 4276, r=dvander)
     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"		"ageofchivalry"
    20 			"game"		"zps"
    21 			"game"		"empires"
    22 			"game"		"synergy"
    23 			"game"		"bg2"
    24 			"game"		"garrysmod"
    25 			"game"		"pvkii"
    26 		}
    27 
    28 		"Offsets"
    29 		{
    30 			/* Offset into CBaseTempEntity constructor */
    31 			"s_pTempEntities"
    32 			{
    33 				"windows"	"17"
    34 			}
    35 			"GetTEName"
    36 			{
    37 				"windows"	"4"
    38 				"linux"		"4"
    39 			}
    40 			"GetTENext"
    41 			{
    42 				"windows"	"8"
    43 				"linux"		"8"
    44 			}
    45 			"TE_GetServerClass"
    46 			{
    47 				"windows"	"0"
    48 				"linux"		"0"
    49 			}
    50 		}
    51 
    52 		"Signatures"
    53 		{
    54 			"CBaseTempEntity"
    55 			{
    56 				"library"	"server"
    57 				"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"
    58 			}
    59 			"s_pTempEntities"
    60 			{
    61 				"library"	"server"
    62 				"linux"		"@_ZN15CBaseTempEntity15s_pTempEntitiesE"
    63 			}
    64 		}
    65 	}
    66 	
    67 	/* Create Entity Signatures */
    68 	"#default"
    69 	{
    70 		"#supported"
    71 		{
    72 			"game"		"ageofchivalry"
    73 			"game"		"zps"
    74 			"game"		"empires"
    75 			"game"		"pvkii"
    76 		}
    77 
    78 		"Signatures"
    79 		{
    80 			"DispatchSpawn"
    81 			{
    82 				"library"	"server"
    83 				"linux"		"@_Z13DispatchSpawnP11CBaseEntity"
    84 				"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\x50\x64\x8B\xCB"
    85 			}
    86 			"CreateEntityByName"
    87 			{
    88 				"library"	"server"
    89 				"linux"		"@_Z18CreateEntityByNamePKci"
    90 				"windows"	"\x56\x8B\x74\x24\x0C\x83\xFE\xFF\x57\x8B\x7C\x24\x0C\x74\x27\x8B\x0D\x2A\x2A\x2A\x2A\x8B\x01\x8B\x50\x54\x56\xFF\xD2"
    91 			}
    92 		}
    93 	}
    94 
    95 	/* CGlobalEntityList */
    96 	"#default"
    97 	{
    98 		"#supported"
    99 		{
   100 			"game"		"ageofchivalry"
   101 			"game"		"zps"
   102 			"game"		"empires"
   103 			"game"		"pvkii"
   104 		}
   105 		
   106 		"Signatures"
   107 		{
   108 			/* Functions in CGlobalEntityList */
   109 			"FindEntityByClassname"
   110 			{
   111 				"library"	"server"
   112 				"windows"	"\x53\x55\x56\x8B\xF1\x8B\x4C\x24\x10\x85\xC9\x57\x74\x19\x8B\x01\x8B\x50\x08\xFF\xD2\x8B\x00\x25\xFF\x0F\x00\x00\x83\xC0\x01\xC1\xE0\x04\x8B\x3C\x30\xEB\x06\x8B\xBE\x2A\x2A\x2A\x2A\x85\xFF\x74\x39\x8B\x5C\x24\x18\x8B\x2D\x2A\x2A\x2A\x2A\xEB\x03"
   113 				"linux"		"@_ZN17CGlobalEntityList21FindEntityByClassnameEP11CBaseEntityPKc"
   114 			}
   115 		}
   116 	}
   117 
   118 	/* General GameRules */
   119 	"#default"
   120 	{
   121 		"#supported"
   122 		{
   123 			"game"		"ageofchivalry"
   124 			"game"		"zps"
   125 			"game"		"empires"
   126 			"game"		"synergy"
   127 			"game"		"bg2"
   128 			"game"		"garrysmod"
   129 			"game"		"pvkii"
   130 		}
   131 		
   132 		"Offsets"
   133 		{
   134 			/* Offset into CreateGameRulesObject */
   135 			"g_pGameRules"
   136 			{
   137 				"windows"	"2"
   138 			}
   139 		}
   140 		
   141 		"Signatures"
   142 		{
   143 			/* This signature sometimes has multiple matches, but this
   144 			 * does not matter as g_pGameRules is involved in all of them.
   145 			 * The same g_pGameRules offset applies to each match.
   146 			 *
   147 			 * Sometimes this block of bytes is at the beginning of the static
   148 			 * CreateGameRulesObject function and sometimes it is in the middle
   149 			 * of an entirely different function. This depends on the game.
   150 			 */
   151 			"CreateGameRulesObject"
   152 			{
   153 				"library"	"server"
   154 				"windows"	"\x8B\x0D\x2A\x2A\x2A\x2A\x85\xC9\x74\x2A\x8B\x01\x8B\x50\x2A\x6A\x01\xFF\xD2"
   155 			}
   156 			"g_pGameRules"
   157 			{
   158 				"library"	"server"
   159 				"linux"		"@g_pGameRules"
   160 			}
   161 		}
   162 	}
   163 
   164 	/* IServer interface pointer */
   165 	"#default"
   166 	{
   167 		"Keys"
   168 		{
   169 			/* Signature for the beginning of IVEngineServer::CreateFakeClient.
   170 			 *
   171 			 * The engine binary is not actually scanned in order to look for
   172 			 * this. SourceHook is used to used to determine the address of the
   173 			 * function and this signature is used to verify that it contains
   174 			 * the expected code. A pointer to sv (IServer interface) is used
   175 			 * here.
   176 			 */
   177 			"CreateFakeClient_Windows"	"\x8B\x44\x24\x2A\x50\xB9\x2A\x2A\x2A\x2A\xE8"
   178 		}
   179 		
   180 		"Offsets"
   181 		{
   182 			/* Offset into IVEngineServer::CreateFakeClient */
   183 			"sv"
   184 			{
   185 				"windows"	"6"
   186 			}
   187 		}
   188 
   189 		"Signatures"
   190 		{
   191 			/* CBaseServer object for IServer interface */
   192 			"sv"
   193 			{
   194 				"library"	"engine"
   195 				"linux"		"@sv"
   196 			}
   197 		}
   198 	}
   199 	
   200 	/* EntityFactoryDictionary function */
   201 	"#default"
   202 	{
   203 		"Signatures"
   204 		{
   205 			"EntityFactory"
   206 			{
   207 				"library"	"server"
   208 				"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"
   209 				"linux"		"@_Z23EntityFactoryDictionaryv"
   210 			}
   211 		}
   212 	}
   213 
   214 	/* CBaseEntityOutput::FireOutput */
   215 	"#default"
   216 	{
   217 		"#supported"
   218 		{
   219 			"game"		"ageofchivalry"
   220 		}
   221 		"Signatures"
   222 		{
   223 			"FireOutput"
   224 			{
   225 				"library"	"server"
   226 				"windows"	"\x81\xEC\x1C\x01\x00\x00\x53\x55\x56\x8B\x71\x14\x85\xF6"
   227 				"linux"		"@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
   228 			}
   229 		}
   230 		"Offsets"
   231 		{
   232 			"FireOutputBackup"
   233 			{
   234 				"windows"	"6"
   235 				"linux"		"10"
   236 			}
   237 		}
   238 	}
   239 	
   240 	/* SetUserInfo data */
   241 	"#default"
   242 	{
   243 		"Offsets"
   244 		{
   245 			/**
   246 			 * CBaseClient::SetUserCVar(char  const*,char  const*);
   247 			 * Linux offset straight from VTable dump.
   248 			 * Windows offset is crazy. Found the windows SetName function using string "(%d)%-0.*s"
   249 			 * Cross referenced back to the vtable and counted manually (SetUserCvar is 1 higher, offsets start from 1)
   250 			 */
   251 			"SetUserCvar"
   252 			{
   253 				"windows"	"17"
   254 				"linux"		"55"
   255 			}
   256 			/**
   257 			 * Offset into CBaseClient - Used by CBaseServer::UpdateUserSettings to determine when changes have been made.
   258 			 * Find CBaseClient::UpdateUserSettings (strings "net_maxroutable", "cl_updaterate" etc) and the offset is set to 0 near the end.
   259 			 * Linux: 	mov     byte ptr [esi+98h], 0
   260 			 * Win:	mov     byte ptr [esi+0A4h], 0
   261 			 */
   262 			"InfoChanged"
   263 			{
   264 				"windows"	"140"
   265 				"linux"		"140"
   266 			}
   267 		}
   268 	}
   269 }