Raised This Month: $ Target: $400
 0% 

[TF2] Need assistance finding Game Data Offsets


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Proctato
Junior Member
Join Date: Feb 2022
Old 03-07-2022 , 10:09   [TF2] Need assistance finding Game Data Offsets
Reply With Quote #1

Trying to update offsets for a freak fortress subplugin and I can't seem to find out how to get the latest values for these off sets:

"CBaseCombatWeapon::GetSlot"
{
"linux" "333"
"windows" "326"
}
"CTFPlayer::Weapon_Switch"
{
"linux" "268"
"windows" "267"
}
"CBasePlayer::EquipWearable"
{
"linux" "434"
"windows" "435"
}


Would someone be able to help me pull the latest values or send a tutorial on how to?
Proctato is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 03-07-2022 , 10:32   Re: [TF2] Need assistance finding Game Data Offsets
Reply With Quote #2

Quote:
Originally Posted by Proctato View Post
Trying to update offsets for a freak fortress subplugin and I can't seem to find out how to get the latest values for these off sets:

"CBaseCombatWeapon::GetSlot"
{
"linux" "333"
"windows" "326"
}
"CTFPlayer::Weapon_Switch"
{
"linux" "268"
"windows" "267"
}
"CBasePlayer::EquipWearable"
{
"linux" "434"
"windows" "435"
}


Would someone be able to help me pull the latest values or send a tutorial on how to?
I recommend using this site to get the VTable offsets of functions: https://asherkin.github.io/vtable/
Keep in mind that the site isn't always 100% accurate, but for the most part, the offsets are almost always correct.
PHP Code:
"CBaseCombatWeapon::GetSlot"
{
    
"linux"        "336"
    "windows"    "330"
}
"CTFPlayer::Weapon_Switch"
{
    
"linux"        "272"
    "windows"    "271"
}
"CBasePlayer::EquipWearable"
{
    
"linux"        "435"
    "windows"    "434"

__________________
Psyk0tik is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 03-07-2022 , 12:16   Re: [TF2] Need assistance finding Game Data Offsets
Reply With Quote #3

Quote:
Originally Posted by Psyk0tik View Post
I recommend using this site to get the VTable offsets of functions: https://asherkin.github.io/vtable/
Keep in mind that the site isn't always 100% accurate, but for the most part, the offsets are almost always correct.
As long as you upload your own binaries it is generally fine - unfortunately the AM service the buttons pull from stopped updating.
__________________
asherkin is offline
Proctato
Junior Member
Join Date: Feb 2022
Old 03-07-2022 , 13:14   Re: [TF2] Need assistance finding Game Data Offsets
Reply With Quote #4

Quote:
Originally Posted by asherkin View Post
As long as you upload your own binaries it is generally fine - unfortunately the AM service the buttons pull from stopped updating.
What the path to my own binaries, apologies for the silly question.
Proctato is offline
PC Gamer
Veteran Member
Join Date: Mar 2014
Old 03-07-2022 , 15:41   Re: [TF2] Need assistance finding Game Data Offsets
Reply With Quote #5

Quote:
Originally Posted by asherkin View Post
As long as you upload your own binaries it is generally fine.
Where would a Windows user find the linux file to upload?
PC Gamer is offline
nosoop
Veteran Member
Join Date: Aug 2014
Old 03-07-2022 , 16:13   Re: [TF2] Need assistance finding Game Data Offsets
Reply With Quote #6

Quote:
Originally Posted by Proctato View Post
What the path to my own binaries, apologies for the silly question.
Assuming you have a Linux copy of the game client or server, the server and engine binaries will be at tf/bin/server_srv.so and bin/engine_srv.so respectively, relative to the game's install directory. If not, see below.

Quote:
Originally Posted by PC Gamer View Post
Where would a Windows user find the linux file to upload?
Windows users can use something like DepotDownloader or something written on top of a library like ValvePython/steam to retrieve just the engine.so and server{,_srv}.so Linux binaries.
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)
nosoop is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 03-07-2022 , 18:07   Re: [TF2] Need assistance finding Game Data Offsets
Reply With Quote #7

Quote:
Originally Posted by PC Gamer View Post
Where would a Windows user find the linux file to upload?
One way is download SRCDS Linux (or Windows) version from SteamCMD.
PHP Code:
@sSteamCmdForcePlatformType Linux 
example
PHP Code:
//update.txt


logout

@sSteamCmdForcePlatformType windows


//force_install_dir "../Counter-Strike Source"
//app_update 232330 validate
//logout

force_install_dir "../Team Fortress 2"
login anonymous
app_update 232250 validate
logout

//force_install_dir "../Half-Life 2 Deathmatch"
//login anonymous
//app_update 232370 validate
//logout

@sSteamCmdForcePlatformType Linux


//force_install_dir "../Counter-Strike Source Linux"
//app_update 232330 validate
//logout

force_install_dir "../Team Fortress 2 Linux"
login anonymous
app_update 232250 validate
logout

//force_install_dir "../Half-Life 2 Deathmatch Linux"
//login anonymous
//app_update 232370 validate
//logout


exit 
__________________
Do not Private Message @me

Last edited by Bacardi; 03-07-2022 at 18:08.
Bacardi is offline
PC Gamer
Veteran Member
Join Date: Mar 2014
Old 03-07-2022 , 18:42   Re: [TF2] Need assistance finding Game Data Offsets
Reply With Quote #8

Quote:
Originally Posted by nosoop View Post
Windows users can use something like DepotDownloader or something written on top of a library like ValvePython/steam to retrieve just the engine.so and server{,_srv}.so Linux binaries.
I want to make sure I understand. In order to learn an offset for Windows I must do the following:
1. Install and enable Microsoft .NET framework on a computer running Windows.
2. Obtain and install the Microsoft Visual Studio.
3. Determine which programming language I'd like to learn that operates with Visual Studio.
4. Learn the programming language.
5. Determine the depot, manifest, ugc, pubfile of the files you want (where do you find these?).
6. Write code that connects to the Steam DepotDownloader.
7. Execute code to download your two files.
Did I capture that process correctly?

Edit: Just read Bacardi's post. Thanks Bacardi! That seems way easier.

Last edited by PC Gamer; 03-07-2022 at 18:44.
PC Gamer is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 03-07-2022 , 19:37   Re: [TF2] Need assistance finding Game Data Offsets
Reply With Quote #9

Quote:
Originally Posted by PC Gamer View Post
I want to make sure I understand. In order to learn an offset for Windows I must do the following:
1. Install and enable Microsoft .NET framework on a computer running Windows.
2. Obtain and install the Microsoft Visual Studio.
3. Determine which programming language I'd like to learn that operates with Visual Studio.
4. Learn the programming language.
5. Determine the depot, manifest, ugc, pubfile of the files you want (where do you find these?).
6. Write code that connects to the Steam DepotDownloader.
7. Execute code to download your two files.
Did I capture that process correctly?
I just use the "Depot Downloader" that nosoop linked, since it's fairly easy to setup. Then I use this site to fetch the app ID, depot ID, and manifest ID.

Example: TF2 Binaries
- App ID: 232250
- Depot ID: 232256 (Linux)
- Manifest ID: 2312266632028026945 (Latest)

Once you have all that information, you go to the folder where "DepotDownloader.exe" is located, and just type "cmd" in the folder path to automatically run "cmd.exe" with your DD folder as the selected directory. This is the directory path I use: C:\Users\X\Desktop\depot downloader

Finally, you have to use this syntax: dotnet DepotDownloader.dll -app <ID> -depot <ID> -manifest <ID>

For the example I provided, this is what you would use: dotnet DepotDownloader.dll -app 232250 -depot 232256 -manifest 2312266632028026945

Once you've done all that, a "depots" folder should be created inside your DD directory. Each depot will have its own designated folder. My TF2 Linux binaries would be located inside: C:\Users\X\Desktop\depot downloader\depots\232256

Note: Syntax can vary depending on which app's depot you want to download.

Example: L4D2 Mac Binaries
- Syntax: dotnet DepotDownloader.dll -app <ID> -depot <ID> -manifest <ID> -username <username> -password <password>
- Example: dotnet DepotDownloader.dll -app 550 -depot 553 -manifest 4080991265902159838 -username XXXXXXXX -password XXXXXXXX
__________________
Psyk0tik is offline
nosoop
Veteran Member
Join Date: Aug 2014
Old 03-07-2022 , 22:21   Re: [TF2] Need assistance finding Game Data Offsets
Reply With Quote #10

Quote:
Originally Posted by PC Gamer View Post
I want to make sure I understand. In order to learn an offset for Windows I must do the following:

[...]

Did I capture that process correctly?
Apologies for the confusion.

The README linked in the first project shows the usage for DepotDownloader, which is a standalone tool. To get the latest version of the server, you actually don't need anything beyond the server appid (and whatever version of .NET the program itself requires); here's an example command-line invocation:

Code:
DepotDownloader -app 232250 -all-platforms -filelist filelist_tf2_server.txt -dir tf2_binaries
Where filelist_tf2_server.txt contains the list of files to download:

Code:
tf/bin/server_srv.so
bin/engine_srv.so
tf/bin/server.dll
tf/bin/engine.dll
This will allow you to retrieve just those files and nothing else.

(ValvePython/steam was added in as an aside in case you wanted to implement your own tooling for some reason; I don't have any affiliation with either project beyond being a user.)
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)
nosoop is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:02.


Powered by vBulletin®
Copyright ©2000 - 2022, vBulletin Solutions, Inc.
Theme made by Freecode