project reality header
Go Back   Project Reality Forums > PR:BF2 Mod Forums > PR:BF2 Bugs
PR Time:
Register Forum RulesDeveloper Blogs Project Reality Members List Search Today's Posts Mark Forums Read
PR:BF2 Bugs If you find a bug within Project Reality (including PRSP), please report it here.

Contact Support Team Frequently Asked Questions Register today!

Closed Thread
 
LinkBack Thread Tools Display Modes
Old 01-21-2010, 10:05 PM   #71
communistman
Default Re: Project Reality + Battlefield 2 on Steam

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.
communistman is offline
Old 01-26-2010, 10:39 PM   #72
Xitude

Xitude's Avatar
Send a message via MSN to Xitude
Default Re: Project Reality + Battlefield 2 on Steam

Thanks Guys Worked Perfectly. +1.

UK FTW!
Xitude is offline
Old 01-30-2010, 12:08 AM   #73
Deep_pain
Default Re: Project Reality + Battlefield 2 on Steam

Quote:
Originally Posted by Jeff View Post
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.
http://www.realitymod.com/forum/f27-...en-2048-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.
Deep_pain is offline
Old 02-03-2010, 04:32 AM   #74
shifty66
Supporting Member

shifty66's Avatar
Default Re: Project Reality + Battlefield 2 on Steam

Quote:
Originally Posted by VBNight View Post
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:
; 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?


To view links or images in signatures your post count must be 1 or greater. You currently have 0 posts.
" border="0" />
*14 sigs made for PR members Ingame name:supermannen6 Not making sigs anymore. Army life does not permit it! hah
shifty66 is offline
Old 02-03-2010, 07:46 PM   #75
mo0nbuggy1
Banned
Default Re: Project Reality + Battlefield 2 on Steam

Oh I member when this kept on happening to me. Darkest days of my life!
mo0nbuggy1 is offline
Old 02-03-2010, 08:01 PM   #76
[R-CON]Snares
PR:BF2 Contributor

[R-CON]Snares's Avatar
Default Re: Project Reality + Battlefield 2 on Steam

Won't have to do any of this with 0.9, since PR will support Steam installs.
[R-CON]Snares is offline
Closed Thread


Tags
battlefield, project, reality, steam
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 06:08 PM.


Powered by: vBulletin. ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO.
All Content Copyright ©2004 - 2012, Project Reality.