Team Fortress: Source 2 (TFS2) is a project powered by s&box made by Facepunch, the spiritual successor to Garry's Mod. It aims to recreate the experience and mechanics of TF2 on Source 2, taking advantage of the updated engine's graphics and capabilities. The project has been internally developed by Amper Software and it has been made open source for everyone to access, players and developers alike.
This part aims to guide developers with installing and setting up the addon for local development. For general users and players it is recommended to use s&box's in-game addon browser to play the gamemode.
- Navigate to your s&box installation directory. For example, on Windows this would be the
Steam/steamapps/common/sbox/
folder. - Go into the
addons
folder and clone the repository. - Initialize submodules. We use our s&box FPS SDK as the core of the gamemode. If you have cloned the repository using a GUI client such as GitHub Desktop the submodule should have been initialized automatically. If not, navigate to the repository folder and run:
git submodule update --init --recursive
. You can then navigate to thecode/Libraries/Source1
folder and verify that it contains content. - Run the developer version of s&box (sbox-dev.exe). Once loaded, add the addon using the Addon Manager widget (Add -> Add From Disk) by selecting the
.addon
file and verify that it is active and enabled by hovering over the checkmark icon.
Congrats! Your local version of TFS2 is ready to be played and modified.
If you encounter any issues during installation or the overall setup process you can contact us on our Discord.
An easy way to launch the game mode is by using launch configs.
You can also launch the gamemode by either using the in-game gamemode browser or by using the console. If you want to use the console, run the following commands:
gamemode local.tfs2
map mapname
In order to update the gamemode all you have to do is just git pull the new changes from the remote repository. Most of the time, the game will succesfully recognize the new changes and hotload them. However if you are doing some major git operations (like checking out another branch or merging it), it is recommended to close the game before you perform them.
Sometimes s&box decides to recompile the assets and change the compiled files, thus putting them in the git change list. This may cause issues when performing branch-related activities, like merging or checkout so it is reccomended to discard any changes of *_c
files, unless you specifically intended for them to appear, in which case just commit them.
Interested in fixing a bug or implementing a feature? Whether it's a major change or a small hotfix, you are welcome to submit it through a pull request! But before that happens you must follow:
As long as you abide by these guidelines, you can submit a pull request and an Amper developer will try to review it as soon as possible.
Also, feel free to join our Discord and chat with other developers about your ideas in the special channels.
This repository is licensed under the MIT license but some assets included (such as models, sounds, animations and more) were originally created by Valve Corporation and therefore are under Valve's intellectual property.