Open SuperMario20 opened 4 years ago
Unfortunately, to my knowledge the TF2 Classic mod does not support the server modding community and strips their binaries of symbols, which means that finding gamedata for that mod is a fairly involved reverse engineering process. The SourceMod team has attempted outreach to many mods to aid in support in the past, but it generally seems to fall on deaf ears. Also from discussions in the SourceMod Discord in the past, I believe the game does not use the econ system from TF2 so there is no utility for TF2Items. As I understand it there is a similar item attributes system in the mod, but it is entirely home-grown and unrelated to the TF2 implementation TF2Items was built for. That doesn't appear to be correct after briefly looking at it myself, I may have been confusing it with Open Fortress, although it'll probably need a lot of work - TF2Items particularly needs:
CTFPlayer::GiveNamedItem
that takes a CEconItemView *
- the string "NULL Ent in GiveNamedItem" might direct you down the right path (or the wrong one!)CEconItemView
and CEconItemAttribute
- these should be networkable, so you can get a lot of structure from a SourceMod netprop dump.To build TF2Items you need to install AMBuild and then run configure.py
in a clean directory from a Visual Studio Tools command prompt, which will generate a build.py
script in the directory that needs running to do the actual build. The build.bat
script committed in the repo does those steps for a regular command prompt, but is looking for a very old version of Visual Studio you don't have installed. As this is a very old project you will almost certainly need to massage the Metamod:Source/SourceMod/SDK paths/versions in AMBuildScript
- TF2Items is so old that it predates the split of the ob-valve
SDK into tf2
, css
, and hl2dm
.
If you need any help, I highly suggest joining the SourceMod Discord which has an abundance of helpful people and skilled reverse engineers, including the main driver towards Team Fortress 2 Classic support for SourceMod.
there is a gamedata for tf2c https://github.com/Scags/TF2Classic-Tools
but it doesn't have a givenameditem
now I get Exception: Could not find a valid path for MMSOURCE19
How do you find the TF2 offsets? I have been working on some plugins for a mod called Team Fortress 2 Classic and I can't find any information on it, but I need to change the offsets in the tf2items.txt so it will work on my server. Also it errors when running build.bat saying
call "\vsvars32.bat" '"\vsvars32.bat"' is not recognized as an internal or external command, operable program or batch file.
..\configure.py Traceback (most recent call last): File "configure.py", line 3, in
import ambuild.runner as runner
ModuleNotFoundError: No module named 'ambuild'
build.py 'build.py' is not recognized as an internal or external command, operable program or batch file.
It seems like some of the files required for it to build are missing. Could you explain how to find the offsets and maybe also what I need to download to get this working?