home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 September / PCWELT_9_2006.ISO / pcwsoft / Freeciv-2.0.8-win32-gtk2-setup.exe / doc / README.rulesets < prev    next >
Encoding:
Text File  |  2005-10-13  |  6.8 KB  |  180 lines

  1. ----------------------------------------------------------------------
  2.                        Freeciv Rulesets
  3. ----------------------------------------------------------------------
  4.           (Originally by David Pfitzner, dwp@mso.anu.edu.au)
  5.  
  6. Quickstart:
  7. -----------
  8.  Rulesets allow modifiable sets of data for units, advances, terrain,
  9.  improvements, wonders, nations, cities, governments and miscellaneous
  10.  game rules, without requiring recompilation, in a way which is
  11.  consistent across a network and through savegames.
  12.  
  13. - To play Freeciv normally: don't do anything special; the new
  14.   features all have defaults which give the standard Freeciv 
  15.   behaviour.
  16.  
  17. - To play a game with rules more like Civ1, start the server with:
  18.        ./ser -r data/civ1.serv
  19.   (and any other command-line arguments you normally use; depending on
  20.   how you have Freeciv installed you may have to give the installed
  21.   data directory path instead of "data").  
  22.  
  23.   Start the client normally.  The client must be network-compatible
  24.   (usually meaning the same or similar version) but otherwise nothing
  25.   special is needed.  (However some third-party rulesets may
  26.   potentially require special graphics to work properly, in which case
  27.   the client should have those graphics available and be started with
  28.   an appropriate '--tiles' argument.)
  29.  
  30.   As well as a Civ1 style as above, Freeciv now has a Civ2 style
  31.   similary, although currently it is almost identical to standard
  32.   Freeciv rules.
  33.  
  34.   Note that the Freeciv AI might not play as well with rules other
  35.   than standard Freeciv.  The AI is supposed to understand and 
  36.   utilize all sane rules variations, so please report any AI 
  37.   failures so that they can be fixed.
  38.  
  39. The rest of this file contains:
  40.  
  41. - More detailed information on creating and using custom/mixed 
  42.   rulesets.
  43.  
  44. - Information on implementation, and notes for further development.
  45.  
  46. ----------------------------------------------------------------------
  47. Using and modifying rulesets:
  48. -----------------------------
  49.  
  50. Rulesets are specified using the server command "rulesetdir".  The 
  51. command above of "./ser -r data/civ1.serv" just reads a file which 
  52. uses this command (as well as a few of the standard server options).  
  53. The server command specifies in which directory the ruleset files
  54. are to be found.
  55.  
  56. The ruleset files in the data directory are user-editable, so you can
  57. modify them to create modified or custom rulesets (without having to
  58. recompile Freeciv).  It is suggested that you _don't_ edit the 
  59. existing files in the "default", "classic", "civ1" and "civ2"
  60. directories, but rather copy them to another directory and edit the
  61. copies.  This is so that its clear when you are using modified rules
  62. and not the standard ones.
  63.  
  64. The format used in the ruleset files should be fairly 
  65. self-explanatory.  A few points:
  66.  
  67. - The files are not all independent, since eg, units depend on
  68.   advances specified in the techs file.
  69.  
  70. - Units have a field, "roles", which is like "flags", but 
  71.   determines which units are used in various circumstances of the
  72.   game (rather than intrinsic properties of the unit).
  73.   See comments in common/unit.h
  74.  
  75. - The cities section of the nations ruleset files deserves some
  76.   explanation.  At first glance, it simply contains a comma-
  77.   separated list of quoted city names.  However, this list can
  78.   also be used to label cities by their preferred terrain type.
  79.   Cities can be labeled as matching or not matching a particular
  80.   type of terrain, which will make them more (or less) likely to
  81.   show up as the "default" name.  The exact format of the list
  82.   entry is
  83.  
  84.     "<cityname> (<label>, <label>, ...)"
  85.  
  86.   where the cityname is just the name for the city (note that it
  87.   may not contain quotes or parenthesis), and each "label" matches
  88.   (case-insensitive) a terrain type for the city (or "river"), with a
  89.   preceeding ! to negate it.  The terrain list is optional, of course,
  90.   so the entry can just contain the cityname if desired.  A city name
  91.   labeled as matching a terrain type will match a particular map
  92.   location if that map location is on or adjacent to a tile of the named
  93.   terrain type; in the case of the "river" label (which is a special
  94.   case) only the map location itself is considered.  A complex example:
  95.  
  96.     "Wilmington (ocean, river, swamp, forest, !hills, !mountains, !desert)"
  97.  
  98.   will cause the city of Wilmington to match ocean, river, swamp, and
  99.   forest tiles while rejecting hills, mountains, and deserts.  Although
  100.   this degree of detail is probably unnecessary to achieve the desired
  101.   effect, the system is designed to degrade smoothly so it should work
  102.   just fine.
  103.  
  104.   (A note on scale: it might be tempting to label London as !ocean, i.e.
  105.   not adjacent to an ocean.  However, on a reasonably-sized FreeCiv world
  106.   map, London will be adjacent to the ocean; labeling it !ocean will tend
  107.   to give bad results.  This is a limitation of the system, and should be
  108.   taken into account when labelling cities.)
  109.  
  110.   Also note that a city earlier in the list has a higher chance of being
  111.   chosen than later cities.
  112.  
  113. Properties of units and advances are now fairly well generalised.
  114. Properties of buildings are still rather inflexible.
  115.  
  116. ----------------------------------------------------------------------
  117. Restrictions and Limitations:
  118. -----------------------------
  119.  
  120. units.ruleset:
  121.  
  122.   Restrictions:
  123.  
  124.     - At least one unit with role "FirstBuild" must be available
  125.       from the start (i.e., tech_req = "None").
  126.  
  127.     - There must be units for these roles:
  128.       - "Explorer"
  129.       - "FerryBoat"
  130.       - "Hut"
  131.       - "Barbarian"
  132.       - "BarbarianLeader"
  133.       - "BarbarianBuild"
  134.       - "BarbarianBoat"  (move_type must be "Sea")
  135.       - "BarbarianSea"
  136.  
  137.     - There must be at least one unit with flag "Cities".
  138.  
  139.   Limitations:
  140.  
  141.     - These unit flag combinations won't work:
  142.       - "Diplomat" and "Caravan"
  143.  
  144.     - These flags and roles work only for move_type "Land" units:
  145.       - "Diplomat"
  146.       - "Partisan"
  147.       - "Paratroopers"
  148.       - "Settler"
  149.       - "IgTer"
  150.       - "Marines"
  151.       - "Airbase"
  152.       - "Barbarian"
  153.       - "BarbarianTech"
  154.  
  155.     - Flag "Cities" does not work for move_type "Air" or "Heli" units
  156.  
  157. nations.ruleset:
  158.  
  159.   Unused entries:
  160.  
  161.     - tech_goals
  162.     - wonder
  163.     - government
  164.  
  165. ----------------------------------------------------------------------
  166. Implementation details:
  167. -----------------------
  168.  
  169. This section and following section will be mainly of interested to
  170. developers who are familiar with the Freeciv source code.
  171.  
  172. Rulesets are mainly implemented in the server.  The server reads the
  173. files, and then sends information to the clients.  Mostly rulesets 
  174. are used to fill in the basic data tables on units etc, but in some
  175. cases some extra information is required.
  176.  
  177. For units and advances, all information regarding each unit or advance
  178. is now captured in the data tables, and these are now "fully
  179. customizable", with the old enumeration types completely removed.
  180.