CTF Invade and other modes

Discussion in 'Mapping Questions & Discussion' started by VelvetFistIronGlove, Jan 12, 2010.

  1. VelvetFistIronGlove

    aa VelvetFistIronGlove

    Messages:
    567
    Positive Ratings:
    437
    There's a very good summary of the different builtin CTF gamemodes over at the Valve wiki, so check that out if you're uncertain about what the item_teamflag can do for you.

    I also want to announce loudly that anyone who is making a single-neutral-flag-take-it-to-enemy-cap-point (i.e. Invade mode), to turn on the Invade mode on the flag. This fixes the "HUD doesn't show who's carrying the flag" problem. Note that invade mode also limits the flag to the team who first picked it up, until it either is captured or returns to the start.

    If you wish to manually return the flag to neutral, use:

    My output named OnDrop
    Target entities named item_teamflag
    Via this input Skin
    With a parameter override of 2

    and

    My output named OnDrop
    Target entities named item_teamflag
    Via this input SetTeam
    With a parameter override of 0

    To set it back to grey, neutral. Skins 1 and 2 and teams 2 and 3 can also be used if you want to set it to be Red or Blu.

    I'm really happy to discover this, as it means that sometime in the past, Valve fixed the previously broken invade flag type, and likely others also.

    Edit:
    Summary of results from testing
    CTF mode single neutral flag
    • Teams can only pick up enemy flag or neutral flag.
    • While being carried: the HUD non-carriers see will remain neutral. Firing SetTeam 2 (red) on the flag will cause their HUDs to show red; SetTeam 3 (blu) will cause it to show Blue; SetTeam 0 (neutral) returns it to neutral; the appearance of the flag does not change.
    • While being carried: the carrier's HUD will show an enemy-coloured briefcase regardless of the flag's team.
    • When dropped: The timer above the flag shows in the team colour as above. Teams cannot pick up their own colour flag.
    • Anytime: Skin 0 give the briefcase the red "dropped/home" skin; Skin 1 for blue; Skin 2 for neutral; Skin 3 give is the red "carried by blu" skin; Skin 4 the blu "carried by red" skin, and Skin 5 the neutral "carried" skin.
    • Capturing: The team's capture score will be incremented, but not the round score.
    • Disabling the flag will cause the HUD to switch to two-flag mode and not point to the flag anymore.

    Invade mode single neutral flag
    • Teams can only pick up own flag or neutral flag.
    • While being carried: the carrier's HUD will show their coloured briefcase regardless of the flag's team.
    • Capturing: The team's capture score will not be incremented, but the round score will. So with the OnCaptureTeam1/OnCaptureTeam2 inputs, fire AddRedTeamScore/AddBlueTeamScore on tf_gamerules with override -1 to undo the round score bump. Capture score cannot be modified at present, so Invade mode will not currently work for contest maps which are required to be scored with capture credits.
    • Disabling the flag will cause the HUD to switch to two-flag mode and not point to the flag anymore.
    • Announcer sound files are missing for invade mode; so no sounds are played on flag events, and a console error message is displayed.
     
    • Thanks Thanks x 8
    Last edited: Jan 17, 2010
  2. grazr

    aa grazr Old Man Mutant Ninja Turtle

    Messages:
    5,436
    Positive Ratings:
    3,562
    does that inadvertantly return the flag to "base"? Or just set it to neutral where it was dropped? This should be very useful.. Although i'm not sure which mechanic i prefer more. I had assumed it was possible for either team to pick the flag up, but i'm starting to like the idea that the first team to grab the intel has "first dibs" on attacking.
     
  3. Nutomic

    Nutomic L11: Posh Member

    Messages:
    888
    Positive Ratings:
    177
    I have a neutral intel, that can always be picked up by any team when dropped.

    Playtest must show how it works, but this will sure make a faster gameplay, less sentries and stuff.
     
  4. VelvetFistIronGlove

    aa VelvetFistIronGlove

    Messages:
    567
    Positive Ratings:
    437
    It just sets it to neutral where it was dropped.

    Yeah, so you'll want to use Invade mode, and set the appropriate OnDrop outputs as above. If you use the CTF mode, then the HUD doesn't show which team is carrying the flag, which is pretty vital to know.

    I have found a bug with the invade mode: sending the Disable input to the flag will cause the HUD to revert to two-flag mode, from which it doesn't recover. So if you don't want the flag to instantly respawn ready for pickup, make an inaccessible room with a point_teleport in it to teleport the flag to on capture (and/or on return); then after the appropriate delay, teleport it to another point_teleport where you want the flag to be picked up from.
     
    • Thanks Thanks x 1
    Last edited: Jan 15, 2010
  5. VelvetFistIronGlove

    aa VelvetFistIronGlove

    Messages:
    567
    Positive Ratings:
    437
    Damn :cursing:

    There's a game-breaking bug in Invade mode: when a player caps, the team doesn't get a capture point credit (which is what the CTF hud shows), they get a round win point (which is what you see at the top of the scoreboard).

    As far as I know, there's no way to manually increment team cap points, and fiddling with round win points is just dodgy.

    :(

    I guess I need to write to Valve to see if they can fix it.
     
  6. Nutomic

    Nutomic L11: Posh Member

    Messages:
    888
    Positive Ratings:
    177
    I didnt mean i dont want it how it is :D

    (Though playtest must show whether it works this way)

    That bug is really bad, i hope they will fix it soon.
     
  7. VelvetFistIronGlove

    aa VelvetFistIronGlove

    Messages:
    567
    Positive Ratings:
    437
    Hopefully they will indeed:

     
  8. Pseudo

    Pseudo L6: Sharp Member

    Messages:
    319
    Positive Ratings:
    149
    You could just use the "CTF" flag gametype and have the OnPickupTeam_ outputs change the flag with SetTeam.

    None of the non-CTF flag gametypes will correctly count a capture. They should not be used for the CTF contest.
     
  9. Boylee

    aa Boylee pew pew pew

    Messages:
    1,068
    Positive Ratings:
    631
    Even if they may be better for competitive play?
    I would've thought that if valve fixes the bugs with invade ctf then there would be no reason not to use it in the competition.
     
  10. VelvetFistIronGlove

    aa VelvetFistIronGlove

    Messages:
    567
    Positive Ratings:
    437
    The biggest issue with the "CTF" gametype for a single neutral flag gamemode is that if someone is carrying the flag, the HUD doesn't show which team is holding it Edit: You can work around this; see edit in top post. There are a couple of other quirks as well, for example the HUD shows the wrong flag colour when you pick up the neutral flag. The announcer messages are also not fully appropriate, but that's not a biggie.

    Yeah, if they don't get fixed, I'm going to have to stick with the CTF gametype, and horrible game_text_tf to show which team has the flag.
     
    Last edited: Jan 13, 2010
  11. Pseudo

    Pseudo L6: Sharp Member

    Messages:
    319
    Positive Ratings:
    149
    I may be wrong here, but I thought that changing the non-CTF gamemodes to count captures would potentially break A/D CTF maps, which take advantage of this behavior to use their own scoring method.

    Even if you change the flag's color with SetTeam?
     
    • Thanks Thanks x 1
  12. VelvetFistIronGlove

    aa VelvetFistIronGlove

    Messages:
    567
    Positive Ratings:
    437
    Ooh, that's a really good point -- although most of the A/D CTF maps were using A/D mode flags, but I'm sure there are Invade maps out there that it will break. I guess altering the way scoring is currently done is a bad idea then. I'll send a retraction on that point to Robin.

    So what's the solution? Ask for new inputs on tf_gamerules to add capture score to teams? (since we can already adjust the team scores that are shown on the scoreboard down with Add*TeamScore).

    OK, I've just tested this now, and indeed it works. The flag shown on the flag carrier's HUD is still the enemy team's colour, and doesn't change regardless of SetTeam, but other players' HUDs will show red or blue for 2 or 3 respectively. (It'll have to be changed again on drop of course, so the team can pick it up again!)

    I've updated the first post to detail the output of all this.
     
    Last edited: Jan 13, 2010
  13. Nutomic

    Nutomic L11: Posh Member

    Messages:
    888
    Positive Ratings:
    177
    I f valve has good programmers, they will make different scoring methods for different game modes.
     
  14. grazr

    aa grazr Old Man Mutant Ninja Turtle

    Messages:
    5,436
    Positive Ratings:
    3,562
    It's not a question of if they have good programmers, but whether they feel the need to do this. The CTF modes have been broken for months...
     
  15. Boylee

    aa Boylee pew pew pew

    Messages:
    1,068
    Positive Ratings:
    631
  16. megawac

    megawac L4: Comfortable Member

    Messages:
    180
    Positive Ratings:
    29
    To change the colour of the flag on pickup enter these outputs (from your flag to the flag)

    [​IMG]
    The outputs appear broken in hammer because there isnt an fgd file, but they work in game.
     
    • Thanks Thanks x 1
  17. Boylee

    aa Boylee pew pew pew

    Messages:
    1,068
    Positive Ratings:
    631
    Last edited: Jan 15, 2010
  18. VelvetFistIronGlove

    aa VelvetFistIronGlove

    Messages:
    567
    Positive Ratings:
    437
    BoyLee: yes, but somehow in that post I wrote "point_template" when I meant "point_teleport" (I've edited it to fix it now).
     
  19. Nosher

    Nosher L4: Comfortable Member

    Messages:
    184
    Positive Ratings:
    20
    VFIG

    Any chance you can make a basic VMF showing the settings for Invade?

    Cheers
    Nosh
     
  20. grazr

    aa grazr Old Man Mutant Ninja Turtle

    Messages:
    5,436
    Positive Ratings:
    3,562
    • Thanks Thanks x 2