What it does | |||||||||
PHost 3.3c and later can limit the number of minefields each player is allowed to have. This is to counteract the problem that players lay thousands of junk minefields just to prevent their enemies from laying. mfq can make the minefield limits dynamic. It can also delete minefields which are over the limit. mfq can also keep the actual limits secret, so players won't see them. The "dynamic limits" and "deleting minefields" parts can also be used alone. Using only the dynamic limits probably also provides an interesting playground, and using only the minefield deletion part may be beneficial to those who wish to manually configure the minefield limits in pconfig.src. | |||||||||
Installation | |||||||||
You need a PDK version of after 19/Aug/2001, and PHost 3.3c. Edit the mfq Makefile and set the paths/compiler names correctly. Compile it using GNU make. With gcc, this program compiles without warnings. | |||||||||
Configuration | |||||||||
The configuration file should be pretty self-explaining. mfq looks for its configuration in the game directory, in a file mfq.cfg or, if that can't be found, in pconfig.src, section mfq. Putting the configuration in pconfig.src has the advantage that players can request it using the send config command. mfq must be run in auxhost1. If you enabled the UnmodifyMinefieldQuotas config option, you must run it again in auxhost2, this time with the -2 option (i.e. mfq -2 GAMEDIR). You can also add the mfq -2 call to auxhost2.ini if you do not need to, it's then simply ignored. It should also be possible to wrap the mfq calls around the mine laying phase using pcontrol, but that's a bit more complicated. When mfq is only used to delete minefields, it will ignore all score-related options and use the minefield quota setting from pconfig.src (MaximumMinefieldsPerPlayer option). mfq does not create logfiles. However, any operating system worth its salt can redirect output, so you can do something like `mfq >mfq.log' or `mfq >>host.log'. | |||||||||
Player Interaction | |||||||||
If the AllowPlayerOverrides config option is enabled, players can tell the add-on which minefields are important to them. The deletion routine will respect that. Of course, this interaction only makes sense when DeleteExcessMinefields is enabled. To talk to the add-on, players have to send in a file `mfqX.txt' with their turn. This is a text file containing various commands. There must be one command per line, whitespace and blank lines are ignored, comments can be added to the file using the `;' character and range from the `;' to the end of the line.
Commands can also be submitted using the PHost command processor. This does not require setting up autohosts to accept mfqX.txt files, but it is less convenient for players because at the time of this writing, there was not a player-side tool known to me that automates sending of messages again and again. To send a command using the command processor, write a message to yourself containing `xtern command', for example `x keep #9' (the word xtern can be abbreviated, the mfq commands can not). If a player does not submit commands, or the AllowPlayerOverrides option is disabled, the smallest minefields are deleted first. | |||||||||
Options | |||||||||
mfq understands the following command-line options:
| |||||||||
Author | |||||||||
Stefan Reuther, design with Thomas Klebes. Share and enjoy under the conditions of the GNU GPL v2. |