.CFG Files: Difference between revisions

From Jedi Knight Wiki | JKHub
Line 25: Line 25:
* 'default.cfg' and 'mpdefault.cfg' are used in [[JKA]] to set the [[bind|binds]] for the game.
* 'default.cfg' and 'mpdefault.cfg' are used in [[JKA]] to set the [[bind|binds]] for the game.
* In JKA, 'JASP.cfg' and 'JAMP.cfg' are created when the respective game is played, and they store the session's information there.
* In JKA, 'JASP.cfg' and 'JAMP.cfg' are created when the respective game is played, and they store the session's information there.
* The player can use [[Cvars|seta]] to modify cvars. This makes the modification saved to any written .cfg files.
* The player can use [[Cvar|seta]] to modify cvars. This makes the modification saved to any written .cfg files.


== Related Commands ==
== Related Commands ==

Revision as of 18:49, 24 February 2013

A CFG, or configuration file, is a .cfg document that allows the player to group a list of commands, or change numerous cvars simultaneously.

Format

Generically, a .cfg file is a regular text file, renamed to have the extension ".cfg", however, this is not required. The text file is then modified and filled with content, like so

[insert any commands/cvars]
[on a new line, add the next command/cvar modification]

The finished .cfg file can then be placed in .pk3 file, or the base folder.

Execution

In order to execute a configuration file, type the following into the console:

exec [cfg name (no '.cfg' is required]

However, if you decided to create a configuration with another extensions, like .txt, then you must include the '.txt' in the cfg name.

Special Configuration Files

  • A configuration file titled 'autoexec.cfg' is automatically executed on game start.
  • 'default.cfg' and 'mpdefault.cfg' are used in JKA to set the binds for the game.
  • In JKA, 'JASP.cfg' and 'JAMP.cfg' are created when the respective game is played, and they store the session's information there.
  • The player can use seta to modify cvars. This makes the modification saved to any written .cfg files.

Related Commands

  • The write command writes a .cfg file
  • The exec command (mentioned above) executes a desired .cfg file