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:-
- The global configuration file (if present) /etc/dopewars
- The user-specific file (if present) ~/.dopewars
- Options specified on the command line
Settings in a configuration file can set numbers, strings or "string lists".
A numerical value is set with a command such as Port=7902 (which sets
the TCP port for mulitplayer connections to 7902).
String (text) values are set with commands such as BankName="the bank"
(which sets the name of the bank). Notice that string values must be
enclosed in quotes. Strings in double quotes understand escapes such as "\n";
strings in single quotes do not treat backslash characters specially.
A string list is used for setting an array of strings; for example
SubwaySaying = { "Saying 1", "Saying 2", "Saying 3" } sets up three
"subway sayings". A string list consists of a list of strings, separated by
commas and wrapped with braces - { and } characters. Single strings in a
string list can be replaced individually - for example
SubwaySaying[3]="Third Saying" replaces the third string (which was
previously "Saying 3"). The number of strings in the list
"List" can be set with the variable NumList - for example,
NumSubwaySaying=4 dimensions the SubwaySaying list to contain
four strings.
Whitespace and line breaks are ignored in the configuration files; comments
can be used, and extend from a '#' character to the end of the current line,
or are enclosed by C-style /* and */ symbols. See the
example configuration file for a demonstration.
Valid configuration file settings are listed below. The examples given
generally 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. 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.HttpPort=80
- Instructs the dopewars client that the metaserver can be found on TCP 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.UdpPort=7802
- Instructs the dopewars server that the metaserver can be found on UDP port
7802. The server utilises UDP as oppposed to the TCP connection used
by the client due to its much lower overhead.
- 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. A blank LocalName can also be used with a
suitable password to identify "your" server, even if its IP changes.
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.
- 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 the gun shop in location number 2 (the
Ghetto).
- RoughPub=2
- Players can visit the rough pub to hire bitches in location number
2.
- LoanSharkName="the Loan Shark"
- The loan shark is known by the name "the Loan Shark" during the game.
- BankName="the bank"
- The bank is known by the name "the bank" during the game.
- GunShopName="Dan's House of Guns"
- The gun shop is known by the name "Dan's House of Guns" during
the game.
- RoughPubName="the pub"
- The pub is known by the name "the pub" during the game.
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:-
- 1. Sort in forward alphabetical order by name
- 2. Sort in reverse alphabetical order by name
- 3. Sort in order of current price, cheapest first
- 4. Sort in order of current price, most expensive first
- 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.
- IdleTimeout=14400
- If a connected player in a game does nothing to interact with the
server for 14400 seconds, he/she will be automatically disconnected.
- ConnectTimeout=300
- If a player takes more than 300 seconds to complete the process
of connecting or disconnecting to the server, the server will sever the
connection.
- 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.
- SubwaySaying= { "First saying", "Second saying",
"Third saying" }
- Sets the list of things which the lady you sometimes meet on the subway
says to you; one of "First saying", "Second saying" and
"Third saying" will be displayed each time. Any previous sayings will
be erased. Note that individual sayings can be overwritten by appending an
array suffix to the variable name - for example, to replace
"Third saying" with "3rd saying" the following command would
suffice:-
SubwaySaying[3]="3rd saying"
- NumSubwaySaying=5
- Sets there to be 5 distinct things that the lady on the subway
says to you. If this number is greater than the old number of sayings, the
newly added sayings will be blank; if it is smaller, the sayings that are now
beyond the end of the list will be deleted.
- Playing= { "Song 1", "Song 2", "Song 3" }
- Sets the list of things which you can sometimes hear playing while
jetting; one of "Song 1", "Song 2" or "Song 3" will be
displayed. See the help for SubwaySaying for more details.
- NumPlaying=4
- Sets there to be 4 distinct things which you can sometimes hear
playing.
- StoppedTo= { "have a beer", "smoke a joint", "smoke a cigar",
"smoke a Djarum", "smoke a cigarette" }
- Sets the list of things which you sometimes stop to do while jetting;
see SubwaySaying for more details.
- NumStoppedTo=5
- Sets there to be 5 distinct things which you can stop to do.
Last update: 09-09-2000