Author Topic: Extra Bots for Co-Op Lan  (Read 13619 times)

Offline SuperHugger

  • Newbie
  • *
  • Posts: 9
    • View Profile
Extra Bots for Co-Op Lan
« on: 13-02-2012, 02:02:48 »
I have a team of four guys at work playing FH2 like it's going out of fashion, the problem is we want more bots in co-op!!! 16 just isn't enough to verse.

I am currently looking at 5 config files to double the quantity and balance the bots for local multiplayer:

~ Documents\Battlefield 2\ServerConfigs\_serversettings.con
~ Documents\Battlefield 2\ServerConfigs\SuperHuggerServer.con
~ Program Files\Battlefield 2\mods\bf2\Settings\ServerSettings.com
~ Program Files\Battlefield 2\mods\bf2\AI\AIDefault.ai
~ Program Files\Battlefield 2\mods\fh2\ai\aidefault.ai

This is my progress so far, I adjusted the max bots settings in this config file:

Program Files\Battlefield 2\mods\fh2\ai\aidefault.ai

I changed this:

aiSettings.overrideMenuSettings 1
aiSettings.setMaxNBots 31
aiSettings.maxBotsIncludeHumans 0
aiSettings.setBotSkill 0.85

... to this:

aiSettings.overrideMenuSettings 1
aiSettings.setMaxNBots 64
aiSettings.maxBotsIncludeHumans 0
aiSettings.setBotSkill 0.85

RESULTS:

I get an extra 30 bots in the game.

PROBLEM:

Bots only add to one team!
Working in the Battle of Sfakia map, the ratio stands as 17 Germans (including me)/47 Brittish

ATTEMPTED SOLUTIONS:

Tried adjusting settings in the both of the profile server configs (I have no idea which ones take effect):

~ Documents\Battlefield 2\ServerConfigs\_serversettings.con
~ Documents\Battlefield 2\ServerConfigs\SuperHuggerServer.con

1. Adjusting the bot count only trims the bots on the Brittish team.
2. Adjusting the bot ratio from 50 to 75 only added 8 more bots to German team - 25/104 (128 bot test).
3. Adjusting the team ratio percent to different numbers below 100 and had no results.
4. Turned auto-balance on with no results.
 
As I mentioned, I have no idea which config and ai files really take effect for what I want to achieve or if I need to update them all simultaneously. I may need a walkthrough from scratch, I just haven't been able to find a tutorial anywhere on the web for adding even amounts of bots in local multiplayer for both teams.

Any suggestions?

IF NOT, doesn't anyone know how to do this from scratch, ignoring my approach?
« Last Edit: 14-02-2012, 00:02:24 by Void »

Offline SuperHugger

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Extra Bots for Co-Op LAN!!! NEED SHOOT MORE BOTS! MUST HAS!
« Reply #1 on: 13-02-2012, 06:02:07 »
PROGRESS REPORT:

Changed settings in the custom server config file:

~ Documents\Battlefield 2\ServerConfigs\SuperHuggerServer.con

Changed...

sv.coopBotRatio 50
sv.coopBotCount 61

... to...

sv.coopBotRatio 0
sv.coopBotCount 61

... and found that the team ratios changed to 1 German (me) / 61 Brittish (bots).

So I overcompensated the ratio to 75 and the team ratios changed to 25 German / 36 Brittish.

sv.coopBotRatio 75
sv.coopBotCount 61

I'm guessing its logic is saying that if normally the team ratios are 32 @ 50, then adjusting to 61 @ 75...

...

... actually, I have no idea what it's talking about. Flipping 5 configs to mess with and it comes down to at least 2 of them to get extra bots for local multi.

Offline YaPh1l

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Extra Bots for Co-Op LAN!!! NEED SHOOT MORE BOTS! MUST HAS!
« Reply #2 on: 13-02-2012, 13:02:15 »
The ratio is calculated in a somewhat unintuitive way.
Steps to make it work:
1. mods/fh2/ai/aidefault.ai (respectively the aidefault.ai of the mod you want to run)
setMaxNBots must be the overall max. number of bots (both teams added together) [for example 32].
2. ServerConfig/whatever_servercon_you_use.con
coopBotRatio needs to be 100.
coopBotCount needs to be half the max. number [for example 16].
The trick: When the ratio is 100, coopBotCount will determine the number of bots on team 1 and the difference to the max. number (from aidefault.ai) will be on team 2.

Best regards, Phil.
« Last Edit: 13-02-2012, 13:02:32 by YaPh1l »

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: Extra Bots for Co-Op LAN!!! NEED SHOOT MORE BOTS! MUST HAS!
« Reply #3 on: 13-02-2012, 15:02:08 »
Its basically editing that last value in the Aidefaults.con file and making the bot ratio ingame match.

48 players i.e 44 bots + 4 total players require bot ratio of 48 or 50 to make it 50:50

thats your 0 point. So adjust based on that.

64 total playing i.e 60 bots + 4players require 64 on the scale, etc, etc. Also helps if you use auto-balance


Offline Paasky

  • Sr. Member
  • ****
  • Posts: 1.801
  • DON'T PANIC! DON'T PANIC!
    • View Profile
Re: Extra Bots for Co-Op LAN!!! NEED SHOOT MORE BOTS! MUST HAS!
« Reply #4 on: 13-02-2012, 15:02:15 »
Or you could start a local game in coop mode with 64 players max & team balance at 50, it'll be 32 vs 32, and a bot is removed each time a player connects.

Or have I missed something?
It's half naked people on boats. That's all.
Here in Finland we call that "summer".

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: Extra Bots for Co-Op LAN!!! NEED SHOOT MORE BOTS! MUST HAS!
« Reply #5 on: 13-02-2012, 17:02:07 »
Yer, sadly its more complex than that.

A bit of history,

BF2 had a max bot count of 32 till 1.5 patch
That patch raised it to 48 and the toggle allows this.
However, FH2 never changed its aidefault.con file (This is fixed now) so we still had a fix of 32 bots, even though the toggle said differently, that made it such that any adjustment you made, dumped the remainder on one side.


Now once you change the bot count to 47 in the aidefaults.con file, you get everything working well.
If you want more bots, you simply need to realize that since 48 bots allowed 50:50 ratio ingame, and 48 is almost 50, then 64 bots needs to be adjusted to a ratio of aprox 64 to restore balance.

So at max, you can have 100 bots at 50:50 ratio when you push the slider to 100% ratio.

Once you set that slider and adjust the bot count in the file, the biasing of bots to one side is up to you. Just rememer where the 50:50 position is for the number of bots you set.

Offline Michael Z Freeman

  • Jr. Member
  • **
  • Posts: 811
  • The Few are many ;)
    • View Profile
    • Homepage
Re: Extra Bots for Co-Op LAN!!! NEED SHOOT MORE BOTS! MUST HAS!
« Reply #6 on: 13-02-2012, 19:02:22 »
Here's a guide I wrote - Setting up a Coop or SP Battlefield 2 Game on a Multi Core Machine

What we could really do with is this being already setup in the FH build with windows shortcuts prepared for various game configs ... double click and and go. A shortcut for each map. No messing.

Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: Extra Bots for Co-Op Lan
« Reply #7 on: 14-02-2012, 00:02:32 »
Forgive me, but I am editing this topic title. There is no need for shouting as many nice people here are willing to help with questions. :)

@DJBarney: Just make shortcuts and use the command line switches of BF2 used in the FH2.exe; the arguments get passed through. +loadLevel +gameMode ... something like that, type in bf2.exe +? to get proper arguments.

@Djinn: BF2 has always supported 64 bots or more.

Offline SuperHugger

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Extra Bots for Co-Op Lan
« Reply #8 on: 14-02-2012, 03:02:20 »
Thanks for the feedback and replies.

I still don't fully understand the logic behind ratios, still, but that's OK.

I changed the custom server settings from...

sv.coopBotRatio 50
sv.coopBotCount 61

...to...

sv.coopBotRatio 100
sv.coopBotCount 61

We had 3 players, so it ended up being 32/32 even steven.

Thanks for all the support once again, making FH2 the best flipping mod I've ever experienced!

P.S. Sorry about the 'shouting' format, not intentionally aggressive, just didn't see the formatting of other posts prior to this one.