To install and use scripts from the Script & Config Library, you will have to copy the contents into a new text file, save the file with a
.cfg extension in your Game path, and then execute the script in the game.
Step One: Copy the contents into a new text fileEdit
Using a plain-text editor (like Notepad on Windows, TextEdit on Mac OS X, or check Editors for Scripts), create a new file. Copy the contents of the script you want to use into this blank text document. Line numbers will not be included when you copy and paste, and they are not necessary for the script to work.
Step Two: Save the file with a .cfg extensionEdit
Once you've copied the script, save the file with a
.cfg extension in your Game path. To find out where your game path is, check here. Make sure your editor doesn't add a
.txt extension, even if you type the filename as
<something>.cfg. It may still try to save as
<something>.cfg.txt. That won't be recognized by Urban Terror.
- Mac OS X (TextEdit and many other editors)
- Make sure you uncheck "Hide Extension" (if it's an option in the save dialog). That will add an invisible
.txtextension to your file.
- Windows (Notepad and many other editors)
- If you have trouble, see Save Without TXT Extension
Step Three: Execute the scriptEdit
To run the script just once (like if you want to try it out before you set it to run every time), start the game and open the Console by pushing tilde (~). Then enter…
<scriptname> is whatever you chose to name your script in step two. This will run the script once. If you restart the game, the script will be forgotten (though you can run it again in the future).
To make the script run every time you launch the game, you can edit (or create)
autoexec.cfg in your Game path.
- If you don't have an
autoexec.cfg, create another new, blank text file and save it as
autoexec.cfgin your Game path.
autoexec.cfg will be executed every time you launch. So, if you want your new script to be a permanent addition to your game, add a line to
autoexec.cfg that looks like this:
<scriptname> is whatever you chose to name your script in step two. This will run the contents of your script.