mods for Battlefield 2 crash under POL-WINE (Plain BF2 is fine)

oldrick

New Member
I have an i3 system with an AMD R9 280 card. I am using Linux Mint 17 32-bit with the MATE desktop (I am using the 32-bit version of Linux Mint because I also run the Linux Dedicated Server kit for Battlefield 2 which is also 32-bit. It was easier to get the Dedicated Server running on a 32-bit Linux). The install uses the AMD proprietary driver 15.302. Installing BF2 (Windows) from a retail 3-CD kit into POL-WINE following the instructions on the site I made a few changes. I used the POL ver. 4.2.10 from noobslab and installed WINE ver. 1.9.11 under it. I set WINE to operate the Windows XP version. After the CD of Battlefield 2 was installed I patched BF2 up to version 1.41. (This was the version the mod runs under.) I DID NOT apply the v1.5 patch. To use BF2 v1.41 requires a no-CD version of bf2.exe which I use. The plain version of BF2 runs without a problem.
I have installed mods (Hard Justice v1.3 and AIX 2.0) on top of the BF2 game and they installed without errors. The mods will start but will crash out after a short amount of time.

The POL log is:

[11/23/16 17:26:06] - Running wine-1.9.11 BF2.exe +restart 1 +modPath mods/hardjustice +fullscreen 1 (Working directory : /home/oldrick/.PlayOnLinux/wineprefix/141bf2_drive/drive_c/Program Files/EA GAMES/141Battlefield 2)
wine: Unhandled page fault on read access to 0x000000a8 at address 0x75fa9e63 (thread 0009), starting debugger...

And the Backtrace is:

Unhandled exception: page fault on read access to 0x000000a8 in 32-bit code (0x75fa9e63).
Register dump:
CS:0073 SS:007b DS:007b ES:007b FS:0033 GS:003b
EIP:75fa9e63 ESP:0032f180 EBP:20558700 EFLAGS:00010202( R- -- I - - - )
EAX:00000000 EBX:7bbe68f0 ECX:00000000 EDX:00000000
ESI:7b9912b8 EDI:20558700
Stack dump:
0x0032f180: 00000000 00000000 00011000 00000000
0x0032f190: 00000000 c0034300 2ec07fc0 ffffffff
0x0032f1a0: 00000000 0000000a 0032f340 75ea92ae
0x0032f1b0: 00001d7f 00000000 20558700 7c22bef8
0x0032f1c0: 20558700 76181681 7b9912b8 00000000
0x0032f1d0: 0032f1d4 7c210260 00950000 000000ec
Backtrace:
=>0 0x75fa9e63 in fglrx_dri.so (+0x14e3e63) (0x20558700)
1 0x00000000 (0x772f96b8)
2 0x76185d9c in fglrx_dri.so (+0x16bfd9b) (0x761857ca)
3 0xfc878b08 (0x247c8b57)
0x75fa9e63: movl 0xa8(%eax),%edx
Modules:
Module Address Debug info Name (179 modules)
PE 330000- 349000 Deferred zlib122
PE 350000- 38a000 Deferred bf2voipserver
PE 390000- 3dd000 Deferred bf2audio
PE 400000- af5000 Deferred bf2
PE b00000- c83000 Deferred dice_py
PE 31c0000- 3386000 Deferred bf2openal
PE 36a0000- 393d000 Deferred renddx9
PE 3940000- 3982000 Deferred textureatlasbuilder
PE 3990000- 3be3000 Deferred d3dx9_25
PE 3bf0000- 3c03000 Deferred pcregexp
PE 8f00000- 9138000 Deferred d3dx9_24
PE ac00000- acba000 Deferred pbsv
PE ecb0000- ee28000 Deferred aidll
PE 10000000-10122000 Deferred memory
PE 30000000-3006d000 Deferred binkw32
ELF 7333c000-73432000 Deferred libasound.so.2
ELF 73436000-7344b000 Deferred midimap<elf>
\-PE 73440000-7344b000 \ midimap
ELF 7344b000-7347c000 Deferred winealsa<elf>
\-PE 73450000-7347c000 \ winealsa
ELF 7347c000-7357a000 Deferred quartz<elf>
\-PE 73490000-7357a000 \ quartz
ELF 7367a000-73692000 Deferred msacm32<elf>
\-PE 73680000-73692000 \ msacm32
ELF 73692000-736ba000 Deferred devenum<elf>
\-PE 736a0000-736ba000 \ devenum
ELF 736ba000-736ce000 Deferred libtasn1.so.6
ELF 736ce000-736fe000 Deferred p11-kit-trust.so
ELF 736fe000-7373a000 Deferred libp11-kit.so.0
ELF 7373a000-737bf000 Deferred libgcrypt.so.11
ELF 737bf000-737d1000 Deferred libtasn1.so.3
ELF 737d1000-7388f000 Deferred libkrb5.so.3
ELF 7388f000-73958000 Deferred libgnutls.so.26
ELF 73958000-739c5000 Deferred libcups.so.2
ELF 74ac6000-773ff000 Dwarf fglrx_dri.so
ELF 7b400000-7b7ea000 Deferred kernel32<elf>
\-PE 7b420000-7b7ea000 \ kernel32
ELF 7b7ee000-7b834000 Deferred libgssapi_krb5.so.2
ELF 7b834000-7b8ab000 Deferred ddraw<elf>
\-PE 7b840000-7b8ab000 \ ddraw
ELF 7bab7000-7bae7000 Deferred libk5crypto.so.3
ELF 7baec000-7bb00000 Deferred avicap32<elf>
\-PE 7baf0000-7bb00000 \ avicap32
ELF 7bc00000-7bcf7000 Deferred ntdll<elf>
\-PE 7bc10000-7bcf7000 \ ntdll
ELF 7bcf9000-7bd00000 Deferred libffi.so.6
ELF 7c000000-7c003000 Deferred <wine-loader>
ELF 7c007000-7c049000 Deferred winspool<elf>
\-PE 7c010000-7c049000 \ winspool
ELF 7c0c6000-7c0d8000 Deferred libavahi-client.so.3
ELF 7c0d8000-7c100000 Deferred dxgi<elf>
\-PE 7c0e0000-7c100000 \ dxgi
ELF 7c403000-7c43b000 Deferred wbemprox<elf>
\-PE 7c410000-7c43b000 \ wbemprox
ELF 7c4f4000-7c5a7000 Deferred libatiadlxx.so
ELF 7c5a7000-7c5c6000 Deferred libatiuki.so.1
ELF 7c6ae000-7c6cb000 Deferred libgcc_s.so.1
ELF 7c6cb000-7c777000 Deferred libgl.so.1
ELF 7c777000-7c7b0000 Deferred uxtheme<elf>
\-PE 7c780000-7c7b0000 \ uxtheme
ELF 7c7b0000-7c8bc000 Deferred comctl32<elf>
\-PE 7c7c0000-7c8bc000 \ comctl32
ELF 7c8bc000-7c903000 Deferred avifil32<elf>
\-PE 7c8c0000-7c903000 \ avifil32
ELF 7c903000-7ca35000 Deferred opengl32<elf>
\-PE 7c920000-7ca35000 \ opengl32
ELF 7ca35000-7cb93000 Deferred wined3d<elf>
\-PE 7ca40000-7cb93000 \ wined3d
ELF 7cb93000-7cc50000 Deferred msvcrt<elf>
\-PE 7cbb0000-7cc50000 \ msvcrt
ELF 7cf50000-7cf57000 Deferred libnss_dns.so.2
ELF 7cf57000-7cf5b000 Deferred libnss_mdns4_minimal.so.2
ELF 7cf74000-7cfbf000 Deferred dinput<elf>
\-PE 7cf80000-7cfbf000 \ dinput
ELF 7d202000-7d207000 Deferred libgpg-error.so.0
ELF 7d207000-7d20b000 Deferred libkeyutils.so.1
ELF 7d20b000-7d231000 Deferred dxdiagn<elf>
\-PE 7d210000-7d231000 \ dxdiagn
ELF 7d231000-7d26f000 Deferred d3d9<elf>
\-PE 7d240000-7d26f000 \ d3d9
ELF 7d2c8000-7d2d4000 Deferred libkrb5support.so.0
ELF 7d2d4000-7d300000 Deferred msvfw32<elf>
\-PE 7d2e0000-7d300000 \ msvfw32
ELF 7d401000-7d406000 Deferred libcom_err.so.2
ELF 7d406000-7d40f000 Deferred libogg.so.0
ELF 7d40f000-7d43b000 Deferred libvorbis.so.0
ELF 7d43b000-7d5b3000 Deferred libvorbisenc.so.2
ELF 7d5b3000-7d5e7000 Deferred libflac.so.8
ELF 7d5e7000-7d5ee000 Deferred libasyncns.so.0
ELF 7d5ee000-7d660000 Deferred libsndfile.so.1
ELF 7d660000-7d6ab000 Deferred libdbus-1.so.3
ELF 7d6ab000-7d71a000 Deferred libpulsecommon-4.0.so
ELF 7d71a000-7d769000 Deferred libpulse.so.0
ELF 7d76a000-7d778000 Deferred libavahi-common.so.3
ELF 7d782000-7d7aa000 Deferred winepulse<elf>
\-PE 7d790000-7d7aa000 \ winepulse
ELF 7d7aa000-7d8ef000 Deferred oleaut32<elf>
\-PE 7d7c0000-7d8ef000 \ oleaut32
ELF 7d8ef000-7d911000 Deferred mmdevapi<elf>
\-PE 7d8f0000-7d911000 \ mmdevapi
ELF 7d9c6000-7d9cc000 Deferred libxfixes.so.3
ELF 7d9cc000-7d9d7000 Deferred libxcursor.so.1
ELF 7dad7000-7dae7000 Deferred libxi.so.6
ELF 7dae7000-7daeb000 Deferred libxcomposite.so.1
ELF 7daeb000-7daf6000 Deferred libxrandr.so.2
ELF 7daf6000-7db01000 Deferred libxrender.so.1
ELF 7db01000-7db07000 Deferred libxxf86vm.so.1
ELF 7db07000-7db0b000 Deferred libxinerama.so.1
ELF 7db0b000-7db12000 Deferred libxdmcp.so.6
ELF 7db12000-7dc46000 Deferred libx11.so.6
ELF 7dc82000-7dc86000 Deferred libxau.so.6
ELF 7dc86000-7dca8000 Deferred libxcb.so.1
ELF 7dca8000-7dcbb000 Deferred libxext.so.6
ELF 7dcbd000-7dcc7000 Deferred libwrap.so.0
ELF 7dcc7000-7dcd2000 Deferred libjson-c.so.2
ELF 7dcd4000-7dd68000 Deferred winex11<elf>
\-PE 7dce0000-7dd68000 \ winex11
ELF 7dd68000-7dd8c000 Deferred imm32<elf>
\-PE 7dd70000-7dd8c000 \ imm32
ELF 7ddec000-7de15000 Deferred libexpat.so.1
ELF 7de15000-7de50000 Deferred libfontconfig.so.1
ELF 7de50000-7de78000 Deferred libpng12.so.0
ELF 7de78000-7df18000 Deferred libfreetype.so.6
ELF 7df18000-7df93000 Deferred shlwapi<elf>
\-PE 7df30000-7df93000 \ shlwapi
ELF 7df93000-7e1df000 Deferred shell32<elf>
\-PE 7dfa0000-7e1df000 \ shell32
ELF 7e1df000-7e2b0000 Deferred crypt32<elf>
\-PE 7e1f0000-7e2b0000 \ crypt32
ELF 7e2b0000-7e2fb000 Deferred dsound<elf>
\-PE 7e2c0000-7e2fb000 \ dsound
ELF 7e2fb000-7e316000 Deferred wsock32<elf>
\-PE 7e300000-7e316000 \ wsock32
ELF 7e316000-7e340000 Deferred msacm32<elf>
\-PE 7e320000-7e340000 \ msacm32
ELF 7e340000-7e3fa000 Deferred winmm<elf>
\-PE 7e350000-7e3fa000 \ winmm
ELF 7e3fa000-7e480000 Deferred rpcrt4<elf>
\-PE 7e410000-7e480000 \ rpcrt4
ELF 7e480000-7e5c7000 Deferred ole32<elf>
\-PE 7e4a0000-7e5c7000 \ ole32
ELF 7e5c7000-7e5e2000 Deferred dinput8<elf>
\-PE 7e5d0000-7e5e2000 \ dinput8
ELF 7e5e2000-7e5fa000 Deferred libresolv.so.2
ELF 7e613000-7e63b000 Deferred iphlpapi<elf>
\-PE 7e620000-7e63b000 \ iphlpapi
ELF 7e63b000-7e66a000 Deferred netapi32<elf>
\-PE 7e640000-7e66a000 \ netapi32
ELF 7e66a000-7e6a5000 Deferred ws2_32<elf>
\-PE 7e670000-7e6a5000 \ ws2_32
ELF 7e6a5000-7e759000 Deferred msvcr71<elf>
\-PE 7e6c0000-7e759000 \ msvcr71
ELF 7e759000-7e8af000 Deferred msvcp71<elf>
\-PE 7e7a0000-7e8af000 \ msvcp71
ELF 7e8af000-7e8c8000 Deferred version<elf>
\-PE 7e8b0000-7e8c8000 \ version
ELF 7e8c8000-7e943000 Deferred advapi32<elf>
\-PE 7e8e0000-7e943000 \ advapi32
ELF 7e943000-7ea65000 Deferred gdi32<elf>
\-PE 7e950000-7ea65000 \ gdi32
ELF 7ea65000-7ebc4000 Deferred user32<elf>
\-PE 7ea80000-7ebc4000 \ user32
ELF 7ebc4000-7ebdd000 Deferred libz.so.1
ELF 7ebdd000-7ec45000 Deferred dbghelp<elf>
\-PE 7ebe0000-7ec45000 \ dbghelp
ELF 7ef77000-7ef83000 Deferred libnss_files.so.2
ELF 7ef83000-7ef8f000 Deferred libnss_nis.so.2
ELF 7ef8f000-7efa8000 Deferred libnsl.so.1
ELF 7efa8000-7efb1000 Deferred libnss_compat.so.2
ELF 7efb1000-7eff7000 Deferred libm.so.6
ELF 7eff7000-7f000000 Deferred librt.so.1
ELF b7371000-b7376000 Deferred libdl.so.2
ELF b7376000-b7525000 Deferred libc.so.6
ELF b7525000-b7541000 Deferred libpthread.so.0
ELF b7548000-b755b000 Deferred psapi<elf>
\-PE b7550000-b755b000 \ psapi
ELF b755b000-b7711000 Dwarf libwine.so.1
ELF b7713000-b7735000 Deferred ld-linux.so.2
ELF b7735000-b7736000 Deferred [vdso].so
Threads:
process tid prio (all id:s are in hex)
00000008 (D) C:\Program Files\EA GAMES\141Battlefield 2\BF2.exe
0000003b 1
00000039 1
00000038 0
00000037 15
00000034 0
00000033 0
00000032 0
00000031 15
00000030 15
0000002f 0
0000002e 0
00000009 0 <==
0000000e services.exe
00000024 0
00000023 0
0000001d 0
00000014 0
00000010 0
0000000f 0
00000012 mscorsvw.exe
0000001a 0
00000019 0
00000018 0
00000013 0
0000001b winedevice.exe
00000027 0
00000020 0
0000001f 0
0000001c 0
00000021 plugplay.exe
00000026 0
00000025 0
00000022 0
00000028 explorer.exe
0000002d 0
0000002c 0
0000002b 0
0000002a 0
00000029 0
System information:
Wine build: wine-1.9.11
Platform: i386
Version: Windows XP
Host system: Linux
Host version: 3.13.0-24-generic

Can anyone tell me how to fix this problem with mods crashing?

I used the POL-WINE method because I couldn't get BF2 to run with just WINE in my Linux Mint 17.
- I am not a complete n00b but I am really not that much above a n00b. So, any fix will have to have a lot of step-by-step for me to understand.
 
Last edited by a moderator:
OOPS. Correction: Video driver is not what I listed. It's the AMD proprietary driver : fglrx-updates version 2:15.201-0ubuntu0.14.04.1 (Sorry about that).
 
Where did you get the BF2 Mod? I will download it and try it myself...

By the way, if you install the 1.5 patch, you will get the expansions and it doesn't require a CD anymore. So then you won't need the no-CD crack
 
Where did you get the BF2 Mod? I will download it and try it myself...

By the way, if you install the 1.5 patch, you will get the expansions and it doesn't require a CD anymore. So then you won't need the no-CD crack

I got the mod from the Hard Justice mod website several years ago. I originally ran everything under Windows XP (I don't dare hook my XP system to net these days). The HJ site went dark about 2011-2012. You can probably find HJ on some other sites but you have to get the 1.3 version. Several of the sites still only carry the old 1.1 and 1.2 versions (which can be a bit flaky). There are also three add-on map packs for HJ v1.3 (HJ has about 12 maps with the default kit, so you don't need the add-ons). But, if you want the extra maps, you have to get the map packs that were updated to v1.3. Like the mod itself a lot of sites only have the old v1.1 and v1.2 map sets.

With a quick look I found: http://www.bf-games.net/downloads/1220/hard-justice-v1-3-full-client.html. I think this is the good version. The team launched the 1.3 version but found a couple of mistakes in it after they released it and had to fix them. Since this file is listed as the "full" version I think it's the fixed kit. (If it's not you will have to find the HJ v1.3 "Hotfix" kit and use it to patch the HJ v1.3) I have read where the "good" kit is sometimes listed as the 1.31 version but I don't know if that was the HJ mod team's official name.

I know the BF2 1.5 patch gets rid of the CD check but Hard Justice v1.3 has problems with BF2 v1.5. Using Windows XP, running Hard Justice v1.3 under BF2 1.5, the mod will crash randomly. The mod team knew about the crashing and while they were working on a fix they recommended a parallel install of BF2 updated to only 1.41 to run HJ. Unfortunately the team didn't have it fixed before their web site went dark. So, the only way to run HJ v1.3 reliably is use BF v1.41. Which is why I am using the no CD executable.
 
Wow, looks like you have done a lot of testing with this mod.
You are treading new ground here...
Basically, in order to get it running in PlayOnLinux, you will need to simulate everything you had setup in Windows XP. Your problem might be the mod its-self, but if it ran well in XP, then Wine may have some issues.

I have only tested Battlefield 2 with patch 1.5 and it is very stable. When I do a fresh install, I will use the 1.4 patch first, then the 1.5 patch. This is the problem with game patches and mods with patches. I have to really really love a mod to go through all of these "hoops" in order to get it working.

I'll download it and give it a try. I will report my results here.
 
I tested Hard Justice 1.3 in PlayOnLinux with Wine 1.8.3 and the BF2 1.5 patch.
Never had any issues with crashing, but I didn't play for a long time either. Some of the maps are really good and others are just cut-n-paste objects everywhere. I wasn't able to allow 64 bots on a map for some reason, it maxed out at 32.

Your crashing issues might be related to huge 64 maps with 100 bots running around. Battlefield 2 is only a 32-bit game, so you might be running into memory leaks or running out of memory. Try running the mod with System Monitor running on the Resources tab, then when it crashes you can check how much memory it was using.

If you haven't play the Assault Mod yet, check it out, because they have added some great features like muzzle-flash, realistic damage and 64 player maps of the original BF2 maps. It runs on 1.5 patch
 
The bots were limited to 32 because the settings of "Create Local" affect the running of the Singleplayer. To play by myself with just the client I click on the [MULTIPLAYER] button and select the "Create Local" function. First I set the "Co-op" option under the AVAILABLE MAPS then set the MAX PLAYERS down to 1. Then I shove the "bot" slider up to 48 to get me and 47 bots. Then click the [Start Sever] button at the bottom right. Setting the number of player to "ONE" allows the game to run with just me.
(With the default configuration the amount under "MAX PLAYERS" is subtracted from the total number of bots. You probably had the number of players at 16 and the bots set to 48. 48-16=32.) (EDIT [My Bad] minor detail: With the default configuration the amount of Players AND bots can not exceed 64. Under the MULTIPLAYER section the default number of players the slider is set at is 32. So, 64-32=32 bots. If you reduce the number of Players to 16 or less then you get the maximum number bots, 48, the normal settings give you. The highest value the bot slider goes up to is 48.)

To go higher than 48 bots you have to make changes to some settings. In the folder:
"drive_c/Program Files/EA GAMES/Battlefield 2/mods/hardjustice/AI"
find the "AIDefault.ai" file and open it with a text editor. Find the entries:
aiSettings.setMaxNBots 32
aiSettings.maxBotsIncludeHumans 1
Disable these with the remark function ("rem") in front of the line. Like this:
rem aiSettings.setMaxNBots 32
rem aiSettings.maxBotsIncludeHumans 1

Add these lines under the Remarked out entries (they replace the REM'ed entries.)
aiSettings.overrideMenuSettings 1
sv.coopBotCount <- (Bad edit job. It should be the line "setMaxNBots 64" Sorry. OldRick)
aiSettings.setMaxNBots 64
aiSettings.maxBotsIncludeHumans 0

And then save the new version of AIDefault.ai.
(There are some comments in the AIDefault.ai file that might help.)

I have found that to keep things working properly you also have to make another change. In the folder:
"drive_c/Program Files/EA GAMES/Battlefield 2/mods/hardjustice/Settings"

CORRECTION
As noted in a later post
For a Listen-Server (aka Serve&Play) the ServerSettings.con file is located in the Player Profile. Go to the player profile in:
drive_c/users/<user name>/My Documents/Battlefield 2/Profiles/0002
The numbered folder might be 0000, 0001, 0002, 0003, etc depending on the player name you're using. To find the correct profile in the numbered folder open the "Profile.con" file with a text editor to read the player name.


find the "ServerSettings.con" file and open it with a text editor. Find the entries
sv.coopBotRatio 50
sv.coopBotCount 16

Change the values to:
sv.coopBotRatio 67
sv.coopBotCount 64

(The sv.coopBotCount line always has to match the sv.coopBotCount aiSettings.setMaxNBots in AIDefault.ai) <-(More Bad Edit job)

You will have 64 bots and 32 of them will be on "TEAM 1".

!> The BotRatio and BotCount get to be a little strange when you have more than 48 bots. The game engine seems to think that there can never be more than 48 bots. Which is wrong. The game engine can handle more than 48 bots. (Whether or not your computer can manage more than 48 bots without LAG is another story.) But, because the game engine "thinks" there are only 48 bots the interaction of the BotCount and BotRatio gets weird. The bot ratio is calculated on the number of bots up to 48 BUT, if the value is higher the calculation will always assume 48. The bot ratio assigns the number of bots to TEAM 1. Any bots NOT assigned to TEAM 1 automatically get moved to TEAM 2. So if you have more than 48 bots to get the ratio correct divide the number of bot you want on TEAM 1 by 48 and multiply by 100 to get a % value. So, from what is listed above 67% of 48 is 32 bots. Just be aware that no matter how many bots you have in total the number of bots on TEAM 1 can never exceed 48. 100% of 48 is = 48.

If you have a system less than 5 years old you should be able to run 64 bots from the client without a problem.

!> To get more than 64 bots usually requires the "Dedicated Server" over a network connection. The server kit has to have the same changes to AIDefault.ai and ServerSettings.con as listed above (adjusted to the larger bot count) and since the dedicated server doesn't have to create the 3D image for a player to look at the system has a lot more computing power available to manage the bots. The 100 bot case I mentioned was from a dedicated server on a LAN. In most cases the only place most of us can have a dedicated server is at a LAN party. (I still don't know how to connect a dedicated server AND a client box simultaneously to my home internet connection.) I do have a computer for my Dedicated Server as well as my usual client machine so I can have a LAN game with just me playing.

I doubt the crashing problem is due to 100 bots on a 64 player map. The Dedicated LINUX Server has run 96-108 bots for several years with Windows XP client machines connected to it on a LAN and there were no crashes.

I'll get to the Assault Mod eventually.

Since you have Hard Justice running start the 64 player version of the ISLAND CITY map. The Canadian airfield at the lower right (South East) has an F15 with a Tactical Nuke (if the bots don't grab it first). Fly over the far end of the bridge north of the city, there's usually lots of enemy vehicles trying to get on the bridge, and drop the Nuke. Make sure you stay high enough the blast doesn't blow you out of the sky.
If that's not to your liking... Try the A10s. One of them has cluster bombs and Maverick missiles.

I'm still experimenting with settings. I found out the Video settings listed on the WINE HQ site are for an nVidia video card. Since my card is an AMD I've changed the settings and things seem to work better. I have also found a comment on the BattlefieldSinglePlayer Forum from someone trying to get BF2 and the AIX 2.0 mod working under Windows 10. He claimed that AIX 2.0 crashed constantly under windows 10 until he installed the Visual C++ Runtime 2005 kit. PlayOnLinux has several "vcrun" kits in the components list so I thought I'd try them and see if things got better.
 
Last edited:
Wow, thank you for being so thorough.
I will try to edit the mentioned files and see if I can get my listenserver to run 100 bots on a single level. My machine has a 6-core AMD CPU and 8 GB of RAM. So hopefully it can handle the load and play the game at the same time. If not, I can always run a dedicated server and connect from one of my other machines.

Since you have an AMD video card, I've read many times that drivers cause issues specially from AMD. Sounds like you have a good grasp on the driver situation, but I'm using Nvidia cards. GeForce 550 Ti, GeForce GTX 950, GeForce 750 Ti. Hopefully I will experience less crashing....

I'll report my findings back here.
 
I made the requested changes to:
  • ServerSettings.con
  • AIDefault.ai
But now my listenserver crashes every time. If I touch the in-game bot count, max players, etc... does this override those two files I made changes to?
 
With the "aiSettings.overrideMenuSettings 1" in the AIdefault.ai file the sliders in the Multiplayer - Create Local don't override the file settings. The in-game settings are based on the values inside the AIDefault.ai and the SeverSettings.con files. The in-game sliders only "adjust" the settings when the "override" is off (override off is the default). And be aware the maximum slider values are fixed. They don't accurately show what the file values are. Note that the settings in the AIDefault.ai and the SeverSettings.con files are also used for the Singleplayer function.

Looks like you will have to reset everything to the default values to get your BF2 working.

(EDIT: MORE LIKELY it was my bad editing in the AIDefault.ai entry in my earlier post. Use the aiSettings.setMaxNBots 64 entry as in the "fixed" post.)

The crashing problem may be your WINE version. Even with the original installation of BF2 (without any mods yet) I had trouble trying to get regular BF2 to run on my system with WINE 1.8.3 and 1.8.5. (However, it may be possible my problem might be the AMD video drivers. You're using an nVidia video card, my is an AMD. And that might explain why I need WINE version 1.9.11 to get things working. WINE 1.8.x may not like AMD video cards.)

Remember that BF2 is Single-Threaded. Having a multi-core CPU doesn't give any extra computing power to BF2 because it only uses one core. With multi-core CPUs under Windows XP you actually had to lock the BF2 "process" to a single core or the game would always Crash To Desktop. I haven't found that I need to set the CPU affinity in WINE to get BF2 working. (But, it is there if you want to try it. POL configuration, WINE tab, Task Manager, Processes tab, Right-Click on the BF2 Process and set the CPU affinity.)

Since BF2 is single threaded the "Processor Rating" of a multi-core CPU will give a false idea of what your system can support when it comes to running BF2. For example: If you have two CPUs of the same series, a quad core at 3.0 GHz and a dual core at 3.2 GHz, the dual core will actually be better for BF2 because one core of the dual is running faster than one core of the quad. In general AMD CPUs have a lower Instruction Per Clock (IPC) rate than Intel units which can also give poorer results. I have gotten 48 bots running from a Listen-Server on an AMD Phenom II X2 550 BE but that was after I added a heavy-duty Heat-Pipe CPU Cooler and over-clocked the CPU from 3.1GHz up to 3.8GHz. As a reference Comparing my current stock Intel CPU at 3.4 GHz to the old Over-Clocked AMD CPU at 3.8 GHz... Even though the Intel is running at a lower clock its Single-Thread rating is 40% Higher than the AMD.

Trying to get 100 bots running from a Listen-Server is probably too optimistic. I said you could likely get 64 bots running from a Listen-Server if your system was less than 5 years old. In my examples with 90+ bots I was quoting what I could get from a Dedicated Server kit.

Moving the MAX PLAYERS slider down to ONE in the Mutliplayer - Create Local settings will allow the Listen-Server to run with only you playing on it. And setting the MAX PLAYERS down to one should stop the Single Player function from subtracting bots from the "Number of bots" slider value. Or, the setting "aiSettings.maxBotsIncludeHumans 0" in the AIDefault.ai file is another way to stop the game from subtracting a bot for every "human" player.

NOW, I admit that all of my experience is with BF2 v1.41. There may have been changes with the BF2 v1.5 patch. I will have to install BF2 v1.5 and experiment to see if any of the "adjustments" still work.

I'm back -
I made a mistake in the file locations. For a Listen-Server the SeverSettings.con file is not where I said it was. It is actually located in the game user profile.
drive_c/users/<user name>/My Documents/Battlefield 2/Profiles/0002
The 0002 number will be different depending on the game name used. (i.e. 0000, 0001, 0002, 0003, etc.) Open the number folder then open the "Profile.con" file with a text editor to see the game user name.

A quick test with the BF2 v1.5 install I've got showed that when the settings are done correctly my system can run 64 bots in a Listen-Server or Singleplayer.
 
Last edited:
Ok, I'm about to try with your new tips setting it in the My Documents profile.
Do I still need to set it in AIDefault.ai?
 
Yup, it totally worked! I hosted my own LAN server by modifying .con file in my BF profile. Its hard to tell if there really are 64 bots when using Tab menu, but there was a lot more and I could actually play the 64 player maps for once.

So did the Hard Justice team create bot paths for their 64 player maps? So far it looks really good and interactive. Some of the maps are so big that its hard to help my team-mates, but its still fun. I may have to try this at my LAN parties too.
 
Do I still need to set it in AIDefault.ai?

Yes. The settings in the AIDefault.ai are the important ones to get more than 48 bots. The changes to the ServerSettings.con are extras to help with the stability of the game when it has more than 48 bots.
 
So what other tests do you want me to try?
I really don't want to connect all 6 computers in my LAN, but so far it appears to run fine with Patch 1.5
 
Yup, it totally worked! I hosted my own LAN server by modifying .con file in my BF profile. Its hard to tell if there really are 64 bots when using Tab menu, but there was a lot more and I could actually play the 64 player maps for once.

So did the Hard Justice team create bot paths for their 64 player maps? So far it looks really good and interactive. Some of the maps are so big that its hard to help my team-mates, but its still fun. I may have to try this at my LAN parties too.

Using the Tab menu only has room to list 21 names for each team. But, if you look below the list you can see the "total number of players" for each team. Which will show that you have more "soldiers" than just the names listed.

Just be careful when the combat gets busy. Since the game is designed for a maximum of 48 bots the extra bots (from 49 - on) Do Not get a nametag on screen. You know, green for your squad, blue for friendlies and Red for enemy. And they don't get a map-dot on the mini map or the big one either. I try to be careful but I have given up counting the number of times I have killed "un-marked" friendlies. When "someone" appears suddenly moving toward me I'll often shoot before I see the uniform and recognise a friendly. (Even worse so much of the time the friendly coming at me is a Medic when I need him most.) Or, when doing a bombing run I take a quick look at the mini map, see nothing, drop a string, only to see the score ticker list "Teamkills" next to my name. You just have to take the -2 points for each incident. If my "assists" gets to be too negative I'll change class to a Medic and try to bring my minus points to a plus value before the end of the map.

Yes, the Hard Justice mod Team did a full 64-player map bot path (aka navmesh) for the maps. Now, some areas the bots have no need to go into so in those places the path was removed to keep the bots out. Also, the navmesh was sometimes reduced to keep the game from getting too slow.
Most mods with 64-player COOP maps have the full size navmeshes. AIX2 has them and I think BF2all64 (a mod that just navmeshed the 64-player BF2 conquest maps.)

For LAN parties you probably have to do the changes to the AIDefault.ai on every machine on the LAN to keep each machine from crashing. I forget if the ServerSettings.con file has to be changed as well. Just remember the number of bots in the AIDefault.ai and the ServerSettings.con files have to be the same for stability. (One guy told me that you can get away with having the bot value in AIDefault.ai any value equal to or larger than the value in the ServerSettings.con file so it's easy to change the number of bots by only changing the ServerSettings.con file as long as it's less than the AIDefault.ai value.)
 
Last edited:
So what other tests do you want me to try?
I really don't want to connect all 6 computers in my LAN, but so far it appears to run fine with Patch 1.5

I was hoping that there was some setting or component that I was missing that when applied would fix things. But, there doesn't seem to be a quick fix.

Your setup and mine are different so it looks like anything you try won't apply to my machine. I'll just have to keep experimenting. I do know that the mod team reported that Hard Justice 1.3 has problems in BF2 v1.5 so don't be surprised if something strange happens running HJ.

I did manage to get my system to run longer by installing the vcrun2008 kit (listed as msvcr90 in the Libraries tab "DLL Overides" section of WINE Configuration) and installing the OpenAL32 from the Libraries tab "DLL Overides" section of WINE Configuration. But, I still get crashes. Usually after running a few maps in a cycle. Which is better than having it crash loading the first map.

Thanks Booman.
 
Last edited:
No problem. Thanks for posting everything you have learned about Battlefield 2. There are still a lot of communities playing this classic game.
I wish I had more productive input for you, but it seems you have a find grasp on the problem and the configs.

Did you ever look into Battlefield Revive?

I tried their downloader and it crashed in Wine...
 
Back
Top