Author Topic: Single Player Bots  (Read 2516 times)

Offline Tigtoo

  • Newbie
  • *
  • Posts: 1
    • View Profile
Single Player Bots
« on: 24-05-2021, 22:05:52 »
I understand this has probably been asked 100 thousand times but I'm still confused. I want to play single player 50 v 50. I've edited the AI files like you usually would but nothings changed. My file looks like this right now.

echo *****************************************************************************************
echo AIDefault.ai ****************************************************************************
echo *****************************************************************************************

aiSettings.setNSides 2
aiSettings.setAutoSpawnBots 1

aiSettings.overrideMenuSettings 1
rem NOTE: the "run UserSettings.ai" below may override the following settings
aiSettings.setMaxNBots 99
aiSettings.maxBotsIncludeHumans 0
aiSettings.setBotSkill 0.5

run UserSettings.ai

run BotNames.ai

aiSettings.setInformationGridDimension 32


run AIPathFinding.ai

rem aiDebug.draw 1


rem EOF

What should I do to play 50 v 50?

Offline jan_kurator

  • FH-Betatester
  • ***
  • Posts: 2.546
  • Magnificent Mustard
    • View Profile
Re: Single Player Bots
« Reply #1 on: 25-05-2021, 09:05:22 »
As far as I know, you can't play 50 vs 50 with bots. BF2' hardcoded limit of bots in game is 48 (that's how far the bot slider in game goes), all you can do is setting bot ratio to 100, this will move all 48 bots to Team 1 (always Axis). Editing the file is a workaround to add more bots above the mentioned limit, so after you move 100% of the bots to Team 1, everything above the limit will end up in the Team 2 (Allies).

Offline olimac

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Single Player Bots
« Reply #2 on: 06-06-2021, 18:06:28 »
Try this

aidefault.con

   aiSettings.setMaxNBots 63

serversettings.con:

   sv.teamRatioPercent 63
   sv.coopBotRatio 63
   sv.coopBotCount 63
   sv.maxPlayers 8

this will give you a 50:50 ratio in any coop game.

32 bots for the enemy
31 bots for your side.

if you use values > 63, additional bots are added to the enemy.

Offline jan_kurator

  • FH-Betatester
  • ***
  • Posts: 2.546
  • Magnificent Mustard
    • View Profile
Re: Single Player Bots
« Reply #3 on: 07-06-2021, 23:06:06 »
question was about 100 bots (50 vs 50)

Offline DutchGuyMike

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Single Player Bots
« Reply #4 on: 08-06-2021, 11:06:38 »
As far as I know, you can't play 50 vs 50 with bots. BF2' hardcoded limit of bots in game is 48 (that's how far the bot slider in game goes), all you can do is setting bot ratio to 100, this will move all 48 bots to Team 1 (always Axis). Editing the file is a workaround to add more bots above the mentioned limit, so after you move 100% of the bots to Team 1, everything above the limit will end up in the Team 2 (Allies).
Partially not true!

What should I do to play 50 v 50?
If you use the Forgotten Hope 2 launcher and check the launcher options you should be able to set the bot amount to any number you want (I sometimes play with 200+ bots alongside triple the amount of vehicles - with no respawn waiting time for lives/tickets and vehicles, it will lag like hell but it looks so freaking awesome and chaotic when it all clashes, especially on maps with good AI navigation meshing/pathfinding.. I might release the extra vehicles tweaks as a side mod for the game).

But I find that when you increase the number of bots without making the server files read-only, the game becomes a bit glitchy, and that the game tends to crash way more often.

Up to 100 bots is reasonable, if you have a decent CPU. But you might as well go with 107 bots which would mean that the fire teams are completely filled up (squads), 9 teams of 6 bots per team (which you can command each one separately via the commander radio, when you apply for the commander seat via the in-game menu and they will somehow, with variable degrees of success, try to follow those orders - it really depends on the map and the navigation meshing/pathfinding):

Do the following steps to get more bots

1. Locate the "ServerSettings.con" in:
C:\Users\YOURUSER/PCNAME\Documents\Forgottenhp 2\Profiles\0001

1b. If there is a profile named 0002, edit that file as well as the 0001 file as shown in the 2nd step:
C:\Users\YOURUSER/PCNAME\Documents\Forgottenhp 2\Profiles\0002

2. Open the file called "ServerSettings.con", and change the following values/lines to these amounts:
  GameServerSettings.setMaxPlayers 108 (to tell the game that 108 "players" are allowed)
  GameServerSettings.setSpawnTime 10 (respawn timer, 10 seconds is time enough to look around after death - this value is only for the player, could also set it to 1 second)
  GameServerSettings.setTicketRatio 1000 (it's the amount of soldiers lives/tickets per match)
  GameServerSettings.setSoldierFF 0 (the following 5 lines disable team friendly fire)
  GameServerSettings.setVehicleFF 0
  GameServerSettings.setSoldierSplashFF 0
  GameServerSettings.setVehicleSplashFF 0
  GameServerSettings.setPunishTeamKills 0
  GameServerSettings.setTeamRatio 100 (makes sure sides are equally populated)
  GameServerSettings.setCoopBotRatio 50 (makes sure sides are equally populated)
  GameServerSettings.setCoopBotCount 107 (108 "players" set to maximum above, so use only 107 bots per example if you play solo)
  GameServerSettings.setCoopBotDifficulty 80 (the difficulty of the bots, over 80 they become similar in skill akin to aim-bots)

3. Save the changes you made/close it, after you made the changes listed above, and right-click it to see a list come out and then click the "Properties" tab which is usually all the way down in that right-click menu menu - and then make the file(s) "Read-only" which will save any settings without the game overriding them, then close that file.

4. Locate the "serversettings.con":
C:\Games\Battlefield 2\mods\fh2\settings (this is my PC's specific directory, where the game/mod is located/installed)
and change the following values to these amounts:
  sv.maxPlayers 108
  sv.numPlayersNeededToStart 1
  sv.startDelay 10
  sv.endDelay 10
  sv.spawnTime 10
  sv.endOfRoundDelay 10
  sv.ticketRatio 1000
  sv.soldierFriendlyFire 0
  sv.vehicleFriendlyFire 0
  sv.soldierSplashFriendlyFire 0
  sv.vehicleSplashFriendlyFire 0
  sv.teamRatioPercent 100
  sv.coopBotRatio 50
  sv.coopBotCount 107
  sv.coopBotDifficulty 80
  sv.useGlobalRank 1
  sv.useGlobalUnlocks 1

5. Repeat step 3 for 4 (making the file Read-only, after you've made and saved the changes)

And that's it! You should now have 107 bots playing in equal teams against each other.

Contact me here or via private messaging for any further questions,
should you have any (and provided, if I am able to give the answer)

Cheers and happy shootin'!

PS: You can enable 3rd person in tanks/vehicles as well, but I won't list the fix here since I am not sure if you'd even want that ability.
« Last Edit: 08-06-2021, 13:06:23 by DutchGuyMike »