SourceMod Offsets for PVK II 2.3

RothgarRothgar Server Admin
edited February 2010 in Servers
The following block of text needs to be installed in the following location:

addons\sourcemod\gamedata\sdktools.games\custom

Make a file called "game.pvkii.txt"

Insert the following text in that file:

*** Updated values by Viper (Tested and working)

CODE
"Games"
{
    /* Pirates, Vikings and Knights II */
    "pvkii"
    {
        "Offsets"
        {
            /* CBasePlayer */
            "GiveNamedItem"
            {
                "windows"    "352"
                "linux"        "353"
            }
            "RemovePlayerItem"
            {
                "windows"    "239"
                "linux"        "240"
            }
            "Weapon_GetSlot"
            {
                "windows"    "237"
                "linux"        "238"
            }
            "Ignite"
            {
                "windows"    "194"
                "linux"        "195"
            }
            "Extinguish"
            {
                "windows"    "198"
                "linux"        "199"
            }
            "Teleport"
            {
                "windows"    "101"
                "linux"        "102"
            }
            "CommitSuicide"
            {
                "windows"    "393"
                "linux"        "393"
            }
            "GetVelocity"
            {
                "windows"    "131"
                "linux"        "132"
            }
            "EyeAngles"
            {
                "windows"    "123"
                "linux"        "124"
            }
            "AcceptInput"
            {
                "windows"    "35"
                "linux"        "36"
            }
            "DispatchKeyValue"
            {
                "windows"    "29"
                "linux"        "28"
            }
            "DispatchKeyValueFloat"
            {
                "windows"    "28"
                "linux"        "29"
            }
            "DispatchKeyValueVector"
            {
                "windows"    "27"
                "linux"        "30"
            }
            "SetEntityModel"
            {
                "windows"    "24"
                "linux"        "25"
            }
            "WeaponEquip"
            {
                "windows"    "230"
                "linux"        "231"
            }
            "Activate"
            {
                "windows"    "32"
                "linux"        "33"
            }
            "FireOutputBackup"
            {
                "windows"    "6"
                "linux"        "10"
            }
        }
        "Signatures"
        {
            "FireOutput"
            {
                "library"    "server"
                "windows"    "\x81\xEC\x2A\x2A\x2A\x2A\x53\x55\x56\x8B\x71\x2A\x85\xF6\x57"
                "linux"        "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
            }
        }
    }
}



You also need to edit the file in addons\sourcemod\gamedata\sdktools.games\engine.ep2.txt

Add:

CODE
"game"        "pvkii"


Inside the following blocks:

/* General Temp Entities */
/* Create Entity Signatures */
/* CGlobalEntityList */
/* General GameRules */


You also need to edit the following file in addons\sourcemod\gamedata\core.games\common.games.txt

Add:

CODE
"game"        "pvkii"


Inside the following blocks:

/* Which games need a radio menu timeout? */
Which games support HudMsg?


You also need to edit the following file in addons\sourcemod\gamedata\core.games\engine.ep2.txt

Add:

CODE
"game"        "pvkii"


Inside the following blocks:

/* CGlobalEntityList */


Note this has been tested on Windows Only at this point.



Enjoy.
Dawgclan Network > http://www.dawgclan.net
CustomFactor.com > Official PVK II #1 Beta 2.4 (-FF)
21 Players, 33 tick, Custom Maps & More
203.56.188.6:27019

Comments

  • tcvipertcviper Senior
    edited 7:44PM
    Your values are wrong and we have the right ones over here, getting into Sourcemod itself:

    https://bugs.alliedmods.net/show_bug.cgi?id=4276
  • psychonicpsychonic Senior
    edited February 2010
    QUOTE (tcviper @ Feb 10 2010, 09:03 AM) »
    Your values are wrong and we have the right ones over here, getting into Sourcemod itself:

    https://bugs.alliedmods.net/show_bug.cgi?id=4276

    Only a few of them (linux CommitSuicide and some of the DispatchKeyValues) ones are incorrect. The correct offsets and other gamedata are indeed posted on that bug report in the form of a patch file which will hopefully be committed into SM's repository soon so that it will show up in the latest SM snapshots.
  • RothgarRothgar Server Admin
    edited February 2010
    No Worries, I wasn't able to test on Linux as the files weren;t available and didn't get time to get access to the Linux test server in time before things were released.

    I wasn't aware of any KeyValue issues as all the commands worked at least on my previous build haven't tested this final release.

    In any case I will update the post with the patch details, thanks.

    LOL I noticed I still had pvkii-dev in the posted config >_<
    Dawgclan Network > http://www.dawgclan.net
    CustomFactor.com > Official PVK II #1 Beta 2.4 (-FF)
    21 Players, 33 tick, Custom Maps & More
    203.56.188.6:27019
  • RothgarRothgar Server Admin
    edited 7:44PM
    Updated with the other files that need modification.
    Dawgclan Network > http://www.dawgclan.net
    CustomFactor.com > Official PVK II #1 Beta 2.4 (-FF)
    21 Players, 33 tick, Custom Maps & More
    203.56.188.6:27019
  • psychonicpsychonic Senior
    edited 7:44PM
    This is now in the SM 1.3(.2) and SM 1.4 snapshots.
  • MadKatMadKat Senior
    edited January 2012
    I've updated the complete offset list on the alliedmods wiki:

    http://wiki.alliedmods.net/CPVK2Player_Offset_List_(Pirates,_Vikings,_and_Knights_II)

    Had not changed since 2008.
    Programmer, Swashbuckler
    Author of PVKII Randomizer
    Author of PVKII WeaponsMaster
  • kryddakrydda Senior
    edited 7:44PM
    can someone send me their engine.ep2.txt and common.games.txt , i dont really understand how to edit them ohmy.gif
  • pizzahutpizzahut Senior
    edited 7:44PM
    Rothgar wrote:

    You also need to edit the file in addons\sourcemod\gamedata\sdktools.games\engine.ep2.txt

    Add:

    CODE
    "game" "pvkii"


    Inside the following blocks:

    /* General Temp Entities */
    /* Create Entity Signatures */
    /* CGlobalEntityList */
    /* General GameRules */

    In my "engine.ep2.txt" there is no "Create Entity Signatures" section. However I found one titled "CBaseEntityOutput::FireOutput". Should I add the line there instead?
  • MadKatMadKat Senior
    edited 7:44PM
    Programmer, Swashbuckler
    Author of PVKII Randomizer
    Author of PVKII WeaponsMaster
  • MadKatMadKat Senior
    edited 7:44PM
  • KOKORONOKAWARIKOKORONOKAWARI Funny Little Japanese Drawing Person Beta Tester
    edited 7:44PM
    MadKat wrote:

    Updated offsets for PVKII 2.6:

    https://wiki.alliedm...and_Knights_II)


    I never quite understood how you input this in and the "one less" for Windows

    Nichi2EditCROP_zpscolnflbv.gifKarenPirate1Crop_zps5ccbfa57.gifNichi1CROP_zpspr3i3epd.gif
    http://steamcommunit...m/groups/aclans Join and be pro today!


    10402520_1443600839260675_3566335342614205908_nRESIZE_zpsf8423ece.jpg
    output_6Dn6Cs_zpse8ae5afc.gif
    tumblr_mq1t1bZGDA1r30985o1_400_zps948e174a.gif
    tumblr_mviov3cTGP1r8bshso1_500_zpsbada721a.gif
    "I like axes"
    --kokoronokawari
    loli loli loli loli loli loli loli loli

  • MadKatMadKat Senior
    edited December 2013
    When a SourceMod plugin wants to use one of the functions listed in that set of offsets, the plugin needs to have a list of the offsets in a separate configuration file that declares offsets for both windows and linux. The list that I linked shows the offset numbers for Linux. The correct offset on Windows is one less than that listed number.

    For example, here is the declarations for WeaponsMaster:

    "Games"
    {
    "pvkii"
    {
      "Offsets"
      {
       "GiveNamedItem"
       {
    	"windows"  "354"
    	"linux"   "355"
       }
      
       "Weapon_Equip"
       {
    	"windows"  "232"
    	"linux"   "233"
       }
       "RemoveAllItems"
       {
    	"windows"  "302"
    	"linux"   "303"
       }
       "GiveAmmo"
       {
    	"windows"  "226"
    	"linux"   "227"
       }
    					  
       "ForceRespawn"
       {
    	"windows"  "285"
    	"linux"   "286"
       }
       "Spawn"
       {
    	"windows"  "22"
    	"linux"   "23"
       }
       "CancelSpecial"
       {
    	"windows"  "425"
    	"linux"   "426"
       }
     }
    }
    }
    
    Programmer, Swashbuckler
    Author of PVKII Randomizer
    Author of PVKII WeaponsMaster
Sign In or Register to comment.