The solution to the 800x600 bug...


(Mael) #1

Background

Every time you restart ET it defaults back to 800x600 no matter what you have in your autoexec.cfg

It’s not a shrub bug, read Lekdevil.NL’s explanation of the problem;

It’s not a Shrub bug, but a flaw in the way the ET deals with mods and with crash detection.

Last things first. Whenever you start ET, it creates a file called “profile.pid” in the homedir\etmain\profiles\profilename (e.g. “D:\Games\ETfull.2.55a\etmain\profiles\Lekdevil.NL”). If you exit ET, this file gets deleted again.

If you start ET, and it detects that “profile.pid” is already present, the program assumes that it has crashed on the previous run and resets all cvars that are marked as “unsafe” in etconfig.cfg to their default values.

Sounds pretty straightforward so far, doesn’t it?

Things get ugly when you connect to a server running a mod (any mod, not just shrub). As in all games based on the Q3A code, the client creates a separate directory for each mod name used on the server it connects to, as in homedir\modname (e.g. “D:\Games\ETfull.2.55a\shrubet”). In this directory, a new “profiles\profilename” subdirectory gets created, in which a new etconfig.cfg file gets stored. A new “profile.pid” file also gets created in there.

Now here’s the problem. Whenever you exit ET after playing on a server running a mod, only the profile.pid file in the mod directory gets deleted, and not the one in the “etmain…” directory. Hence, when you start ET again, it thinks is crashed previously and resets the cvars.

Solution: write a batch script that deletes the profile.pid file and then runs the ET program. Use that script to start ET.

The Solution

  1. Put the etstart.bat batch file in C:\Program Files\Wolfenstein - Enemy Territory. Make sure to change the profile name.

del etmain\profiles\TLMael\profile.pid
del shrubet\profiles\TLMael\profile.pid

et.exe %*

  1. Point the shortcut on your desktop to etstart.bat instead of et.exe.

  2. If you are using ASE edit the configuration of your browser so that it runs that batch file when an ET game is started. In ASE it can be found under View->Options->Games->Wolfenstein: Enemy Territory->Program Location.

Pretty cool eh?

Thank you Lekdevil.NL for the solution!!!


(SCDS_reyalP) #2


I use a different solution though… My video card is so crappy I always run at 800x600 anyway :clap:


(weasel) #3

And for those running in linux, open /usr/local/games/enemy-territory/et in a text editor and right before the line that says ‘/.et.x86 $’, add in 'rm ~/.etwolf//profiles/*/profile.pid’. That will delete all the profile.pid files in all the mod directories for all profiles.

On a semi-related note, I noticed that the profile.pid file seems to be empty. Isn’t the purpose of a .pid file normally to keep track of the PID of the process that spawned it?


(Lekdevil.NL) #4

Ehhh, you’re welcome y’all. :slight_smile:

Anyhow, yes, a .pid file usually contains a process ID. However, in this particular case it’s just an empty file, used to detect a crash during the previous session.

Also, I don’t think removing the “unsafe” keywords from the config file will work: ET will put those right back when exiting the program.


(IPvD) #5

Excellent, this worked for me :moo:


XS400


(skinner) #6

woooo thanks


(Lt. Jones) #7

Thanks! :clap:


(_NeT_WalBanger) #8

OMG is there chance of writing that in ENGLISH plz

AS:-
A) I have no idea what you just said
B) How to make a batch file etc


(Sauron|EFG) #9

It can’t be described in a simpler way. :eek:

Use notepad. Create batch file. Follow instructions. Search Windows Help. Drink beer. :drink:


(LKS_FreeMan) #10

Thank you Lekdevil.NL and Mael! I’ve been having this problem for far too long and it has finally been solved.
:drink: :drink: :drink:


(DrDeemer) #11

Um … lil help… English I BEG YOU!

how do you make the .bat file?

step by step?

this 800x600 thing is getting old.


(Majin) #12

If you are running windows:

  1. Open notepad.

  2. Paste the following:

del etmain\profiles\YOURPROFILE\profile.pid
del shrubet\profiles\YOURPROFILE\profile.pid
et.exe %*

  1. change YOURPROFILE to whatever you named your profile. If you don’t remember what it is, open ET, click profiles, and see what it says.

  2. click file -> save as -> write “et.bat” in the file name spot -> select “all files” under “save as type” -> select your enemy territory folder -> hit save

  3. Open your start menu, find the shortcut to ET. Right click -> properties
    Change the very end of the “target” field to et.bat, instead of et.exe; but leave the rest of the words there (such as c:/program files/enemy territory or something)


(Whatever) #13

thanks for the tip guys - very helpful - but I have one question.

I want my batch file to also start the etmin.exe file, but when I add that line the batch file just stalls immediatly after it tries to run etmin (although etmin does launch). I don’t really know what I’m doing, so any help is appreciated. Thanks.


(Majin) #14

del etmain\profiles\PROFILE\profile.pid
del shrubet\profiles\PROFILE\profile.pid
start et.exe %*
start etmin.exe %*

That will open both.

edit:

etmin.exe will need to be in your enemy territory folder


([DP]CEO) #15

If you use pathfinder like i do, and you are ok with regedit, i have found a way to make that work also.
fire up regedit, START,RUN,REGEDIT. browse to…
HKEY_CURRENT_USER\Software\Pathfinder Enemy Territory
browse to abET, about 3-4 down, with this key, or somthing similar…
C:\Program Files\Wolfenstein - Enemy Territory\ET.exe, change that to…
C:\Program Files\Wolfenstein - Enemy Territory\etstart.bat


(Whatever) #16

Thanks Majin… worked like a charm.


(DrDeemer) #17

Excellent instructions! Thank you! Worked like a charm


(Majin) #18

:banana: :banana: :banana:


(Genocide) #19

Did u get this sorted m8 if not buzz me and I will do it for you :stuck_out_tongue:

([G-TAP] Genocide)

ps. how can u not know what a batch file is :wink:


(FstFngrz) #20

someone made a program ta do it.

I have not tried it or know how it works, but its just came out over at www.rtcwfiles.com

Enemy Territory Loader (v1.0)
http://www.rtcwfiles.com/file.info?ID=19619
Description:
3) Purpose


Upon loading et.exe, the game tries to check if it has crashed in the previous run, the way it does so is flawed…
It creates a file profile.pid upon your first run of et.exe and deletes the file when you close. Every subsequent run will
search for the file, if it has found, the game determines that it has crashed and resets some settings (such as resolution)
to their defaults, this program simply deletes all the different profile.pid files (one in each mod directory, basically).
and runs the game for you.