Configuring WC3 XP

This is the place for general discussion about Warcraft3 XP, including install help.

Moderator: Forum Moderator

Locked
User avatar
ferret
Lead Warcraft 3 XP Developer
Posts: 422
Joined: Wed Jul 06, 2005 8:20 am
Location: Atlanta, GA
Contact:

Configuring WC3 XP

Post by ferret » 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.

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 ####

*/
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:

Code: Select all

//#define SHORT_TERM 0		// Set this to 0 for long-term XP, and 1 for short-term XP.
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:

Code: Select all

#define SHORT_TERM 0		// Set this to 0 for long-term XP, and 1 for short-term XP.
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:

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).
To change how much XP is given when a player buys a Tome of Experience, remove the // and change the number on this line:

Code: Select all

//#define TOME_XP_BONUS 20		// XP for buy a tome of experience.
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.
Last edited by ferret on Wed Jul 20, 2005 6:45 am, edited 2 times in total.
-< www.gamehavoc.com >-

Lazarus Long: And I know you didn't because the Server Files are version 2.2.6 and the file you posted is version 2.2.5, so do as I told you above and don't ever lie to me again or help is gone!

User avatar
ferret
Lead Warcraft 3 XP Developer
Posts: 422
Joined: Wed Jul 06, 2005 8:20 am
Location: Atlanta, GA
Contact:

Post by ferret » Mon Jul 11, 2005 7:24 am

Once you have made the changes you want to your CFG file, place it and the SMA file into your AMXMODX scripting folder.

From your server's main folder, this is usually:
<serverroot>/cstrike/addons/amxmodx/scripting/

You can compile plugins on your PC and then upload them to your server if necessary. To do so just download AMXX and install it to your desktop.

Open up a command line (In Windows, hit Start, Run, and type in "cmd")

Do a "cd" to your AMXX scripting folder, for example in windows:
cd server\cstrike\addons\amxmodx\scripting

Then type:
Linux: ./amxxpc warcraft3.sma -o../plugins/warcraft3.amxx
Win: amxxpc warcraft3.sma -o../plugins/warcraft3.amxx

Restart your server or change the map, and the new version of the plugin will be activated.
-< www.gamehavoc.com >-

Lazarus Long: And I know you didn't because the Server Files are version 2.2.6 and the file you posted is version 2.2.5, so do as I told you above and don't ever lie to me again or help is gone!

Locked