Running local dedicated COOP server

Help and support regarding PR:BF2 installation and in-game issues
Post Reply
User avatar
Suchar
PR:BF2 Lead Developer
Posts: 2174
Joined: 2016-10-12 13:25
Location: Poland

Running local dedicated COOP server

Post by Suchar »

Tutorial by [R-COM]bad_nade

Bold lines are the files you need to edit or run, followed by settings and example values. File paths are relative to your PR install folder.

mods\pr\ai\aidefault.ai
(AI related settings)
  • aiSettings.setMaxNBots 96 is the total number of bots. Maximum is 96.
  • aiSettings.maxBotsIncludeHumans 0 leave at 0 to make math easier.
mods\pr\settings\serversettings.con
(generic server settings)
  • sv.serverPort 16567 forward this port in your router if you want to play with friends. Another option is Radmin VPN.
  • sv.autoBalanceTeam 0 auto balance on/off for humans. Set to 0 to keep all your friends in the same team.
    sv.maxPlayers 16 is the number of humans allowed on the server.
  • sv.coopBotCount 48 is the base number for bot calculations. Maximum is 48.
  • sv.coopBotRatio 100 is the percentage of sv.coopBotCount bots in the team 1. Maximum is 100.
    • For example, with aiSettings.setMaxNBots 96
      • sv.coopBotCount 48 & sv.coopBotRatio 100 = 48v48teams.
      • sv.coopBotCount 40 & sv.coopBotRatio 100 = 56v40 teams.
      • sv.coopBotCount 40 & sv.coopBotRatio 50 = 76v20 teams.
      • sv.coopBotCount 20 & sv.coopBotRatio 100 = 76v20 teams.
    • Or aiSettings.setMaxNBots 64
      • sv.coopBotCount 32 & sv.coopBotRatio 100 = 32v32 teams.
    • Or aiSettings.setMaxNBots 32
      • sv.coopBotCount 32 & sv.coopBotRatio 50 = 16v16 teams. Etc.
    • Team with over 40 bots can't have human squad leaders.
mods\pr\python\game\realityconfig_coop.py
(COOP related settings)
  • C['PRDEBUG_ALL'] = 1 allow/deny debugging. Set to 1 to allow.
  • Search PR forums for rcon commands.
mods\pr\settings\maplist.con
(the map list)
  • In order to play COOP, you must put COOP maps on the list.
  • Remove all non-COOP/non-wanted maps, and all rem, beginrem and endrem lines.
start_prbf2_w32ded.bat
(starts the server)
  • Double click.
  • Don't resize the window.
  • Google for BF2 server commands.
Join by selecting Multiplayer -> Join local.
Image
AguirreA.
Posts: 38
Joined: 2023-12-11 16:26

Re: Running local dedicated COOP server

Post by AguirreA. »

Today I tried it with the maps that used to cause problems when playing in the local COOP, I am grateful since it no longer presents any problems when playing, thanks for the support guys.
Brotherbear
Posts: 1
Joined: 2024-07-10 13:39

Re: Running local dedicated COOP server

Post by Brotherbear »

Did exactly everything but for some reason theres only one team filling up
Last edited by Brotherbear on 2024-07-10 14:11, edited 2 times in total.
User avatar
bad_nade
Support Technician
Posts: 1373
Joined: 2008-04-06 18:26
Location: Finland

Re: Running local dedicated COOP server

Post by bad_nade »

Brotherbear wrote:Did exactly everything but for some reason theres only one team filling up
You must have missed a setting somewhere. For example, did you notice that the file mods\pr\ai\aidefault.ai has same few settings twice, but the first set of lines is commented out using rem keywords? Thus those lines have no effect.

Several settings work in concert and must be edited at the same time, and using combination of values that are supported as a whole. So, if you change just one of these, you must check that the value is compatible with values specified in other four settings as well:
  • sv.maxPlayers
  • sv.coopBotCount
  • sv.coopBotRatio
  • aiSettings.setMaxNBots
  • aiSettings.maxBotsIncludeHumans
Raghuvir15
Posts: 2
Joined: 2024-07-19 05:59

Re: Running local dedicated COOP server

Post by Raghuvir15 »

Before v1.8, the local singleplayer wasn't crashing (I mean playing with AI bots) it was going fine on most of the maps, but now after the update of v1.8 the local singleplayer has started crashing, any update to fix this soon ??.
User avatar
Suchar
PR:BF2 Lead Developer
Posts: 2174
Joined: 2016-10-12 13:25
Location: Poland

Re: Running local dedicated COOP server

Post by Suchar »

Raghuvir15 wrote:Before v1.8, the local singleplayer wasn't crashing (I mean playing with AI bots) it was going fine on most of the maps, but now after the update of v1.8 the local singleplayer has started crashing, any update to fix this soon ??.
If you try launching local COOP, you will see a message saying it's unstable and unsupported.
Use dedicated server executable instead.
Image
Randomboi4
Posts: 2
Joined: 2024-08-31 00:46

Re: Running local dedicated COOP server

Post by Randomboi4 »

I couldn't find those files, where to find them? Since i am new to pcs
User avatar
bad_nade
Support Technician
Posts: 1373
Joined: 2008-04-06 18:26
Location: Finland

Re: Running local dedicated COOP server

Post by bad_nade »

Randomboi4 wrote:I couldn't find those files, where to find them? Since i am new to pcs
File locations in the guide are relative to your PR install location. If you have installed PR to, let's say, D:\Games\Project Reality\Project Reality BF2, then it's your starting point, and the first file would be in D:\Games\Project Reality\Project Reality BF2\mods\pr\ai\aidefault.ai. And so on.
Post Reply

Return to “PR:BF2 Support”