Author Topic: Is there any way to set up proper ratios with 100+ bots on a co-op server?  (Read 1387 times)

Offline TheGuineaPig

  • Newbie
  • *
  • Posts: 4
    • View Profile
Well, I'm not as much asking because I play with 100+ bots; I do sometimes, but usually it's less.  More I'm wondering because often I set up games where the attacking team outnumbers the defenders, often significantly. For example, I usually play with 80 bots.  When the Allies are attacking, that's easy to set up: I can, for example, set the bot number to 30 and the ratio to 100, and have a 5:3 ratio for the attacking Allies.  But for the Axis this becomes more difficult: the max number of bots I'm seemingly able to put on their team is 48 (the far right of the slider), and changing the bot ratio doesn't help because it will only increase the numbers for the Allies.

Are there console commands I can use?  Other tricks?  I know single-player maps automatically start at 50-50, so there must be some work-around, right?

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Open the 'fh2' folder,
in there is an 'ai' folder.
In that is an 'aidefault.con' file.
open it in notepad or notepad++
Change the lower mention of 47 bots, not the one that says 64 above.
Change it to whatever yo want, but note that after about 86 bots, bots wont have squads, and neither will you.

To have more than 100 bots is possible, but buggy, and you cant have 50:50 ratio, since it calls 'Bot ratio' toggle ingame being set for more than 100% (Set the toggle to same value as the number of bots to get a 50:50 ratio)


Offline TheGuineaPig

  • Newbie
  • *
  • Posts: 4
    • View Profile
It's the latter thing I was wanting to know about.  It seems like when starting a coop server, it's impossible to get more than 48 players on Team 1, even though it is possible in singleplayer (which defaults to 50:50).  I was just wondering whether it was possible with server commands or something to get around this.

Offline |7th|Nighthawk

  • Full Member
  • ***
  • Posts: 1.278
    • View Profile
Do you want to play with a friend? There is a way around this. First, start a local server and let your friend see it in his server list. Then, make a SP game and let him join your former Coop server. Don't refresh though as this obviously erases the server from the list. This one worked several times for me.
"I'm sorry Dave, I'm afraid I can't do that..."

Offline TheGuineaPig

  • Newbie
  • *
  • Posts: 4
    • View Profile
I remember that being the work-around when the game first launched.  Unfortunately, the actual co-op support wasn't much better.

Offline |7th|Nighthawk

  • Full Member
  • ***
  • Posts: 1.278
    • View Profile
And? Did it work?
"I'm sorry Dave, I'm afraid I can't do that..."

Offline TheGuineaPig

  • Newbie
  • *
  • Posts: 4
    • View Profile
The approach works, but it still doesn't get what I'm aiming for: a way to make it so that the Axis team can have more than 48 bots (and more than a 50:50 ratio).
« Last Edit: 03-04-2013, 14:04:36 by TheGuineaPig »

Offline |7th|Nighthawk

  • Full Member
  • ***
  • Posts: 1.278
    • View Profile
Sorry, I don't think I can help you on this one.
"I'm sorry Dave, I'm afraid I can't do that..."

Offline gavrant

  • (Almost) retired dev
  • Developer
  • ******
  • Posts: 598
    • View Profile
For Singleplayer the following trick works:
Let's say, you set up 100 bots in total and now want the ratio of 60 Axis bots vs 40 Allied bots.
Open the in-game console and type:
Code: [Select]
sv.teamRatioPercent 150
Note that 150 = 60 / 40 * 100%.
After that, if any Allied bot gets killed (unless it's a suicide or the bot is a squad leader), he will switch teams until the 60/40 ratio is reached.

As for Coop, the problem is that the vBF2 autobalance script doesn't work in Coop. In a brief experiment I managed to get 55 vs 55 bots, but it requires some work to do it properly. I can polish the script and include it in the next SP patch or mod release, if there's public demand for this.

Offline |7th|Nighthawk

  • Full Member
  • ***
  • Posts: 1.278
    • View Profile
Would be indeed nice, because setting up a server several times in order to have a nearly balanced ratio is not that fun. I would certainly appreciate this.
"I'm sorry Dave, I'm afraid I can't do that..."

Offline Michael Z Freeman

  • Jr. Member
  • **
  • Posts: 811
  • The Few are many ;)
    • View Profile
    • Homepage
As for Coop, the problem is that the vBF2 autobalance script doesn't work in Coop. In a brief experiment I managed to get 55 vs 55 bots, but it requires some work to do it properly. I can polish the script and include it in the next SP patch or mod release, if there's public demand for this.

Yeah, I looked at this myself. Someone on bfeditor.org even wrote a script  for me which I have not fully tested. If you can get that script working then that would be a real boon for my HABAI mod as the point of it is really to be able to run as many bots as possible without low framerates or immersion damaging framerate glitches.