random bots?

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

SkaarjMaster

enemy of time
Sep 1, 2000
4,872
11
38
Sarasota, FL
Anyone know what the deal is with the bots? Theoretically, it should be random, but I've noticed sometimes facing the same bots almost all the time with a few new ones thrown in every now and then. I know I can use the bot config thing, but I don't want to set it up every time. I have a lot of bots added to the game and I do see them every now and then, but it seems I'm seeing the same group of bots. Are the custom maps set to just grab random bots most of the time? Is there anything that can be done in UT2004 to make the bots come up more random? Any help from either forum thread on this topic would be appreciated. Thank you.
 

meowcat

take a chance
Jun 7, 2001
803
3
18
Well, after digging through quite a few class' source code it appears that the .upl files need to have one key entry for each bot description line in order to even be considered for use: BotUse=X where X can be anywhere from 0-255, it is used as a 'weight' with the higher value increasing the likelihood that the character will be selected as an overall percentage of available characters (see the various .upl entries). The value really needs to be greater than zero for the Character entry to be used by a bot at all, see the function 'GetRandomPlayer' in the classes xDMRoster or xTeamRoster (both in the XGame package source code).

Some key classes and functions to look at to follow how the random bots are assigned:
1. DeathMatch-> 'InitGame' -parses the game string options to figure out whether to use player created bot rosters, bots versus players, numbered amount of bots, or "random" bots to match the map's recommended player load (initial variables are set here)

2. DeathMatch-> 'PostBeginPlay' - sets off a function call chain which spawns the TeamInfo class, which then adds/selects the random character entries and adds them to an array.

3. DeathMatch-> 'StartMatch' -actually calls the function to spawn new bots (addBot)

4. DeathMatch-> 'SpawnBot' -causes the TeamInfo actor to either spawn a named bot, or get the 'next bot name on its list' and spawn it (from the array that was filled with entries earlier).

5. UnrealTeamInfo/xTeamRoster/xDMRoster-> all of the functions specify how to add bots properly.

[EDIT] Now that I look at the PostBeginPlay functions in both xDMRoster and xTeamRoster a bit more closely it looks as though they should always load up the exact same list of bots if using map defaults, *except* when more bots are added above and beyond the base amount.

Here is what you might want to try: create bot rosters with only one or two bots that you will always play with and use those rosters. Once the match has started, use the "addbots" console command and I *think* it should choose the remaining bots more randomly...
 
Last edited:

SkaarjMaster

enemy of time
Sep 1, 2000
4,872
11
38
Sarasota, FL
So if set to map defaults, which I'm going to do anyway (not worth it to try and pick bots each time a map is started), then what if I set the "BotUse=" to the same number for every bot whether a default character or custom character? I'm not playing online anymore with this game, so the server kicks won't matter.

I will say that if you are correct and the bots are taken from the same default list every time, then my game has somehow included custom bots/characters/voices in that list also. If this is the case, then I believe the original UT was more random in picking bots; although, I have noticed a slight pattern that isn't as obvious as it seems in UT2004.

EDIT: just checked my bot config in the game and there are 228 individual bots right now. I had no idea I had that many.:eek:

EDIT AGAIN: Also, what's with all the duplicate bots in xplayersL1.upl? Is it worth it to change them to activate them or maybe just some of them?
 
Last edited: