Page 1 of 1
Running local dedicated COOP server
Posted: 2024-07-08 10:01
by Suchar
Mini-tutorial by
[R-COM]bad_nade
Bold lines are the files you need to edit or run, followed by
settings and suggested values. File paths are relative to your PR install or Documents folders.
AI RELATED SETTINGS
mods\pr\ai\aidefault.ai
- aiSettings.setMaxNBots 64 is the total number of bots. Maximum is 96.
- aiSettings.maxBotsIncludeHumans 0 leave at 0 to make math easier.
GENERIC SERVER SETTINGS
mods\pr\settings\serversettings.con for dedicated (or
ProjectReality\Profiles\XXXX\ServerSettings.con for in-game server)
- sv.serverPort 16567 forward this port in your router if you want to play with friends. Another option is Radmin VPN.
- sv.maxPlayers 16 is the number of human slots on the server. Don't go over 16 on COOP.
- sv.coopBotCount 48 is the base number for bot calculations. Max is 48.
- sv.coopBotRatio 100 is the % of sv.coopBotCount bots in the team 1. Max 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.
MAP LIST
mods\pr\settings\maplist.con
- 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.
COOP GAME MODE SETTINGS
mods\pr\python\game\realityconfig_coop.py
- C['PRDEBUG_ALL'] = 1 allow/deny debugging. Set to 0 to deny.
- Search PR forums for rcon commands.
STARTUP
start_prbf2_w32ded.bat
- Double click.
- Don't resize the window.
- Google for BF2 server commands.
Join by selecting Multiplayer > Join local. Your friends joins by IP.
Re: Running local dedicated COOP server
Posted: 2024-07-08 18:58
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.
Re: Running local dedicated COOP server
Posted: 2024-07-10 13:51
by Brotherbear
Did exactly everything but for some reason theres only one team filling up
Re: Running local dedicated COOP server
Posted: 2024-07-10 15:52
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
Re: Running local dedicated COOP server
Posted: 2024-07-19 06:19
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 ??.
Re: Running local dedicated COOP server
Posted: 2024-07-19 10:16
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.
Re: Running local dedicated COOP server
Posted: 2024-08-31 05:27
by Randomboi4
I couldn't find those files, where to find them? Since i am new to pcs
Re: Running local dedicated COOP server
Posted: 2024-08-31 09:37
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.
Re: Running local dedicated COOP server
Posted: 2025-03-08 14:32
by gsgen
I read through everything very carefully. I also found this page info in discord. In my settings i do not have sv_coopBotRatio in server settings or aidedault.ai
From what i was seeing of the math it is not possible to switch the bot ratio so the humans can be outnumbered on the other team. as an example currently every map loads with 20 v 40 so we pick the 20 side to be outnumbered by bots. How do I switch it so that the maps load with 40 v 20. That is just an example of what i am trying to do. I am almost positive it was you bad_nade that help write my aidefault file i am using. I tried adding sv_coopBotRatio to serversettings and nothing happened. Here are the files again that are important. unless there is a 3rd file i am not editing that I should be. I took out the spaces to fit better on this page
echo **************************************************************************
echo ********************PROJECT****REALITY****AI****LOADED********************
echo **************************************************************************
aiSettings.setNSides 2
aiSettings.setAutoSpawnBots 1
aiSettings.overrideMenuSettings 1
aiSettings.setMaxNBots 60 <if I change this number i know I must also change sv_coopBotCount to same #
aiSettings.maxBotsIncludeHumans 0
aiSettings.setBotSkill 0.6
run botnames.ai
aiSettings.setInformationGridDimension 80
rem aiDebug.draw 1
run aipathfinding.ai
--------------------------------------------------------------------------------------
sv.allowFreeCam 0
sv.allowExternalViews 0
sv.allowNoseCam 0
sv.hitIndicator 1
sv.maxPlayers 64
sv.numPlayersNeededToStart 1
sv.notEnoughPlayersRestartDelay 5
sv.ticketRatio 100
sv.roundsPerMap 1
sv.timeLimit 0
sv.scoreLimit 0
sv.coopBotCount 60
sv.coopBotDifficulty 60
sv.useGlobalRank 1
sv.useGlobalUnlocks 1
sv.radioSpamInterval 6
sv.radioMaxSpamFlagCount 6
sv.radioBlockedDurationTime 30
Re: Running local dedicated COOP server
Posted: 2025-03-08 18:03
by bad_nade
gsgen wrote: 2025-03-08 14:32
I read through everything very carefully. I also found this page info in discord. In my settings i do not have sv_coopBotRatio in server settings or aidedault.ai
Note that setting does not have underscore (_) in the name. It's
sv.coopBotCount, it belongs to
serversettings.con file, and if it's not there then just add it.
gsgen wrote: 2025-03-08 14:32
aiSettings.setMaxNBots 60 <if I change this number i know I must also change sv_coopBotCount to same #
No you don't.
aiSettings.setMaxNBots can be anything, up to 96
sv.coopBotCount can also be anything but it
cannot exceed aiSettings.setMaxNBots. So it does not need to match
aiSettings.setMaxNBots.
If you want 20v40 teams, it means you need total of 60 bots. So
aidefault.ai must include:
Code: Select all
aiSettings.setMaxNBots 60
aiSettings.maxBotsIncludeHumans 0
Then you put these into
serversettings.con:
Code: Select all
beginrem
This can be anything between 1 and 64. But any number bigger than 16 will reduce total number of bots you get regardless of other settings.
endrem
sv.maxPlayers 16
beginrem
These two settings form an equation that goes something like this:
sv.coopBotCount × sv.coopBotRatio ∕ 100
and the result tells how many bots go to team 1.
That number is then subtracted from aiSettings.setMaxNBots and the result tells how many bots go to team 2.
endrem
sv.coopBotCount 40
sv.coopBotRatio 100
Re: Running local dedicated COOP server
Posted: 2025-03-08 22:16
by gsgen
So i added sv.coopBotRatio 20 and made it 80 as well. Was not working until I changed from 20 t0 80 Thanks
Changed sv.maxPlayers from 64 to 16 as you suggested. Quick question what does this control aiSettings.setNSides 2 ? If easier I am monitoring discord as well GreyDragon#11921
Appreciate the help for some reason coopbotratio did not want to work until I restarted the server 4 times. I knew it was one line I was missing that was causing the headache for me. Which is wierd since the server was balancing the bots at 20 v 40 without that sv coop ratio command being in there. Which is what was throwing me off about everything.
Re: Running local dedicated COOP server
Posted: 2025-03-09 08:06
by bad_nade
gsgen wrote: 2025-03-08 22:16
So i added sv.coopBotRatio 20 and made it 80 as well. Was not working until I changed from 20 t0 80 Thanks
Changed sv.maxPlayers from 64 to 16 as you suggested. Quick question what does this control aiSettings.setNSides 2 ? If easier I am monitoring discord as well GreyDragon#11921
Appreciate the help for some reason coopbotratio did not want to work until I restarted the server 4 times. I knew it was one line I was missing that was causing the headache for me. Which is wierd since the server was balancing the bots at 20 v 40 without that sv coop ratio command being in there. Which is what was throwing me off about everything.
I'm not sure about other settings there. The name suggests aiSettings.setNSides specifies whether or not there will be "ai" controlled bots on both teams or just on one team.
There are also auto-balance related settings and
rcon commands. You might want to look into those as well.
I didn't find you on PR official Discord (and I don't do private messaging).
Re: Running local dedicated COOP server
Posted: 2025-03-11 15:05
by gsgen
This is my post on discord so you can find my name. No need to PM I was just letting you know
https://discord.com/channels/1900904559 ... 0308885504
Re: Running local dedicated COOP server
Posted: 2025-03-25 19:35
by loris141
Hi there, a little late to the party.
I followed the instructions perfectly and it worked for the first few minutes.
However, as soon as I tried again later, everything works but the Start_prbf2_w32ded.bat closes by itself when it is in background, so the game goes "you have problems with your connection".
Is there a way to not make Start_prbf2_w32ded bat close?
Thank you!
Re: Running local dedicated COOP server
Posted: 2025-03-26 21:22
by bad_nade
loris141 wrote: 2025-03-25 19:35
Hi there, a little late to the party.
I followed the instructions perfectly and it worked for the first few minutes.
However, as soon as I tried again later, everything works but the Start_prbf2_w32ded.bat closes by itself when it is in background, so the game goes "you have problems with your connection".
Is there a way to not make Start_prbf2_w32ded bat close?
Thank you!
Server process has probably crashed. Do you have enough free RAM and a fast CPU to run two resource hungry programs simultaneously?
Re: Running local dedicated COOP server
Posted: 2025-05-28 12:49
by CERE
Hello
I have my maps in the maplist, but how do I change maps? Do I have to wait for my map to come up?