dopewars configuration files

A dopewars server, or a client (in single-player mode) can be heavily configured by the means of dopewars configuration files. Clients used to connect to multiplayer servers can also be configured by the same means, but almost all of these settings will be overridden on connecting to the server (although the server location settings Port and Server are still useful).

The order of making dopewars settings is as follows:-

  1. The global configuration file (if present) /etc/dopewars
  2. The user-specific file (if present) ~/.dopewars
  3. Options specified on the command line
Each setting in a dopewars configuration file should be on a line by itself; comments may be added if the first character in the line is a hash (#). An example configuration file is shown here.

Valid configuration file settings are listed below. The examples given reproduce the default behaviour; obviously you are free to replace the parts in italics to customise your own server and client.

General configuration: file and server locations

Port=7902
Tells the dopewars client to look for a server on port 7902, and tells the dopewars server to bind to port 7902 and wait for connections. This can be overridden with the -p command line option.
Server=localhost
Tells the dopewars client to look for a server at the address localhost. Dotted quad (e.g. 127.0.0.1) addresses may also be used here. If this variable is set to one of the three "special" names (MetaServer), (Prompt), or (Single) (including the brackets) then the client will not connect to a server but instead list the servers available at the metaserver, prompt the user to enter a server name and port, or play in single player mode, respectively. This option can be overridden with the -o command line option (but be sure to protect the brackets from the shell if you use one of the "special" names).
HiScoreFile=/var/lib/dopewars.sco
Tells the dopewars server (or the client, if running in single-player mode, not connected to a server) to use the file /var/lib/dopewars.sco to store high scores. This can be overridden with the -f command line option.
Pager=more
Sets the pager used to display multi-page output in an interactive server to more. ("less" is a popular alternative)
ConfigVerbose=0
Prints extra feedback information when processing the config. file if set to 1; this only takes affect, of course, after the ConfigVerbose variable is set, and then remains in force until it is reset again.

Metaserver configuration

MetaServer.Active=1
Tells the dopewars server to report its status to the metaserver on startup and shutdown. If 1 is replaced by 0 (zero) the server will not report to the metaserver. This setting, if set to 1, can be overridden by the -S command line option.
MetaServer.Name=bellatrix.pcl.ox.ac.uk
Tells dopewars that the metaserver is located at bellatrix.pcl.ox.ac.uk. See the metaserver page for information about connecting to the dopewars metaserver via. a proxy web server.
MetaServer.Port=80
Instructs dopewars that the metaserver can be found on port 80. This is the standard HTTP port for Web access, but you may need to change this if you are connecting via. a proxy web server.
MetaServer.Path=/~ben/cgi-bin/server.pl
Tells dopewars that the CGI script on the metaserver, for server registration (server mode) or listing the available servers (client mode) is /~ben/cgi-bin/server.pl.
MetaServer.Comment=dopewars server
Sets the comment for your server, which appears on the list of servers maintained by the metaserver, to dopewars server.
MetaServer.LocalName=dope-serv.com
Tells the metaserver that the preferred hostname of your dopewars server machine is dope-serv.com. By default, the metaserver tries to ascertain your domain name from the connection, and this can fail if you connect via. a proxy server, or if DNS does not properly translate your IP address to your domain name. You must also set MetaServer.Password to the password given to you by the metaserver maintainer for this to work. See the metaserver page for more details.
MetaServer.Password=auth
Uses the password auth to authenticate your dopewars server's hostname (see MetaServer.LocalName above) with the metaserver.

Basic configuration: places in the game

NumLocation=8
Sets the number of locations in the game to 8. Note that if too many locations are specified, the client may not be able to display them all!
Location[4].Name=Manhattan
Sets the name of the 4th location in the game to Manhattan. The index within the square brackets can range from 1 to whatever NumLocation is set to above, or an error will be reported.
Location[4].PolicePresence=90
Sets the police presence in the 4th location to 90%. In theory this affects how likely it is for the police to catch players at each location; in practice, it has no effect (code not written yet - sorry!).
Location[4].MinDrug=4
Sets the minimum possible number of different drugs that will be on sale to players in location number 4 to 4.
Location[4].MaxDrug=10
Sets the maximum possible number of different drugs that will be on sale to players in location number 4 to 10. Don't be silly and try to set this to more than the number of actual drugs.
LoanShark=1
Makes the loan shark pop up when players visit location number 1. To stop the loan shark from appearing at all (making it rather difficult to pay off debts) set this number to something which is not a valid location, such as 0 (zero).
Bank=1
Makes the bank appear when a player visits location 1 (the Bronx).
GunShop=2
Players can visit "Dan's House of Guns" in location number 2 (the Ghetto).
RoughPub=2
Players can visit the rough pub to hire bitches in location number 2.

Basic configuration: drug prices

NumDrug=12
Sets there to be 12 different types of drug in the game.
Drug[6].Name=MDA
Sets the name of the 6th drug to be MDA.
Drug[6].MinPrice=1500
Sets the usual minimum price of the 6th drug (in the absence of "special events" such as drug busts) to be $1,500.
Drug[6].MaxPrice=4400
Sets the usual maximum price of drug number 6 to be $4,400.
Drug[1].Cheap=1
Tells dopewars that drug 1 (by default, Acid) can occasionally be especially cheap (if this is set to 0, zero, this does not happen).
Drug[1].CheapStr=The market is flooded with cheap home-made acid!
Sets the message to display to alert players that drug number 1 is especially cheap.
Drugs.CheapDivide=4
Tells dopewars that whenever a drug is "specially" cheap, divide the normal price distribution (between Drug[x].MinPrice and Drug[x].MaxPrice) by 4.
Drug[4].Expensive=1
Tells dopewars that drug 4 (normally Heroin) can occasionally be particuarly expensive (0, zero, cancels this).
Drugs.ExpensiveStr1=Cops made a big %s bust! Prices are outrageous!
Sets the string that is displayed when any drug is particularly expensive. This is a standard C-style format string - i.e. the %s is replaced by the name of the drug which is expensive. This string is displayed 50% of the time for expensive drugs.
Drugs.ExpensiveStr2=Addicts are buying %s at ridiculous prices!
Sets the string which is used for expensive drugs the other 50% of the time.
Drugs.ExpensiveMultiply=4
Tells dopewars that whenever a drug is "specially" expensive, multiply the normal price distribution (between Drug[x].MinPrice and Drug[x].MaxPrice) by 4.

Basic configuration: guns

NumGun=4
Configures the game to have 4 guns available to players at the gun shop.
Gun[3].Name=Ruger
Sets the name of the 3rd gun to Ruger.
Gun[3].Price=2900
Sets the price in the gun shop of the 3rd gun to $2,900. Guns offered "on the street" (i.e. by random events) will be priced at 10% of the value set here.
Gun[3].Space=4
Tells dopewars that gun number 3 uses 4 spaces in the inventory - i.e. carrying one of these guns uses the same spaces as 4 drugs.
Gun[3].Damage=4
Defines gun number 3 to do up to 4 points of damage - i.e. a successful hit with one of these guns decreases the target's health by up to 4 points.

Advanced configuration

NumTurns=31
Defines the game to end after 31 "days" or turns. If this is set to 0 (zero) the game never ends for a player, unless they quit or are killed.
Sanitized=0
If set to 1, this "sanitizes" the game by removing all drug references from the random events. To completely remove drug references, of course, you must also alter the drug names above.
DrugSortMethod=1
Tells the dopewars client how to sort the names of available drugs at each location for display. The default, 1, sorts them in alphabetical order by their names. The choices are as follows:-
FightTimeout=5
If a player in a firefight with another player fails to fire back within 5 seconds, lets his/her enemy have another shot. If this is set to 0 (zero) timeouts are disabled, and players may take as long as they like to fire back.
MaxClients=20
Prevents more than 20 clients from connecting to the server at any one time.
AITurnPause=5
Makes computer-controlled client players run from this machine (not necessarily AI players that connect to a server run on this machine) wait 5 seconds between moving from location to location - i.e. a turn takes at least 5 seconds.
StartCash=2000
Each player will start the game with $2,000 in cash.
StartDebt=5000
Each player will start the game with a debt to the loan shark of $5,000.
Cops.EscapeProb=70
Gives each player a 70% chance of escaping successfully from Officer Hardass or Bob on his own, if the player chooses to run
Cops.DeputyEscape=2
Decreases the probability of escaping from the cops by 2% per deputy accompanying a police officer.
Cops.HitProb=65
Sets the probability of a lone policer officer hitting you in a firefight to 65%.
Cops.DeputyHit=2
Increases the probability of the cops hitting you by 2% per deputy accompanying a police officer.
Cops.Damage=5
Sets the maximum damage done to a player in a firefight with the cops to 5 per cop.
Cops.Toughness=2
Sets the difficulty of killing a cop to 2. This works against the decreased difficulty provided by each extra gun a player has.
Cops.DropProb=30
Sets the probability that the cops will discover a player dropping drugs, and subsequently attack them, to 30%.
Names.Bitch=bitch
Sets the word used to describe a single "bitch" in the game. Bitch, gun and drug names are automatically capitalised where necessary by the dopewars code.
Names.Bitches=bitches
Sets the word used to describe two or more "bitches".
Names.Gun=gun
Sets the word used to describe a single "gun" (for example, it could be replaced by "knife").
Names.Guns=guns
Sets the word used to describe two or more "guns".
Names.Drug=drug
Sets the word used to describe a single "drug" (for example, it could be replaced by "candy bar" or something similarly innocuous).
Names.Drugs=drugs
Sets the word used to describe two or more "drugs".
Names.Month=12-
Sets the text which is displayed on the client's screen to the immediate left of the current turn (by default, a "turn" is a day, and so this part is the month, in displaying the date in MM-DD-YYYY format)
Names.Year=1984-
Sets the text displayed to the immediate right of the current turn (by default, the year).
Names.Officer=Hardass
Sets the name of the first police officer to attack each player to Hardass.
Names.ReserveOfficer=Bob
Sets the name of the police officer which attacks the players if they kill the first one to Bob.
Prices.Spy=20000
Sets the price to pay a bitch to spy on another player to be $20,000.
Prices.Tipoff=10000
Sets the price to pay a bitch to tip off the cops to another player to be $10,000.
Bitch.MinPrice=50000
Sets the minimum price for a bitch at the Rough Pub to be $50,000. Note that prices for bitches "on the street" (i.e. those that are offered by random events) are produced by dividing the normal bitch price distribution by 10.
Bitch.MaxPrice=150000
Sets the maximum price for a bitch to $150,000.

Last update: 14-01-2000