How to customize the gameplay?

Bamarin

L1: Registered
Apr 1, 2020
4
2
Hi, I'm very new to the world of mapping and I would like to get addressed on how to create a map with a custom game mode that, for example, forces you into a specific class, changes weapon damage and so on...
I've started with Crash's [Video Tutorials] How to Make TF2 Maps. So I know the basics but literally nothing more than that.

I found it strange that I didn't find any tutorial on how to create a custom game mode so maybe this isn't the right place to ask, or maybe I'm just bad at searching...

PS I've some experience in game developing, I guess this is not something that you can do entirely on Hammer, but I know how to script and program so you can give me advanced resources if you have any
 

Pinsplash

bad bad bad
May 8, 2016
156
71
Tf2 doesn't have any intermittent language you can use (unlike gmod or left 4 dead 2). Weapon stats can only be changed with a server plugin (which requires the server operator to do... extra things). You can't force people to a class but you can filter people by their class with the filter_tf_class entity (or just use another server plugin).
 

Bamarin

L1: Registered
Apr 1, 2020
4
2
Ok, so server plugins was I thing that I never heard of and I'll look if I find any that suits me. I guess my aim is actually to create a private server rather than just a map.

If you have any more tips on what I should look for, that would be greatly appreciated!
 
T

The Asylum

An easier albeit more.... unethical way of forcing classes is to use client commands via the point_clientcommand entity. A trigger volume that a player moves into can send an output to the clientcommamd that you can make it fire a command output to the player's command console. Firing a join_class scout command, for instance, will force that player to respawn as a Scout if they aren't one already.

The reason why I call this unethical is because point_clientcommand can be abused to really fuck with other players, and like point_servercommand, it's a very powerful tool that has potential to do lots of damage. Every server cfg defaults to disabling servercommand and clientcommand. Many maps that do use them do so for innocent enough reasons, but again, the potential for severe abuse is there, and I doubt you'll be able to find many admins willing to disable these protections if you're not a trusted, long-time member of their community.