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

Offline QwazyWabbit

  • Carpal Tunnel Member
  • ******
  • Posts: 1232
    • 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:

Sgt. Dick

May 21, 2019, 04:07:06 AM
Foc - where are you.
 

quadz

May 18, 2019, 10:21:55 PM
Thanks, yes, system crashed; unknown reason.

Hopefully everything is restarted now.
 

NIN-IceFox

May 18, 2019, 08:56:59 PM
Some servers seem down currently Quadz, don't know if it's just a hiccup that'll fix itself, maintenance or what, but just in case, I mention it.
 

NoBugsOnMe

May 13, 2019, 09:44:19 PM
pm gang rise up
 

quadz

May 10, 2019, 08:27:35 PM
It's always been that if you mymap and disconnect before the map goes live, it's deleted from the queue.

Occasinally, someone will stick around until their map loads, and THEN disconnect, which is not appreciated. (Currently the only recourse is a full mute, as there's no provision for blocking just mymap usage.)

At least these days, the chosen map has to be roughly compatible with the number of players active on the server. (No more mapping sewer64 on a 3-player server; etc.)

Punk_FAS

May 10, 2019, 08:22:02 AM
Any way to prevent people from trolling with mymap? By that I mean they join the server, mymap a map, then immediately discconnect, forcing whoever's playing to play a map that nobody there necessarily wanted to play in the first place. Maybe have it check to see if the player who issued the command
 

R. Hayabusa

May 07, 2019, 10:16:25 PM
it's tradition to play vanila and listen to something like this
https://www.youtube.com/watch?v=yOSsvue9DM0&t=243s

Punk_FAS

May 07, 2019, 07:44:28 PM
Seems like that did the trick, quadz. I'm sure everyone is happy to have their lower pings back :) Thanks!

0rbisson

May 06, 2019, 08:23:50 PM
Yes it appears to be normal. thanks
 

quadz

May 06, 2019, 01:44:21 PM
OK, they made a routing change that appears to have resolved the issue I was seeing here.

Everyone else's pings back to normal?

Show 50 latest
Welcome, Guest. Please login or register.
May 25, 2019, 10:21:57 PM

Login with username, password and session length