10

I'm creating a custom population (.pop) file for Mann vs Machine, and want to be able to apply condition codes (like the TF2_AddCondition function, or the addcond cheat command) to a specific bot when it arrives.

Some examples of what I'm trying to accomplish:

  • Upon arrival, a bot has 100% Critical Hit chance for 30 seconds. (TFCond_CritOnDamage)
  • Or: Upon spawning, coat this bot in Mad Milk (TFCond_Milked) for infinite duration. (That would mean that all attacks against this bot return health to the attacker.)

The .pop files have support for event triggers eg StartWaveOutput, but the documentation is virtually nonexistent.

Does anyone know how I can apply TF2 Conditions to bots in MvM?

3
+50

You can't do this with population files alone on a vanilla (unmodded) TF2 server.

If you are open to hosting a dedicated server on a Linux machine, you can achieve this using sigsegv's SourceMod extensions. You will, of course, first need to install SourceMod. Then, you can use sigsegv's addcond syntax to do exactly what you want:

TFBot
{
    // ...
    AddCond [$SIGSEGV]
    {
        Index 27 // Mad Milk
        // No Duration = lasts forever
    }

    AddCond [$SIGSEGV]
    {
        Index 56 // Misc. Crit Boost
        Duration 30.0
    }
}

While parts of sigsegv's extensions work on Windows, I don't believe the TFBot extensions do, so you're out of luck in case you can't use Linux.

  • 2
    Thanks! I already do run a dedicated server and have SourceMod and my own extension, so that's no problem. (And it is on Linux. Linux all the way.) I'll check out sigsegv's source; it seems to have a ton of stuff in it. – rosuav Feb 5 '18 at 21:18
  • Derp, I now see that you have an Ask Ubuntu account, lol. Good luck setting it up! – Schism Feb 5 '18 at 21:46
  • Haven't yet actually proven this in practice, but it ought to work, so I'm accepting the answer. Thanks! – rosuav Feb 6 '18 at 1:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.