Calculating updated sourcemod vtable offsets

Discussion in 'Coding' started by Thexa4, Sep 26, 2016.

  1. Thexa4

    Thexa4 Developer Staff Member Moderator

    Messages:
    304
    Likes Received:
    98
    Trophy Points:
    0
    Using vtablescanner from: https://forums.alliedmods.net/showthread.php?t=146379

    This works on linux only.

    Download from: https://delftelectronics.nl/empires/tools/vtablescanner3.zip

    Instructions
    • Unzip [optionally rebuild]
    • Download empires dedicated server.
    • Copy libsteam_api.so, libtier0.so, libvstdlib.so and server.so to the Release folder
    • Open a shell in the Release folder
    • run:
      Code:
      LD_LIBRARY_PATH="./" ./vtabledump ./server.so '_ZTV10CEmpPlayer'
    • First column is the function name, second column is the windows offset, third column is the linux offset.
     
    Last edited: Mar 20, 2017
    Neoony likes this.
  2. Thexa4

    Thexa4 Developer Staff Member Moderator

    Messages:
    304
    Likes Received:
    98
    Trophy Points:
    0
    Neoony likes this.
  3. Thexa4

    Thexa4 Developer Staff Member Moderator

    Messages:
    304
    Likes Received:
    98
    Trophy Points:
    0
    Uploaded version 3 to fix a problem with the offets for CommitSuicide (sm_slay)
     
    Neoony likes this.
  4. Neoony

    Neoony Member

    Messages:
    1,370
    Likes Received:
    106
    Trophy Points:
    0
    Attached version 4

    This replaces game.empires.head.txt with the newer signatures from 2017+ version from Sourcemod gamedata file. (should only affect sdktools I believe)

    Following part:
    Code:
    "Games"
    {
       /* General Temp Entities */
       "#default"
       {
         "Offsets"
         {
           /* Offset into CBaseTempEntity constructor */
           "s_pTempEntities"
           {
             "windows"   "16"
           }
           "GetTEName"
           {
             "windows"   "4"
             "linux"     "4"
             "mac"     "4"
           }
           "GetTENext"
           {
             "windows"   "8"
             "linux"     "8"
             "mac"     "8"
           }
           "TE_GetServerClass"
           {
             "windows"   "0"
             "linux"     "0"
             "mac"     "0"
           }
         }
    
         "Signatures"
         {
           "CBaseTempEntity"
           {
             "library"   "server"
             "windows"   "\x55\x8B\xEC\x8B\x45\x08\x89\x41\x04\xC7\x01"
           }
           "s_pTempEntities"
           {
             "library"   "server"
             "linux"     "@_ZN15CBaseTempEntity15s_pTempEntitiesE"
             "mac"     "@_ZN15CBaseTempEntity15s_pTempEntitiesE"
           }
         }
       }
    
       /* CGlobalEntityList */
       "#default"
       {
         "Signatures"
         {
           /* Functions in CGlobalEntityList */
           "FindEntityByClassname"
           {
             "library"   "server"
             "windows"   "\x55\x8B\xEC\x53\x56\x57\x8B\xF9\x8B\x4D\x08\x85\xC9\x74\x2A\x8B\x01\xFF\x50\x08\x8B\x30"
             "linux"     "@_ZN17CGlobalEntityList21FindEntityByClassnameEP11CBaseEntityPKc"
             "mac"     "@_ZN17CGlobalEntityList21FindEntityByClassnameEP11CBaseEntityPKc"
           }
         }
       }
    
       /* CBaseEntityOutput::FireOutput */
       "#default"
       {
         "Signatures"
         {
           "FireOutput"
           {
             "library"   "server"
             "windows"   "\x55\x8B\xEC\x81\xEC\x30\x01\x00\x00\xA1\x2A\x2A\x2A\x2A\x33\xC5\x89\x45\xFC\x53"
             "linux"     "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
             "mac"     "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
           }
         }
       }
    

    Related links/useful resources:
    https://wiki.empiresmod.com/Sourcemod_Plugins
    https://git.empiresmod.com/sourcemod/sourcemodoffsets
     

    Attached Files:

Share This Page