Author Topic: How does Quake2 handle the client configuration files?  (Read 1827 times)

Offline QwazyWabbit

  • Carpal Tunnel Member
  • ******
  • Posts: 1241
    • View Profile
  • Rated:
How does Quake2 handle the client configuration files?
« on: December 04, 2017, 03:47:47 PM »
How does Quake2 handle the client configuration files?

There are three files Quake II uses on startup of the client
and on shutdown, they are:

default.cfg, config.cfg, autoexec.cfg

Quake II creates it's own "virtual file system" on startup and
once it's initialized it tries to execute each of these from
within the "current directory". These files are loaded in the
order listed above so anything you write into them overrides
any equivalent setting in the previous file. This virtual
file system is a security feature of the game to prevent
malicious directory traversal attacks and it also includes
the pak files shipped with the game or included with any
mods. This allows mod authors to pak configuration files
into their mods and conveniently ship them with their mod's
custom files.

The Quake II file system is rooted in the Quake2 directory
where the Quake II executable is installed. The maximum path
that Quake II can handle is 64 characters, so you don't want
to use long directory names or long file names and you shouldn't
go very deep. This 64 character limit is hard coded into the game.

How to manage your configuration files.

The original default.cfg is used by the engine when selecting
the "reset defaults" menu item in the Options menu of the game
console. This file may or may not exist on your system as a
"normal" disk file but the default.cfg is defined in pak0.pak
of the original game from idSoftware. Never alter this file.
WARNING: altering idSoftware's pak0.pak should not be attempted.
You can make your game inoperable or incompatible.

NEVER EDIT config.cfg. Why? Because the game writes a new one
each and every time you quit the client. It's used to save the
last state of your binds. Likewise, never make it read-only.
This file is normally located in C:\quake2\baseq2\. You can
copy-paste anything from this file into your autoexec.cfg file
and it makes a handy starting point for your customizations.
One technique you can use is to launch the game, alter the settings
or add binds, then exit the client which forces your current
settings and binds to be written to config.cfg, then copy the
contents into autoexec.cfg and begin your hand edits. This file
is written to the current mod folder when you quit the game from
within a mod, this can be a multiplayer or single player mod.

The autoexec.cfg file is what you or the mod authors want it to
be. THIS is the file you should edit for your default binds and
for your mod-specific binds or parameter settings. There can be
a unique autoexec.cfg file in every mod folder and even in baseq2.

This file is ALWAYS loaded from the current folder for the client
binary you have launched. If you launched the game directly from a
shortcut or from the executable in c:\quake2\ for example, then the
autoexec.cfg will come from c:\quake2\ and not from any subdirectory.

If you launch your game from a game launcher with a target Quake2
server then the configuration files are loaded from the current
mod folder given by the gamedir cvar specified by the server.
Once you are in-game on a modded server the autoexec.cfg and
the config.cfg will be read from and written into the mod folder
for that particular mod.

Enhanced Quake II Clients

R1Q2 and Q2Pro clients also load "postinit.cfg" after loading
autoexec.cfg.

Q2E clients use q2econfig.cfg instead of config.cfg, preserving
the old quake2 configuration file for backward compatibility.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

 

El Box de Shoutamente

Last 10 Shouts:

 

quadz

September 15, 2019, 01:18:02 PM
fun retrospective (nightmare)

https://www.youtube.com/watch?v=whizTpYtWxA

Uberphawx

September 15, 2019, 05:33:58 AM
Yeah, prophylactics are always an option, specially when you are doing it with something you think it has something "stormy" inside...
Stay safe folks...
 

ImperiusDamian

September 14, 2019, 02:09:14 PM
Well, obviously one has to use protection when fucking any kind of tropical weather system.
 

|iR|Focalor

September 14, 2019, 09:56:57 AM
If a hurricane blows your house down, call STD Contractors.

Uberphawx

September 14, 2019, 04:29:27 AM
You should use a condom first...
If it has hepatitis or gonorrhea or some kind of tropical STD then you may want to be safe first...
 

ImperiusDamian

September 13, 2019, 05:08:30 PM
fuck hurricanes up the ass. >:(

Uberphawx

September 13, 2019, 10:39:21 AM

https://www.youtube.com/watch?v=SgF42jlEEIs
Best video in the internet...
Don't pay attention to the title and take a listen..

RyU

September 12, 2019, 02:34:48 AM
pm me

playboy

September 11, 2019, 06:44:00 PM
mr. eastcoast up in this bitch

Unh0ly-rwz-

September 11, 2019, 04:30:46 PM
UPDATE! EVERYTHING WORKS NOW CLICK VVVV DOWN? THERE FOR LINK

http://forum.tastyspleen.net/quake/index.php?topic=22977.msg225448;topicseen#new

Show 50 latest
Welcome, Guest. Please login or register.
September 19, 2019, 09:48:45 AM

Login with username, password and session length