Many of us that have tried to go off the beaten path with gamemodes in TF2 have run into issues where we basically need to "hack" or override existing logic to make our gamemode work. I'd like to start a discussion about a new entity that would be able to solve this problem for us and unlock a lot of potential for creative new custom modes.
My proposal to Valve:
The thing all these custom gamemodes have in common is that we want to override parts of the HUD or the entire HUD and make things update on it.
A new entity called "tf_logic_hud_driver".
How might the inputs work?
Custom Gamemode Examples:
Siege: https://tf2maps.net/threads/siege_grove.43069/
Generator Defense: https://tf2maps.net/downloads/gd_powerbreak.8350/
Casual Arena: https://tf2maps.net/downloads/lumberyard-event.10884/
Object Destruction: https://tf2maps.net/downloads/od_canary.9156/
CTF Enhanced: https://tf2maps.net/downloads/ctf-with-a-gateswitch-cp.1148/
King of TC: https://tf2maps.net/downloads/king-of-territorial-control-prefab.10312/
Tug of War: https://tf2maps.net/threads/longboy.38876/
Mutli Payload: https://tf2maps.net/threads/resource-mpl_-game-type-setups-coding.24979/#post-334252
Open Questions:
What gamemodes have you tried to implement? I'd like to hear about other potential use cases of this kind of entity.
My proposal to Valve:
The thing all these custom gamemodes have in common is that we want to override parts of the HUD or the entire HUD and make things update on it.
A new entity called "tf_logic_hud_driver".
- Simliar to the pd logic, takes a .res file that defines the gamemodes HUD
- Takes inputs to drive values defined in the .res file
- My assumption is that there is enough existing generalized logic entities (e.g. math_counter, logic_compare, etc) to be able to manage the state for most custom gamemodes. This entity has always been the missing piece
Code:
"DeathCounter"
{
"ControlName" "CExLabel"
"fieldName" "DeathCounter"
"xpos" "52"
"ypos" "72"
"zpos" "4"
"wide" "25"
"tall" "15"
"visible" "1"
"enabled" "1"
"textAlignment" "center"
"labelText" "%deathcount%"
"font" "HudFontSmallBold"
"fgcolor" "TanLight"
}
How might the inputs work?
- Set a string. Could be something like a goal string, or help or instruction text
- Set / increment / decrement an integer. Could be something like health of an entity you want to protect (see Generator Defense)
- Drive a progress bar (like the PD score count or Payload progress) by modifying the width of a hud element based on an integer.
- Turn certain hud elements on and off. Set a variable that controls visbility of a particular element. (e.g. Seige, show a progress bar for the cap but replace it with a payload hud for the payload part)
Custom Gamemode Examples:
Siege: https://tf2maps.net/threads/siege_grove.43069/
Generator Defense: https://tf2maps.net/downloads/gd_powerbreak.8350/
Casual Arena: https://tf2maps.net/downloads/lumberyard-event.10884/
Object Destruction: https://tf2maps.net/downloads/od_canary.9156/
CTF Enhanced: https://tf2maps.net/downloads/ctf-with-a-gateswitch-cp.1148/
King of TC: https://tf2maps.net/downloads/king-of-territorial-control-prefab.10312/
Tug of War: https://tf2maps.net/threads/longboy.38876/
Mutli Payload: https://tf2maps.net/threads/resource-mpl_-game-type-setups-coding.24979/#post-334252
Open Questions:
- Would we be able to have this entity work in tandem with existing payload logic and cp's?
- It would be nice to be able to also drive a payload track, could func_tracktrains be able to expose a "progress" output so one could more smoothly drive a payload track
- Could this entity simply override a hud file. (e.g. You want remove the pointer things from the CTF hud, could just comment those out in the .res file and load it into the map with this entity)
- Are we concerned with players having their own custom huds for things, and this causing certain maps to look a bit off? Should we only support the idea that everyone is running the default hud?
What gamemodes have you tried to implement? I'd like to hear about other potential use cases of this kind of entity.
Last edited: