---------------------------------------------------------------------- Freeciv Rulesets ---------------------------------------------------------------------- (Originally by David Pfitzner, dwp@mso.anu.edu.au) Quickstart: ----------- Rulesets allow modifiable sets of data for units, advances, terrain, improvements, wonders, nations, cities, governments and miscellaneous game rules, without requiring recompilation, in a way which is consistent across a network and through savegames. (In the future there could be other categories of rulesets.) - To play Freeciv normally: don't do anything special; the new features all have defaults which give the standard Freeciv behaviour. - To play a game with rules more like Civ1, start the server with: ./ser -r data/civ1.serv (and any other command-line arguments you normally use; depending on how you have Freeciv installed you may have to give the installed data directory path instead of "data"). Start the client normally. The client must be network-compatible (usually meaning the same or similar version) but otherwise nothing special is needed. (However some third-party rulesets may potentially require special graphics to work properly, in which case the client should have those graphics available and be started with an appropriate '--tiles' argument.) As well as a Civ1 style as above, Freeciv now has a Civ2 style similary, although currently it is almost identical to standard Freeciv rules. Note that the Freeciv AI might not play as well with rules other than standard Freeciv. (See notes below.) The rest of this file contains: - More detailed information on creating and using custom/mixed rulesets. - Information on implementation, and notes for further development. ---------------------------------------------------------------------- Using and modifying rulesets: ----------------------------- Rulesets are specified using new server options. The command above of "./ser -r data/civ1.serv" just reads a file which sets these options (as well as a few of the standard server options). The new server options are: techs, governments, units, buildings, terrain, nations, cities, game. They are special server options in that they take string values, but otherwise the behave like normal server options. Eg, try the server command "explain techs". For each of these options, the value of the option specifies a subdirectory of the Freeciv data directory, containing a file name techs.ruleset, units.ruleset, buildings.ruleset, etc. Eg, the commands: set techs default set governments default set units civ1 set buildings custom set terrain civ2 set nations default set cities default set game custom would specify the files: data/default/techs.ruleset data/default/governments.ruleset data/civ1/units.ruleset data/custom/buildings.ruleset data/civ2/terrain.ruleset data/default/nations.ruleset data/default/cities.ruleset data/custom/game.ruleset (This is just an example, and may not give very sensible rules; the directory data/custom and the file data/custom/buildings.ruleset do not exist in standard Freeciv.) The ruleset files in the data directory are user-editable, so you can modify them to create modified or custom rulesets (without having to recompile Freeciv). It is suggested that you _don't_ edit the existing files in the "default", "classic", "civ1" and "civ2" directories, but rather copy them to another directory and edit the copies. This is so that its clear when you are using modified rules and not the standard ones. The format used in the ruleset files should be fairly self-explanatory. A few points: - The files are not all independent, since eg, units depend on advances specified in the techs file. - Wonders and city improvements have a new field, "variant". This allows limited changes to the effects of specific wonders and improvements, where such changes have been implemented. See the "TODO Variants" section below for which variant effects which have been implemented so far. - Units have a new field, "roles", which is like "flags", but determines which units are used in various circumstances of the game (rather than intrinsic properties of the unit). See comments in common/unit.h - The [units_adjust] section of the units file deserves some explanation. It contains the entry firepower_factor. The value of firepower_factor is used when combat is resolved: All combat firepower values are multiplied by firepower_factor, which means that the effective hitpoints of any unit is really (hitpoints/firepower_factor). Actually, it is these effective hitpoints which are report to the client for all hitpoint values. (This complicated setup is so that the AI calculations don't blow up when using Civ1 rulesets.) - The cities section of the nations ruleset files deserves some explanation. At first glance, it simply contains a comma- separated list of quoted city names. However, this list can also be used to label cities by their preferred terrain type. Cities can be labeled as matching or not matching a particular type of terrain, which will make them more (or less) likely to show up as the "default" name. The exact format of the list entry is " (