Playonlinux "Far Cry 2" script bug fix

Hello all. If this belongs in general or some other forum, move it.

I can’t register to the playonlinux website. So, I’ll post on here. I’m sure some of you can’t either. The current script freezes up after you select your video card memory size then click next. Here’s how to fix it.

Script

Download the script and open it with kwrite.

Change this:

cd "$WINEPREFIX/drive_c/windows/temp/"
cat << EOF > vms.reg
[HKEY_CURRENT_USER\\Software\\Wine\\Direct3D]
"VideoMemorySize"="$VMS"
EOF
regedit vms.reg
if  "$VMS" -lt "256" ]; then
POL_SetupWindow_message "$LNG_VMS_ERROR" "$TITLE"
fi
 
## Fix for this game
cd "$POL_USER_ROOT/tmp/"
cat << EOF > FC2_Fix.reg
[HKEY_CURRENT_USER\\Software\\Wine\\Direct3D]
"OffscreenRenderingMode"="pbuffer"
regedit FC2_Fix.reg

To this:

cd "$WINEPREFIX/drive_c/windows/temp/"
cat << EOF > vms.reg
[HKEY_CURRENT_USER\\Software\\Wine\\Direct3D]
"VideoMemorySize"="$VMS"
EOF
regedit vms.reg
if  "$VMS" -lt "256" ]; then
	POL_SetupWindow_message "$LNG_VMS_ERROR" "$TITLE"
fi

## Fix for this game
cd "$POL_USER_ROOT/tmp/"
cat << EOF > FC2_Fix.reg
[HKEY_CURRENT_USER\\Software\\Wine\\Direct3D]
"OffscreenRenderingMode"="pbuffer"
EOF
regedit FC2_Fix.reg

Save it. You’ll see it was missing a EOF. The install will now get to checkboxes for shortcut on menu and desktop.

Now run playonlinux.

Tools->run local script

Follow the prompts and ignore the warning. Install it as normal. Download the patch from the ubisoft website. Now search for and install “far cry 2” patch.

That’s all enjoy! :slight_smile: