alliedmodders / amxmodx

AMX Mod X - Half-Life 1 Scripting and Administration
http://www.amxmodx.org/
496 stars 201 forks source link

Offsets for DMC and Ricochet #626

Open DarthMan opened 6 years ago

DarthMan commented 6 years ago

Hello. I'd like to request, just as you can find offsets for Half-Life, Opposing Force, Team Fortress Classic, Counter-Strike and Day of Defeat, can offsets for Ricochet and Deathmatch Classic be added as well? This could be very useful for people that are not very familiar with IDA. Also, there aren't really any tutorials explaining how to get offsets with IDA. I know that code has to be decompiled and look for 'this' to get the value, but, for decompilation, I guess, an extra IDA plug-in is required. This will make it very easy for anyone to write plug-ins with multimod support that are relying on offsets. For example, let's say you want to get where the player was hit on Ham_Killed post. For m_LastHitGroup, you would need the offset corresponding to the game. Thanks for reading and hoping for an update that will include DMC and Ricochet :-)

Arkshine commented 6 years ago

The offsets (name and value) are known because debug info has been added into the binary since the Valve SteamPipe update in 2013. I'm pretty sure I did not add them because they don't contain debug info.

I checked again, and actually, DMC has debug info, but not Ricohet. So I can extract and add offsets for DMC, but Ricochet is not going to be possible.

WPMGPRoSToTeMa commented 6 years ago

@Arkshine Ricochet is open-source as well as DMC, so you can try to compile it with debug info or use some another way.

Arkshine commented 6 years ago

Oh right, then it should be possible for Ricochet.

DarthMan commented 6 years ago

The offsets (name and value) are known because debug info has been added into the binary since the Valve SteamPipe update in 2013. I'm pretty sure I did not add them because they don't contain debug info.

I checked again, and actually, DMC has debug info, but not Ricohet. So I can extract and add offsets for DMC, but Ricochet is not going to be possible.

It's ok. Getting offsets is actually very easy with IDA for both Windows and Linux, after getting the hex value I convert it to decimal using the Windows Calculator. But it's good for those who don't know how to use IDA and need offsets for games other than CS, for example.