Configuring WC3 XP
Posted: Mon Jul 11, 2005 7:06 am
Some people find it odd how we do configuration for WC3 XP. This is to give a basic outline of how it works.
Instead of using CVARs, many of our options are done at what we refer to as "compile-time" .. This means they are hardwired. In some cases this gives a slight performance benefit. In other cases its simply the way we did things.
Configuration in WC3 is handle in two ways. The first is very basic. Included in the install (And listed on the download thread for the 2.7 beta) is a file called warcraft3.cfg
Inside this file is a lot of stuff. It can take a bit to read through because we tried to make sure the purpose of everything was clear. The first thing in the file is the usual header giving credit to the authors and all, and mentioning the GPL license code.
The next thing in the file is instructions on how to use the file.
The basic instructions above explain how the file works. All options in the file start out with a // in front of them. This "comments" them out so that when you compile they are ignored and defaults are used.
By removing the //, you override the defaults and can change the value of the option. Most options will have a 0 for off, or a 1 for on. Most should have their default value listed but this isn't always the case, make sure to read the description!
As the basic instructions say, one of the easiest things to do is turn on saved xp and make the server long term. See the below option, taken from warcraft3.cfg:
To activate long term mode, you need to disable short term. To do so, you remove the // in front, and make sure it is set to 0. See below:
The process is the same for every option in the file. Some more examples follow.
To turn on expanded races, remove the // in warcraft3.cfg for this:
To change how much XP is given when a player buys a Tome of Experience, remove the // and change the number on this line:
I mentioned at the start of the post that configuration is handled in two ways, and this was the basic method. The advanced method should only be done by people who have a basic idea of coding and know what they're doing. Inside the SMA file, which is the actual code for the plugin, there are configuration variables that control the price of items, and skills. These options are immediately after the #define section of the SMA, or you could do a find on "p_vamp" to jump to it.
Instead of using CVARs, many of our options are done at what we refer to as "compile-time" .. This means they are hardwired. In some cases this gives a slight performance benefit. In other cases its simply the way we did things.
Configuration in WC3 is handle in two ways. The first is very basic. Included in the install (And listed on the download thread for the 2.7 beta) is a file called warcraft3.cfg
Inside this file is a lot of stuff. It can take a bit to read through because we tried to make sure the purpose of everything was clear. The first thing in the file is the usual header giving credit to the authors and all, and mentioning the GPL license code.
The next thing in the file is instructions on how to use the file.
Code: Select all
/*
------------ Enter Warcraft 3 configuration area ------------------
#### IMPORTANT ####
If you change something here, you will have to recompile the plugin
Linux: ./amxxsc warcraft3.sma -o../plugins/warcraft3.amxx
Win: amxxsc warcraft3.sma -o../plugins/warcraft3.amxx
This file shows all possible configuration options with a brief description
of the option. Lines with a // in front of them are comments. If you want
to change an option simply remove the // in front of the #define. You do not
need to set all options, only the ones you want to change.
This makes upgrading to newer versions easier, and gives you a better overview
of which options you have changed. This also makes it possible to make a very
simple warcraft.cfg, if you for example only want long term with vault saving
and the rest of the options should stay default, a warcraft3.cfg file with the
following two lines would suffice.
#define SHORT_TERM 0
The file warcraft3.cfg MUST exist (the file can be empty though).
#### IMPORTANT ####
*/
By removing the //, you override the defaults and can change the value of the option. Most options will have a 0 for off, or a 1 for on. Most should have their default value listed but this isn't always the case, make sure to read the description!
As the basic instructions say, one of the easiest things to do is turn on saved xp and make the server long term. See the below option, taken from warcraft3.cfg:
Code: Select all
//#define SHORT_TERM 0 // Set this to 0 for long-term XP, and 1 for short-term XP.
Code: Select all
#define SHORT_TERM 0 // Set this to 0 for long-term XP, and 1 for short-term XP.
To turn on expanded races, remove the // in warcraft3.cfg for this:
Code: Select all
//#define EXPANDED_RACES 1 // This line controls what races are available. By default, only the
// original four races are available. By uncommenting this, you enable
// the expanded races (8 total).
Code: Select all
//#define TOME_XP_BONUS 20 // XP for buy a tome of experience.