Home TF2 Classic SourceMod+Metamod Setup
Post
Cancel

TF2 Classic SourceMod+Metamod Setup

Note: If you don’t have a server up and running, here’s a guide for that.

So, as expected, SourceMod isn’t necessarily drag-and-drop like supported SM games are such as TF2 and CS:Source due to this simply being a mod built off of Source SDK 2013 with things like a different game name (tf2classic), offsets, signatures, etc.

While the process of getting SM to work isn’t that hard, the pins in the #servers channel of the TF2 Classic Discord aren’t that great either. Information is scattered, there’s outdated information, and no one likes to read pins (sadly). This is meant to unify it a bit.


Getting SourceMod and MetaMod

Visit the Stable builds section of sourcemod.net and grab the latest Linux build. Download it to your server using wget/curl or to your machine and upload it to your server using SFTP.

1
2
3
curl -L -O https://sm.alliedmods.net/smdrop/1.10/sourcemod-1.10.0-git6502-linux.tar.gz
# or
wget https://sm.alliedmods.net/smdrop/1.10/sourcemod-1.10.0-git6502-linux.tar.gz

You’ll also need stable Metamod:Source from here. Download it with one of the ways you did.

Make sure the archives are in your tf2classic game folder.
(location_of_sdk2013ds/tf2classic)

Extract it in that location:

1
2
tar -xf sourcemod-1.10.0-git6502-linux.tar.gz
tar -xf mmsource-1.11.0-git1144-linux.tar.gz

Feel free to remove the archives.

There are a few things we need to do before launching the server.

Replacing metamod.vdf

You should see an addons folder at the end. We need to replace a file in there.
Addons folder after extracting SM and MM

metamod.vdf is necessary for your server to recognize the game. Since this is a mod, we need to use a web tool to generate a metamod.vdf file for us that points to tf2classic.

Go into your addons folder in your tf2classic server and delete metamod.vdf. No need to back it up or anything.

Head over to sourcemm.net/vdf.
You’re going to leave the “Game:” blank, or as “—”. In the “Game Folder” box, enter tf2classic. It should look exactly like this.
Metamod generator page example

Download this file and transfer it to your server via SFTP. Move it to your addons folder.
Addons folder after adding the new metamod.vdf


Great, we’re half way done c;


Importing custom gamedata

To get things like the showmenu, radio menu, hud message, etc to work, we need to import custom gamedata. Do not edit common.games.txt anymore as this is not reliable and a hacky solution. It also requires disabling auto updating. The official method is to create data in custom subdirectories.

If you’re using Ubuntu Server, you might have the git program on your server. If you do, move to the tf2classic directory and clone the following repo with this command:

1
git clone https://github.com/Scags/TF2Classic-Tools.git

If you don’t, download this repo with wget/curl directly:

1
2
3
4
5
6
wget https://github.com/Scags/TF2Classic-Tools/archive/master.zip
# or
curl -L -O https://github.com/Scags/TF2Classic-Tools/archive/master.zip
# then unzip it
unzip master.zip
# if you do not have unzip, install it using: sudo apt install unzip

cd into the directory, being either TF2Classic-Tools or TF2Classic-Tools-master depending on how you downloaded it.

The sourcemod directory is what we’re after. Run the following command to copy it to your addons folder:

1
cp -r sourcemod/ ../addons/

Now we have the necessary gamedata for plugins and core SM and MM functions to work with TF2C! One more thing c:

Setting yourself as the “root” admin user.

You’re gonna need to be able to do administrative actions, but SourceMod doesn’t know that yet! Thankfully, it’s pretty simple.

First, grab your SteamID using a website like steamid.io. Simply enter your custom URL or your steamID64. Take note of the steamID line.
Example Steam lookup

Open the file tf2classic/addons/sourcemod/configs/admins_simple.ini with a text editor.
At the very bottom, create a new line following this scheme:

1
"steamID" "99:z"

99:z means all permissions available. Only gives this permission to server operators as you can do more than you realize with this kind of power.

For example, here’s my admins_simple.ini:
Example admins_simple.ini

To assign lesser admins, you can follow the same scheme with the help of the comments in this file and the wiki: https://wiki.alliedmods.net/Adding_Admins_(SourceMod)

Save the file, then start your server up and have fun!


Note: While I tested map voting, you should not need to delete nextmap.smx. If you have issues with map voting, try disabling or removing the plugin. There are other map voting plugins out there too!


You might get an error about missing dhooks.ext. It does seem safe to ignore if you don’t have any plugins that need dhooks, but if you use something like Scags’ TF2C Crash Exploit Fixes you will need DHooks w/Detours.

To install DHooks with Detours, download this ZIP file and upload it to your server: https://forums.alliedmods.net/attachment.php?attachmentid=184479&d=1602926778
(If you need pre-SourceMod v1.10 build of DHooks w/Detours for some reason: https://forums.alliedmods.net/attachment.php?attachmentid=184480&d=1602926778)

Original post: https://forums.alliedmods.net/showpost.php?p=2588686&postcount=589

Extract it, and move the addons folder to tf2classic and restart the server.


Written by Zanthed <3
This post is licensed under CC BY 4.0 by the author.
Trending Tags
Contents
Trending Tags