How do you implement a hybrid game mode?

Orange Juice

L1: Registered
Jun 6, 2019
7
0
I am trying to make a map that uses a combination of arena, ctf, and attack/defend logic. It would utilize arena logic such that there would be no respawning. It would not, however, have a control point that can be captured after a certain length of time. Instead, there would be a red intelligence briefcase that the BLU team must capture to win the game. RED team must defend their intelligence until the round timer is up or, alternatively, eliminate every BLU player. The map would be asymmetrical, with enough map-influenced advantages for team BLU to counter-balance the game mode's inherent advantages for the defending RED team.

Each round would start with a 1 minute setup time for the RED team, with the intelligence briefcase being creatively designed inside of the room they spawn into. Meanwhile, BLU Team would not be able to leave their spawn room until setup time is over. In their respective spawn rooms however, both teams would be able to change classes, customize their load out, or join the game, if they hadn't already.

Once the setup time is over, there will be a round timer of some duration (I haven't determined how long to make it, but it'll be no more than 10 minutes). The BLU team must pick up the red intelligence briefcase and, while carrying it, take it to the capture point; a designated area in their spawn room (think of any official ctf map). If the round timer reaches 0:00 before BLU captures the intelligence, RED team wins. I haven't fully decided yet, but I plan on making it such that, even if the BLU team has eliminated all RED players and is carrying the intelligence, the RED team will still win if the BLU team does not capture the intelligence before the round timer is up. Perhaps I could add some kind of overtime, but that's not a high priority.

Hopefully the game mode I am trying to create is clear. It does favor the defending RED team, but map design and health/ammo pack placement can give BLU team some advantages to achieve a balance. The question I have is this: how do you make this game mode? I don't want the standard arena mode; I just want no respawn. I don't want your typical ctf; I want attack/defend ctf, where one team is trying to capture the other team's intel, instead of both teams trying to capture each other's intelligence. Also, I don't want attack/defend; I just want the round timer. Is there any way to do this? Can someone help me? I am new to mapping; this is my first map. I am not super focused on the map design, rather I am focused on how to make this game mode function. I can worry about designing and making the map later. Anyways, if you've read this far, I would like to thank you. If I wasn't clear about anything, please let me know and I will try to get back to you as soon as possible. Thank you so much, and I hope you can teach me how to do this.
 

Da Spud Lord

Occasionally I make maps
aa
Mar 23, 2017
1,339
994
I'd recommend learning how the logic works for each individual game mode. What you're proposing does sound possible, but it'll require a decent amount of custom-made logic, and an extreme amount of mapping talent and finesse to make it actually enjoyable and balanced to play. By making a map with a simple gamemode with easy-to-learn and well-known logic, you'll hopefully learn how all the entities work, and will be able to then move on to custom stuff. Plus it'll help you learn other aspects of mapping, such as how to design a fun layout, which will be of great benefit when the time comes to prove to everyone that your new gamemode is worth playing.

I really like this quote, and think it well applies here:
While it would be so cool to have that four stage payload that whirls around an erupting volcano or the cp_steel influenced map that is floating by giant air balloons in the sky, you will have a horrific time trying to execute it.

Start small, and conquer each obstacle as you go. You'll run into bugs, problems and difficulties almost as soon as you start. So many new mappers are trying to reinvent the wheel when they forget why we have a wheel in the first place. When you [get] the skills and the experience, then try to make that awesome amazing 6-month-in-the-making map. Don't forget your ideas. As Schwa said, you don't want to become jaded and boring, but you also don't want to get frustrated and keep restarting projects over and over because you get stuck on how to tackle a gargantuan workload.

Pick your battles intelligently. One of my favorite architects was once quoted saying: "It's better to be good than to be original." I agree, but I want to take that a bit further:

Be good. And then, be original.
 

Orange Juice

L1: Registered
Jun 6, 2019
7
0
While I do plan on watching more tutorials and learning how to make maps, I feel like this is more of a specific problem that I wouldn't be able to find anywhere on the internet. Right now, I just have a square room with square walls, two square spawnrooms, and a skybox. I just want to know how to make custom-made logic. Like, I don't really have an interest in making payload maps or KOTH maps or cp maps, nor do I want to go through making those maps on my way of learning. It probably sounds amateur, but I'm just not interested in making maps for established game modes. I'm more into arena and ctf, however I don't like them in their current state, so I decided to change a few things. Unfortunately, however, they are not built into the system by default.

I understand that it isn't really possible to test the validity and plausibility of a new game mode without first being a good map maker and making a good map. Conversely, it's not possible for me to start building and play testing a map without creating the custom-made logic as the foundation for my future progress as a map maker.

So, if you know how to implement it, or if you could show me some resources that could aid me, it would be much appreciated. Again, thanks.
 

Orange Juice

L1: Registered
Jun 6, 2019
7
0
I've never played Counter Strike, but I looked it up, and I guess it might be similar to de_. I got the idea from watching a bunch of tf2 source film maker videos.

I really like the concept of taking the intelligence; it gives me such a rush. In particularly, the TF2 SFMs always portray spy as the cerebral thinker that intelligently creates a master plan to eliminate RED and infiltrate their base to steal their intel. I got a lot of inspiration from watching SFMs like "Live and Let Spy."
 

Maid

Bimbo Succubus Lesbian
aa
Sep 29, 2018
246
553
While I think engies are going to make this gamemode very difficult to execute well, it's most definitely possible and there's no harm in trying it out. Use the A Boojum Snark gamemode prefabs to examine the logic for each of the gamemodes ur planning to combine and take what you need. This doesn't honestly sound too difficult - the map design is going to be a far bigger obstacle. If you don't feel able to work out the logic yourself, I could try my best to create a prefab for you - though I can't guarantee buglessness, and it'd be much more valuable to understand the logic yourself in order to tweak and refine it.
 

Da Spud Lord

Occasionally I make maps
aa
Mar 23, 2017
1,339
994
Well, if you insist on making this hybrid gamemode, then I won't stop you. I won't tell you exactly how to implement it, partially out of laziness and I wouldn't know the exact steps off the top of my head, partially because it should be simple enough to do on your own, and partially because learning how the logic works yourself will make debugging and modifying your gamemode easier. Here's some resources to get you started:
  • The ABS Mapping Resource Pack contains a gamemode library that demonstrates all the logic for every standard gamemode in TF2. Take a look at how the elements of each gamemode work in their normal environments to get an understanding of how they work, and if necessary, recreate the standard gamemode logic by hand- building anything yourself is the fastest way to learn how something works. It also has a bunch of other resources that are useful for TF2 mappers- if you haven't installed it yet, I advise you do.
  • The Valve Developer Wiki has some half-decent documentation on every entity in TF2. If you're having trouble wrapping your head around an entity, this may help.
Some of the entities you'll want to look at:
The functionality of some of these entities may conflict due to the fact that they weren't all designed to be used together, so tread carefully and expect issues.
 
Last edited:

Orange Juice

L1: Registered
Jun 6, 2019
7
0
Alright, so I completed as much logic as I could, but there are a few problems. I'll go through what I am trying to achieve, what currently works, and what isn't coming together:

What I am trying to achieve:

There is a single intelligence briefcase that belongs to team RED. BLU is trying to take the intelligence and capture it. If they capture it, they win. There is no overtime and no matter which team wins, teams will be swapped for the next round.

There is a setup time that is no longer than 1 minute. RED is able to setup, and BLU stays in their spawn. I don't know whether I should allow class and loadout changes during this time, because then RED's engineers could essentially respawn with full metal, despite the absence of a resupply locker for exactly this purpose. With that said however, without class or loadout changes, it may be difficult to change at any other time, without having to wait for the next round.

After setup time, there is a round time limit. If the intelligence is not captured before the round ends, RED team wins.

Lastly, I would like to disable first-blood criticals, random critical hits, and random bullet spread. I personally don't like first-blood crits; I feel like it solidifies Arena mode in general into the "Alternative Game Modes" category because it's somewhat random. It feels out of place imo. As for random crits, it's just my personal preference. I don't really like them much. Finally, I don't want random bullet spread because I like consistency. Anyways, I mostly want random crits and first-blood crits turned off. The last thing players want is to have to wait for next round because they died to a random crit and they can't respawn because it's arena mode.

Alrighty, let's move on to the more positive (maybe) stuff! Here's what I have gotten to work so far:

I got spawn doors that open for RED when setup time begins. They stay closed on BLU's side for 60 seconds. The round timer also works. If the round timer reaches 0:00, RED wins. There is also humiliation, which is when the winning team gets crits and gets to run around and blow up the losing team, just like in casual. lol

It's also arena mode, meaning there is no respawning. So that works too. So far, you may have noticed that I have mentioned arena mode, but haven't mentioned any control point to capture. This is because there is no control point. Instead, there is a timer. And, eventually, a flag. Which leads me into what isn't working.

What doesn't work:

First-blood crits exist. Random crits exist. Random bullet spread exists.

The bigger problem is this: when I tried to place a red ctf flag, it overrode the arena logic and the game became a CTF game instead. The good news was that capturing the flag won the game for BLU, which is what it is supposed to do. Furthermore, the HUD updated itself to show an arrow indicating which direction the intelligence was, which was great. I was afraid that the HUD would appear like it does at the bottom of the screen in a casual ctf_2fort map; showing red and blu intel, but the program didn't do that. Instead, it centered the red intelligence's arrow indicator, and it didn't even show BLU. Which is good, because there is only 1 intelligence briefcase. I like this design, as it shows where the intel is. Before I added the flag, this HUD element did not appear.

However, all of this overrode the arena logic, meaning it wasn't arena mode anymore; it was CTF. This means that players would respawn. Also, everything else that is inherent with arena mode was gone; usually, Arena mode requires an equal number of players on both teams, and at least 2 players to start a game. None of this was present; only CTF.

If none of this made sense, hopefully this will: I was able to make a setup time and round timers, and the game mode could be CTF or arena, but not both. And I am trying to get parts of both at the same time. So that's the problem.


Does anyone know if I can keep the CTF hud at the bottom of the screen while also having the countdown timer at the top? Currently, if I have the map to be setup for arena mode (if I delete the flag entity, save, and compile), then there is a countdown timer, but it isn't visible on the hud. If I have the map setup for CTF mode (if I add the flag and capture point, save, and compile), then the CTF hud at the bottom of the screen shows up, and there is also a visible countdown timer.

For the HUD, I don't want any of the arena hud elements. In arena mode, there is a count at the top center of the screen that displays the number of players left on each team. I don't want that. Instead, I would like to keep the countdown timer at the top of the screen, which is standard in all the official attack/defend, control points, and payload game modes. Lastly, I would like to keep the CTF hud element at the bottom of the screen, which shows the direction of the location of the red intelligence briefcase.

Simply put, the HUD would be like the normal ctf hud, except with 1 flag, a round timer, and, instead of playing to 3 captures, only playing to 1 capture.

*If I need to post any additional information to clarify anything*, let me know, and I'll post a reply. Thanks!
 

Da Spud Lord

Occasionally I make maps
aa
Mar 23, 2017
1,339
994
Lastly, I would like to disable first-blood criticals, random critical hits, and random bullet spread.
All of these are controlled by cvars:
  • tf_arena_first_blood 0/1 will disable or enable first blood.
  • tf_weapon_criticals 0/1 will disable or enable random critical hits.
  • tf_used_fixed_weaponspreads 0/1 will enable or disable random bullet spread.
You can forcibly set these using the point_servercommand entity on any server that has sv_allow_point_servercommand always, but this of course requires the server to have this enabled (it is disabled by default), and it generally isn't advisable to forcibly change server settings unless you're making a gamemode that absolutely demands the server uses certain settings.

However, all of this overrode the arena logic, meaning it wasn't arena mode anymore; it was CTF. This means that players would respawn. Also, everything else that is inherent with arena mode was gone; usually, Arena mode requires an equal number of players on both teams, and at least 2 players to start a game. None of this was present; only CTF.
Seems to be an inherent flaw in the item_teamflag entity that overrides Arena mode logic. I know Yrr managed to successfully combine CTF elements with Arena mode logic in ctf_exsmol, try decompiling that map or asking her how she did it.

For the HUD, I don't want any of the arena hud elements. In arena mode, there is a count at the top center of the screen that displays the number of players left on each team. I don't want that. Instead, I would like to keep the countdown timer at the top of the screen, which is standard in all the official attack/defend, control points, and payload game modes. Lastly, I would like to keep the CTF hud element at the bottom of the screen, which shows the direction of the location of the red intelligence briefcase.
tf_gamerules has a HUD Type keyvalue that should allow you to override the HUD type displayed to CTF. I'd implement that solution after you successfully manage to blend Arena and CTF together and the HUD still doesn't look like what you want it to look like.
 

Orange Juice

L1: Registered
Jun 6, 2019
7
0
Thank you all so much (Spud, Maid, Yrr). Adding the point_template was a quick fix and it worked.

So, the HUD still didn't look the way I wanted, so I added the tf_gamerules entity, and set the HUD to CTF. Now, this part is kinda hard to explain with words, so I uploaded a few pictures to better illustrate what I'm trying to say.

My thought process concerning setup time is as follows: I want setup time to be 1 minute long, but players can't move until after like 5 seconds, so setup time needs to be 1 minute and 5 seconds. However, the arena mode logic also gives players 5 seconds before the round, and players can't move until the round begins, so what happens is that players get a 1 minute and 10 second setup time, and can't move for ten seconds. Not a huge problem; I could always just take off the 5 seconds that I originally added to the default setup time, but I noticed during play-testing that the HUD changed depending on whether or not it was actually setup time.

You see, setup time wasn't actually lasting 1 minute and 5 seconds like it was originally supposed to; it was 1 minute and 10 seconds. Plot twist: it was actually only 10 seconds long. What do I mean? Well, the setup time *technically* is 10 seconds long, however I set up BLU's spawn doors so that they only open after 1 minute and 5 second. I delayed BLU's doors to open after 1 minute and 5 seconds, but the actual game thought the round had already started.

Essentially, the doors are opening in response to a pre-set delay, instead of in response to setup time being over.

I've uploaded one picture that shows what the HUD looks during the actual 10 second setup time. Another picture shows what the HUD looks like after setup time. Lastly, I've added a picture of what HUD I am trying to get during and after setup time. Also, after play testing, I also realized that Arena mode is played in the best-of-3 format. I would like it to be best-of-1, so that the teams will swap after every round. I have a similar issue with the flag; at the bottom of the screen, the HUD reads, "Playing to: 3", but I only want it to show "Playing to: 1". In-game, if BLU caps once, they win; it's just the HUD that isn't correct.

Again, thanks so much for the detailed responses; I couldn't ask for more. Thank you.
 

Attachments

  • HUD during 10 second setup time.jpg
    HUD during 10 second setup time.jpg
    77.1 KB · Views: 233
  • HUD after 10 second setup time.jpg
    HUD after 10 second setup time.jpg
    55.1 KB · Views: 319
  • Preferred HUD.jpg
    Preferred HUD.jpg
    53.9 KB · Views: 253
Last edited: