When mixer is not available, recommend SDL2_mixer instead of SDL1.2 mixer
[freeciv.git] / doc / README.nations
blobacce07ed41a5ce26c01f156b9e220ba2a4249acc
2 ===========================================================================
3 Freeciv Nation Rulesets and Flags
4 ===========================================================================
6 This file describes the contents of the nation files. This is intended as 
7 developer reference, and for people wanting to create/compile alternative 
8 nation files for Freeciv. A nation consists of a nation file in the 
9 rulesets and a flag in the tilesets. 
11 The contents of this file is based on this page from the Freeciv wiki:
12 http://www.freeciv.org/wiki/Nations
16 ----------------------------------------------------------------------
17 Local Nation files:
18 -------------------
20 Starting from freeciv-2.6, to most supplied rulesets nations can be
21 added locally without need to modify freeciv distribution files.
22 This section discuss the way there local override files work. Later
23 sections assume that nation is being added to main freeciv distribution,
24 even if only to locally modified copy.
26 Freeciv search data files from several directories in priority order.
27 Local nations overrides mechanism uses this to include files from
28 user data directory, ~/.freeciv/<freeciv version>/override/,
29 e.g., ~/.freeciv/2.6/override/
30 Freeciv distribution has empty versions of those files in a lower priority
31 directory. Once user adds the file, it gets used instead of the empty
32 one.
34 ~/.freeciv/<version>/override/nation.ruleset
35   Ruleset sections for nations that user wants to add. This can of course
36   use *include directives so that individual nations are in separate files.
37   See below sections for the format of the nation rulesets.
39 ~/.freeciv/<version>/override/flags.spec
40 ~/.freeciv/<version>/override/shields.spec
41 ~/.freeciv/<version>/override/flags-large.spec
42 ~/.freeciv/<version>/override/shields-large.spec
43   Spec files for flag graphics to add. See below sections for the format
44   of spec files and graphics files.
47 How to add a Nation:
48 --------------------
50 To add a nation of your own, you should look at the following files:
52 data/nation/<nationname>.ruleset
54   This is the new nation, which you will have to create. It may help to
55   copy one of the other nation files over and edit it. See below for a
56   style guide for nation files.
57   - The <nationname> bit is to be replaced with the nations name (duh).
58   Please don't use whitespaces and special characters. Underlines are
59   ok though.
60   - The name should be the same as the name of the nation inside the
61   ruleset file.
62   - The file must be encoded in UTF-8.
64 data/default/nations.ruleset
66   This lists all nation files. Add your nation
67   (data/nation/<nationname>.ruleset) to this list.
69 data/flags/*
71   This is the flags directory. You will have to add a flag-file
72   (see below) for your nation to work (see below).
74 data/scenario/*
76   You can add starting position for your nation on a scenario map.
78 Before a nation can be included in the main distribution, the following
79 files will also have to be edited. Unless you know what you're doing you
80 shouldn't need to worry about this.
82 data/nation/Makefile.am
84   Another list of nation files - add your nation (<nationname>.ruleset)
85   to this list.
87 data/flags/Makefile.am
89   Another list of flag files - add your flag to this list.
91 translations/nations/POTFILES.in
93   Here is yet another list of nations files; again add your nation
94   (data/nation/<nationname>.ruleset) to it.
95   Nations part of the "core" group go to tranlations/freeciv/POTFILES.in
96   instead.
99 ----------------------------------------------------------------------
100 How to add a Flag:
101 ------------------
103 Overview
104 ========
106 Please note that Freeciv no longer uses XPM files. PNG is the preferred
107 form for graphics, and flags should be made exclusively in SVG. 
109 A new nation needs a new flag. As of Freeciv 2.1 all flags are stored 
110 in SVG (Scalable Vector Graphics) format. Sodipodi and Inkscape are 
111 two good SVG editors. If you are creating a real-world nation you can 
112 probably find a Free or public domain flag that can be used. One good 
113 place to look is the Open Clip Art Library (OCAL). Remember that any flags 
114 we add must be licenced under the GPL and should be attributed to their 
115 original author, so make a note of where you found the flag, what its 
116 licence is, and who made it.
118 We also welcome improvements to existing flags. Most of our existing 
119 flags come from the Sodipodi clipart collection, and some of them are 
120 less than perfect. One common problem is that the colors are wrong. If 
121 you fix a flag for a real nation be sure to cite your source so we can 
122 be sure it's accurate. Good sources for nation flag data are Wikipedia 
123 or Flags Of The World.
125 If you want to improve an imaginary flag, this is also welcome. We
126 recommend you first contact the original author of the flag 
127 (see the flags/credits file) to discuss your ideas for changes.
130 Flag Guidelines
131 ===============
133 Here are a few guidelines for flags:
135   - Flags should be rectangles, since an outline is added to them
136   automatically.
137   - Flags often come in multiple aspect ratios. A 3:2 ratio looks best 
138   for Freeciv and currently every flag has this ratio. For a flag that 
139   is "supposed" to be 2:1 or 4:3, you can often find a 3:2 version 
140   as well.
143 Flag Specifics
144 ==============
146 To add a flag you'll have to edit the following files:
148 data/flags/<flagname>.svg 
150   Here is the SVG flag image. This is not used directly by Freeciv but 
151   is  rendered into PNG files (at various resolutions for different 
152   tilesets). The SVG file is not used in Freeciv 2.0 but all the other 
153   steps for adding flags are the same.
154   - The <flagname> should either be the name of the country that represents
155   the flag, or the common name for the actual flag. When in doubt, use the
156   same name as the name of the nation.
158 data/flags/<flagname>.png
160 data/flags/<flagname>-shield.png 
162   These are the flag images that are used by Freeciv. They are rendered
163   from the SVG file. Once this file has been created it can be used with
164   older versions of Freeciv as well. To run the conversion program you
165   will need to install Inkscape, ImageMagick, and (optionally) pngquant.
166   Once these are installed change to the data/flags directory and run
167   ./convert_png <nationname>.svg.
169 data/misc/flags.spec 
171   This file has a reference to the flag PNG graphic. The "tag" here must
172   match the flag tag you put in the nation ruleset file
173   (usually f.<flagname>) and the "file" should point to the PNG image at
174   flags/<flagname>.png.
176 data/misc/shields.spec 
178   Just like flags.spec, this file must include a reference to the flag
179   PNG graphic. The only difference is that the file should point to the
180   "shield" graphic, flags/<flagname>-shield.png.
182 Changes to the .spec files can be submitted as a patch (created using 
183 diff -ruN). Even though the *.spec files may need to be changed, please 
184 include them in the diff -- this should be easier for you, and it 
185 provides a convenient place for us to grab the sprite name. See the 
186 section on How to Contribute in the Freeciv wiki for more instructions.
190 ----------------------------------------------------------------------
191 Contents and Style:
192 -------------------
194 What nations can be added to Freeciv?
195 =====================================
197 A nation in Freeciv should preferrably be a current independent country
198 or a historical kingdom or realm. A nation that is currently governed
199 by or the part of a greater political entity, or in other ways lacks
200 complete independence could in most cases be made a Freeciv nation as
201 well, but must never be listed as _modern_ (see 'Nation grouping' below.)
203 Copyrighted content may not be added unless full permission is granted by
204 the holder of the copyright. This rule effectively disallows the
205 inclusion of nations based on most literary works.
208 Nation grouping
209 ===============
211 Freeciv supports a classification of nations in an unlimited number of
212 groups and every nation should be assigned to at least one. We currently 
213 have Ancient, Medieval, Early Modern, Modern, African, American, Asian,
214 European, Oceanian and Imaginary groups. Modern nations are existing and
215 politically independent countries; a nation listed as ancient, medieval
216 or early modern should have had an independent dynasty or state in ancient
217 (until 500 AD), medieval (500 - 1500) or early modern (1500 - 1800) times
218 respectively. Finally, an imaginary nation is - as the name suggests - a
219 product of someone's imagination.
222 Nation naming
223 =============
225 The default name of the nation should be the name of the people, 
226 country, or empire in English adjective form. For example, the nation 
227 of ancient Babylon is called "Babylonian" in Freeciv. The plural form 
228 should be standard English as well. For example, plural for the Polish 
229 nation is "Poles" in Freeciv. UTF-8 is permitted in nation names.
232 Conflicting nations
233 ===================
235 To specify one or more nations that the AI shouldn't pick for the same 
236 game, use this syntax:
238         conflicts_with="<nationname>", "<nationname>", ...
240 You only have to specify this in the nation you're adding, since it 
241 works in both directions. Reasons for conflicting nations could be 
242 either that they represent the same people in different eras 
243 (ex: Roman - Italian) or that the two nations have too similar 
244 flags that they are easily mixed up in the game 
245 (ex: Russian - Serbian.)
248 Civil war nations
249 =================
251 Specify one or more civil war nations. When a player's capital is 
252 captured, that player might suffer a civil war where his or her 
253 nation is divided and a new player created. The nation for this new 
254 player is selected from one of the civil war nations specified in the
255 ruleset. A civil war nation should be linguistically, geographically 
256 and/or historically related to the current nation. A linguistic 
257 relation is especially important, since city names after a nation 
258 run out of their own city names, are selected from the civil war 
259 nations' city lists.
262 Legend
263 ======
265 A legend is required in a nation ruleset. The legend can be a 
266 summarized history of the nation, or just a piece of trivia. 
267 UTF-8 is permitted in legends.
270 Leaders
271 =======
273 A leader should be a historically notable political leader of the
274 nation. Two living persons per nation are permitted - one of each sex.
276 An ideal leader list should contain between five and ten names.
278 Use the person's full name to avoid ambiguity.
280 Monarchs should be marked with the appropriate succession
281 number, using Roman numerals in standard English style (not German 
282 e.g. "Otto II."; Hungarian e.g. "IV. Béla"; Danish e.g. "Valdemar 4."
283 etc.)
285 Freeciv support any Unicode character, but please keep to 
286 Latin letters. When transcribing from a non-Latin writing system, 
287 be consistent about the system of transcription you are using.
288 Also, try to avoid unnecessarily technical and/or heavily accented
289 systems of transcription.
291 Subject to the above, leaders should be written in native
292 orthography, e.g. "Karl XII" instead of "Charles XII" for the
293 Swedish king.
295 For consistency and readability, put only one leader per line. 
296 Feel free to provide a hint of the leader's identity or a brief 
297 background in a comment beside any leader: This information might 
298 be used in-game at a later stage.
300 Leader titles for each government type (including Despotism and
301 Anarchy) may be specified in a separate tag. UTF-8 is permitted in
302 leader titles.  If the male and female titles are identical in
303 English, give the latter the ?female: qualifier. Use a unique title
304 for each government. Ruler titles should be in English, though
305 exceptions are made for non English titles as long as they are
306 understood outside of their own language regions and commonly used in
307 non-academic contexts. Titles from the default ruleset may not be used.
310 Flag
311 ====
313 You should provide a unique flag for your nation. Using a flag that 
314 is already used by another nation in the game is not acceptable.
316 An alternative flag does not have to be specified.
319 Style
320 =====
322 A nation must specify a default style. With the supplied rulesets
323 each national style has direct relation to equivalent city style.
324 The available city styles depends on the tileset used.
325 Practically every tileset has four city styles: "European",
326 "Classical" (Graeco-Roman style), "Asian" (Pagoda style) and
327 "Tropical" (African or Polynesian style). In Amplio tileset,
328 "Babylonian" and "Celtic" are also available. If the tileset used by
329 a client does not support a particular city style, a fallback style is
330 used. Selecting a style for your nation is not that strict. Just try
331 to keep it somewhat "realistic."
334 Cities
335 ======
337 As for the list of city names, you should make a clear decision about 
338 the type of the nation you add. An _ancient_ or _medieval_ nation may
339 list any city that it at some point controlled. However if your
340 nation is listed as _modern_, its city list must be restricted to
341 cities within the country's current borders.
343 The reason for this is, we don't want Freeciv to be used as a political 
344 vehicle for discussions about borders or independence of particular
345 nations. Another reason is to avoid overlapping with other nations in
346 the game.
348 A city should appear in its native form, rather than Anglicized or
349 Graeco-Roman forms. For example, the Danish capital is "København"
350 rather than "Copenhagen"; and the ancient Persian capital is "Parsa" 
351 rather than "Persepolis."
353 City names support any Unicode character, but please keep to 
354 Latin letters. When transcribing from a non-Latin writing system, 
355 be consistent about the system of transcribation you are using.
356 Also, try to avoid unnecessarily technical or heavily accented
357 systems of transcribation.
359 The ordering of cities should take both chronology of founding and 
360 overall historical importance into consideration. Note that a city 
361 earlier in the list has a higher chance of being chosen than later 
362 cities.
365 Natural city names
366 ==================
368 Freeciv supports "natural" geographic placements of cities.
370 Cities can be labeled as matching or not matching a particular
371 type of terrain, which will make them more (or less) likely to
372 show up as the "default" name. The exact format of the list
373 entry is
375         "<cityname> (<label>, <label>, ...)"
377 where the cityname is just the name for the city (note that it
378 may not contain quotes or parenthesis), and each "label" matches
379 (case-insensitive) a terrain type for the city (or "river"), with a
380 preceding ! to negate it. The terrain list is optional, of course,
381 so the entry can just contain the cityname if desired. A city name
382 labeled as matching a terrain type will match a particular map
383 location if that map location is on or adjacent to a tile of the named
384 terrain type; in the case of the "river" label (which is a special
385 case) only the map location itself is considered. A complex example:
387   "Wilmington (ocean, river, swamp, forest, !hills, !mountains, !desert)"
389 will cause the city of Wilmington to match ocean, river, swamp, and
390 forest tiles while rejecting hills, mountains, and deserts. Although
391 this degree of detail is probably unnecessary to achieve the desired
392 effect, the system is designed to degrade smoothly so it should work
393 just fine.
395 (A note on scale: it might be tempting to label London as !ocean, i.e.
396 not adjacent to an ocean.  However, on a reasonably-sized Freeciv world
397 map, London will be adjacent to the ocean; labeling it !ocean will tend
398 to give bad results. This is a limitation of the system, and should be
399 taken into account when labelling cities.)
401 At this point, it is useful to put one city per line, only.
403 Finally, don't forget to leave a blank line feed in the end of your nation
404 ruleset.
407 Update information
408 ==================
410 The information about the changes in the definition of a nation between
411 different versions of Freeciv is kept in the wiki at http://www.freeciv.org/
412 as part of the ruleset differences. The URLs below list the differences
413 between the freeciv versions from 2.3.x to the current version:
415 http://www.freeciv.org/wiki/How_to_update_a_ruleset_from_2.2_to_2.3
417 The description of a nation file can be found at:
419 http://www.freeciv.org/wiki/Nations