Team Fortress 2

Team Fortress 2

Not enough ratings
MVM Changing bot's behavior on the way
By Baldurs Tod
This guide is about making maps with bots who whange behaviour afer spawning like mvm_mannhattan. This guide is usefull for map / mission makers.
This is the purpose of the guide:
Before your read this guide, you must know how to use hammer and basic editiing of .pop files. This is NOT a tutorial about using such tools.
What can be changed
You can change these attributes:
  • Weapons
  • Attributes
  • Tags
  • Items
  • Skill
  • Weapon restriction
  • Character attributes
  • Items attributes
What can not be changed
You cannot change these attributes:
  • Class
  • Health
  • Scale
  • Autojump
Getting started: making the map
For the guide, i used the map mvm_example. Load it or whatever map you want into hammer.

First, you have to add an entity callled point_populator_interface. Name it pop_interface.

Next, you have to add inputs to your entity. For this, create a trigger_multiple brush entity. You can use any entity able to fire event for this purpose, such as relay, timers...
Add two output to your pop_interface with target input ChangeBotAttributes & ChangeDefaultEventAttributes. Set the parameter for each to BotAttributesSet1. This parameter will be the used in the pop file.

You can change bot's behavior many times using different trigger and changing the input parameter BotAttributesSet2

Now, add some outputs to your wave_start_relay to revert bot behaviour upon wave restarting.

Finally the result you shoul have in your pop_interface entity.
Making the first bot: soldier
Here's is the code for a changing attributes bot.
This is a soldier spawning with a rocket launcher and restricted to it. The first alternate loadout is a cow mangler, and the second one is bison with some cosmetics.
You have to add a block

and inside, Default block, and BotAttributesSet1 & BotAttributesSet2 blocks, which contains bot's attributes.

T_TFChange_Test1 { Class Soldier EventChangeAttributes { Default { BehaviorModifiers push Attributes IgnoreFlag Skill Normal WeaponRestrictions PrimaryOnly Item "tf_weapon_rocketlauncher" } BotAttributesSet1 { WeaponRestrictions PrimaryOnly Item "the cow mangler 5000" } BotAttributesSet2 { Skill Normal WeaponRestrictions SecondaryOnly Item "the righteous bison" Item "the team captain" Item "lieutenant bites" ItemAttributes { ItemName "the righteous bison" "set item tint RGB" 16738740 } ItemAttributes { ItemName "the team captain" "attach particle effect" 74 } } } }

This template can be used like any other in your population file.