logo Scripting for Enemy Territory

Menu


Home
Tutorials
Downloads
Forum
Contact

Friends





Basic tutorial 1

Creating a cfg file.

Before you start learning to script you have to know in what kind of a file you place your script. These files are known as config files or cfg files. Cfg stands for the extension of the file, e.g. weapons.cfg.

You do not need any expensive software to create these files. You can use a text editor like notepad, wordpad or notepad++. Most people use notepad, so I will also be using it in my examples in all the tutorials.

The tricky part is in the saving of the file. We will now create an empty cfg file called test.cfg. Open notepad and just, like you always would when saving a file, go to:
File --> Save as





Now there are 2 ways of saving this file correctly:
1. Change the file type to "All files" and set your file name to weapons.cfg, like you can see in the image below



2. Leave the filetype as "Text Documents (*.txt)" and set your file name as "weapons.cfg". It is important that you place your filename in between the " ", just like in the image below.



You now have an empty cfg file in which you can place a script. Of course you decide where you save the files. In the following thread we will discuss where to place the files, when you want to start using them.

Back to the tutorial list