The blog for the bleeding-edge news in the server of Research and Development.

CSRD Update: 19 October 2018

← Blog

It's aliiiiiiiiive.

After months of working late nights in the lab and tons of test server crashes, bots have received a major software upgrade.

I can't really think of anything witty to say and I want to push this changelog out before bed, so here you go.

Seasonal events

  • The Halloween rotation is live until November 15th. This year will be slightly different from previous years — the Halloween maps will be in addition to the default maps, instead of replacing them entirely. Four weeks of running 40 Halloween maps (of which 29 are fully supported) is kind of boring.
    • Nominations are still supported, of course, so you can always queue up a Halloween map whenever you'd like.
    • I'm still on the fence about this; trying to strike a balance between the popularity of Halloween maps and the staleness of them.
    • Edit: Because Valve launched their Halloween event (predictably) on the same day I pushed this update, I'll keep it Halloween-locked for now. I'm considering updating the map runner to allow for nominations of any map, but to restrict the automatic rotation to only the spookiest maps.

Bot changes

  • TFBots are now generally supported on Arena, Player Destruction, and Robot Destruction! Major refactors to the bot extension have made it significantly easier to add new features.
    • While the bots may understand the general concepts of these game types, making them play well given the dynamic aspects of certain maps is a more difficult task.
      • Bots can't traverse across moving trigger_teleport entities, such as the one on Cursed Cove (PD). Fixed-location, non-moving trigger_teleports are relatively easy to handle with a bit of navigation mesh finagling.
    • Bots may still need work when it comes to certain behaviors.
    • The additional support made me realize just how unsupported bots are on Arena maps by default.
      • Bots don't recognize locked points by default. Additionally, Engineer bots determine where to build based on nearby objectives, so they have no idea what to do on Arena maps while the point is locked.
      • Arena maps vary regarding the presence of func_respawnroom entities. Spy bots choose their lurking areas based on enemy spawn room boundaries, and incursion flow in general is controlled by those boundaries.
    • Robot Destruction has about 80% of the support behind-the-scenes. Engineers just have no clue where to build (this will require changes to the Engineer bots' underlying CollectBuildAreas function to choose to build near any present RD bots).
    • Engineer can now properly defend on Payload Race maps after patching up CTFGameRules::GetPayloadToBlock() to account for neutral / RED payload carts. They'll build around the capture area.
    • Bots will now ignore the setup time on Well (5CP), allowing them to move. The default CapturePoint behavior is the same for both Attack/Defend and standard Control Point maps, so some configurability has been added to work around those checks.
  • Bot Manager has been rebuilt from the ground up!
    • One of the pain points of the original Bot Manager was that it was very kludgy, using the tf_bot_add command to do its work. Feedback of running the command isn't immediate nor was it guaranteed to succeed.
    • The rewrite also calls the game functions directly. It also provides forwards that pass the newly connected bot index.
      • Theoretically this could work with any bot plugin that exposes something like CreateFakeClient() to SourceMod. Of course, there'd have to be alternative bot plugins in the first place. (I mean, RCBot2 is a thing, at least.)
    • As a result, it now properly works on Arena maps. The previous iteration had trouble managing late-joining bots as they would have to wait until the next round to move out of the queue.
    • It also detours the game's default bot manager quota system, allowing the plugin to use the game's ConVars instead.
  • A previously backported fix to the extension while the improvements were made:
    • Fixed an attempted null pointer dereference crash that would occur when a bot was joining to substitute for a leaving player at the end of a Payload map. The problem was due to two combined effects:
      • Bot Manager, unlike the game's default bot manager, doesn't check that the map is over; any calls to tf_bot_add would drop the bot into spectate.
      • The game returns a null pointer in CTFBotScenarioMonitor::DesiredScenarioAndClassAction() for only one case: if the current game type is Payload and the bot is on neither RED nor BLU. See the disassembly here.
      • The extension assumed the function would return a non-null pointer (heck, the default case falls back to SeekAndDestroy). It would then attempt to get the returned action's name to check what action it is (as a poor man's RTTI). Hence the segfault.

Map changes

  • Asteroid (Robot Destruction) has its scoring amount adjusted for rounds to go faster.
    • The maximum number of points is determined by the formula (numPlayers * 5) + 30, where numPlayers is the number of players present when the round starts.
  • Added Farm Feud (Arena), Frosty (CTF), and Conifer (A/D) to the standard map rotation.
    • Yes, Frosty was in the rotation already, but the map author decided to reupload it for better reach in the Workshop.
  • Added Ghastlane (5CP) to the Halloween rotation.
  • For completeness' sake, these are the newly supported maps in the standard rotation:
    • Arena: Backlot, Farm Feud, Mach2, Yunshu, Mochville, Badlands, Granary, Lumberyard, Offblast, Ravine, Sawmill, Well.
    • Player Destruction: Watergate, El Vvis, Tribute
    • Robot Destruction: Asteroid.
  • And for Halloween:
    • Arena: Backlot (Event), Graveyard, Phantom.
    • Player Destruction: Monster Mash Monster Bash.
  • Edit: Removed workshop versions of newly promoted maps (all 5 of the Halloween maps were previously in the workshop collection). Congratulations to the map authors!
(Up you go!)