Project Reality + Battlefield 2 on Steam

If you find a bug within PR:BF2 (including PRSP), please report it here.
BuddhaBroddh
Posts: 1
Joined: 2010-01-05 13:59

Re: Project Reality + Battlefield 2 on Steam

Post by BuddhaBroddh »

I dont Really Know wheather this has something to do with steam or not but i have a problem with my Punkbuster.

I use that autohotkey script to run PR instead of BF2 and after a few minutes i get the message, that punkbuster kicked me because my bf2.exe doesnt seem to be as it should be :shock:

i already updated punkbuster but whatelse can i do? and am i the only one with that issue? :confused:

Punkbuster Error
You have been disconnected by punkbuster. The reason follows in english below.
Punkbuster kicked player >ME< (for 3 minutes) ...
MD5Tool Mismatch BF2.exe (len=2048 )


Edit: Found a solution in another thread!
Last edited by BuddhaBroddh on 2010-01-06 21:27, edited 4 times in total.
Reason: Everything works fine for now
Synctone
Posts: 1
Joined: 2010-01-09 11:37

Re: Project Reality + Battlefield 2 on Steam

Post by Synctone »

VBNight wrote:I have built a workaround to allow Steam players to get Project Reality to launch correctly. The problem is BF2.exe from Steam quits when you 1st launch it to perform some sort of Steam authentication. Steam relaunches BF2 after the authentication. This script launches PR.exe, waits for it to close when BF2 closes, then waits for BF2 to be restarted, then relaunches PR.exe so it is running with BF2. This has the side effect of PR.exe starting BF2 again which try to start but it will exit because the existing BF2 process is running.

The PR developers should be able to update the PR.exe to detect steam and wait for BF2 to relaunch instead of exiting but this will let you run the game until they do.

Please post any questions or problems here.



AUTOHOTKEY REQUIRED - FREE

You will need to have Autohotkey installed on your system to use this script.

Download Autohotkey: http://www.autohotkey.com

AUTOHOTKEY REQUIRED - FREE




To Use Script:



Copy & Paste Method
  • Paste the following code into a blank notepad.
  • Save the text file on your desktop as "LaunchPR.ahk"
  • Double click LaunchPR.ahk to start Project Reality.
Download Method
  • Download attached LaunchPR.txt file.
  • Open file in notepad and verify text matches script above. (Optional)
  • Rename file to LaunchPR.ahk
  • Double click LaunchPR.ahk to start Project Reality.
Project Reality Launcher - Steam Helper

Code: Select all

; Project Reality Launcher - Steam Helper
;
; This workaround helps launch Project Reality for users who purchased BF2 on Steam.
;
; Run this script to start Project Reality
;
; Launches PR.exe and waits for it to exit when BF2 performs Steam authentication.
; Relaunches PR.exe after Steam restarts BF2.exe after authentication.
;
; WARNING: The 2nd launch of PR.exe attempts to start BF2 again which will try start then quit.

#NoTrayIcon 
#SingleInstance force
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

; Get Path To Project Reality PR.EXE
EnvGet ProgramFilesX86, ProgramFiles(x86)
PREXE := ProgramFilesX86 . "\Steam\steamapps\common\battlefield 2\mods\pr\pr.exe"
BF2 := ProgramFilesX86 . "\Steam\steamapps\common\battlefield 2"

; Verify Path Correct
IfNotExist %PREXE%
{
	EnvGet ProgramFilesFolder, ProgramFiles
	PREXE := ProgramFilesFolder . "\Steam\steamapps\common\battlefield 2\mods\pr\pr.exe"

	IfNotExist %PREXE%
	{
		Msgbox PR.EXE (%PREXE%) NOT FOUND, PROJECT REALITY LAUNCHER FAILED
		ExitApp 1
	}
}

; Launch PR, Wait For It To Exit
RunWait, %PREXE%, %BF2%, UseErrorLevel

; Wait For BF2 Relaunch (20 Sec Timeout)
Process, Wait, BF2.exe, 20

; Check Timeout Error
if (ErrorLevel == 0)
{
	Msgbox TIMEOUT WAITING FOR BF2 RELAUNCH, PROJECT REALITY LAUNCHER FAILED
	ExitApp
}

; Relaunch PR.EXE Again
Run, %PREXE%, %BF2%, UseErrorLevel

; Exit (Finished)
ExitApp 0

Please post any questions or problems here.
Thanx it helped :D
Tsar94
Posts: 2
Joined: 2010-01-10 18:34

Re: Project Reality + Battlefield 2 on Steam

Post by Tsar94 »

VBNight wrote:I have built a workaround to allow Steam players to get Project Reality to launch correctly. The problem is BF2.exe from Steam quits when you 1st launch it to perform some sort of Steam authentication. Steam relaunches BF2 after the authentication. This script launches PR.exe, waits for it to close when BF2 closes, then waits for BF2 to be restarted, then relaunches PR.exe so it is running with BF2. This has the side effect of PR.exe starting BF2 again which try to start but it will exit because the existing BF2 process is running.

The PR developers should be able to update the PR.exe to detect steam and wait for BF2 to relaunch instead of exiting but this will let you run the game until they do.

Please post any questions or problems here.



AUTOHOTKEY REQUIRED - FREE

You will need to have Autohotkey installed on your system to use this script.

Download Autohotkey: http://www.autohotkey.com

AUTOHOTKEY REQUIRED - FREE




To Use Script:



Copy & Paste Method
  • Paste the following code into a blank notepad.
  • Save the text file on your desktop as "LaunchPR.ahk"
  • Double click LaunchPR.ahk to start Project Reality.
Download Method
  • Download attached LaunchPR.txt file.
  • Open file in notepad and verify text matches script above. (Optional)
  • Rename file to LaunchPR.ahk
  • Double click LaunchPR.ahk to start Project Reality.
Project Reality Launcher - Steam Helper

Code: Select all

; Project Reality Launcher - Steam Helper
;
; This workaround helps launch Project Reality for users who purchased BF2 on Steam.
;
; Run this script to start Project Reality
;
; Launches PR.exe and waits for it to exit when BF2 performs Steam authentication.
; Relaunches PR.exe after Steam restarts BF2.exe after authentication.
;
; WARNING: The 2nd launch of PR.exe attempts to start BF2 again which will try start then quit.

#NoTrayIcon 
#SingleInstance force
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

; Get Path To Project Reality PR.EXE
EnvGet ProgramFilesX86, ProgramFiles(x86)
PREXE := ProgramFilesX86 . "\Steam\steamapps\common\battlefield 2\mods\pr\pr.exe"
BF2 := ProgramFilesX86 . "\Steam\steamapps\common\battlefield 2"

; Verify Path Correct
IfNotExist %PREXE%
{
	EnvGet ProgramFilesFolder, ProgramFiles
	PREXE := ProgramFilesFolder . "\Steam\steamapps\common\battlefield 2\mods\pr\pr.exe"

	IfNotExist %PREXE%
	{
		Msgbox PR.EXE (%PREXE%) NOT FOUND, PROJECT REALITY LAUNCHER FAILED
		ExitApp 1
	}
}

; Launch PR, Wait For It To Exit
RunWait, %PREXE%, %BF2%, UseErrorLevel

; Wait For BF2 Relaunch (20 Sec Timeout)
Process, Wait, BF2.exe, 20

; Check Timeout Error
if (ErrorLevel == 0)
{
	Msgbox TIMEOUT WAITING FOR BF2 RELAUNCH, PROJECT REALITY LAUNCHER FAILED
	ExitApp
}

; Relaunch PR.EXE Again
Run, %PREXE%, %BF2%, UseErrorLevel

; Exit (Finished)
ExitApp 0

Please post any questions or problems here.
I did it but when i launched launchPR.exe there is opening a black window its not working please help :-(

Image
Franco.A.USMC
Posts: 4
Joined: 2009-02-28 07:14

Re: Project Reality + Battlefield 2 on Steam

Post by Franco.A.USMC »

When i double-click the PR shortcut it goes to the login menu and after my account is logged in it shows a message:
You must use "pr.exe" to run Project Reality.
Please update ur shortcuts as required.
Example:
'C:\Program Files\EA Games\Battlefield 2\mods\pr\pr.exe'
instead of:
'C:\Program Files\EA Games\Battlefield 2\bf2.exe'



Thats all it says... i run it as an admin and in compablity mode, it has started only twice and ran beautifuly with the script but no longer starts. Please reply with solution to this problem.
DutchInAction
Posts: 7
Joined: 2010-01-11 07:45

Re: Project Reality + Battlefield 2 on Steam

Post by DutchInAction »

Hey,

Im not sure if you already have your answer, didnt read the whole thread, but I have the same problem. I solve this by starting PR by : 'My computer', 'Program Files', 'EA Games', 'Battlefield 2', 'mods', 'pr' , and then that shortcut with 'pr'.

Goodluck!
Tsar94
Posts: 2
Joined: 2010-01-10 18:34

Re: Project Reality + Battlefield 2 on Steam

Post by Tsar94 »

I have a new problem

Image

What should i do?
Psyrus
Retired PR Developer
Posts: 3841
Joined: 2006-06-19 17:10

Re: Project Reality + Battlefield 2 on Steam

Post by Psyrus »

I believe it should be

\Program Files (x86)\
Technobanana
Posts: 29
Joined: 2010-01-17 03:40

Re: Project Reality + Battlefield 2 on Steam

Post by Technobanana »

Hey do you think you could make a steam script for rpsp.exe ???? because i wouldent mind having the single player as well
communistman
Posts: 123
Joined: 2010-01-20 07:31

Re: Project Reality + Battlefield 2 on Steam

Post by communistman »

Actually, I made singleplayer work by myself, just go into the PR autohotkey script and change every reference from 'PR' to 'PRSP'.
subliminal
Posts: 3
Joined: 2010-01-21 07:36

Re: Project Reality + Battlefield 2 on Steam

Post by subliminal »

the hotkey thing didnt work for me... here my code maybe you guys can spot whats wrong with it

; Project Reality Launcher - Steam Helper
;
; This workaround helps launch Project Reality for users who purchased BF2 on Steam.
;
; Run this script to start Project Reality
;
; Launches PR.exe and waits for it to exit when BF2 performs Steam authentication.
; Relaunches PR.exe after Steam restarts BF2.exe after authentication.
;
; WARNING: The 2nd launch of PR.exe attempts to start BF2 again which will try start then quit.

#NoTrayIcon
#SingleInstance force
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.

; Get Path To Project Reality PR.EXE
EnvGet ProgramFilesX86, ProgramFiles(x86)
PREXE :="\Steam\steamapps\common\battlefield 2\mods\pr\pr.exe"
BF2 :="\Steam\steamapps\common\battlefield 2\"

; Verify Path Correct
IfNotExist %PREXE%
{
PREXE :="\Steam\steamapps\common\battlefield 2\mods\pr\pr.exe"

IfNotExist %PREXE%
{
Msgbox PR.EXE (%PREXE%) NOT FOUND, PROJECT REALITY LAUNCHER FAILED
ExitApp 1
}
}

; Launch PR, Wait For It To Exit
RunWait, %PREXE%, %BF2%, UseErrorLevel

; Wait For BF2 Relaunch (20 Sec Timeout)
Process, Wait, BF2.exe, 20

; Check Timeout Error
if (ErrorLevel == 0)
{
Msgbox TIMEOUT WAITING FOR BF2 RELAUNCH, PROJECT REALITY LAUNCHER FAILED
ExitApp
}

; Relaunch PR.EXE Again
Run, %PREXE%, %BF2%, UseErrorLevel

; Exit (Finished)
ExitApp 0
communistman
Posts: 123
Joined: 2010-01-20 07:31

Re: Project Reality + Battlefield 2 on Steam

Post by communistman »

Mine reads:

; Project Reality Launcher - Steam Helper
;
; This workaround helps launch Project Reality for users who purchased BF2 on Steam.
;
; Run this script to start Project Reality
;
; Launches PR.exe and waits for it to exit when BF2 performs Steam authentication.
; Relaunches PR.exe after Steam restarts BF2.exe after authentication.
;
; WARNING: The 2nd launch of PR.exe attempts to start BF2 again which will try start then quit.

#NoTrayIcon
#SingleInstance force
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.

; Get Path To Project Reality PR.EXE
EnvGet ProgramFilesX86, ProgramFiles(x86)
PREXE := ProgramFilesX86 . "\Steam\steamapps\common\battlefield 2\mods\pr\pr.exe"
BF2 := ProgramFilesX86 . "\Steam\steamapps\common\battlefield 2\"

; Verify Path Correct
IfNotExist %PREXE%
{
EnvGet ProgramFilesFolder, ProgramFiles
PREXE := ProgramFilesFolder . "\Steam\steamapps\common\battlefield 2\mods\pr\pr.exe"

IfNotExist %PREXE%
{
Msgbox PR.EXE (%PREXE%) NOT FOUND, PROJECT REALITY LAUNCHER FAILED
ExitApp 1
}
}

; Launch PR, Wait For It To Exit
RunWait, %PREXE%, %BF2%, UseErrorLevel

; Wait For BF2 Relaunch (20 Sec Timeout)
Process, Wait, BF2.exe, 20

; Check Timeout Error
if (ErrorLevel == 0)
{
Msgbox TIMEOUT WAITING FOR BF2 RELAUNCH, PROJECT REALITY LAUNCHER FAILED
ExitApp
}

; Relaunch PR.EXE Again
Run, %PREXE%, %BF2%, UseErrorLevel

; Exit (Finished)
ExitApp 0




Works fine, with the exception of being kicked about 90% of the time because of the MD5tool mismatch, something about PB restrictions, etc. In fact, I got so damned fed up with trying to deal with crappy Steam that I just ordered a regular retail copy of BF2 from Amazon for $10.
Xitude
Posts: 9
Joined: 2007-07-25 21:26

Re: Project Reality + Battlefield 2 on Steam

Post by Xitude »

Thanks Guys Worked Perfectly. +1.
UK FTW!
Deep_pain
Posts: 2
Joined: 2010-01-29 06:06

Re: Project Reality + Battlefield 2 on Steam

Post by Deep_pain »

Jeff wrote:Nevermind, I found this bf2.exe that works really well. I don't even need the autohotkey script anymore. i found it on this post.
https://www.realitymod.com/forum/f27-pr ... 048-a.html
replacing the bf2.exe from the post you quoted fixed this issue for me, pr now works on steam for me (win xp sp3) with no problems.
shifty66
Posts: 309
Joined: 2008-09-06 01:40

Re: Project Reality + Battlefield 2 on Steam

Post by shifty66 »

VBNight wrote:I have built a workaround to allow Steam players to get Project Reality to launch correctly. The problem is BF2.exe from Steam quits when you 1st launch it to perform some sort of Steam authentication. Steam relaunches BF2 after the authentication. This script launches PR.exe, waits for it to close when BF2 closes, then waits for BF2 to be restarted, then relaunches PR.exe so it is running with BF2. This has the side effect of PR.exe starting BF2 again which try to start but it will exit because the existing BF2 process is running.

The PR developers should be able to update the PR.exe to detect steam and wait for BF2 to relaunch instead of exiting but this will let you run the game until they do.

Please post any questions or problems here.



AUTOHOTKEY REQUIRED - FREE

You will need to have Autohotkey installed on your system to use this script.

Download Autohotkey: http://www.autohotkey.com

AUTOHOTKEY REQUIRED - FREE




To Use Script:



Copy & Paste Method
  • Paste the following code into a blank notepad.
  • Save the text file on your desktop as "LaunchPR.ahk"
  • Double click LaunchPR.ahk to start Project Reality.
Download Method
  • Download attached LaunchPR.txt file.
  • Open file in notepad and verify text matches script above. (Optional)
  • Rename file to LaunchPR.ahk
  • Double click LaunchPR.ahk to start Project Reality.
Project Reality Launcher - Steam Helper

Code: Select all

; Project Reality Launcher - Steam Helper
;
; This workaround helps launch Project Reality for users who purchased BF2 on Steam.
;
; Run this script to start Project Reality
;
; Launches PR.exe and waits for it to exit when BF2 performs Steam authentication.
; Relaunches PR.exe after Steam restarts BF2.exe after authentication.
;
; WARNING: The 2nd launch of PR.exe attempts to start BF2 again which will try start then quit.

#NoTrayIcon 
#SingleInstance force
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

; Get Path To Project Reality PR.EXE
EnvGet ProgramFilesX86, ProgramFiles(x86)
PREXE := ProgramFilesX86 . "\Steam\steamapps\common\battlefield 2\mods\pr\pr.exe"
BF2 := ProgramFilesX86 . "\Steam\steamapps\common\battlefield 2"

; Verify Path Correct
IfNotExist %PREXE%
{
	EnvGet ProgramFilesFolder, ProgramFiles
	PREXE := ProgramFilesFolder . "\Steam\steamapps\common\battlefield 2\mods\pr\pr.exe"

	IfNotExist %PREXE%
	{
		Msgbox PR.EXE (%PREXE%) NOT FOUND, PROJECT REALITY LAUNCHER FAILED
		ExitApp 1
	}
}

; Launch PR, Wait For It To Exit
RunWait, %PREXE%, %BF2%, UseErrorLevel

; Wait For BF2 Relaunch (20 Sec Timeout)
Process, Wait, BF2.exe, 20

; Check Timeout Error
if (ErrorLevel == 0)
{
	Msgbox TIMEOUT WAITING FOR BF2 RELAUNCH, PROJECT REALITY LAUNCHER FAILED
	ExitApp
}

; Relaunch PR.EXE Again
Run, %PREXE%, %BF2%, UseErrorLevel

; Exit (Finished)
ExitApp 0

Please post any questions or problems here.

Can anyone edit this to make it launch the ADF mod through steam?
Image[/img]
*14 sigs made for PR members Ingame name:supermannen6 Not making sigs anymore. Army life does not permit it! hah
mo0nbuggy1
Posts: 64
Joined: 2009-12-06 02:08

Re: Project Reality + Battlefield 2 on Steam

Post by mo0nbuggy1 »

Oh I member when this kept on happening to me. Darkest days of my life!
Snares
Posts: 342
Joined: 2008-11-24 23:25

Re: Project Reality + Battlefield 2 on Steam

Post by Snares »

Won't have to do any of this with 0.9, since PR will support Steam installs.
Locked

Return to “PR:BF2 Bugs”