• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..10-Dec-2021-

ca/H10-Dec-2021-1,5811,250

de/H10-Dec-2021-2,0391,584

fr/H10-Dec-2021-2,6102,005

it/H10-Dec-2021-2,1991,682

ja/H10-Dec-2021-1,6171,252

man/H10-Dec-2021-2,1991,827

nl/H10-Dec-2021-1,6321,285

sv/H10-Dec-2021-1,5561,240

BUGSH A D10-Dec-20213.2 KiB9863

CodingStyleH A D10-Dec-202120 KiB624452

FAQH A D10-Dec-202141.6 KiB1,076786

HACKINGH A D10-Dec-202156.4 KiB1,2891,016

HOWTOPLAYH A D10-Dec-202111.3 KiB272202

INSTALL.CygwinH A D10-Dec-20213 KiB8863

Makefile.amH A D10-Dec-2021610 3630

Makefile.inH A D10-Dec-202129.6 KiB965880

READMEH A D10-Dec-202120.3 KiB583414

README.AIH A D10-Dec-202113.4 KiB343270

README.AI_modulesH A D10-Dec-20215.6 KiB136102

README.achievementsH A D10-Dec-20211.5 KiB5339

README.actionsH A D10-Dec-202110.9 KiB248210

README.agentsH A D10-Dec-20212.1 KiB5140

README.attributesH A D10-Dec-20211.6 KiB3327

README.deltaH A D10-Dec-20217.3 KiB164137

README.effectsH A D10-Dec-202120.3 KiB586452

README.fcdbH A D10-Dec-20219.7 KiB247198

README.governorH A D10-Dec-202110.6 KiB226183

README.graphicsH A D10-Dec-202123.9 KiB507437

README.modpack_installerH A D10-Dec-202116.7 KiB382311

README.msys2H A D10-Dec-20215.9 KiB204149

README.nationsH A D10-Dec-202115.9 KiB428307

README.packagingH A D10-Dec-202111 KiB218196

README.rulesetsH A D10-Dec-20215.8 KiB155117

README.scorelogH A D10-Dec-20211.3 KiB3930

README.soundH A D10-Dec-20214 KiB10381

README.tilesetsH A D10-Dec-20211.1 KiB3321

TODOH A D10-Dec-2021255 97

README

1===================
2Freeciv Version 2.6
3===================
4
5Welcome to Freeciv!
6
7This archive contains Freeciv, a free Civilization-like game, primarily
8for X under Unix.  It has support for multiplayer games locally or
9over a network, and an AI which gives most people a run for their money.
10
11Freeciv aims to be mostly rule-compatible with Civilization II [tm],
12published by Sid Meier and Microprose [tm].  A few rules are different
13where we think it makes more sense, and we have lots and lots of
14adjustable parameters to make customizing games possible.
15
16Freeciv has been implemented completely independently of Civilization;
17you do not need to own Civilization to play Freeciv.
18
19
20Translations:
21=============
22
23You may find a translated version of this file, as well as of other parts
24of the Freeciv documentation, in the following places:
25
26        Catalan                 ./doc/ca
27        Dutch                   ./doc/nl
28        French                  ./doc/fr
29        German                  ./doc/de
30        Italian                 ./doc/it
31        Japanese                ./doc/ja
32        Swedish                 ./doc/sv
33
34Even if there is no translation for your language, the game itself may
35support it.  Please see "Native Language Support" below.
36
37
38Web site:
39=========
40
41Freeciv's web site is here:
42
43  http://www.freeciv.org/
44
45We invite you to visit.  You can get the latest Freeciv news, releases
46and patches, find out about the Freeciv mailing lists, and see the
47Freeciv metaserver, which records games being played around the world.
48
49
50License:
51========
52
53Freeciv is released under the GNU General Public License (version 2
54or, at your option, any later version).  In short, you may copy this
55program (including source) freely, but see the COPYING file for full
56details.
57
58Some materials that were used to prepare the graphics in the game (in
59the 'data' subdirectory), such as 3D models used to prepare bitmap
60images, are not distributed with the main source code due to their
61size; they are not necessary to build Freeciv from source, as the
62(manually) derived graphics are also included in the distribution.
63These materials are available in the separate 'graphics-materials'
64distribution (e.g., freeciv-2.4.0-graphics-materials.tar.bz2), or from
65version control (Git).
66
67
68Compiling and installing:
69=========================
70
71Please read the INSTALL file carefully for instructions on how to get
72Freeciv compiled and installed on your machine.
73
74
75Freeciv is modular:
76===================
77
78Freeciv is actually several programs, a server and one or more clients.  When
79a game is in progress, there will be one server program running, and as many
80client programs as there are human players.  The server does not use a gui,
81but the clients do.  The clients come in many flavors:
82
83freeciv-gtk2:  This uses the GTK+ 2 libraries. To install, see section 1a of
84  the INSTALL document.
85  This client has been replaced by freeciv-gtk3, but it still exist for benefit
86  of those who cannot to switch to gtk3.
87
88freeciv-gtk3:  This uses the GTK+ 3 libraries. To install, see section 1b of
89  the INSTALL document.
90  This client is better supported and more developed than the others,
91  as such it is considered to be the default interface throughout the rest of
92  this document.
93
94freeciv-gtk3.22:  This uses the GTK+ 3 libraries. Version 3.22 or 3.24
95  is required. To install, see section 1c of the INSTALL document.
96
97freeciv-qt:  This uses the QT library. Development of this client has recently
98  reached the state where it's considered generally usable, but it still lacks
99  number of features gtk-clients have.
100
101freeciv-sdl:  This uses Simple DirectMedia Layer libraries version 1.2.
102  This client is currently unmaintained but is usable.
103
104freeciv-sdl2: This uses Simple DirectMedia Layer libraries version 2.
105  This client is going to replace freeciv-sdl in the future.
106
107freeciv-xaw:  This uses the X Window System along with its Athena Widget
108  interface.
109  This client, somewhat minimalistic compared to the others, is currently
110  unmaintained.
111
112
113Starting a game:
114================
115
116  NOTE:
117  The following examples assume that Freeciv has been installed on
118  your system, and that the directory containing the "freeciv-gtk3"
119  and "freeciv-server" programs is in your PATH.  If Freeciv is not
120  installed, then you may want to use the "fcgui" and "fcser" programs,
121  which can be found in the top Freeciv directory.  They are used
122  in exactly the same fashion as "freeciv-gtk3" and "freeciv-server".
123
124Running Freeciv involves starting the server, then the client(s)
125and AI(s), then telling the server to start the game.  Here are the
126steps:
127
128Server:
129
130  To start the server:
131
132  |  % freeciv-server
133
134  Or for a list of command-line options:
135
136  |  % freeciv-server --help
137
138  Once the server is started, a prompt will appear:
139
140  |  For introductory help, type 'help'.
141  |  >
142
143  and, you can see this information by using the help command:
144
145  |  > help
146  |  Welcome - this is the introductory help text for the Freeciv server.
147  |
148  |  Two important server concepts are Commands and Options.
149  |  Commands, such as 'help', are used to interact with the server.
150  |  Some commands take one or more parameters, separated by spaces.
151  |  In many cases commands and command arguments may be abbreviated.
152  |  Options are settings which control the server as it is running.
153  |
154  |  To find out how to get more information about commands and options,
155  |  use 'help help'.
156  |
157  |  For the impatient, the main commands to get going are:
158  |    show   -  to see current options
159  |    set    -  to set options
160  |    start  -  to start the game once players have connected
161  |    save   -  to save the current game
162  |    quit   -  to exit
163  |  >
164
165  If you like, you can use the 'set' command to set any of the various
166  server options for the game.  You can get a list of the options
167  with the 'show' command, and detailed descriptions of each with the
168  'help <option-name>' command.
169
170  For example:
171
172  | > help size
173  |  Option: size  -  Map size in 1,000 tiles units
174  |  Description:
175  |    This value is used to determine the map dimensions.
176  |      size = 4 is a normal map of 4,000 tiles (default)
177  |      size = 20 is a huge map of 20,000 tiles
178  | Status: changeable
179  | Value: 4, Minimum: 1, Default: 4, Maximum: 29
180
181  And:
182
183  |  > set size 8
184
185  This will make the map twice as large as the default.
186
187Client:
188
189  Now all the human players should join, by running the Freeciv
190  client:
191
192  |  % freeciv-gtk3
193
194  This assumes the server is running on the same machine.  If not, you
195  can either specify it on the command line with the '--server' option,
196  or enter it into the first dialog box once the client starts.
197
198  For example, suppose the server is running on a different machine
199  called 'neptune'.  Then players would join with a command like:
200
201  |  % freeciv-gtk3 --server neptune
202
203  If you're the only human player, then only one client needs to be
204  started.  In standard Unix fashion you can start the client
205  "in the background" by appending an ampersand:
206
207  |  % freeciv-gtk3 &
208
209  Another option for the client you may like to try is the '--tiles'
210  option, which can be used to select different "tilesets" (that is,
211  different graphics for the map terrain, units, and so on).  The
212  distribution comes with 8 main tilesets:
213  - amplio2: An isometric tileset with larger and more detailed tiles.
214  - isotrident: An isometric tileset similar in shape to the one in Civ 2.
215  - cimpletoon: amplio2 with alternative units that display direction they
216                are facing.
217  - trident: a Civ 1-style ('overhead') tileset with 30x30 tiles.
218  - hexemplio: an iso-hexagonal tileset with larger tiles derived
219               from amplio2
220  - toonhex: tileset combining hexemplio tiles with cimpletoon units
221  - isophex: an iso-hexagonal tileset
222  - hex2t: a hexagonal tileset
223
224  In this release, each map topology has its own default tileset; with
225  default settings, amplio2 is the default tileset.
226  To try another one, for instance the trident tileset, start the
227  client with:
228
229  |  % freeciv-gtk3 --tiles trident
230
231  Other tilesets are available from http://www.freeciv.org/wiki/Tilesets
232
233
234  Clients can be authorized to issue server commands.  To allow them
235  to use informational commands only, type at the server prompt
236
237  |  > cmdlevel info
238
239  Clients can now use '/help', '/list', '/show settlers', etc.
240
241Computer Players:
242
243  There are two ways to create AI players.  The first is to set
244  the number of players (human and AI) by setting the 'aifill'
245  server option.  For example:
246
247  |  > set aifill 7
248
249  After using the 'start' server command to start the game, any players
250  which aren't controlled by humans will be AI players.  For the above,
251  if two human players had joined, 5 AI players would be created.
252
253  The second way is to explicitly create an AI with the 'create'
254  server command.  For example:
255
256  |  > create HumanKiller
257
258  This will create an AI-controlled player called HumanKiller.
259
260  AI players are assigned to nations after all human players have
261  chosen their nations, but you can choose a particular nation for an
262  AI player by using the normal name for that nation's leader.  For
263  example, to play against AI-controlled Romans, use this server
264  command:
265
266  |  > create Caesar
267
268  Note, this is just a preference:  If no other human player chooses
269  to play the Romans, then this AI will.
270
271Server:
272
273  When everybody has joined (use the "list" command to see who's in),
274  start the game with the "start" command:
275
276  |  > start
277
278And the game is on!
279
280  NOTE: In this version of Freeciv, the GTK, Qt, and SDL clients have the
281  capability to automagically start a freeciv-server session when the user
282  selects "Start New Game" from the main menu. This reduces the steps
283  needed to get started playing a game of Freeciv. On the other hand,
284  it also means that if the client crashes for some reason or becomes
285  unavailable, the freeciv-server session will also be lost. So starting a
286  separate freeciv-server session and then connect to it with the client is
287  generally the recommended method.
288
289
290Announcing the game:
291====================
292
293If you do not want to limit your opponents to local friends or AI players,
294visit the Freeciv metaserver:
295
296  http://meta.freeciv.org/
297
298It is a list of Freeciv servers.  To make your own server announce itself
299there, start freeciv-server with the '--meta' option, or just '-m' for short.
300
301Caveats:
302
303 1) Due to the inclusion of new features, different client and server
304    versions are often incompatible. The 2.5.0 version is for example
305    incompatible with any 2.4.x or earlier versions.
306
307 2) If the Metaserver button in the connection dialog doesn't work,
308    check if your ISP uses a mandatory WWW proxy and make freeciv-gtk3
309    use it through the $http_proxy environment variable.  For instance,
310    if the proxy is proxy.myisp.com port 8888, set $http_proxy
311    to http://proxy.myisp.com:8888/ before starting the client.
312
313 3) Sometimes there are no games on the metaserver.  That happens.
314    The number of players there vary with the time of the day. Try
315    starting one yourself!
316
317
318Playing the game:
319=================
320
321The game may be saved at any time using the 'save' server command,
322like so:
323
324  |  > save mygame.sav
325
326(If your server is compiled with compression support, and the
327'compresstype' server option is set to other than PLAIN, then the
328file written may be compressed and called 'mygame.sav.gz', 'mygame.sav.bz2',
329or 'mygame.sav.xz' depending on the setting.)
330
331The Freeciv client works pretty much as you would expect from a
332multiplayer civilization game.  That is, the human players all move
333at the same time, then all the AI players move when all the human
334players have completed their turn.  There's a turn timeout value,
335which is by default set to 0 seconds (no timeout).  The server
336operator can alter this value at any time with the 'set' command.
337
338Have a look at the online help system. All three mouse-buttons are
339used, and documented in the help.
340
341Players can hold down 'Shift' and push the 'Return' key to announce
342the end of their turn, or just push the 'Turn Done' button.
343
344Use the 'Players' dialog to see who has announced their end of turn,
345and who you're waiting for.  (Hey feller, are you asleep or what?? ;).
346
347Use the input line at the bottom of the window for broadcasting
348messages to other players.
349
350You can send a message to an individual player (e.g., 'peter') like so:
351
352  |  peter: move that armor away *NOW*!
353
354The server is smart enough to perform "name completion", so if you had
355typed "pet:", it will find a player name that matches the part of the
356name you typed.
357
358You can send a message to all your allies by prefixing it with the
359letter '.' (yes, that is a period).
360
361You can issue server commands from the client input line:
362
363  |  /list
364  |  /set settlers 4
365  |  /save mygame.sav
366
367The server operator will probably let you issue informational commands
368only.  This is partly because allowing clients to use all server
369commands has security implications; consider if a player tried:
370
371  |  /save /etc/passwd
372
373Of course the server should not be running with superuser privileges in
374any case, to reduce this sort of risk.
375
376If you're just starting, and would like to get an idea of a strategy,
377have a look in the Freeciv playing HOWTO, contained in the HOWTOPLAY
378file.
379
380For lots more information about the client, the server, and the
381concepts and rules of the game, see the Freeciv manual, available
382at the wiki:
383
384  http://www.freeciv.org/wiki/Manual
385
386
387Ending the game:
388================
389
390There are six ways in which a game can end:
391
3921) Only winners remain in game
393   1a) If victory condition 'ALLIED' is enabled in server setting 'victories':
394       All the remaining nations, short of those who have ceded the game
395       (/surrender), are allied or in the same team.
396   1b) If victory condition 'ALLIED' is disabled in server setting 'victories':
397       Only one nation or one team is left, or all other players of all
398       other teams have ceded the game (/surrender).
3992) The final turn (/show endturn) is reached.
4003) If victory condition 'SPACERACE' is enabled in server setting 'victories' and
401   a player builds and launches a spaceship, which reaches Alpha
402   Centauri first.
4034) If victory condition 'CULTURE' is enabled in server setting 'victories' and
404   a player has reached both ruleset-defined minimum number of culture points
405   and ruleset-defined minimum lead in culture points.
4065) If the modpack has special victory conditions and a player has reached one
407   of those.
4086) The server operator uses the /endgame command.
409
410A score-table will be shown in all cases.  Hint: The server operator
411can set the final year while the game is still going by changing the
412'endturn' option.  This is nice when the winner is obvious, but you
413don't want to play through the boring 'cleanup phase'.
414
415
416Restoring games:
417================
418
419You can restore a saved game by using the '-f' server option, eg:
420
421  |  % freeciv-server -f oursave2001.sav
422
423or, if the save-file was created by a server that compressed it:
424
425  |  % freeciv-server -f oursave2001.sav.gz
426
427Now the players can rejoin the game:
428
429  |  % freeciv-gtk3 -n Alexander
430
431Notice how the player-name is specified with the -n option. It's vital
432that the player uses the same name as they had when the game was running,
433if they're to be allowed in.
434
435The game may then be restarted with the 'start' command as usual.
436
437
438Native Language Support:
439========================
440
441Freeciv supports several languages.
442
443You may choose which local language to use by specifying a "locale".
444Each locale has a standard name (e.g., 'de' for German).  If you have
445installed Freeciv, you may choose a locale by setting the environment
446variable LANG to that locale's standard name before running freeciv-server
447and freeciv-gtk3.
448
449For example, assuming you wish to use the German localization, you
450would do:
451
452  export LANG; LANG=de   (in the Bourne shell (sh)),
453or
454  setenv LANG de         (in the C shell (csh)).
455
456(You could do this in your .profile or .login file.)
457
458Sometimes there is a conflict between the local library implementation
459and the internal locale determination.  It is often possible to work
460around problems with a more detailed descriptor:
461
462  LANG=de_DE.UTF-8
463
464We'd like to know about such problems.  Please report them as bugs
465(see BUGS).
466
467
468Log messages:
469=============
470
471Both the client and server print messages known as "log messages".
472There are five categories of log messages: "fatal", "error", "normal",
473"verbose", and "debug".
474
475By default, fatal, error and normal messages are printed to standard
476output where the client or server was started.  You can direct log
477messages to a file instead of the screen with the "--log filename",
478or "-l filename" command line options.
479
480You can change the level of log messages displayed with "--debug
481level" or "-d level" (or instead "-de level" for the Xaw client, since
482"-d" is ambiguous between "-debug" and "-display"), where "level" is
4830, 1, 2, or 3.  0 means show fatal messages only, 1 means show fatal
484and error messages, 2 means fatal, error and normal messages (the
485default), and 3 means show all fatal, error, normal, and verbose
486messages.
487
488If you compiled with DEBUG defined (an easy way to do this is to
489configure with --enable-debug), then you can get debug level messages
490by setting the level to 4.  Also, it is possible to control debug
491level messages (but not other messages) on a per-file and per-line
492basis.  To do this use "--debug 4:str1:str2" (as many strings as you
493like, separated by colons) and any filenames which match those strings
494as a substring will have debug log messages turned on, and all other
495debug messages will be suppressed.  To control lines, use:
496"--debug 4:str1,min,max" and for files which match str1 only debug
497messages within the specified minimum and maximum lines will be
498printed.  Only one set of (min,max) can be applied to each file.
499
500Example:
501
502  |  % freeciv-server -l my.log -d 3
503
504This sends all server log messages to file "my.log", including verbose
505level messages.
506
507Example:
508
509  |  % freeciv-gtk3 --debug 0
510
511This suppresses all non-fatal client log messages.
512
513Example:
514
515  |  % freeciv-server -d 4:log:civserver,120,500:autoattack
516
517This turns on all fatal, error, normal and verbose messages for the
518server, and debug level messages for some specified modules.  Note
519that "log" will match "gamelog.c" as well as "log.c".  For
520"civserver.c", debug messages between lines 120 and 500 will be
521printed.  This example only works if the server was compiled with
522DEBUG.
523
524
525Bugs:
526=====
527
528Found a bug?  We really want to hear from you so we can fix it.
529See the file BUGS, for a list of known bugs in this release, and
530information about reporting new bugs.
531
532
533Mailing lists:
534==============
535
536We maintain 5 mailing lists:
537
538  freeciv-announce@freelists.org
539                   Announcements of general interest.
540                   This is a "Read Only" list, with infrequent messages.
541                   In other words you can't mail this list, just read it.
542                   Subscribe: https://www.freelists.org/list/freeciv-announce
543  freeciv-i18n@freelists.org
544                   Freeciv translation.
545                   All discussions related to translating the Freeciv code,
546                   documentation, and website, into other languages than
547                   English.
548                   Subscribe: https://www.freelists.org/list/freeciv-i18n
549  freeciv-dev@freelists.org
550                   Freeciv development.
551                   Subscribe: https://www.freelists.org/list/freeciv-dev
552  freeciv-tickets@lists.osdn.me
553                   Automated notifications about updates to
554                   bug and patch tickets.
555                   Subscribe: https://lists.osdn.me/mailman/listinfo/freeciv-tickets
556  freeciv-commits@gna.org
557                   Notifications of changes to the code repository.
558                   This is a "Read Only" list, carrying automated messages.
559                   In other words you can't mail this list, just read it.
560                   (At the time of writing, gna.org is expected to shut
561                   down soon; we're not yet sure what arrangements we'll
562                   have for a replacement commits mailing list.)
563
564All lists are open to the general public and everyone is welcome to join.
565Only maintainers may post to the -announce and -commits lists.
566
567
568Internet Relay Chat (IRC)
569=========================
570
571Several players and developers hang out on #freeciv and #freeciv-dev
572channels on the Libera.Chat network. Try connecting to the server
573
574        irc.libera.chat
575
576
577And finally:
578============
579
580Have fun and give 'em hell!
581
582                                   -- The Freeciv team.
583

README.AI

1==============
2THE FREECIV AI
3==============
4
5This document is about freeciv's default AI. Freeciv supports also
6using custom AI modules, though at the time of writing none exist.
7See README.AI_modules about support of custom modules.
8
9
10CONTENTS
11========
12Introduction
13Contacting the current AI developers
14Long-term AI development goals
15Want calculations
16Amortize
17Estimation of profit from a military operation
18Selecting military units
19Ferry system
20Diplomacy
21Difficulty levels
22Things that needs to be fixed
23Idea space
24
25
26INTRODUCTION
27============
28
29The Freeciv AI is widely recognized as being as good as or better
30military-wise as the AI of certain other games it is natural to compare
31it with.  It is, however, still too easy for experienced players.
32
33The code base used to be in a bad shape but it has gotten a lot
34better.  The reason for this is that the developer (Syela) who in a
35few months put together a working AI had suddenly disappeared.  His
36bright ideas could only be matched by his inability to name variables
37and to comment the code.  Subsequent AI developers were not brave (or
38stupid?) enough to start from scratch, taking instead a small bite
39here and there, trying hard not to break much, to understand Syela's
40original design and only then to throw it away.  Or perfect it.
41
42Code that implements the AI is divided between ai/ and server/advisors.
43Latter is used also by human players for such automatic helpers
44as auto-settlers and auto-explorers.
45
46
47CONTACTING THE CURRENT AI DEVELOPERS
48====================================
49
50AI development used to have its own mailing list, freeciv-ai@freeciv.org.
51Go to
52
53  http://www.freeciv.org/wiki/Community_Forums
54
55to read the archives.
56
57Currently freeciv-dev@freelists.org is used for all discussion about
58Freeciv development.
59
60
61LONG-TERM AI DEVELOPMENT GOALS
62==============================
63
64The long-term goals for Freeciv AI development are
65 -> to create a challenging and fun AI for human players to defeat
66 -> to create an AI that can handle all the rules possibilities that
67    Freeciv can offer
68
69
70WANT CALCULATIONS
71=================
72
73Build calculations are expressed through a structure called adv_choice.
74This has a variable called "want", which determines how much the AI
75wants whatever item is pointed to by choice->type. choice->want is
76
77   -199   get_a_boat
78   < 0    an error
79   == 0   no want, nothing to do
80   <= 100 normal want
81    > 100 critical want, used to requisition emergency needs
82    > ??? probably an error (1024 is a reasonable upper bound)
83    > 200 Frequently used as a cap. When want exceeds this value,
84          it is reduced to a lower number.
85
86These are ideal numbers, your mileage while travelling through the
87code may vary considerably.  Technology and diplomats, in particular,
88seem to violate these standards.
89
90
91AMORTIZE
92========
93
94Hard fact:
95amortize(benefit, delay) returns benefit * ((MORT - 1)/MORT)^delay
96(where "^" == "to the power of")
97
98Speculation:
99What is better, to receive 10$ annually starting in 5 years from now
100or 5$ annually starting from this year?  How can you take inflation
101into account?  The function amortize is meant to help you answer these
102questions.  To achieve this, it rescales the future benefit in terms of
103todays money.
104
105Suppose we have a constant rate of inflation, x percent.  Then in five
106years time 10$ will buy as much as 10*(100/(100+x))^5 will buy today.
107Denoting 100/(100+x) by q we get the general formula, N dollars Y
108years from now will be worth N*q^Y in todays money.  If we will
109receive N every year starting Y years from now, the total amount
110receivable (in todays money) is N*q^Y / (1-q) --- this is the sum of
111infinite geometric series.  This is exactly the operation that
112amortize performs, the multiplication by some q < 1 raised to power Y.
113Note that the factor 1/(1-q) does not depend on the parameters N and Y
114and can be ignored.  The connection between MORT constant and the
115inflation rate x is given by
116    (MORT - 1) / MORT = q = 100 / (100 + x).
117Thus the current value of MORT = 24 corresponds to the inflation rate
118(or the rate of expansion of your civ) of 4.3%
119
120Most likely this explanation is not what the authors of amortize() had
121in mind, but the basic idea is correct: the value of the payoff decays
122exponentially with the delay.
123
124The version of amortize used in the military code (military_amortize())
125remains a complete mystery.
126
127
128ESTIMATION OF PROFIT FROM A MILITARY OPERATION
129==============================================
130
131This estimation is implemented by kill_desire function (which isn't
132perfect: multi-victim part is flawed) plus some corrections.  In
133general,
134        Want = Operation_Profit * Amortization_Factor
135where
136
137* Amortization_Factor is completely beyond me (but it's a function of the
138estimated time length of the operation).
139
140* Operation_Profit = Battle_Profit - Maintenance
141
142where
143
144* Maintenance
145  = (Support + Unhappiness_Compensation) * Operation_Time
146  (here unhappiness is from military unit being away from home
147   and Support is the number of shields spent on supporting this unit
148   per turn )
149
150* Battle_Profit
151  = Shields_Lost_By_Enemy * Probability_To_Win
152    - Shields_Lost_By_Us * Probability_To_Lose
153
154That is Battle_Profit is a probabilistic average.  It answer the
155question "how much better off, on average, we would be from attacking
156this enemy unit?"
157
158
159SELECTING MILITARY UNITS
160========================
161
162The code dealing with choosing military units to be built and targets
163for them is especially messy.  Here is what we've managed to decipher.
164
165Military units are requested in military_advisor_choose_build
166function.  It first considers the defensive units and then ventures
167into selection of attackers (if home is safe).  There are 2
168possibilities here: we just build a new attacker or we already have an
169attacker which was forced, for some reason, to defend.  In the second
170case it's easy: we calculate how good the existing attacker is and if
171it's good, we build a defender to free it up.
172
173Building a brand-new attacker is more complicated.  Firstly,
174ai_choose_attacker_* functions are charged to find the first
175approximation to the best attacker that can be built here.  This
176prototype attacker is selected using very simple attack_power * speed
177formula.  Then (already in kill_something_with) we search for targets
178for the prototype attacker (using find_something_to_kill).  Having
179found a target, we do the last refinement by calling
180process_attacker_want to look for the best attacker type to take out
181the target.  This type will be our attacker choice.  Note that the
182function process_attacker_want has side-effects wrt the tech selection.
183
184Here is an example:
185
186First ai_choose_attacker_land selects a Dragoon because it's strong
187and fast.  Then find_something_to_kill finds a victim for the
188(virtual) Dragoon, an enemy Riflemen standing right next to the town.
189Then process_attacker_want figures out that since the enemy is right
190beside us, it can be taken out easier using an Artillery.  It also
191figures that a Howitzer would do this job even better, so bumps up our
192desire for Robotics.
193
194This is the idea, anyway.  In practice, it is more complicated and
195probably less efficient.
196
197
198FERRY SYSTEM
199============
200
201The ferry (i.e. boats transporting land units) system of Freeciv is
202probably better described by statistical mechanics than by logic.
203Both ferries and prospective passenger (PP) move around in what looks
204like a random fashion, trying to get closer to each other.  On
205average, they succeed.  This behaviour has good reasons behind it, is
206hell to debug but means that small bugs don't affect overall picture
207visibly (and stay unfixed as a result).
208
209Each turn both boats and PPs forget all about prior arrangements
210(unless the passenger is actually _in_ the boat).  Then each will look
211for the closest partner, exchange cards and head towards it.  This is
212done in a loop which goes through all units in essentially random
213order.
214
215Because most units recalculate their destination every turn, ignoring
216prior arrangements is the only good strategy -- it means that a boat
217will not rely on the PP to notify it when it's not needed anymore.
218This is not very effective but can only be changed when the PPs behave
219more responsibly.  See diplomat code for more responsible behaviour --
220they try to check if the old target is still good before trying to
221find a new one.
222
223When a boat has a passenger, it's a different story.  The boat doesn't
224do any calculations, instead one of the passengers is given full
225control and it is the passenger who drives the boat.
226
227Here are the main data fields used by the system.
228Value of ai.ferry in the passenger unit is:
229  FERRY_NONE : means that the unit has no need of a ferry
230  FERRY_WANTED : means that the unit wants a ferry
231  >0 : id of it's ferry
232Value of ai.passenger in the ferry unit can be either of:
233  FERRY_AVAILABLE : means that the unit is a ferry and is available
234  >0 : id of it's passenger
235
236When boat-building code stabilizes, it can be seen how many free boats
237there are, on average, per PP.  If there are more boats than PPs, it
238makes sense that only PPs should look for boats.  If boats are few,
239they should be the ones choosing.  This can be done both dynamically
240(both possibilities are coded and the appropriate is chosen every
241turn) and statically (after much testing only one system remains).
242Now they exist in parallel, although developed to a different degree.
243
244
245DIPLOMACY
246=========
247
248The AI's diplomatic behaviour is current only regulated by the
249'diplomacy' server setting.
250
251AI proposes cease-fire on first contact.
252
253AI is not very trusting for NEUTRAL and PEACE modes, but once it hits
254ALLIANCE, this changes completely, and it will happily hand over
255any tech and maps it has to you.  The only thing that will make the AI
256attack you then is if you build a spaceship.
257
258For people who want to hack at this part of the AI code, please note
259 * pplayers_at_war(p1,p2) returns FALSE if p1==p2
260 * pplayers_non_attack(p1,p2) returns FALSE if p1==p2
261 * pplayers_allied(p1,p2) returns TRUE if p1==p2
262 * pplayer_has_embassy(p1,p2) returns TRUE if p1==p2
263i.e. we do not ever consider a player to be at war with himself, we
264never consider a player to have any kind of non-attack treaty with
265himself, and we always consider a player to have an alliance with
266himself.
267
268The introduction of diplomacy is fraught with many problems.  One is
269that it usually gains only human players, not AI players, since humans
270are so much smarter and know how to exploit diplomacy, while for AIs
271they mostly only add constraints on what it can do.  Another is that it
272can be very difficult to write diplomacy that is useful for and not in
273the way of modpacks.  Which means diplomacy either has to be optional,
274or have fine-grained controls on who can do what diplomatic deals to
275whom, set from rulesets.  The latter is not yet well implemented.
276
277
278DIFFICULTY LEVELS
279=================
280
281There are currently seven difficulty levels: 'handicapped, 'novice',
282'easy', 'normal', 'hard', 'cheating', and 'experimental'.
283The 'hard' level is no-holds-barred. 'Cheating' is the same
284except that it has ruleset defined extra bonuses, while 'normal'
285has a number of handicaps. In 'easy', the AI also does random stupid
286things through the ai_fuzzy function. The 'experimental' level is
287only for coding - you can gate new code
288with the H_EXPERIMENTAL handicap and test 'experimental' level
289AIs against 'hard' level AIs. In 'novice' the AI researches slower
290than normal players.
291
292Other handicaps used are:
293  H_DIPLOMAT     Can't build offensive diplomats
294  H_LIMITEDHUTS  Can get only 25 gold and barbs from huts
295  H_DEFENSIVE    Build defensive buildings without calculating need
296  H_RATES        Can't set its rates beyond government limits
297  H_TARGETS      Can't target anything it doesn't know exists
298  H_HUTS         Doesn't know which unseen tiles have huts on them
299  H_FOG          Can't see through fog of war
300  H_NOPLANES     Doesn't build air units
301  H_MAP          Only knows map_is_known tiles
302  H_DIPLOMACY    Not very good at diplomacy
303  H_REVOLUTION   Cannot skip anarchy
304  H_EXPANSION    Don't like being much larger than human
305  H_DANGER       Always thinks its city is in danger
306
307For an up-to-date list of all handicaps and their use for each
308difficulty level see ./ai/handicaps.h.
309
310
311THINGS THAT NEED TO BE FIXED
312============================
313
314* Cities don't realize units are on their way to defend it.
315* AI builds cities without regard to danger at that location.
316* AI won't build cross-country roads outside of city radii.
317* Locally_zero_minimap is not implemented when wilderness tiles
318change.
319* If no path to chosen victim is found, new victim should be chosen.
320* Emergencies in two cities at once aren't handled properly.
321* Explorers will not use ferryboats to get to new lands to explore.
322The AI will also not build units to explore new islands, leaving huts alone.
323* AI sometimes believes that wasting a horde of weak military units to
324kill one enemy is profitable (PR#1340)
325* Stop building shore defense in landlocked cities with a pond adjacent.
326* Fix the AI valuation of supermarket. (It currently never builds it).
327See farmland_food() and ai_eval_buildings() in advdomestic.c
328* Teach the AI to coordinate the units in an attack (ok, this one is a bit
329big...)
330
331
332IDEA SPACE
333==========
334
335* Friendly cities can be used as beachheads
336* Assess_danger should acknowledge positive feedback between multiple
337attackers
338* It would be nice for bodyguard and charge to meet en-route more
339elegantly.
340* struct choice should have a priority indicator in it.  This will
341reduce the number of "special" want values and remove the necessity to
342have want capped, thus reducing confusion.
343

README.AI_modules

1
2CONTENTS
3========
4
51. Default build
62. Using freeciv built with AI-modules support
73. Building freeciv with AI-modules support
84. Coding new AI module
95. Using default AI as part of new AI module
106. Callback interface ChangeLog
11
12
131. Default build
14----------------
15
16By default Freeciv is built with just one, "classic", AI type
17statically built in, and with no support for dynamic AI modules.
18Classic AI is always used for all players, effectively hiding the
19fact that AI module interface even exist.
20
21
222. Using freeciv built with AI-modules support
23----------------------------------------------
24
25Some modules might be statically linked to freeciv server, and those
26are always available. If freeciv is built with also dynamic modules
27support enabled, one can load additional AI modules to server with
28commandline option "--LoadAI <modulename>"
29Whether module is statically linked or dynamically loaded, new AI players
30that use that module can be created by giving "create" command AI type as
31second parameter
32> create Leonidas classic
33
34Players created any other way, such as by aifill will get the AI type
35that has been made the default freeciv build time.
36
37Information "list" command shows includes player's AI type:
38> list
39Leonidas [#ff0000]: Team 0, user Unassigned
40  AI, classic, difficulty level Easy
41
42
433. Building freeciv with AI-modules support
44-------------------------------------------
45
46There's three configure options controlling AI-modules support to be
47built in to freeciv.
48
49To statically link some of the supplied AI modules to freeciv,
50use --enable-ai-static=<comma,separated,list>. Default value for this
51is just "classic". Order of the modules is important in that first of
52the modules will be the default AI type used for all the players for whom
53it's not explicitly set.
54
55To support dynamically loading additional modules, use
56--enable-aimodules. It requires that also --enable-shared has been used,
57which may not work on all platforms.
58Special value --enable-aimodules=experimental makes freeciv also to build
59all the modules in its source tree as dynamically loadable AI modules.
60
61In case you want to use some dynamically loadable module as the default
62AI type instead of first type listed for --enable-ai-static, you can
63explicitly set the default type with --with-default-ai=<type>.
64
65Dynamic AI modules are expected in their correct installation location
66unless one has configured with --enable-debug which allows freeciv
67server to look for supplied modules from build directory too. Otherwise you
68cannot use dynamic modules from the freeciv build dir, but you need
69to "make install" freeciv to install them to correct location.
70
71
724. Coding new dynamic AI module
73-------------------------------
74
75Dynamic AI module to be loaded with "--LoadAI <modulename>" needs to contain
76two functions.
77
78const char *fc_ai_<modulename>_capstr(void)
79  This needs to return capability string of the module. This is used to
80  check if module is compatible with the version of freeciv one tries to
81  load it into. Current freeciv's capstr is in common/ai.h macro FC_AI_MOD_CAPSTR.
82
83
84bool fc_ai_<modulename>_setup(struct ai_type *ai)
85  This function is called for AI module to setup itself. Most importantly
86  it should setup callback table ai->funcs so that its other functions
87  get called, and fill ai->name so that it can be referred to in creation of
88  new players.
89  Callback table, with comments when each callback gets called, is defined
90  in common/ai.h
91
92For "--LoadAI <modulename>" to find the AI module, it must reside in ${libdir}/fcai/
93(/usr/lib/fcai by default) under name fc_ai_<modulename>.so
94
95
965. Using default AI as part of new AI module
97--------------------------------------------
98
99Default AI here refers to specific code module that any AI module can use, not to any
100one AI module. Classic AI module is just a thin wrapper around it, and also Threaded AI
101uses it.
102
103Almost all functions in default AI API take pointer to current AI type as parameter.
104This is used for accessing memory associated with the correct AI type from the structures
105having such AI type specific data.
106
107If a AI type wants to add its own data associated with some code structure, it needs
108to make sure data needed by default AI is in the beginning of the allocated data blocks.
109For example, see threaded AI: tai_player_alloc(), tai_player_free(), and struct tai_plr.
110
111Default AI code is usually built in freeciv only if some AI type using it has been built;
112either 'classic' or 'threaded'. If no such ai type has been built, you can still force
113it in for custom ai types to use by passing configure option --with-ai-lib
114
115
1166. Callback interface ChangeLog
117-------------------------------
118
119New in Freeciv 2.6:
120-------------------
121- Renamed enum danger_consideration as enum override_bool
122- Added restart_phase, called when AI gains control of the player whose phase is already
123  active, for example when continuing from a saved game
124- Added created_by_civil_war, called for AI type of the player who got created from
125  civil war
126- Added "created" player parameter to split_by_civil_war
127- Added game_start, called for all AI types when game starts
128- "city_got" is called when the city is fully initialized, "city_lost" when city still valid
129- Added gov_value for giving AI control of deciding value of governments
130- Added player_save_relations and player_load_relations called on savegame handling for a
131  player once per other player in game. Old player_save and player_load are called only once
132  overall
133- Added want_to_explore, called for AI type of the unit owner, when it is about to autoexplore
134- Added currently unused 'reserved' pointers that we can populate with optional callbacks
135  without need to change the mandatory capability of the modules
136

README.achievements

1Achievements are something player can gain in game by reaching
2set goals. Achievements active in the ruleset are defined in
3game.ruleset.
4
5Depending on whether achievement is defined unique or not,
6they are granted only to first player, or all players,
7to reach the goal for the achievement. Goal is defined by
8achievement type and another value specific to that achievement type.
9
10
11Achievement types
12=================
13
14Map_Known
15    Achievement is granted when player has mapped at least
16    <value>% of the world.
17
18Spaceship
19    This achievement is granted when player launches spaceship.
20    <Value> is ignored.
21
22Multicultural
23    Achievement is granted when player has citizens of at least
24    <value> different nationalities (across all their cities).
25
26Cultured_City
27    Achievement is granted when player has a city with at least
28    <value> culture points.
29
30Cultured_Nation
31    Achievement is granted when player has at least <value>
32    culture points.
33
34Lucky
35    Achievement is granted on turn when random number generator
36    gives value less than <value> out of 10000.
37
38Huts
39    Achievement is granted once player has entered <value> huts.
40
41Metropolis
42    Achievement is granted once there's city of at least size
43    <value> in the player's empire.
44
45Literate
46    Achievement is granted when player's literacy percent is at least
47    <value>.
48
49Land_Ahoy
50    Achievement is granted when player has seen <value> different
51    islands/continents. Home continent counts, so to give achievements
52    for finding first other continent, use value 2.
53

README.actions

1Actions
2=======
3An action is something a player can do to achieve something in the game.
4It has properties like cost, chance of success and effects. Some of those
5properties are configurable using effects and other rule set settings. To
6learn how to change them read README.effects and the rule set files of
7classic. An action enabler allows a player to do an action.
8
9Generalized action enablers
10===============================
11Some actions have generalized action enablers. An action like that can have
12zero, one or more action enablers defined for it in the ruleset. The player can
13do the action only when at least one generalized action enabler says that the
14action is enabled (and all its hard requirements are fulfilled). A ruleset
15author can therefore disable an action by not defining any action enablers for
16it in his ruleset.
17
18A generalized action enabler lives in game.ruleset. It consists of the action it
19enables and two requirement vectors. The first requirement vector, actor_reqs,
20applies to the entity doing the action. The second, target_reqs, applies to its
21target. If both requirement vectors are fulfilled the action is enabled as far
22as the action enabler is concerned. Note that an action's hard requirements
23still may make it impossible.
24
25In some situations an action controlled by generalized action enablers may be
26impossible because of limitations in Freeciv it self. Those limitations are
27called hard requirements. The hard requirements of each action are documented
28below in the section called "Actions and their hard coded requirements".
29
30If the player don't have the knowledge required to find out if an action is
31enabled or not the action is shown to the player in case it is possible. The
32client will indicate the uncertainty to the player.
33
34Should the player order a unit to do an illegal action the server will
35inform the player that his unit was unable to perform the action. The actor
36unit may also lose a ruleset configurable amount of move fragments.
37
38Example
39=======
40[actionenabler_veil_the_threat_of_terror]
41action = "Incite City"
42actor_reqs    =
43    { "type",   "name", "range", "present"
44      "DiplRel", "Has Casus Belli", "Local", TRUE
45      "DiplRel", "Provided Casus Belli", "Local", FALSE
46    }
47
48[actionenabler_go_bind_your_sons_to_exile]
49action = "Incite City"
50actor_reqs    =
51    { "type",   "name", "range", "present"
52      "Tech", "Flight", "Player", TRUE
53    }
54target_reqs    =
55    { "type",   "name", "range", "present"
56      "Tech", "Writing", "Player", False
57    }
58
59Above are two action enablers. They both enable the action "Incite City". If
60all the conditions of at least one of them are fulfilled it will be enabled.
61No information is given to the player about what action enabler enabled an
62action.
63
64The first action enabler, actionenabler_veil_the_threat_of_terror, is
65simple. It allows a player to incite a city if he has a reason to declare
66war on its owner AND the cities owner don't have a reason to declare war on
67him.
68
69The second action enabler, actionenabler_go_bind_your_sons_to_exile, is more
70complex. It allows a player that has Flight to bribe the cities of
71civilizations that don't have Writing. The complexity is caused by the
72requirement that the target don't know Writing. If the civilization of the
73target city knows Writing or not may be unknown to the acting player. To
74avoid this complexity a requirement that the acting player has an embassy to
75the target cities civilization (and therefore knowledge about its techs) can
76be added.
77
78Requirement vector rules
79========================
80An action enabler has two requirement vectors that must be true at the same
81time. This creates some corner cases you won't find with single requirement
82vectors. The rules below tries to deal with them.
83
84A "DiplRel" requirement with the range "Local" should always be put in the
85actor requirements.
86 * A local DiplRel requirement can always be expressed as an actor
87   requirement.
88 * Only having to care about local DiplRel requirements in the actor
89   requirements allows the Freeciv code responsible for reasoning about
90   action enablers to be simpler and faster.
91 * If player A having a diplomatic relationship to player B implies that
92   player B has the same relationship to player A the relationship is
93   symmetric. Examples: "Is foreign" and "War"
94 * Symmetric local DiplRel requirements can be moved directly from the
95   target requirement vector to the actor requirement vector.
96 * Asymmetric local DiplRel requirements must test for the same thing in
97   the opposite direction. Example: "Hosts embassy" -> "Has embassy"
98
99Actions and Lua
100===============
101Right before an action is executed, but after it is known to be legal, a
102signal is emitted to Lua. It has access to the same information as the
103server. It obviously don't have access to the result of the action since it
104isn't done yet.
105
106The signal's name starts with action_started_, then the actor kind, then
107another _ and in the end the target kind. The signal that is emitted when a
108unit performs an action on a city is therefore action_started_unit_city.
109
110The signal has three parameters. The first parameter is the action that is
111about to get started. The second is the actor. The third parameter is the
112target. The parameters of action_started_unit_city is therefore action,
113actor_unit and finally target city.
114
115To get the rule name of an action, that is the name used in action enablers,
116you can use the method rule_name(). To get a translated name that is nice to
117show to players use name_translation().
118
119Example 1
120=========
121The following Lua code will log all actions done by any unit to a city or to
122another unit:
123
124function action_started_callback(action, actor, target)
125  log.normal(_("%s (rule name: %s) performed by %s on %s"),
126             action:name_translation(),
127             action:rule_name(),
128             actor.owner.nation:plural_translation(),
129             target.owner.nation:plural_translation())
130end
131
132signal.connect("action_started_unit_city", "action_started_callback")
133signal.connect("action_started_unit_unit", "action_started_callback")
134
135Example 2
136=========
137The following Lua code will make a player that poisons the population of
138cities risk civil war:
139
140function action_started_callback(action, actor, target)
141  if action:rule_name() == "Poison City" then
142     edit.civil_war(actor.owner, 5);
143  end
144end
145
146signal.connect("action_started_unit_city", "action_started_callback")
147
148Actions and their hard coded requirements
149=========================================
150
151Actions done by a unit against a city
152=====================================
153"Establish Embassy" - Establish a real embassy to the target player
154 * UI name can be set using ui_name_establish_embassy
155 * actor must be aware that the target exists
156 * actor can't have a real embassy to the target player
157 * actor must be on the same tile as the target or on the tile next to it.
158 * target must be foreign.
159
160"Investigate City" - Look at the city dialog of a foreign city
161 * UI name can be set using ui_name_investigate_city
162 * actor must be aware that the target exists
163 * actor must be on the same tile as the target or on the tile next to it.
164 * target must be foreign.
165
166"Sabotage City" - Destroy a building or the production in the target city.
167 * UI name can be set using ui_name_sabotage_city
168 * actor must be aware that the target exists
169 * actor must be on the same tile as the target or on the tile next to it.
170
171"Targeted Sabotage City" - Targeted version of the above.
172 * UI name can be set using ui_name_targeted_sabotage_city
173 * actor must be aware that the target exists
174 * actor must be on the same tile as the target or on the tile next to it.
175
176"Poison City" - Kill a citizen in the target city.
177 * UI name can be set using ui_name_poison_city
178 * actor must be aware that the target exists
179 * actor must be on the same tile as the target or on the tile next to it.
180
181"Steal Tech" - Steal a random tech from the targets owner.
182 * UI name can be set using ui_name_steal_tech
183 * actor must be aware that the target exists
184 * actor must be on the same tile as the target or on the tile next to it.
185 * target must be foreign.
186
187"Targeted Steal Tech" - Targeted version of the above.
188 * UI name can be set using ui_name_targeted_steal_tech
189 * actor must be aware that the target exists
190 * actor must be on the same tile as the target or on the tile next to it.
191 * target must be foreign.
192
193"Incite City" - Pay the target city to join the actors owners side.
194 * UI name can be set using ui_name_incite_city
195 * actor must be aware that the target exists
196 * actor must be on the same tile as the target or on the tile next to it.
197 * target must be foreign.
198
199"Steal Gold" - Steal some gold from the owner of the target city.
200 * UI name can be set using ui_name_steal_gold
201 * adjustable with the Max_Stolen_Gold_Pm effect and with the
202   Thiefs_Share_Pm effect
203 * actor must be aware that the target exists
204 * the targets owner must have more than 0 gold.
205 * actor must be on the same tile as the target or on the tile next to it.
206 * target must be foreign.
207
208"Establish Trade Route" - Establish a trade route to the target city.
209 * UI name can be set using ui_name_establish_trade_route
210 * actor must be aware that the target exists
211 * actor must be on the same tile as the target or on the tile next to it.
212 * actor must have a home city.
213 * target must be foreign or trademindist tiles away from that home city.
214 * trade route type pct (see "Trade settings") can't be 0%.
215 * it is possible to establish a trade route between the cities as far as
216   the two cities them self are concerned. (Example: If one of the cities
217   can't have any trade routes at all it is impossible to establish a new
218   one.)
219
220"Enter Marketplace" - Get a one time bounus without creating a trade route.
221 * UI name can be set using ui_name_enter_marketplace
222 * actor must be aware that the target exists
223 * if force_trade_route is true "Establish Trade Route" must be impossible
224 * actor must be on the same tile as the target or on the tile next to it.
225 * actor must have a home city.
226 * target must be foreign or trademindist tiles away from that home city.
227 * trade route type (see Trade settings) can't be 0%.
228
229"Help Wonder" - Add the shields used to build the actor to the target city.
230 * UI name can be set using ui_name_help_wonder
231 * actor must be aware that the target exists
232 * actor must be on the same tile as the target or on the tile next to it.
233 * target must be building a wonder.
234 * target city must still need the extra sheilds to build the wonder.
235
236Actions done by a unit against another unit
237===========================================
238"Sabotage Unit" - Halve the target unit's hit points.
239 * UI name can be set using ui_name_sabotage_unit
240 * actor must be on the same tile as the target or on the tile next to it.
241 * target must be visible for the actor.
242
243"Bribe Unit" - Make the target unit join the actors owners side.
244 * UI name can be set using ui_name_bribe_unit
245 * actor must be on the same tile as the target or on the tile next to it.
246 * target must be foreign.
247 * target must be visible for the actor.
248

README.agents

1
2Overview
3========
4
5An agent is a piece of code which is responsible for a certain
6area. An agent will be given a specification by the user of the agent
7and a set of objects which the agent can control (the production
8queue of a city, a city, a unit, a set of units or the whole
9empire). The user can be a human player or another part of the code
10including another agent. There is no extra interaction between the
11user and the agent needed after the agent got its task description.
12
13Examples of agents:
14 - an agent which is responsible for moving a certain unit from A to B
15 - an agent which is responsible for maximize the food production of a
16 city
17 - an agent which is responsible for the production queue of a city
18 - an agent which is responsible for defending a city
19 - an agent which is responsible for a city
20 - an agent which is responsible for all cities
21
22An agent may use other agents to accomplish its goal. Such decencies
23form a hierarchy of agents. The position in this hierarchy is denoted
24by a level. A higher level means more complexity. So an agent of level
25n can only make use of agents of level (n-1) or lower. Level 0 defines
26actions which are carried out at the server and are atomic actions
27(actions which can't be simulated at the client).
28
29By such a definition an agent doesn't have to be implemented in C and
30also doesn't have to make use of client/agents/agents.[ch].
31
32The core of an agent consist of two parts: a part which makes
33decisions and a part which carries out the decision. The results of
34the first part should be made available. An agent lacking the
35execution part is called advisor.
36
37An agent should provide a GUI besides the core.
38
39Implementation
40==============
41
42The received task description and any decision been made can be saved
43in attributes. An agent should not assume anything. This includes
44especially: _no magic numbers_. Everything should be settable by the
45user.
46
47Use client/agents/agents.[ch] to get informed about certain
48events. Don't hesitate to add more callbacks. Use
49client/agents/agents:wait_for_requests instead of
50client/civclient:wait_till_request_got_processed.
51

README.attributes

1
2Client/server model
3===================
4
5Each client player has an attribute block and the server also holds
6such an attribute block for every player. All attribute blocks the
7server holds are included in the save game. The client and server
8synchronize their blocks. The server sends its block to the client at
9game start or reload. The client sends an updated block at each end of
10turn to the server. Since the maximum packet size is limited to
11currently 4k and the attribute block can have arbitrary size (although
12limited to 64k in this initial version) the attribute block can't be
13transferred in one packet. So the attribute block is divided into
14attribute chunks which are reassembled at the receiver. No part of the
15server knows any inner structure of the attribute block. For the
16server an attribute block is just a block of bytes.
17
18User interface
19==============
20
21Since an attribute block isn't a good user interface the user can
22access the attributes through a mapping/dictionary/hashmap/hashtable
23interface. This hashtable will get serialized to the attribute block
24and the other direction around. The key of the hashtable consists of:
25the (real) key, x, y and an id. The (real) key is an integer which
26defines the use and format of this attribute. The values of the
27hashtable can have arbitrary length. The internal structure of an
28value is unknown to the attribute handling.
29
30For easier access there are wrapper functions for the common types
31unit, city, player and tile. So there are easy methods for attaching
32arbitrary data to a unit, a city, a player (self or other) or a tile.
33

README.delta

1=========================================================================
2  Delta
3=========================================================================
4
5If delta is enabled for this packet the packet-payload (after the bytes
6used by the packet-header) is followed by the delta-header. (See HACKING
7to learn how to understand the packet-header.) The delta-header
8is a bitvector which represents all non-key fields of the packet. If
9the field has changed the corresponding bit is set and the field
10value is so included in delta-body. The values of the unchanged fields
11will be filled in from an old version at the receiving side. The old
12version filled in from is the previous packet of the same kind that has
13the same value in each key field. (If the packet's kind don't have any
14key fields the previous packet of the same kind is used) If no old
15version exists the unchanged fields will be assumed to be zero.
16
17For bool field another optimization called bool-header-folding is
18applied. Instead of sending an indicator in the bitvector if the given
19bool values has changed (and so using 1 byte for the real value) the
20actual value of the bool is transfered in the bitvector bit of this
21bool field.
22
23Another optimization called array-diff is used to reduce the amount of
24elements transfered if an array is changed. This is independent of the
25delta-header bit i.e. it will only be used if the array has changed
26its value and the bit indicates this. Instead of transferring the
27whole array only a list of (index, new value of this index) pairs are
28transferred. The index is 8bit and the end of this pair list is
29denoted by an index of 255.
30
31For fields of struct type (or arrays of struct) the following function
32is used to compare entries, where foo stands for the name of the struct:
33
34  bool are_foo_equal(const struct foo *a, const struct foo *b);
35
36The declaration of this function must be made available to the generated
37code by having it #include the correct header. The includes are hard-
38coded in generate_packets.py.
39
40=========================================================================
41  Compression
42=========================================================================
43
44To further reduce the network traffic the (delta) packets are
45compressed using the DEFLATE compression algorithm.
46To get better compression results multiple packets are
47grouped together and compressed into a chunk. This chunk is then
48transfered as a normal packet. A chunk packet starts with the 2 byte
49length field which every packet has. A chunk packet has no type. A
50chunk packet is identified by having a too large length field. If the
51length of the packet is over COMPRESSION_BORDER it is a chunk
52packet. It will be uncompressed at the receiving side and re-feed into
53the receiving queue.
54
55If the length of the chunk packet can't be expressed in the available
56space of the 16bit length field (>48kb) the chunk is sent as a jumbo
57packet. The difference between a normal chunk packet and a jumbo chunk
58packet is that the jumbo packet has JUMBO_SIZE in the size field and
59has an additional 4 byte len field after the 2 byte len field. The
60second len field contains the size of the whole packet (2 byte
61first length field + 4 byte second length field + compressed data).
62The size field of a normal chunk packet is its size + COMPRESSION_BORDER.
63
64Packets are grouped for the compression based on the
65PACKET_PROCESSING_STARTED/PACKET_PROCESSING_FINISHED and
66PACKET_FREEZE_HINT/PACKET_THAW_HINT packet pairs. If the first
67(freeze) packet is encountered the packets till the second (thaw)
68packet are put into a queue. This queue is then compressed and sent as
69a chunk packet. If the compression would expand in size the queued
70packets are sent uncompressed as "normal" packets.
71
72The compression level can be controlled by the
73FREECIV_COMPRESSION_LEVEL environment variable.
74
75=========================================================================
76  Files
77=========================================================================
78
79There are four file/filesets involved in the delta protocol:
80 1) the definition file (common/packets.def).
81 2) the generator (common/generate_packets.py).
82 3) the generated files (*/*_gen.[ch] or as a list
83 client/packhand_gen.c, client/packhand_gen.h, common/packets_gen.c,
84 common/packets_gen.h, server/hand_gen.c and server/hand_gen.h).
85 4) the overview (README.delta, this file)
86
87The definition file lists all valid packet types with their
88fields. The generator takes this as input and creates the generated
89files.
90
91For adding and/or removing packets and/or fields you only have to
92touch the definition file. If you however plan to change the generated
93code (adding more statistics for example) you have to change the
94generator.
95
96=========================================================================
97  Changing the definition file
98=========================================================================
99
100Adding a packet:
101 1) choose an unused packet number. The generator will make sure that
102 you don't use the same number two times.
103 2) choose a packet name. It should follow the naming style of the
104 other packets: PACKET_<group>_<remaining>. <group> may be SERVER,
105 CITY, UNIT, PLAYER, DIPLOMACY and so on.
106 3) decide if this packet goes from server to client or client to server
107 4) choose the field names and types
108 5) choose packet and field flags
109 6) write the entry into the corresponding section of common/packets.def
110
111If you add a field which is a struct (say "foobar") you have to write
112the following functions: dio_get_foobar, dio_put_foobar and
113are_foobars_equal.
114
115Removing a packet:
116 1) add a mandatory capability
117 2) remove the entry from common/packets.def
118
119Adding a field:
120 Option A:
121   1) add a mandatory capability
122   2) add a normal field line:
123      COORD x
124 Option B:
125   1) add a non-mandatory capability (say "new_version")
126   2) add a normal field line containing this capability in an add-cap
127   flag:
128      COORD x; add-cap(new_version)
129
130Removing a field:
131 Option A:
132   1) add a mandatory capability
133   2) remove the corresponding field line
134 Option B:
135   1) add a non-mandatory capability (say "cleanup")
136   2) add to the corresponding field line a remove-cap flag
137
138After changing the definition file the generator has to be run. The
139common/Makefile will take care of this. You don't need to run
140autoconf/automake/configure.
141
142=========================================================================
143  Capabilities and variants
144=========================================================================
145
146The generator has to generate code which supports different
147capabilities at runtime according to the specification given in the
148definitions with add-cap and remove-cap. The generator will find the
149set of used capabilities for a given packet. Lets say there are two
150fields with "add-cap(cap1)" and one field with an "remove-cap(cap2)"
151flag. So the set of capabilities are cap1, cap2. At runtime the
152generated code may run under 4 different capabilities:
153 - neither cap1 nor cap2 are set
154 - cap1 is set but cap2 isn't
155 - cap1 is not set but cap2 is
156 - cap1 and cap2 are set
157
158Each of these combinations is called a variant. If n is the number of
159capabilities used by the packet the number of variants is 2^n.
160
161For each of these variant a seperate send and receive function will be
162generated. The variant for a packet and a connection are calculated
163once and then saved in the connection struct.
164

README.effects

1The effects.ruleset file contains all effects in play in a Freeciv scenario.
2They have the following form (this is perhaps the most complicated example I
3could find):
4
5[effect_hydro_plant]
6type  = "Output_Bonus"
7value = 25
8reqs  =
9    { "type", "name", "range", "present", "quiet"
10      "Building", "Factory", "City", TRUE, FALSE
11      "Building", "Hydro Plant", "City", TRUE, FALSE
12      "OutputType", "Shield", "Local", TRUE, TRUE
13      "Building", "Hoover Dam", "Player", FALSE, FALSE
14      "Building", "Nuclear Plant", "City", FALSE, FALSE
15    }
16
17The text in the brackets is the entry name, which just has to be unique, but
18is otherwise not used. The type field tells Freeciv which effect you are
19defining.  The value is the effect's value, which depends on which effect it
20is. The reqs table contain a list of requirements for this effect being in
21effect. You need to satisfy all requirements listed here for this effect to
22take effect in the game. Requirements with present = TRUE must be present,
23those with present = FALSE must not be present.
24
25Value is integral amount parameter for many effects (must be in the range
26-32767 to 32767).
27
28Requirement range may be one of: "None", "Local",
29"CAdjacent" (Cardinally Adjacent), "Adjacent", "City",
30"Continent", "Player", "Allied, "World". Some requirement types may only work at
31certain ranges; this is not yet documented. In particular, at present,
32"Continent" effects can affect only cities and units in cities.
33
34A requirement may have a 'survives' field, and if this is 'TRUE', the effect
35survives destruction. This is supported for only a few conditions and
36ranges: wonders (at world or player range), nations, and advances
37(both at world range only).
38
39A requirement may have a 'present' field, and if this is 'FALSE',
40the requirement is negated (the condition must not be true for the req to be
41met).
42
43A requirement may have a 'quiet' field, and if this is 'TRUE', the help
44system does not try to autogenerate text about that requirement. This
45can be used if the help system's text is unclear or misleading, or if
46you want to describe the requirement in your own words. The 'quiet'
47field has no effect on the game rules.
48
49
50Requirement types and supported ranges
51======================================
52
53Tech:            World, Alliance, Team, Player
54TechFlag:        World, Alliance, Team, Player
55Achievement:     World, Alliance, Team, Player
56Gov:             Player
57Building:        World, Alliance, Team, Player, Continent, Traderoute, City, Local
58Extra:           Local, Adjacent, CAdjacent, Traderoute, City
59BaseFlag:        Local, Adjacent, CAdjacent, Traderoute, City
60RoadFlag:        Local, Adjacent, CAdjacent, Traderoute, City
61ExtraFlag:       Local, Adjacent, CAdjacent, Traderoute, City
62Terrain:         Local, Adjacent, CAdjacent, Traderoute, City
63Resource:        Local, Adjacent, CAdjacent, Traderoute, City
64UnitType:        Local
65UnitFlag:        Local
66UnitClass:       Local
67UnitClassFlag:   Local
68Nation:          World, Alliance, Team, Player
69NationGroup:     World, Alliance, Team, Player
70Nationality:     Traderoute, City
71DiplRel:         World, Alliance, Team, Player, Local
72OutputType:      Local
73Specialist:      Local
74MinYear:         World
75Topology:        World
76Age (of unit):   Local
77Age (of city):   City
78Age (of player): Player
79MinSize:         Traderoute, City
80MinCulture:      World, Alliance, Team, Player, Traderoute, City
81AI:              Player
82MaxUnitsOnTile:  Local, Adjacent, CAdjacent
83TerrainClass:    Local, Adjacent, CAdjacent, Traderoute, City
84TerrainFlag:     Local, Adjacent, CAdjacent, Traderoute, City
85TerrainAlter:    Local
86CityTile:        Local, Adjacent, CAdjacent
87Style:           Player
88UnitState:       Local
89MinMoveFrags:    Local
90MinVeteran:      Local
91MinHitPoints:    Local
92
93
94MinSize is the minimum size of a city required.
95AI is ai player difficulty level.
96TerrainClass is either "Land" or "Oceanic".
97TerrainAlter is "CanIrrigate", "CanMine", or "CanRoad".
98CityTile is either "Center" (city center) or "Claimed" (owned).
99DiplRel is a diplomatic relationship.
100MaxUnitsOnTile is about the number of units present on a tile.
101UnitState is "Transported" or "OnLivableTile".
102MinMoveFrags is the minimum move fragments the unit must have left.
103Nationality is fulfilled by any citizens of the given nationality
104present in the city.
105
106
107Effect types
108============
109
110Tech_Parasite
111    Gain any advance known already by amount number of other teams,
112if team_pooled_research is enabled, or amount number of other players
113otherwise. Note that if you have two such effects, they combine into
114one much worse effect (the number of players required to gain an advance
115is increased).
116
117Airlift
118    Allow airlift to/from a city. The value tells how many units per
119    turn can be airlifted, unless server setting 'airlifttingstyle' sets
120    the number unlimited for either source or destination city. If airlifts
121    are set to unlimited, they are enabled by any positive value of this
122    effect.
123
124Any_Government
125    Allow changing to any form of government regardless of tech prerequisites.
126
127Capital_City
128    The city with this effect is the capital city.
129
130Gov_Center
131    The city with this effect is governmental center. Corruption and
132    waste depends on distance to nearest such city.
133
134Enable_Nuke
135    Allows the production of nuclear weapons.
136
137Enable_Space
138    Allows the production of space components.
139
140Specialist_Output
141    Specify what outputs a specialist is producing. Should be used with an
142OutputType requirement.
143
144Output_Bonus
145    City production is increased by amount percent.
146
147Output_Bonus_2
148    City production is increased by amount percent after Output_Bonus, so is
149multiplicative with it.
150
151Output_Add_Tile
152    Add amount to each worked tile.
153
154Output_Inc_Tile
155    Add amount to each worked tile that already has at least 1 output.
156
157Output_Per_Tile
158    Increase tile output by amount percent.
159
160Output_Tile_Punish_Pct
161    Reduce the output of a tile by amount percent. The number of units to
162remove is rounded down. Applied after everything except a city center's
163minimal output.
164
165Output_Waste_Pct
166    Reduce waste by amount percent.
167
168Force_Content
169    Make amount' unhappy citizens content. Applied after martial law and unit
170penalties.
171
172Give_Imm_Tech
173    Give amount techs immediately.
174
175Growth_Food
176    Food left after cities grow or shrink is amount percent of the capacity of
177the city's foodbox. This also affects the 'aqueductloss' penalty.
178
179Have_Embassies
180    Like having embassies with all other players.
181
182Irrigation_Pct
183    The tile gets value % of its terrain's irrigation_food_incr bonus.
184(This is how irrigation-like extras have an effect.)
185
186Mining_Pct
187    The tile gets value % of its terrain's mining_shield_incr bonus.
188(This is how mine-like extras have an effect.)
189
190Make_Content
191    Make amount unhappy citizens content. Applied before martial law and unit
192penalties.
193
194Make_Content_Mil
195    Make amount unhappy citizens caused by units outside of a city content.
196
197Make_Content_Mil_Per
198    Make amount per unit of unhappy citizens caused by units outside of a city
199content.
200
201Make_Happy
202    Make amount citizens happy.
203
204Enemy_Citizen_Unhappy_Pct
205    There will be one extra unhappy citizen for each value/100 citizens
206    of enemy nationality in the city.
207
208No_Anarchy
209    No period of anarchy between government changes. (This also neuters
210the Has_Senate effect.)
211
212Nuke_Proof
213    City is nuke proof.
214
215Pollu_Pop_Pct
216    Increases pollution caused by each unit of population by amount
217percent (adds to baseline of 100%, i.e. 1 pollution per citizen).
218
219Pollu_Pop_Pct_2
220    Increases pollution caused by each unit of population by amount
221percent (adds to baseline of 100%, i.e. 1 pollution per citizen).
222This factor is applied after Pollu_Pop_Pct, so is multiplicative with it.
223
224Pollu_Prod_Pct
225    Increases pollution caused by shields by amount percent.
226
227Health_Pct
228    Reduces possibility of illness (plague) in a city by amount percent.
229
230Reveal_Cities
231    Immediately make all cities known.
232
233Reveal_Map
234    Immediately make entire map known.
235
236Incite_Cost_Pct
237    Increases revolt cost by amount percent.
238
239Unit_Bribe_Cost_Pct
240    Increases unit bribe cost by amount percent. Requirements are from the
241point of view of the target unit, not the briber.
242
243Max_Stolen_Gold_Pm
244    The upper limit on the permille of the players gold that may be
245stolen by a unit doing the "Steal Gold" action. Evaluated against the city
246stolen from.
247
248Thiefs_Share_Pm
249    The permille of the gold stolen by a unit doing the "Steal Gold"
250action that is lost before it reaches the player ordering it. Evaluated
251against the actor unit.
252
253Illegal_Action_Move_Cost
254    The number of move fragments lost when the player tries to do an action
255that turns out to be illegal.
256
257Size_Adj
258    Increase maximum size of a city by amount.
259
260Size_Unlimit
261    Make the size of a city unlimited.
262
263SS_Structural, SS_Component and SS_Module
264    A part of a spaceship; this is a "Local" ranged effect. It (for now)
265applies to improvements which cannot be built unless "Enable_Space" is felt.
266Buildings which have this effect should probably not be given any other
267effects.
268
269Spy_Resistant
270    If a spy specifies a target for sabotage, then she has an AMOUNT percent
271chance to fail. Also in diplomatic combat defending diplomatic units in cities
272will get an AMOUNT percent bonus. All Spy_Resistant's are summed before being
273applied.
274
275Move_Bonus
276    Add amount movement to units. Use UnitClass' requirement with range of
277'Local' to give it a specific class of units only.
278
279Unit_No_Lose_Pop
280    No population lost when a city's defender is lost.
281
282Unit_Recover
283    Units recover amount extra hitpoints per turn.
284
285Upgrade_Unit
286    Upgrade amount obsolete units per turn.
287
288Upkeep_Free
289    Improvements with amount or less upkeep cost become free to upkeep (others
290are unaffected).
291
292Tech_Upkeep_Free
293    If this value is greater than 0, the tech upkeep is reduced by this value.
294    For tech upkeep style "Basic" this is total reduction, for tech upkeep
295    style "Cities" this reduction is applied to every city.
296
297No_Unhappy
298    No citizens in the city are ever unhappy.
299
300Veteran_Build
301    Increases the veteran class of newly created units of this type. The
302total amount determines the veteran class (clipped at the maximum for the
303unit).
304
305Veteran_Combat
306    Increases the chance of units of this type becoming veteran after combat
307by amount percent.
308
309HP_Regen
310    Units that do not move recover amount percentage of their full hitpoints
311per turn.
312
313City_Vision_Radius_Sq
314    Increase city vision radius in squared distance by amount tiles.
315
316Unit_Vision_Radius_Sq
317    Increase unit vision radius in squared distance by amount tiles.
318
319Defend_Bonus
320    Increases defensive bonuses of units. Any unit requirements on this effect
321    will be applied to the _attacking_ unit. Attackers with "BadWallAttacker" flag
322    will have their firepower set to 1.
323
324Gain_AI_Love
325    Gain amount points of "AI love" with AI(s).
326
327Turn_Years
328    Year advances by AMOUNT each turn unless Slow_Down_Timeline causes it
329    to be less.
330
331Turn_Fragments
332    Year fragments advance by AMOUNT each turn.
333
334Slow_Down_Timeline
335    Slow down the timeline based on the AMOUNT. If AMOUNT >= 3 the timeline
336will be max 1 year/turn; with AMOUNT == 2 it is max 2 years/turn;
337with AMOUNT == 1 it is max 5 years/turn; with AMOUNT <= 0 the timeline is
338unaffected. The effect will be ignored if game.spacerace isn't set.
339
340Civil_War_Chance
341    Base chance in per cent of a nation being split by civil war when its
342capital is captured is increased by this amount. This percentage is in-
343creased by 5 for each city in civil disorder and reduced by 5 for each one
344celebrating.
345
346City_Unhappy_Size
347    The maximum number of citizens in each city that are naturally content;
348in larger cities, new citizens above this limit start out unhappy. (Before
349Empire_Size_Base/Step are applied.)
350
351Empire_Size_Base
352    Once your civilization has more cities than the value of this effect,
353each city gets one more unhappy citizen. If the sum of this effect and
354Empire_Size_Step is zero, there is no such penalty.
355
356Empire_Size_Step
357    After your civilization reaches Empire_Size_Base size, it gets one more
358unhappy citizen for each amount of cities it gets above that. Set to zero to
359disable. You can use Empire_Size_Step even if Empire_Size_Base is zero.
360
361Max_Rates
362    The maximum setting for each tax rate is amount.
363
364Martial_Law_Each
365    The amount of citizens pacified by each military unit giving martial law.
366
367Martial_Law_Max
368    The maximum amount of units that will give martial law in city.
369
370Rapture_Grow
371    Can rapture grow cities.
372
373Revolution_Unhappiness
374    If value is greater than zero, it tells how many turns citizens
375    will tolerate city disorder before government falls. If value is
376    zero, government never falls.
377
378Has_Senate
379    Has a senate that prevents declarations of war in most cases.
380
381Inspire_Partisans
382    Partisan units (defined in units.ruleset) may spring up when this player's
383cities are taken.
384
385Happiness_To_Gold
386    Make all Make_Content and Force_Content effects instead generate gold.
387
388Max_Trade_Routes
389    Number of trade routes that city can establish.
390    This is forced on trade route creation only. Existing trade routes
391    are never removed due to reduction of effect value. This is to
392    avoid micro-management, need to create same trade routes again
393    after their max number has been temporarily down.
394
395Fanatics
396    Units with "Fanatics" flag incur no upkeep.
397
398No_Diplomacy
399    Cannot use any diplomacy.
400
401Not_Tech_Source
402    Tech cannot be received from this player by any means.
403
404Trade_Revenue_Bonus
405    One time trade revenue bonus is multiplied by pow(2, amount/1000).
406    The amount value is taken from the caravan's home city.
407
408Traderoute_Pct
409    Percentage bonus for trade from traderoutes. This bonus applies after
410    the value of the traderoute is already calculated. It affects one end
411    of the traderoute only.
412
413Unhappy_Factor
414    Multiply unhappy unit upkeep by amount.
415
416Upkeep_Factor
417    Multiply unit upkeep by amount.
418
419Unit_Upkeep_Free_Per_City
420    In each city unit upkeep is deducted by this amount. As usual, you can use
421with OutputType requirement to specify which kind of upkeep this should be.
422
423Output_Waste
424    Base amount in percentage that each city has in waste. Waste can be used
425with any output type, use an OutputType requirement to specify which.
426
427Output_Waste_By_Distance
428    For each tile in real distance that a city is from nearest
429Government Center, it gets amount of extra waste.
430
431Output_Penalty_Tile
432    When a tile yields more output than amount, it gets a penalty of -1.
433
434Output_Inc_Tile_Celebrate
435    Tiles get amount extra output when city working them is celebrating.
436
437Upgrade_Price_Pct
438    Increases unit upgrade cost by amount percent. This effect works at
439    player level. You cannot adjust upgrade costs for certain unit type or
440    for units upgraded in certain city.
441
442Retire_Pct
443    The chance that unit gets retired (removed) when turn changes.
444    Retirement only happens if there are no enemy units or cities within
445    a few tiles. (This exists mainly to implement barbarian behavior.)
446
447Visible_Wall
448    Instruct client to show specific buildings version of the city graphics.
449    Zero or below are considered normal city graphics.
450
451Tech_Cost_Factor
452    Factor for research costs.
453
454Shield2Gold_Factor
455    Factor in percent for the conversion of unit shield upkeep to gold upkeep.
456    A value of 200 would transfer 1 shield upkeep to 2 gold upkeep. The range
457    of this effect must be player or world. Note that only units with the
458    "Shield2Gold" flag will be affected by this.
459
460Tile_Workable
461    If value > 0, city can work target tile.
462
463Irrig_Possible
464    If value > 0, unit can build irrigation to target tile. In addition to
465    requirements given to this effect, unit must also have Settlers flag.
466
467Mining_Possible
468    If value > 0, unit can build mine to target tile. In addition to
469    requirements given to this effect, terrain type must be one to which mine
470    can be built.
471
472Transform_Possible
473    If value > 0, unit can transform target tile. In addition to requirements
474    given to this effect, terrain type needs to be one that can be transformed.
475
476Irrig_TF_Possible
477    If value > 0, unit can transform target tile terrain to another by irrigating.
478    In addition to requirements given to this effect, terrain must be one that
479    can be transformed by irrigating.
480
481Mining_TF_Possible
482    If value > 0, unit can transform target tile terrain to another by mining.
483    In addition to requirements given to this effect, terrain must be one that
484    can be transformed by mining.
485
486Migration_Pct
487    Increase the calculated migration score for the a city by amount in
488    percent.
489
490City_Radius_Sq
491    Increase the squared city radius by amount. Currently, this can only
492    usefully have "MinSize", "Building", or "Tech" requirements.
493
494City_Build_Slots
495    Increase the number of units with no population cost a city can build in
496    a turn if there are enough shields.
497
498City_Image
499    The index for the city image of the given city style.
500
501Victory
502    Positive value means that player wins the game.
503
504Performance
505    Value is how much performance type culture city produces.
506
507History
508    Value is how much history type (cumulative) culture city produces.
509
510National_Performance
511    Value is how much performance type culture, not tied to any specific city,
512    nation produces.
513
514National_History
515    Value is how much history type (cumulative) culture, not tied to any any
516    specific city, nation produces.
517
518
519Effects and Lua
520===============
521Lua has some integration with effects. The effects module allows you to
522get an effect type's current value given that it is evaluated against the
523entities you specify. Only a subset of the entities a hard coded effect can
524be evaluated against is supported. An effect type's value is the sum of the
525effects of that type from effects.ruleset whos requirement vectors are
526fulfilled given the entities you specified.
527
528Example
529-------
530Get the value of Tech_Parasite for the player
531effects.player_bonus(find.player(0), "Tech_Parasite")
532
533
534Details about requirement types
535===============================
536
537The DiplRel requirement type
538----------------------------
539Look for the diplomatic relationship "Never met", "War", "Cease-fire",
540"Armistice", "Peace", "Alliance", "Team", "Gives shared vision",
541"Receives shared vision", "Hosts embassy", "Has embassy",
542"Hosts real embassy" (not from an effect), "Has real embassy",
543"Has Casus Belli" (reason for war), "Provided Casus Belli" or "Is foreign".
544
545A DiplRel is considered fulfilled for the range
546 * world if some player in the world has the specified diplomatic
547   relationship to some other living player.
548 * player if the player has the specified diplomatic relationship to some
549   other living player.
550 * local if the first player has the specified relationship to the second
551   player. Example: When testing a build requirement for an extra the first
552   player is the owner of the unit and the second player the owner of the
553   terrain the extra is built on.
554
555Only the exact relationship required fulfills it. Example: An alliance or
556an armistice agreement won't fulfill a "Peace" requirement.
557
558It is possible to create a requirement that in some situations won't have a
559player to check. In those cases the requirement will always be considered
560unfulfilled. This applies to both present and not present requirements. The
561ranges Alliance, Team, Player and Local needs a player. The Local range also
562needs the player the first player's relationship is to.
563
564Example: The requirements below are about the relationship to the owner of a
565tile. The table shows in what situations a requirement is fulfilled.
566
567Requirement is                            fulfilled when the tile is
568                                        | domestic | unclaimed | foreign
569"DiplRel", "Is foreign", "Local", TRUE  | no       | no        | yes
570"DiplRel", "Is foreign", "Local", FALSE | yes      | no        | no
571
572The MaxUnitsOnTile requirement type
573-----------------------------------
574Check the number of units present on a tile. Is true if no more than the
575specified number of units are present on a single tile.
576
577Hint: By using negation ("not present") it is possible to check if a tile
578has more than the given numbers. It is possible to combine a negated and a
579non negated requirement to specify a range.
580
581The UnitState requirement type
582------------------------------
583"Transported" is fulfilled if the unit is transported by another unit.
584"OnLivableTile" is fulfilled if the unit is on a tile where it can exist
585                outside of a transport.
586

README.fcdb

1===========================================================================
2 Authentication and Freeciv database support (fcdb)
3===========================================================================
4
5The Freeciv server allows the authentication of users, although by default
6it is not enabled, and anyone can connect with any name.
7
8In order to support authentication, the Freeciv server needs access to a
9database backend in which to store the credentials. To support different
10database backends, the database access code is written in Lua using luasql.
11In principle, luasql supports SQLite3, MySQL, and Postgres backends, and
12the Freeciv server can be built with any or all of these; however, the
13supplied scripts currently do not support Postgres out of the box.
14
15As well as storing and retrieving usernames and passwords, the supplied
16database access script logs the time and IP address of each attempted
17login, although this information is not used by the Freeciv server itself.
18
19To use the Freeciv database and authentication, the server has to be built
20with the '--enable-fcdb' and '--enable-auth' options to 'configure'. It
21must also be installed properly, as it searches for database.lua in the
22install location; the server cannot simply be run from a build directory if
23authentication is required.
24
25================================
26 Quick setup: SQLite
27================================
28
29The simplest setup is to use the SQLite backend, and this is probably the
30best option for new deployments. In this setup, the authentication data is
31stored in a simple file accessed directly by the Freeciv server; there is
32no need for a separate database server process.
33
34In order to use this, the server must have been built with
35'--enable-fcdb=sqlite3'.
36
37To set this up, first create a database configuration file called something
38like fc_auth.conf, with the 'database' key specifying where the database
39file is to live (of course it must be readable and writable by the Freeciv
40server):
41
42  [fcdb]
43  backend="sqlite"
44  database="/my/path/to/freeciv.sqlite"
45
46If you have experimental xml registry backend built in to freeciv, above
47configuration can also be given as
48
49<?xml version="1.0" encoding="UTF-8"?>
50<Freeciv options="+xml">
51  <fcdb>
52    <database>"/my/path/to/freeciv.sqlite"</database>
53    <backend>"sqlite"</backend>
54  </fcdb>
55</Freeciv>
56
57(For more information on the format of this file, see below. There are more
58settings available, but this file is entirely sufficient for a SQLite
59setup.)
60
61Now start the server with
62  freeciv-server --Database fc_auth.conf --auth --Newusers
63
64The first time you do this, you need to create the database file and its
65tables with the following server command:
66  /fcdb lua sqlite_createdb()
67
68Now you can create some users by connecting with the client; due to the
69--Newusers flag, when you connect with the client with a previously unknown
70username, the server will prompt for a password and save the new account to
71the database.
72
73You may want to prepopulate the users table this way and then restart the
74server without --Newusers for the actual game, or you can run the game with
75--Newusers.
76
77--------------------------------
78 Advanced SQLite usage
79--------------------------------
80
81SQLite supports working with a temporary database in memory which is never
82written to disk. To do this, specify 'database=":memory:"' in the
83configuration file. The database will last only for the lifetime of the
84freeciv-server process; its contents will be lost if the server quits or
85crashes (it is not saved in the saved game file). You'll probably need the
86--Newusers option :)
87
88================================
89 MySQL
90================================
91
92This setup uses a network connection to a separate MySQL database server.
93MySQL was the only backend supported before Freeciv version 2.4, so is
94supported for backward compatibility, but SQLite is probably a better
95option for new deployments unless you have special requirements.
96
97In order to use this, the server must have been built with
98'--enable-fcdb=mysql'.
99
100You can still use an existing pre-2.4 MySQL authentication database with
101Freeciv 2.4 or later. Note however that the format of the configuration
102file has changed slightly from that which used to be supplied to the --auth
103option:
104 - Section header is now '[fcdb]' instead of '[auth]'
105 - You should add 'backend="mysql"'
106 - the 'table' directive is now called 'table_user', and the default table
107   name is now 'fcdb_auth'; if your setup relied on the old default, you'll
108   need 'table_user="auth"'
109 - the 'login_table' directive is now called 'table_log', and the default
110   table name is now 'fcdb_log'; if your setup relied on the old default,
111   you'll need 'table_log="loginlog"'
112
113If you want to use MySQL for a fresh userbase, the supplied
114scripts/setup_auth_server.sh can be used to create database tables in an
115existing MySQL database, and a suitable config file describing that
116database, which can be passed to the server's '--Database' option.
117
118Before running this script, you will need to have a MySQL database server
119running, with a user account for the Freeciv server and a database to
120contain the data (ideally empty). (The space required for a Freeciv user
121database is very small.)
122
123Having created the tables and config file, you should be able to invoke the
124server in a similar way to SQLite.
125
126================================
127 Command-line options
128================================
129
130The following server command-line options are relevant to authentication:
131
132  -D, --Database <conffile>
133      Specifies a configuration file describing how to connect to the
134      database. Without this, all authentication will fail.
135  -a, --auth
136      Enable authentication. Without this, anyone will be able to connect
137      without authentication, and --Database has no effect.
138  -G, --Guests
139      Allow guests. These are usernames with names starting "guest". If
140      enabled, any number of guests may connect without accounts in the
141      database; if a guest name is already in use by a connection, a new
142      guest name is generated.
143      Once connected, guests have the same privileges as any other account.
144      If this option is not specified, accounts are required to connect,
145      and guest account names are forbidden.
146  -N, --Newusers
147      Allow Freeciv clients to create new user accounts through the Freeciv
148      protocol.
149      Without this, only accounts which already exist in the database can
150      connect (which might be desirable if you wants users to register via
151      a web front end, for instance).
152
153================================
154 Lua script database.lua
155================================
156
157This script is responsible for checking usernames, fetching passwords, and
158saving new users (if --Newusers is enabled). It encapsulates access to the
159database backend, and hence the details of the table layout.
160
161The script lives in data/database.lua in the source tree, and is installed
162to 'sysconfdir'; depending on the options given to 'configure' at build
163time, this may be a location like /usr/local/etc/freeciv/database.lua.
164
165The supplied version supports basic authentication against a SQLite or
166MySQL database; it supports configuration as shown in the following
167example (for MySQL; SQLite does not need all of these options).
168
169  [fcdb]
170  backend="mysql"
171  host="localhost"
172  user="Freeciv"
173  port="3306"
174  password="s3krit"
175  database="Freeciv"
176  table_user="auth"
177  table_log="loginlog"
178
179If that's sufficient for you, it's not necessary to read on.
180
181Freeciv expects the following lua functions to be defined in database.lua:
182
183  -- try to load data for an existing user
184  -- return TRUE if user exists, FALSE otherwise
185  function user_load(conn)
186  -- save a new user to the database
187  function user_save(conn)
188  -- log the connection attempt (success is boolean)
189  function user_log(conn, success)
190
191  -- test and initialise the database connection
192  function database_init()
193  -- free the database connection
194  function database_free()
195
196Where 'conn' is on object representing the connection to the client which
197requests access.
198
199The return status of all of these functions should be one of
200
201  fcdb.status.ERROR
202  fcdb.status.TRUE
203  fcdb.status.FALSE
204
205indicating an error, a positive or a negative result.
206
207The following lua functions are provided by Freeciv:
208
209  -- return the client-specified username
210  auth.get_username(conn)
211  -- return the client IP address (string)
212  auth.get_ipaddr(conn)
213  -- tell the server (the MD5 hash of) the correct password to check against
214  -- for this connection (usually to be called by user_load())
215  -- returns whether this succeeded
216  auth.set_password(conn, password)
217  -- return (the MD5 hash of) the password for this connection (as specified
218  -- by the client in user_save(), or as previously set by set_password()).
219  auth.get_password(conn)
220
221  -- return a value from the --Database configuration file
222  fcdb.option(type)
223
224'type' selects one of the entries in the configuration file by name (for
225instance fcdb.option("backend")). For backward compatibility with Freeciv
2262.4, definitions such as fcdb.param.BACKEND are provided for conventional
227option names, but there's no need to use them in new code.
228
229Freeciv also provides some of the same Lua functions that ruleset scripts
230get -- log.*(), _(), etc -- but the script is executing in a separate
231context from ruleset scripts, and does not have access to signals, game
232data, etc.
233
234================================
235 TODO
236================================
237
238* Move password comparison / policy to Lua script
239  <http://www.hostedredmine.com/issues/660267>
240* Give database.lua access to do more stuff
241  <https://www.hostedredmine.com/issues/657141>
242* Allow setting cmdlevel per-user, etc
243  <https://www.hostedredmine.com/issues/657143>
244* Give database.lua access to game signals and events
245  <https://www.hostedredmine.com/issues/657142>
246* Improve this README
247

README.governor

1
2  Citizen Governor (aka Citizen Management Agent, or CMA)
3=========================================================
4
5The Citizen Governor is designed to help you manage your cities, i.e.
6deploy the workers on the available tiles around (or make them
7scientists, taxmen, or even entertainers), to get the most out of the
8city. You can switch the Governor on or off at any time for any city,
9but there are some handicaps (explained below), if you have governor
10controlled and non-governor-controlled cities nearby.
11
12The heart of Governor system is an optimizing algorithm, that tries
13to deploy the workers of a city in such a way, that a user-defined
14goal is achieved as much as possible. You know probably, there is
15already a kind of optimizing, when you open a city, and click on
16the center tile (the city symbol) of the mini map. This optimization
17tries to maximize mostly the science output; but it doesn't care about
18disorder.
19
20The new City Management Agent goes far beyond this old form of
21optimizing. First, it performs this task every time anything changes
22with the city. If the city grows or shrinks, troops go in or out,
23tiles get irrigation or mining, or are occupied by an enemy, the Governor
24becomes active. Second, it supports all kinds of optimizing, like
25production (shields), gold, science, or luxury. Third, it gives the
26player a fine-grained control over this, with the possibility of
27setting constraints for any kind of city output. The latter includes
28the constraint of celebration, which makes it very easy to let your
29cities grow, even in harder times. The forth, and probably most
30valuable thing in war times, is that is keeps your cities content,
31preventing them from revolt.
32
33
34  Usage
35=========
36
37You can set up the Governor for a city by opening the city window and
38clicking on the Governor tab. On the left side, you can choose a preset for
39a specified goal, on the right side you can specify more complex goals
40by moving the sliders. You can choose a preset at first, and then
41modify it. Once you have created a new setting, you can add a preset
42name for it. This is not required, but very useful, since you can
43watch and even change the city's setting from within the city report,
44if it is given a name. Don't forget to save settings (in the Game
45menu), when you've created new presets.
46
47The sliders are of two kinds: the rightmost sliders are factors, which
48gauges how much one product is worth compared to the others (e.g how
49much shields are worth with respect to everything else). The leftmost
50sliders are constraints: you can command the city not to lose food,
51e.g. by setting the surplus constraint to zero; and you can allow the
52city to lose gold by setting the gold surplus to -3 e.g., and urge
53them to make at least 5 shields per round by setting the production
54surplus to 5. The most powerful constraint, though, is the Celebrate
55constraint, which makes the city celebrate at once (which usually takes
56effect the round after you change it).
57
58It is obvious that the Governor can't fulfill all these constraints in
59every case. Whenever the constraints can't be fulfilled, the Governor
60quits its service for that city, giving a message: "The agent can't
61fulfill the requirements for Berlin. Passing back control." You then
62have the choice of either managing the city on your own (which has some
63drawbacks, see below), or open that city and change the surplus
64requirements so that they can be fulfilled.
65
66When you have made a setup for a city, you need to click on
67"Control city" to switch on the Governor. If this button's text is greyed,
68either the Governor is already active, or the task is impossible. In the
69latter case you see dashes instead of numbers in the results block.
70If you ever want to switch off the Governor deliberately, click "Release
71city".
72
73
74  Advanced Usage
75==================
76
77Usually the goal(s) of your cities depend on the phase your game is in,
78whether you want to spread widely, grow quickly, research advanced techs
79or wage war. You may want to set up a high factor for science to research,
80or a high shields factor to produce units. The highest factor available
81is 25, that means: if the shields factor is set to 25, and other to 1,
82the Governor prefers a single shield over 25 gold (or trade also). This is
83pretty much because money can buy units too. That also means that
84the Governor is indifferent about producing gold, science, luxury, and food;
85but when you wage war, you usually prefer gold or luxury. So it's probably
86a good idea to set a second (or even third) preference for the city's output,
87e.g. gold factor 5. That still prefers 1 shield over 5 gold (and 1 gold over 5
88food or anything else).
89
90Constraints aren't useful in all cases. If you want a high income,
91it's probably better to set the gold factor to 25, than to set a
92minimal surplus of 5 or so. Because a big city can make more gold than
93a small one, you'd end up setting a different surplus for each city.
94
95However, if the shields surplus of a city is below zero, it cannot
96support all of its units any more. You will lose some of the units the
97city supports. If the food surplus is negative, the city will starve
98and eventually (when the granary is empty) shrink. This may be
99intended, but if the city supports any settlers, you will lose them
100before the city shrinks. Constraints can also have a warning function.
101
102Which constraints can be fulfilled depends widely on the global
103science, tax, and luxury rates. E.g. a gold surplus >= 0 is easier to
104fulfill with a higher tax rate than a lower one. You should always
105consider to change these rates, when you going to change the Governor
106settings for the most of your cities.
107
108Hint: To avoid accidentally releasing your cities, when you change the
109rates, it is best to do so from within the tax dialog rather than from
110the rates display in the main window.
111
112
113  Drawbacks
114=============
115
116The Governor is a very powerful tool, which not only releases you from the
117micromanagement of your cities, but gives you more performance than
118you have ever seen (well, for most players).
119
120There are some drawbacks, though. Once you've switched on the Governor, it
121grabs any good tile it can get. So you encounter very hard times
122trying to manage a city nearby a Governor-controlled one. This is true for
123the city window and the main map worker's interface as well. If you
124want to have Governor-controlled and "handmade" cities, they probably
125should be on different islands.
126
127There are several situations where the Governor can't fulfill the
128requirements just temporarily, e.g. when you move a ship from one city
129to another, or when an enemy walks through your country. The Governor
130passes back control in these cases, and you have to reenable it
131manually. A general approach to prevent this might be, to set the
132minimal surpluses as low as possible (-20). Of course you must be
133careful with the food and shield surpluses.
134
135While the Governor does a really good job for a single city, no tile will
136ever be released for the good of another city. Also, the Governor controlled
137cities are computed in a more random order; the results may depend on it and
138change, when a recalculation is done (when tax changes e.g.). So, no
139guarantee is given that the overall results are always optimal.
140
141
142  Settings file
143=================
144
145The client allows the user to load and save preset parameters for the
146agent. Choosing "Save Settings" from the "Game" menu will not only
147save your general options and message options, but it will save any
148changes you made to you Governor presets as well.
149
150The format for the options file (usually ~/.freeciv/.freeciv-client-rc-X.Y , where X.Y
151is the version of freeciv in use) is as follows (in case you which to change
152these presets manually, i.e. with a text editor).
153
154Under the heading [cma], is a "number_of_presets". This should be set
155to the number of presets that are present in the options file. If you
156manually add or remove a preset, you need to change this number as
157appropriate.
158
159After this, is an array that houses the presets. Here is the header:
160
161preset={ "name","minsurp0","factor0","minsurp1","factor1","minsurp2",
162"factor2","minsurp3","factor3","minsurp4","factor4","minsurp5",
163"factor5","reqhappy","factortarget","happyfactor"
164
165so the order of the preset should be as follows:
166
167name of preset, minimal surplus 0, factor 0, ... ,
168require city to be happy, what the target should be [0,1],
169the happiness factor
170
171Currently there are 6 surpluses and factors. They are:
1720 = food, 1 = production, 2 = trade, 3 = gold, 4 = luxury,
1735 = science
174
175Also currently, "factortarget" is not changeable within the client,
176see "client/agents/cma_core.h" for more information.
177
178The array should be terminated with a '}'.
179
180Here are 21 presets you can use if you can't come up with some on
181your own:
182
183"Max food",0,10,0,1,0,1,0,1,0,1,0,1,0,0,1
184"Max production",0,1,0,10,0,1,0,1,0,1,0,1,0,0,1
185"Max trade",0,1,0,1,0,10,0,1,0,1,0,1,0,0,1
186"Max tax",0,1,0,1,0,1,0,10,0,1,0,1,0,0,1
187"Max luxury",0,1,0,1,0,1,0,1,0,10,0,1,0,0,1
188"Max science",0,1,0,1,0,1,0,1,0,1,0,10,0,0,1
189"+2 food",2,1,0,1,0,1,0,1,0,1,0,1,0,0,1
190"+2 production",0,1,2,1,0,1,0,1,0,1,0,1,0,0,1
191"+2 trade",0,1,0,1,2,1,0,1,0,1,0,1,0,0,1
192"+2 gold",0,1,0,1,0,1,2,1,0,1,0,1,0,0,1
193"+2 luxury",0,1,0,1,0,1,0,1,2,1,0,1,0,0,1
194"+2 science",0,1,0,1,0,1,0,1,0,1,2,1,0,0,1
195"Max food no gold limit",0,10,0,1,0,1,-20,1,0,1,0,1,0,0,1
196"Max production no gold limit",0,1,0,10,0,1,-20,1,0,1,0,1,0,0,1
197"Max trade no gold limit",0,1,0,1,0,10,-20,1,0,1,0,1,0,0,1
198"Max gold no gold limit",0,1,0,1,0,1,-20,10,0,1,0,1,0,0,1
199"Max luxury no gold limit",0,1,0,1,0,1,-20,1,0,10,0,1,0,0,1
200"Max science no gold limit",0,1,0,1,0,1,-20,1,0,1,0,10,0,0,1
201"Max food+prod. no gold limit",0,10,0,10,0,1,-20,1,0,1,0,1,0,0,1
202"Max food+prod.+trade",0,10,0,10,0,10,0,1,0,1,0,1,0,0,1
203"Max all",0,1,0,1,0,1,0,1,0,1,0,1,0,0,1
204
205here are 6 more that have been added as an afterthought:
206
207"+1 food, max prod. no gold limit",1,1,0,10,0,1,-20,1,0,1,0,1,0,0,1
208"+2 food, max prod. no gold limit",2,1,0,10,0,1,-20,1,0,1,0,1,0,0,1
209"+3 food, max prod. no gold limit",3,1,0,10,0,1,-20,1,0,1,0,1,0,0,1
210"+4 food, max prod. no gold limit",4,1,0,10,0,1,-20,1,0,1,0,1,0,0,1
211"+5 food, max prod. no gold limit",5,1,0,10,0,1,-20,1,0,1,0,1,0,0,1
212"+6 food, max prod. no gold limit",6,1,0,10,0,1,-20,1,0,1,0,1,0,0,1
213
214and even more, some with multiple goals:
215
216"research at any cost",0,1,0,5,-20,1,-20,1,-20,1,-20,25,0,0,1
217"celebration and growing",1,1,0,25,-20,1,-20,12,-20,1,-20,1,1,0,1
218"grow at any cost",1,25,0,5,-20,1,-20,1,-20,1,-20,5,0,0,1
219"research and some shields",0,1,0,8,0,1,-3,1,0,1,0,25,0,0,1
220"shields and a bit money",0,1,0,25,0,1,-3,3,0,1,0,1,0,0,1
221"many shields and some money",0,1,0,25,0,1,0,9,0,1,0,1,0,0,1
222"shields and some research",0,1,0,25,0,1,-2,1,0,1,0,8,0,0,1
223"celebrate and grow at once",1,1,0,25,-20,1,-20,1,-20,1,-20,8,1,0,1
224
225Last updated: 10 Apr 2015
226

README.graphics

1----------------------------------------------------------------------
2Freeciv Graphics, and Tile Specification Files
3----------------------------------------------------------------------
4
5Using Graphics:
6---------------
7
8To use different graphics with Freeciv, use the '--tiles' argument to
9the Freeciv client. Eg, to use the 'engels' graphics, start the
10client as:
11
12    freeciv-gtk3 --tiles engels
13
14What Freeciv actually does in this case is look for a file called
15'engels.tilespec' somewhere in your Freeciv data path. (See the file
16INSTALL for some information on the Freeciv data path.) That tilespec
17file contains information telling Freeciv which graphics files to use,
18and what those graphics files contain.
19
20That is all you need to know to use alternative graphics provided by
21Freeciv or by third-party add-ons. The rest of this file describes
22(though not fully) the contents of the tilespec file and related
23files. This is intended as developer reference, and for people
24wanting to create/compile alternative tilesets and modpacks for
25Freeciv.
26
27----------------------------------------------------------------------
28Overview:
29---------
30
31The purpose of the 'tilespec' file and related 'spec' files is to
32allow the detailed layout of the graphics within the files to be
33flexible and not hard-coded into Freeciv, and to allow add-ons to
34conveniently provide additional graphics.
35
36There are two layers to the tilespec files:
37
38The top-level file is named, eg: 'trident.tilespec'.  The basename of
39this file (here, 'trident') corresponds to the parameter of the
40'--tiles' command-line argument for the Freeciv client, as described
41above.
42
43The top-level tilespec file contains general information on the full
44tileset, and a list of files which specify information about the
45individual graphics files. These filenames must be located somewhere
46in the data path, though not necessarily the same place as the
47top-level tilespec file. Note that with this system the number and
48contents of the referenced files are completely flexible at this
49level.
50
51An exception is that the intro graphics must be in individual files,
52as listed in the tilespec file, because Freeciv treats these
53specially: these graphics are freed after the game starts, and
54reloaded later as necessary.
55
56----------------------------------------------------------------------
57Graphics formats:
58-----------------
59
60All clients currently use 24/32 bit PNGs.
61
62----------------------------------------------------------------------
63Tileset options:
64----------------
65
66In the top-level tilespec file you can set options for the tileset.
67Each of these should go within the [tilespec] section. Currently
68options include:
69
70  Strings (enclosed in "")
71  ------------------------
72  options               : A capability string, this should be "+Freeciv-a.b-tilespec", where
73                          "a.b" it the current freeciv version.
74  name                  : the name of the tileset
75  type                  : general type of tileset, different types have
76                          quite different format. Supported types are
77                          "overhead" and "isometric"
78  main_intro_file       : GFX file for the intro graphics
79  minimap_intro_file    : GFX file for the radar screen intro graphics
80
81  String vectors
82  --------------
83  preferred_themes      : List of preferred client themes to use with this
84                          tileset
85
86  Integers
87  --------
88  priority              : when user does not specify tileset, client
89                          automatically loads available compatible tileset
90                          with highest priority.
91  normal_tile_width     : the width of terrain tiles
92  normal_tile_height    : the height of terrain tiles
93  unit_width            : unit sprite width. Default is always ok, setting is
94                          provided just for symmetry with unit_height
95  unit_height           : unit sprite height if more than 1.5x terrain tile
96                          height in isometric tileset
97  small_tile_width      : the width of icon sprites
98  small_tile_height     : the height of icon sprites
99  fog_style             : Specifies how fog is drawn.
100                          "Auto" :     Code automatically adds fog.
101                          "Sprite :    A single fog sprite is drawn on top of all
102                                       other sprites for fogged tiles. The
103                                       tx.fog sprite is used for this.
104                          "Darkness" : No fog, or fog from darkness_style = 4.
105  darkness_style        : Specifies how "encroaching darkness" is drawn.
106                          "None"           : No darkness.
107                          "IsoRect"        : A single sprite can be split into 4
108                                             parts, each containing the darkness
109                                             for that particular cardinal direction.
110                                             (Iso-view only.)
111                          "CardinalSingle" : Four different sprites exist, each
112                                             holding the darkness for a particular
113                                             direction. Any or all of the sprites
114                                             may be drawn.
115                          "CardinalFull"   : The sprite is chosen based on the vector
116                                             sum of the darkness in all 4 cardinal
117                                             directions. 15 different sprites are
118                                             needed.
119                          "Corner"         : Corner darkness & fog, 81 sprites needed.
120  unit_flag_offset_x   : Gives an offset from the tile origin at which to
121  unit_flag_offset_y     draw flags behind units or cities. With isometric
122  city_flag_offset_x     tilesets this should be non-zero so that the flag
123  city_flag_offset_y     is placed correctly behind the unit/city.
124  occupied_offset_x    : Gives an offset from the tile origin at which to
125  occupied_offset_y      draw city occupied icon (in many tilesets placed above the flag)
126  unit_offset_x        : Gives an offset from the tile origin at which to
127  unit_offset_y          draw units.
128  activity_offset_x    : Gives an offset from the tile origin at which to
129  activity_offset_y      draw normal unit activity icons. "Auto" icons are not
130                         affected by this as they are usually wanted in different
131                         offset than real activity icons for both to appear simultaneously
132                         "Auto" icons are auto_attack, auto_settler, patrol, connect.
133  unit_upkeep_offset_y : Gives an offset from the unit origin at which to draw
134                         the upkeep icons when they are shown along the unit. The upkeep
135                         icons can safely extend below the unit icon itself.
136                         If this value is omitted, normal tile height is used instead;
137                         - Upkeep icons appear below the unit icon if the unit icons are
138                           equal to tile height (typical in overhead tileset)
139                         - Upkeep icons overlay lower part of the unit icon, if unit icon
140                           is higher than tile height (typical in iso tilesets)
141  unit_upkeep_small_offset_y:
142                         Like unit_upkeep_offset_y, but to be used in case there's only small
143                         space for the overall icon produced. Defaults to unit_upkeep_offset_y -
144                         not having alternative layout.
145  citybar_offset_y     : Gives an offset from city tile origin at which to
146                         draw city bar text.
147  hex_side             : When is_hex is specified (see is_hex, below), this
148                         value gives the length of the "extra" side of the
149                         hexagon. This extra side will be on the top/bottom
150                         of the tile if is_isometric (below) is given, or
151                         on the left/right of the tile otherwise. The actual
152                         dimensions of the hex tile are determined from the
153                         normal_tile_width/normal_tile_height of the tileset
154                         as well as the hex side. The "normal" dimensions
155                         give the X and Y offsets between adjacent tiles in
156                         the tileset - this is not the same as the dimensions
157                         of the tile itself. The dimension of the bounding
158                         box of the hexagonal tile will be equal to the
159                         "normal" dimension minus the hex_side. For instance
160                         "normal" dimensions of 64x32 with a hex_side of 16
161                         for an iso-hex tileset will give hexagons of size
162                         48x32.
163  city_names_font_size : Font size used in drawing city name
164  city_production_font_size : Font size used in drawing city production
165                         (Deprecated, ignored by many clients)
166
167  Booleans (FALSE or TRUE)
168  ------------------------
169  is_hex                : set to TRUE for a hexagonal tileset. If is_isometric
170                          is also specified then you have an iso-hex tileset.
171                          Hex tilesets should be used with topologies 8-11 and
172                          iso-hex tilesets with topologies 12-15.
173
174  String lists (a comma-separated list of strings)
175  ------------------------------------------------
176  files                 : A list of .spec files to scan for sprites.
177                          See "individual spec files", below.
178
179
180----------------------------------------------------------------------
181Terrain options:
182----------------
183
184The top-level tilespec file also contains information on how to draw each
185terrain type.  For each terrain type include a section "[tile_xxx]".
186This section contains information on how to draw this terrain type.
187(The terrain types are specified in the server ruleset file.)
188
189  [tile_XXX] options
190  ----------------
191  tag                   : Tag of the terrain this drawing information refers
192                          to. That must match the "graphic" or "graphic_alt"
193                          field given in the ruleset file.x
194  blend_layer           : If non-zero, given layer of this terrain will be
195                          blended with adjacent terrains. Blending is done
196                          civ2-style with a dither mask. Only iso-view
197                          currently supports blending. Only the base graphic
198                          will be blended.
199                          The blending mask has sprite t.dither_tile.
200  is_reversed           : Draw layers in reverse order.
201  num_layers            : The number of layers in the terrain. This value
202                          must be 1, 2 or 3. Each layer is drawn
203                          separately. The layerN options below control the
204                          drawing of each layer (N should be 0, 1 or 2)
205  layerN_is_tall        : Left right corner of terrain sprites is not based
206                          on normal_tile_width and normal_tile_height, but
207                          to corner of the full tile.
208  layerN_offset_x       : Offset for terrain sprites
209  layerN_offset_y
210  layerN_match_type     : If 0 or unset, no terrain matching will be done and
211                          the base sprite will be drawn for the terrain. If
212                          non-zero, then terrain matching will be done. A
213                          matched sprite will be chosen that matches all
214                          cardinally adjacent tiles whose terrain has the same
215                          match_type.
216  layerN_match_with     : List of match_types to match against
217  layerN_sprite_type    : With traditional tilesets each tile is drawn using
218                          one sprite. This default sprite_type is "whole".
219                          Which sprite to use may be specified using a
220                          match_type, and there may be multiple layers
221                          (each having one sprite). This method corresponds
222                          to sprite_type "single".
223                          A more sophisticated drawing method breaks the tile
224                          up into 4 rectangles. Each rectangular cell is
225                          adjacent to 3 different tiles. Each adjacency is
226                          matched, giving 8 different sprites for each of the
227                          4 cells. This sprite_type is "corner".
228
229Additionally the top-level tilespec file should contain information about
230the drawing of each layer. This is needed because the way each layer is
231drawn must be consistent between different terrain types. You may not have
232more than 3 layers (either in this section or in the [tile_XXX] sections).
233
234  [layerN] options
235  ----------------
236  match_types            : Gives a string list of all different match types.
237                           This list must include every possible match_type
238                           used by terrains for this layer.
239                           First letter of the match_type must be unique
240                           within layer.
241
242  Extra options
243  ------------
244
245  Tilespec should define style of extra graphics for each extra type in
246  section [extras] like:
247
248  [extras]
249  styles =
250      { "name",          "style"
251        "road",          "RoadAllSeparate"
252        "rail",          "RoadAllSeparate"
253        "river",         "River"
254        "tx.irrigation", "Cardinals"
255      }
256
257  RoadAllSeparate    : A single sprite is drawn for every connection the tile has;
258                       only 8 sprites are needed.
259  RoadParityCombined : A single sprite is drawn for all cardinal connections and
260                       a second sprite is drawn for all diagonal connections;
261                       32 sprites are needed.
262  RoadAllCombined    : One sprite is drawn to show roads in all directions.
263                       There are thus 256 sprites (64 for a hex tileset).
264  River              : Cardinal connections are drawn, as well as delta at the coast
265  Single1            : Single sprite at layer Special1
266  Single2            : Single sprite at layer Special2
267  3Layer             : 3 Sprites, tagged <name>_bg, <name>_mg, and <name>_fg
268  Cardinals          : Sprite for each cardinal connection
269
270----------------------------------------------------------------------
271Individual spec files:
272----------------------
273
274Each spec file describes one graphics file (PNG format is standard,
275although some clients may accept other formats as well) as specified in
276the spec file. The graphics file must be in the Freeciv data path, but
277not necessarily in the same location as the spec file. Note you can have
278multiple spec files using a single graphics file in different ways.
279
280The main data described in the spec file is in sections named
281[grid_*], where * is some arbitrary tag (but unique within each file).
282A grid corresponds to a regular rectangular array of tiles. In
283general one may have multiple grids in one file, but the default
284tilesets usually only have one per file. (Multiple grids would be
285useful to have different size tiles in the same file.) Each grid
286defines an origin (top left) and spacing, both in terms of pixels, and
287then refers to individual tiles of the grid by row and column. The
288origin, and rows and columns, are counted as (0,0) = top left.
289
290x_top_left     : x-coordinate of the leftmost pixel of the leftomost cell
291y_top_left     : y-coordinate of the topmost pixel of the topmost cell
292dx             : cell width
293dy             : cell height
294pixel_border   : Number of pixels between cells, unless overridden by axis specific value
295pixel_border_x : Number of pixels between cells in x-direction, overrides pixel_border
296pixel_border_y : Number of pixels between cells in y-direction, overrides pixel_border
297tiles          : Table of tags, each line having "row", "column", and "tag"
298
299[grid_example]
300x_top_left   = 1   ; Border (in x=0) also in left side of the entire grid
301y_top_left   = 1   ; Border (in y=0) also in top side of the entire grid
302dx           = 96
303dy           = 48
304pixel_border = 1
305tiles = { "row", "column", "tag"
306 0, 0, "tag1"
307 0, 1, "tag2"
308 1, 0, "tag3"
309 1, 1, "tag4"
310}
311
312
313Each individual tile is given a "tag", which is a string which is
314referenced in the code and/or from ruleset files. A grid may be
315sparse, with some elements unused (simply don't mention their row and
316column), and a single tile may have multiple tags (eg, to use the same
317graphic for multiple purposes in the game): just specify a list of
318comma-separated strings.
319
320If a given tag appears multiple times in the spec files, the *last*
321such tag is used. (That is, in the order of files listed in the
322tilespec file, and order within each file.) This allows selected
323graphics to be "overridden" by listing a replacement spec file near
324the end of the 'files' list in the top-level tilespec file, without
325having to modify earlier files in the list.
326
327----------------------------------------------------------------------
328Tag prefixes:
329-------------
330
331To help keep the tags organised, there is a rough prefix system used
332for standard tags:
333
334  f.	      national flags
335  r.	      road/rail
336  s.	      general "small"
337  u.	      unit images
338  t.	      basic terrain types (with _n0s0e0w0 to _n1s1e1w1)
339  ts.	      terrain special resources
340  tx.	      extra terrain-related
341  gov.	      government types
342  unit.	      unit overlays: hp, stack, activities (goto, fortify etc)
343  upkeep.     unit upkeep and unhappiness
344  city.	      city related (city, size, sq.-prod., disorder, occupied)
345  cd.	      city defaults
346  citizen.    citizens, including specialists
347  explode.    explosion graphics (nuke, units)
348  spaceship.  spaceship components
349  treaty.     treaty thumbs
350  user.	      crosshairs (in general: user interface?)
351
352In general, graphics tags hard-wired into Freeciv _must_ be provided
353by the spec files, or the client will refuse to start. Graphics tags
354provided by ruleset files (at least for the "standard" rulesets)
355should also be provided, but generally the client will continue even
356if they are not, though the results may not be satisfactory for the
357user. To work properly tags should correspond to appropriately sized
358graphics. (The basic size may vary, as specified in the top-level
359tilespec file, but the individual tiles should be consistent with
360those sizes and/or the usage of those graphics.)
361
362----------------------------------------------------------------------
363Sprites
364-------
365
366Depending on the information given here the tileset must/may contain certain
367sprites.
368
369  Theme Sprites
370  -------------
371
372  citizen sprites :
373
374    This provides citizen graphics. Each citizen has one or more sprites
375    which are shown in the city dialog. The types of citizen are "happy",
376    "content", "unhappy", and "angry". The tag name is "citizen.<type>_<n>".
377    <type> is one of the listed types. <n> is the number of the graphic
378    (numbered starting with 0, unlike most other graphics) which allows more
379    than one sprite to be used. No more than 6 sprites per citizen may be
380    used.
381
382    Currently the citizen and specialist sprites may not have any
383    transparency, as this is ignored in much of the drawing. This is
384    considered a bug.
385
386  specialist sprites:
387
388    These provide specialist graphics just like the citizen graphics. However
389    specialist types come from the ruleset and may be changed in modpacks.
390    The sprite name is "specialist.<type>_<n>". Again <type> is the
391    type of specialist (currently "elvis", "scientist", "taxman") while <n>
392    is the sprite number. See "citizen sprites" above.
393
394  progress indicators:
395
396    There are three types of progress indicator. "science_bulb" indicates
397    progress toward the current research target. "warming_sun" indicates
398    progress toward global warming. "cooling_flake" indicates progress
399    toward nuclear winter. Each indicator should have 8 states, numbered
400    0 (least) through 7 (most). The sprite names are "s.<type>_<n>".
401
402  government icons:
403
404    There should be one icon for each government. Its name is "gov.<gov>",
405    where <gov> is the government name. Government types come from
406    governments.ruleset (currently "anarchy", "despotism", "monarchy",
407    "communism", "fundamentalism", "republic", "democracy").
408
409  tax icons:
410
411    One icon for each tax type. These are used to show the tax rates. The
412    sprites are "s.tax_luxury", "s.tax_science", "s.tax_gold". Commonly
413    the specialist sprites are reused for this.
414
415  right arrow:
416
417    A sprite "s.right_arrow" is used on the panel when more units are
418    present than can be shown.
419
420  Terrain sprites
421  ---------------
422  base sprite           : If the terrain has no match type or is layered, a
423                          base sprite is needed. This sprite has tag
424                          "t.<terrain>1" (e.g., "t.grassland1"). More than
425                          one such sprite may be given ("t.grassland2", etc.)
426                          in which case one will be chosen at random for each
427                          tile.
428  matched sprites       : If the terrain has a match type or is layered, a
429                          set of matched sprites is needed. This consists of
430                          16 sprites with tags "t.<terrain>_n<V>e<V>s<V>w<V>"
431                          (e.g., "t.hills_n0e0s1w0". Each direcional value
432                          <V> is either 0 or 1. Note that the directions are
433                          in map coordinates, so n (north) in iso-view is
434                          northeast on the mapview. (Note this only applies
435                          for cell_type "single".)
436  cell sprites          : For matched terrains that have cell_type "rect",
437                          32 different sprites are needed. Each sprite is
438                          a rectangle corresponding to one cell, and there are
439                          8 different sprites per cell. Each sprite has
440                          a name like "t.ocean_cell_u110" where "ocean" is the
441                          terrain, "u" means up (north on the map) and
442                          110 indicates which of the adjacent tiles are
443                      	  mismatched. For instance u110 means
444
445				    /\
446				   /B \
447				  /\ 1/\
448				 / A\/C \
449				 \1 /\ 0/
450				  \/D \/
451				   \  /
452				    \/
453
454			  a matching terrain exists at C but not at A or B. In
455                          this case D is the current tile.
456
457  Examples:
458
459    ; This specifies a civ2-like grassland tile. A single sprite
460    ; t.grassland is needed; it will be drawn blended.
461    [terrain_grassland]
462    blend_layer = 1
463    num_layers  = 1
464    layer0_match_type = 0
465
466    ; This specifies a civ1-like mountain tile. 16 sprites
467    ; t.mountains_n0s0e0w0 ... t.mountains_n1s1e1w1 are needed. One of them
468    ; will be drawn to match the adjacent tiles. Assuming only mountains
469    ; has this match_type, adjacent mountains will match.
470    [terrain_mountains]
471    blend_layer = 0
472    num_layers  = 1
473    layer0_match_type = 7
474
475    ; This specifies a civ2-like hills tile. A base sprite t.hills will be
476    ; needed, plus 16 matching sprites. The base sprite will be drawn,
477    ; dithered with adjacent base sprites, and the matching sprite will be
478    ; drawn on top. (In most civ2 tilesets the base sprite is the grassland
479    ; sprite).
480    [terrain_hills]
481    blend_layer = 1
482    num_layers  = 2
483    layer0_match_type = 0
484    layer1_match_type = 8
485
486    ; This specifies a civ2-like ocean tile. Ocean is drawn via a cell-based
487    ; system as explained above.
488    [terrain_ocean]
489    blend_layer = 1
490    num_layers  = 1
491    layer0_match_type = 6
492    layer0_cell_type = "rect"
493
494  Terrain Special Sprites
495  -----------------------
496
497  farmland/irrigation:
498
499    tx.farmland and tx.irrigation provide the basic sprites for farmland
500    and irrigation. Additionally, there is support for drawing continuous
501    farmland and irrigation (as is used in Civ3). Here there are 16
502    irrigation sprites (and the same for farmland), starting with
503    tx.irrigation_n0s0e0w0 and running through tx.irrigation_n1s1e1w1.
504    An appropriate sprite will be chosen depending on which adjacent tiles
505    also have farmland/irrigation. If any of these sprites are not present,
506    the default sprite will be used as a fallback.
507

README.modpack_installer

1===========================================================================
2 Modpack installer tool
3===========================================================================
4
5Installing modpacks
6-------------------
7
8The modpack installer is a simple tool to download custom Freeciv
9content called "modpacks" from the Internet, and automatically install
10them into the correct location to be used by the Freeciv client and
11server.
12
13A "modpack" can consist of one or more of:
14 - 'rulesets' for game rules
15 - 'scenarios' for game maps (with or without players/cities/etc)
16 - 'tilesets' for game graphics
17 - 'soundsets' or 'musicsets' for sound effects and in-game music
18
19Depending which client you installed, you will probably have one modpack
20installer tool called something like 'freeciv-mp-gtk3' or
21'freeciv-mp-qt' -- these different versions have the same features.
22There may also be a command-line-only tool called 'freeciv-mp-cli',
23which is mainly useful for headless game servers.
24
25In standard Freeciv builds, when you start the graphical modpack
26installer, it will show a list of modpacks from modpack.freeciv.org,
27curated by the Freeciv developers. You can select one and press
28"Install modpack"; the tool will download the files for the selected
29modpack, and any other modpacks it depends on, and install them ready
30for the main Freeciv programs to use.
31
32You can also point the installer at modpacks or lists on other servers:
33
34 * If someone has given you an individual modpack URL (ending in
35   '.modpack'), you can paste it into the "Modpack URL" box, and when
36   you press "Install modpack", the modpack will immediately be
37   downloaded and installed.
38
39 * If someone has given you a URL for a list of modpacks (probably
40   ending in '.list') and you want to browse them with the standard
41   Freeciv modpack installer build, you need to start the tool with
42   that URL on its command line, for instance:
43
44     freeciv-mp-gtk3.exe --List http://example.com/2.6/my-modpacks.list
45
46   (note the capital letter in '--List')
47
48(The tool has some other command-line options, but most users will not
49need to use them. Use --help for a list of them.)
50
51Once you have installed a modpack, how you use it depends on the modpack
52type:
53
54 - Scenarios (maps) should be listed under 'Start scenario game' from
55   the client start page, or from the game server prompt via
56   '/list scenarios'.
57   (For network play, scenarios need only be installed on the game
58   server.)
59
60 - Rulesets should appear on the 'Ruleset' drop-down from the client's
61   'Start new game' page. On the game server, you can load a ruleset
62   with '/read <name>' or failing that perhaps '/set rulesetdir <name>'.
63   (For network play, rulesets need only be installed on the game
64   server.)
65
66 - Tilesets should appear for selection in the local client options, in
67   the appropriate topology-specific 'Tileset' drop-down under 'Graphics'.
68   (Tilesets should be installed on the game client machine.)
69
70 - Soundsets and musicsets should appear in the dropdowns on the 'Sound'
71   page of the local client options.
72   (These should be installed on the game client machine.)
73
74With standard Freeciv builds, modpacks get installed into a per-user
75area, not into the main Freeciv installation. So you shouldn't need any
76special permissions to download them, and if you uninstall the Freeciv
77game, any modpacks you downloaded are likely to remain on your system.
78Conversely, if you delete downloaded modpacks by hand, the standard
79rulesets, tilesets etc supplied with Freeciv won't be touched.
80
81The precise location where files are downloaded to depends on your build
82and platform. For Unix systems it is likely to be under the hidden
83'.freeciv' directory in your home directory. It is likely to be near
84where the Freeciv client stores its saved games.
85
86Most modpacks are specific to a particular major version of Freeciv; for
87instance, while a 2.5 ruleset or tileset can be used with all Freeciv
882.5.x releases, it cannot be used as-is with any 2.6.x release. So, most
89modpacks are installed in a specific directory for the major version,
90such as ~/.freeciv/2.6/ on Unix. (The modpack installer displays which
91version it will install for at the top of its window.)
92
93An exception to this is scenario maps; scenarios created for one version
94of Freeciv can usually be loaded in later versions, so they are
95installed in a version-independent location (typically
96~/.freeciv/scenarios/ on Unix).
97
98Once a modpack is installed, there is no uninstall action, and if you
99remove the files by hand, the installer will still consider the modpack
100to be installed; the installer maintains its own database
101(.control/modpacks.db) listing which modpack versions are installed, but
102does not keep track of which files were installed by which modpack. If
103the database gets of of sync with reality (or is deleted), it's
104harmless for already installed modpacks and the main Freeciv programs
105(which do not consult the database), but can confuse the modpack
106installer's dependency tracking later.
107
108Modpacks consist mostly of data files read by the Freeciv engine; they
109do not contain compiled binary code (and are thus platform-independent).
110Rulesets can contain code in the form of Lua scripts, but this is
111executed in a sandbox to prevent obvious security exploits. Modpacks are
112installed to a specific area and cannot overwrite arbitrary files on
113your system. Nevertheless, you should only install modpacks from sources
114you trust.
115
116
117Serving modpacks for the installer
118----------------------------------
119
120The rest of this document discusses how to set up a web server so that
121users can download modpacks you publish. (If you just want to install
122modpacks, you need not read on.)
123
124To host modpacks, you just need a web server that can host plain static
125files; you do not need to run any custom code or frameworks on that web
126server, just to publish files with a specific layout, detailed below.
127(You can browse http://modpack.freeciv.org/ for some working examples of
128modpack trees.)
129
130For a long time (up to and including 2.6.1), the standard Windows
131Freeciv builds were effectively unable to access https (secure) URLs, so
132for maximum accessibility to those old versions, you should serve from a
133web server that supports plain http, if possible.
134
135On the modpack server, there are up to three layers of files required:
136  1. modpack.list: A list of available modpacks (optional, advanced).
137  2. *.modpack: A control file for an individual modpack.
138  3. The individual files comprising the modpack.
139
140Each of these layers is described in detail below.
141
142Each layer refers to files in the next layer down. References can be
143with relative URLs (so that a modpack or set of modpacks can be moved
144without changing any file contents), or with absolute URLs (so that the
145different layers can be hosted on different web servers).
146
147Almost all of these file formats are specific to one major version of
148Freeciv; this document only describes the formats for the major version
149of Freeciv it is shipped with. If you wanted to publish modpacks for
150both 2.5.x and 2.6.x, you would publish two sets of modpack control
151files, and perhaps two different modpack.list files.
152
153
1541. modpack.list, a list of modpacks
155
156(Advanced usage only -- most publishers can skip to the next section)
157
158This is only needed if you want to let users browse a list of available
159modpacks before choosing one to install. To look at your modpack.list
160instead of the standard one, users will usually have to start the
161modpack installer with non-standard arguments (see above).
162
163If you build and distribute your own Freeciv binaries, you can build
164in a custom modpack list URL with the '--with-modlist' argument to
165'configure':
166
167  ./configure --with-modlist=http://example.com/2.6/my-modpacks.list'
168
169(You could even build and distribute just the modpack installer -- once
170installed, in principle there's nothing stopping the standard Freeciv
171client/server using modpacks installed by it -- but you would need to
172take care that the data paths used by your modpack installer build were
173the same as those used by the standard builds, since getting the paths
174right is most of the point of the modpack installer.)
175
176modpack.list is a file in Freeciv's "spec-file" format, the same as is
177used for rulespecs, tilespecs, etc; see those for examples of the
178general syntax.
179
180Here's an example:
181
182[info]
183options = "+Freeciv-2.6-modlist"
184message = "2019-12-31: updated Mappamundi tileset. Happy new year!"
185
186[modpacks]
187list =
188{ "name", "version", "type", "subtype", "license", "URL", "notes"
189  "Ancients", "2.6-1b", "Modpack", "-", "GPLv2+", "./ancients.modpack"
190  "Survivors", "2.6r6", "Scenario", "iso", "GPLv2+", "./survivors-2.6r6.modpack", "Installs custom ruleset and two world maps"
191  "Mappamundi", "20191231", "Tileset", "iso", "MIT", "http://otherserver.example.com/mappamundi-20191231.modpack"
192}
193
194Here's what's in the [info] section:
195 - "options" should be exactly as shown here.
196 - "message" is displayed on the status line when the modpack installer
197   starts up. Should be kept to one line.
198
199The [modpacks] section is a header line, followed by a list of modpack
200lines.
201The header line ("name, "version", etc) should usually be left as shown
202here, and followed by one line for each modpack:
203 - "name", "version", "type":
204     These three fields should match those in the .modpack file which
205     "URL" links to.
206 - "subtype":
207     Optional free text. For tilesets or scenarios, conventionally
208     indicates the map topology with one of "overhead", "iso", "hex",
209     or "hex & iso" (and these will be localised). Otherwise "-".
210 - "license":
211     Free text summarising the distribution terms for the modpack
212     content (by naming a well-known license, not quoting the full
213     license text!)
214 - "URL":
215     The URL to a .modpack file for the individual modpack.
216     Either a relative URL starting "./" (in which case it's relative to
217     the URL of modpack.list) or an absolute URL (which can be on some
218     other web server).
219 - "notes":
220     Optional free text; usually shown as a tooltip.
221
222
2232. *.modpack control file, defining an individual modpack
224
225This is the core control file for a modpack, specifying what files it
226contains, where to download them from, and where they are installed.
227
228Most modpack authors will just publish the URL of a .modpack file
229directly, for users to give to the modpack installer tool. (There
230doesn't have to be a modpack.list file anywhere that refers to the
231.modpack file.)
232
233Again, this is a file in Freeciv's "spec-file" format, the same as is
234used for modpacks like rulespecs, tilespecs, etc; see those for examples
235of the general syntax. Its filename must end in ".modpack".
236
237Here is an example of a .modpack file:
238
239[info]
240options = "+Freeciv-2.6-modpack"
241baseURL = "./ancients-2.6-1b"
242name    = "Ancients"
243type    = "Modpack"
244version = "2.6-1b"
245
246[dependencies]
247list =
248{ "modpack", "URL", "type", "version"
249  "Ancients-tiles", "./ancients-tiles.modpack", "Tileset", "2.6-1b"
250}
251
252[files]
253list =
254{ "src", "dest"
255  "ancients/ancients.serv", "ancients.serv"
256  "ancients/game.ruleset"
257  ; ...
258}
259
260The [info] section has overall control information:
261 - "options": must be exactly as shown in the example.
262 - "name":
263     A short name for the modpack. This is used for version and
264     dependency tracking, so should not contain minor version
265     information, and should not change once a modpack has been
266     released for a given major version of Freeciv. Case-insensitive.
267 - "version":
268     Textual version information. If another modpack uses this one as a
269     dependency, this string is subject to version number comparison
270     (using the rules of Freeciv's 'cvercmp' library, which should give
271     sensible results for most version numbering schemes).
272 - "type":
273     This must be one of the following:
274      - "Ruleset" (foo.serv, foo/*.ruleset, foo/*.lua, etc)
275      - "Tileset" (foo.tilespec, foo/*.png, etc)
276      - "Soundset" (foo.soundspec, foo/*.ogg, etc)
277      - "Musicset" (foo.musicspec, foo/*.ogg, etc)
278      - "Scenario" (foo.sav; installed to a version-independent location)
279      - "Modpack": conventionally used for modpacks that contain more
280        than one of the above kinds of material
281     At the moment, only "Scenario" causes special behavior.
282 - "baseURL":
283     URL to prepend to the "src" filenames in the [files] section.
284     May be relative to the .modpack file (starting with "./"), or
285     absolute (in which case the files can be on some web server
286     different to where the .modpack file lives).
287
288The [files] section lists the individual files comprising your modpack.
289(It must list every file individually; any files in the same directory
290on the webserver that are not listed will not be downloaded.)
291After the header, each line can contain two strings:
292 - "src"
293     Mandatory. Path of file on webserver, relative to "baseURL",
294     and also by default installation path.
295 - "dest"
296     Optional. Normally, "src" is also used as the path (relative to the
297     installation root) for the file to be installed on the user's
298     system. If for some reason you need the installation path for some
299     file to be different, specify it here.
300     Usually, the path under "src" will be fine for this, in which case
301     there is no need to have a "dest" string on the line.
302     Path components should be separated with forward slashes ('/').
303
304In the example, the first file would be downloaded from
305  ./ancients-2.6-1b/ancients/ancients.serv
306(relative to the URL of the .modpack file), and installed in
307  ancients.serv
308in the relevant path of the user's system.
309
310Some advice on the structure of files in modpacks:
311
312 * You should generally install files in a directory named after the
313   modpack, with a few exceptions (.serv, .tilespec, .soundspec, and
314   .musicspec files must be installed to the top level, and should
315   reference files in your subdirectory).
316
317   Individual files' and directories' install names should usually not
318   embed version numbers, dates, etc, so that when a new version of
319   modpack X is installed, it cleanly overwrites the old version, rather
320   than leaving both cluttering up the user's installation.
321
322 * The modpack installer does not stop different modpacks overwriting
323   each other's files, so published modpacks should be disciplined about
324   namespace usage. If you've derived from someone else's modpack, you
325   should probably give your derivative new filenames, so that both can
326   be installed simultaneously.
327
328 * There is no 'white-out' facility to delete files from a user's
329   installation -- if a newer version of a modpack has fewer files than
330   an old one, the old file will persist in some users' installations,
331   so your modpacks should be designed to be tolerant of that.
332
333 * At the moment, there is no restriction on what kind of files a given
334   "type" can install, but modpacks should stick to installing the
335   advertised kinds of content. It's OK to install extra files such as
336   documentation in any case (LICENSE/COPYING, README.txt, etc).
337
338 * If your modpack contains a ruleset, you should usually install a
339   .serv file at the top level (which can be a one-line file consisting
340   of "rulesetdir <name>", as this is needed for the server to enumerate
341   the available rulesets.
342
343The [dependencies] section is optional, and not normally needed. If your
344modpack requires another one that can also be installed separately (for
345instance, a scenario that needs a specific ruleset), you can specify it
346here. After the header, each line consists of:
347 - "modpack":
348     What the dependency modpack calls itself when installed (that is,
349     "name" from its .modpack file).
350 - "URL":
351     URL to download modpack if needed. Can be relative or absolute.
352 - "type":
353     Must match "type" from dependency's .modpack file.
354 - "version":
355     Minimum version of dependency (as declared in its .modpack file).
356     Subject to version number comparison algorithm.
357If the modpack installer thinks the required version, or a newer
358version, of the dependency is already installed, it will do nothing,
359otherwise it will download the dependency modpack (and any of its own
360dependencies, recursively).
361
362
3633. Individual modpack files
364
365These are the files comprising the modpack (*.ruleset, *.png, etc), that
366will be copied verbatim to the user's Freeciv data directory and read by
367the Freeciv client and server. The modpack installer does not modify the
368files in any way.
369
370The files must be hosted individually on the web server; the modpack
371installer tool cannot unpack any archives such as .zip files.
372(Individual scenarios can be compressed, e.g. .sav.gz, as the Freeciv
373engine can uncompress these files.)
374
375Because the *.modpack file can change the file paths / names on
376download, the layout on the modpack server doesn't have to correspond
377with the installed layout. An individual file can be shared between
378multiple modpacks, if you want.
379
380How to write modpacks is beyond the scope of this document -- see
381README.rulesets, README.graphics, etc for some clues.
382

README.msys2

1
2 MSYS2 Windows Installer build notes
3====================================
4
5This document is about building Freeciv Windows Installer packages
6using MSYS2 from https://www.msys2.org/
7
8
9 Status
10====================================
11
12- Msys1, not msys2, is still the official freeciv Windows Installer
13  build method
14- Buildable clients are gtk3, gtk3.22, gtk2, sdl2, and Qt
15  - Official pre-made msys2 environment does not support building gtk2-client
16
17
18 Setup
19====================================
20
21 This chapter is about creating new msys2 build environment.
22
23 If you want to reproduce more official freeciv builds, the environment
24 used to make those builds is documented in the next chapter ("Premade environment"),
25 with listing of versions current at the time of this freeciv version.
26
271) Install MSYS2 following the documentation on their homepage
28
291.1) Download
30 https://sourceforge.net/projects/msys2/files/Base/x86_64/msys2-x86_64-20210215.exe
31 for win64 host
32
331.2) Run it to install MSYS2 on build system
34
351.3) Launch msys2_shell to update packages
36> pacman -Syu
37
382) Install following packages with 'pacman -Su --needed'
39
402.1) Packages needed for building freeciv
41 These packages are needed even if you don't plan to make installer,
42 but only build freeciv for local use.
43
442.1.1) Arch independent packages needed for building freeciv
45
462.1.1.1) Arch independent packages always needed for building freeciv
47 With these packages it's possible to build freeciv source tree that
48 has already such generated files present that are created for the
49 release tarball.
50
51 - make
52 - gettext
53 - pkg-config
54
552.1.1.2) Arch independent packages needed for getting and extracting freeciv
56 source tarball
57
58 - tar
59
602.1.1.3) Arch independent packages needed for building freeciv from repository
61 checkout. These are needed in addition to the ones always needed for building
62 freeciv.
63
64 - git
65 - automake
66 - libtool
67 - autoconf
68
692.1.2) Arch-specific packages needed for building freeciv
70
712.1.2.1) Arch-specific packages for building common parts
72 - mingw-w64-i686-gcc / mingw-w64-x86_64-gcc
73 - mingw-w64-i686-curl / mingw-w64-x86_64-curl
74 - mingw-w64-i686-imagemagick / mingw-w64-x86_64-imagemagick
75 - mingw-w64-i686-SDL2_mixer / mingw-w64-x86_64-SDL2_mixer
76
772.1.2.1.2) Arch-specific optional packages for building common parts
78 - mingw-w64-i686-drmingw / mingw-w64-x86_64-drmingw
79 - mingw-w64-i686-tolua / mingw-w64-x86_64-tolua
80
812.1.2.2) Arch-specific packages for building gtk3- and gtk3.22-client
82 - mingw-w64-i686-gtk3 / mingw-w64-x86_64-gtk3
83
842.1.2.3) Arch-specific packages for buildind Qt-client and/or Ruledit
85 - mingw-w64-i686-qt5 / mingw-w64-x86_64-qt5
86
872.1.2.4) Arch-specific packages for building gtk2-client
88 - mingw-w64-i686-gtk2 / mingw-w64-x86_64-gtk2
89
902.1.2.5) Arch-specific packages for building sdl2-client
91 - mingw-w64-i686-SDL2_image / mingw-w64-x86_64-SDL2_image
92 - mingw-w64-i686-SDL2_ttf / mingw-w64-x86_64-SDL2_ttf
93 - mingw-w64-i686-SDL2_gfx / mingw-w64-x86_64-SDL2_gfx
94
952.2) Packages needed for building installer package
96 These are needed in addition to above ones used in the
97 building step already.
98
992.2.1) Arch-specific packages needed for building installer
100 package
101
102 - mingw-w64-i686-nsis / mingw-w64-x86_64-nsis
103
104
105 Premade environment
106====================================
107
108Premade msys2 environment is available for download from
109http://files.freeciv.org/packages/windows/msys2/
110
111Current version is
112
113win64 host:
114-----------
115msys2-freeciv-win64-210226.7z, based on
116https://sourceforge.net/projects/msys2/files/Base/x86-64/msys2-x86_64-20210215.exe
117with packages updated to 26-Feb-2021 level.
118
119Both win32 and win64 targets are included. For each package listed below with <arch>
120in the name, actually two packages is installed; one with a name where <arch> is
121replaced by 'i686' and one where <arch> is replaced by 'x86_64'
122
123
124Following packages have been installed:
125- make
126- pkg-config
127- tar
128- git
129- patch
130- nano
131- automake
132- libtool
133- autoconf
134- gdb
135- mingw-w64-<arch>-gcc
136- mingw-w64-<arch>-icu
137- mingw-w64-<arch>-curl
138- mingw-w64-<arch>-sqlite3
139- mingw-w64-<arch>-gtk3
140- mingw-w64-<arch>-nsis
141- mingw-w64-<arch>-SDL2_mixer
142- mingw-w64-<arch>-SDL2_image
143- mingw-w64-<arch>-SDL2_ttf
144- mingw-w64-<arch>-SDL2_gfx
145- mingw-w64-<arch>-imagemagick
146- mingw-w64-<arch>-qt5
147- mingw-w64-<arch>-drmingw
148- mingw-w64-<arch>-meson
149- mingw-w64-<arch>-tolua
150
151After all the packages were installed 'pacman -Scc' was run to completely
152empty the package cache for having smaller environment package.
153
154
155 Build
156====================================
157
158Launch msys2 shell. Get the freeciv sources there
159somehow. Some options are:
1601) Download freeciv tarball within msys2 shell with wget
1612) Use git within msys2 shell to get them from version control
1623) Copy them from Windows folder where they are to a directory that
163   is within msys2
164
165> cd win32/installer_msys2
166> make <targets>
167
168  Target can be:
169  - "all" (default), build all installers
170  - "<gui>-installer", where <gui> is
171     - gtk3
172     - gtk3.22
173     - gtk2
174     - sdl2
175     - qt
176  - "ruledit-installer"
177  - "snapshot", if your freeciv sources are in git checkout directory,
178                builds all installers with commit id in version number
179
180 You can also set minimum Windows version targeted. While setting this
181 to an older version allows those Windows versions to run the created
182 executables, it may come with the cost of disabling functionality that
183 newer Windows versions could otherwise have.
184 The version is set via MIN_WIN_VER variable. For values to use, see
185 list in: https://msdn.microsoft.com/en-us/library/6sehtctf.aspx
186 Current default is 0x0601 (Windows 7).
187
188 It's possible to set number of make jobs used in the build by
189 setting suitable make parameter to MAKE_PARAMS variable, e,g,
190 MAKE_PARAMS="-j3"
191
192
193 Problems
194====================================
195
196- Freeciv linked against readline in msys2 does not work.
197  Configure freeciv with --without-readline
198
199
200 TODO
201====================================
202
203- Readline support
204

README.nations

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

README.packaging

1----------------------------------------------------------------------
2                   Notes for Freeciv packagers
3----------------------------------------------------------------------
4
5This file is meant to help those people wanting to package Freeciv
6for their distribution, and, to some degree, those people who want to
7create Freeciv fork.
8
9----------------------------------------------------------------------
10Updating from 2.5 to 2.6
11------------------------
12* Client uses ~/.freeciv/freeciv-client-rc-2.6 for storing its options.
13  Options are always saved to that file.
14  Loading of options first tries to get options from
15  ~/.freeciv/freeciv-client-rc-2.6. If that file does not exist it tries to
16  load options from old client files generated by former version of Freeciv
17  (e.g. ~/.freeciv-client-rc-2.5 generated by Freeciv 2.5 or ~/.civclientrc
18   generated by Freeciv version <= 2.1).
19* gtk3-client is now the default client
20* Minimum gtk3 requirement for building gtk3-client is now 3.8.
21* Minimum qt requirement for building qt-client and freeciv-ruledit is 5.2.
22* There's new gtk3.22-client that has gtk+-3.22 as requirement. It can be
23  built with --enable-client=gtk3.22. This client suits better for
24  systems with gtk+-3.22 or gtk+-3.24 than the gtk3-client compatible with
25  much older gtk+ versions.
26* There's new experimental sdl2-client. It can be built with
27  --enable-client=sdl2
28* Development of ruleset editor, freeciv-ruledit, has begun.
29  It has same Qt5 dependencies as other Qt programs in Freeciv distribution.
30  It is not very usable in 2.6 and should probably not be packaged by
31  distributions.
32* Lua version to use is 5.3 now.
33* System lua library is now used by default. Copy of lua distributed
34  with freeciv is used only if system lua is not found, or it's
35  explicitly requested with configure option --disable-sys-lua
36* There's new configure option --enable-sys-tolua-cmd to use tolua
37  command from the build system when generating lua bindings. Plain
38  --enable-sys-tolua-cmd searches tolua from the PATH, other values
39  are treated as full path to executable. The default is to search
40  for tolua from the system. You have to use system tolua when
41  cross-compiling.
42* Minimum libtool version is now 1.5.2
43* Minimum automake version is now 1.10
44* For translation support minimum gettext version is now 0.14. It's
45  still possible to build completely without translation support
46  with configure option --disable-nls
47* SDL2-mixer is now the default. To build clients to still use
48  SDL1.2-mixer, configure with --enable-sdl-mixer=sdl1.2. sdl-client
49  cannot be built with SDL2-mixer, nor can sdl2-client be built with
50  SDL1.2-mixer
51* Server now saves its readline history to file
52  "~/.freeciv/freeciv-server_history" instead of "~/.freeciv-server_history"
53* Configure option --with-freeciv-manual / --without-freeciv-manual has
54  been replaced with --enable-freeciv-manual / --disable-freeciv-manual
55  that can take also value --enable-freeciv-manual=html to make
56  freeciv-manual that produces manuals with alternative formatting,
57  default still being wiki formatting.
58* Added configure options --with[out]-libbz2 and --with[out]-liblzma to
59  explicitly enable or disable support for bz2 or xz compressed files.
60  The default is still to autodetect if the support can be built in.
61  Note that it's usually a bad idea to disable one of these if you
62  have had it previously enabled, as then your new version will be
63  unable to load old savegames created with that compression type in
64  use.
65* Ruleset README files have moved from doc/ into data/ directory
66  alongside ruleset data, so that they can be displayed inside the
67  game. You may want to symlink to these from /usr/share/doc/ or
68  equivalent so that users can continue to easily find the
69  documentation outside the game.
70* GGZ support has been dropped completely.
71
72----------------------------------------------------------------------
73Compatibility of modified versions
74----------------------------------
75If you create patched version of Freeciv, take necessary precautions
76to avoid problems when your patched version interacts with unpatched
77version, or tries to load or save incompatible data files.
78
79Concept called "capabilities" is widely used in Freeciv. If two things
80(server/client, program/datafile...) are incompatible, they have
81different capabilities defined. Based on that they can detect
82incompatibility and act gracely.
83Be sure to update network capability string in fc_version if you break
84network compatibility, so your patched server/client does not cause
85problems to official Freeciv servers/clients trying to connect it.
86
87If you distribute modified version of freeciv, even (or especially)
88one network compatible with upstream, you should change also
89FREECIV_DISTRIBUTOR in fc_version to match. This information is sent
90by client to (public) server so in case there's any problems with certain
91clients, we know a bit more what kind of code they are using.
92
93----------------------------------------------------------------------
94Configure time version number adjustment
95----------------------------------------
96
97The version label part of the version number can be set via
98configure time environment variable FREECIV_LABEL_FORCE.
99If the variable contains tag "<base>", that gets replaced with the
100label that would be used if FREECIV_LABEL_FORCE was not set at all.
101
102----------------------------------------------------------------------
103Announcement of new versions
104----------------------------
105As of 2.4, the Freeciv client displays the latest available version if
106it's newer than the running version. This information comes from the
107metaserver.
108
109The metaserver maintains several different versions to report here,
110distinguished by "follow tags". The default follow tag is "stable",
111updated when a new source release is made, but for instance Windows
112builds will follow a different tag such as "win32", which will only be
113updated when a new Windows binary is available.
114
115This mechanism is primary intended for the Freeciv maintainers, since
116updates to the metaserver need to be made be us. However, if you
117maintain a significant version/package of Freeciv, you can contact us
118and ask to be allocated a tag to pass to 'configure --with-followtag';
119thereafter you'd need to let us know whenever you make a new release
120so we can update the metaserver.
121
122(This is unlikely to be of use to Linux distribution packagers, who
123have their own means of distributing updates.)
124
125----------------------------------------------------------------------
126Optional features
127-----------------
128Configure enables many optional features by default when their
129dependencies are satisfied in the system. Downside of this automation
130is that missing dependencies cause no hard error even when you would
131want the features. For getting list of features automatically left out
132because of missing dependencies you can give option --with-missinglist
133to configure, and last thing configure outputs will be that list.
134
135----------------------------------------------------------------------
136Shared libfreeciv
137-----------------
138Libfreeciv contains code common to server, client, and various tools.
139By default it's built as static library, but you can build it as
140a shared library by giving configure option "--enable-shared"
141(and possibly "--disable-static")
142
143----------------------------------------------------------------------
144Generated files
145---------------
146This is list of files Freeciv might generate to filesystem when running.
147You may want to remove some of these when Freeciv is uninstalled.
148
149* Client saves its options to file "~/.freeciv/freeciv-client-rc-2.6"
150* Server saves its readline history to file "~/.freeciv/freeciv-server_history"
151* When running local single player games, challenge files with name
152  like "~/.freeciv/challenge_*_*" are generated
153* When saving game in server launched by client, savegame go to
154  "~/.freeciv/saves/"
155* When saving game in independently launched server, savegames go
156  to directory specified with "-s" command line option, defaulting
157  to working directory
158* freeciv-modpack saves data under "~/.freeciv/2.6/" and
159  "~/.freeciv/scenarios/"
160* Server can write log to file specified with "-l" command line option
161* When mapimage feature is used, it can save colortest images to
162  working directory and actual map images to save directory (same as above)
163
164----------------------------------------------------------------------
165Building multiple clients at once
166---------------------------------
167Starting from 2.2 it has been possible to build multiple clients running
168'make' just once. Just give configure option "--enable-client" comma
169separated list of clients to compile, e.g. "--enable-client=gtk3,gtk2,sdl,qt"
170
171----------------------------------------------------------------------
172Savegame compression support
173----------------------------
174Freeciv can use several different compression libraries for compressing
175its savegames. See server setting "compresstype".
176* zlib (gzip compression) is required to compile freeciv so zlib
177  compression support is always present
178* bzip2 compression is built into Freeciv if bzip2 libraries and
179  headers are present at configure time. One can override this automatic
180  detection with configure option --with[out]-libbz2.
181* xz compression is built into Freeciv if liblzma library and
182  headers are present at configure time. One can override this automatic
183  detection with configure option --with[out]-liblzma.
184
185While this feature is called "Savegame compression support" it actually
186applies to loading of all the section files: savegames, rulesets, tileset
187spec files... If compression support is built into Freeciv, you can
188compress any of these files and Freeciv can still load them. Freeciv ships
189with all the data files uncompressed, except scenarios which are gzipped.
190
191----------------------------------------------------------------------
192Loadable AI modules
193-------------------
194Freeciv can be built with support of loading AI code from custom module.
195There can be multiple modules loaded at once, and AI players can use
196different module from each other.
197This feature is not enabled by default. When it's not enabled, default
198AI code is built in to server and always used.
199You can enable this feature with '--enable-aimodules'. For this to work
200you have to enable also building of shared libraries (and modules) with
201'--enable-shared' as discussed in chapter 'Shared libfreeciv'
202All modules, both default and custom, must be installed under
203${libdir}/fcai (/usr/lib/fcai for example) for their loading to work.
204
205----------------------------------------------------------------------
206Public servers
207--------------
208Sadly we have no resources to keep public servers for many different
209Freeciv versions running. To give your users ability to play on public
210servers, try to provide them as current Freeciv client version as possible.
211To see list of currently running public servers, see
212"http://meta.freeciv.org/metaserver.php" Note that from the web you
213can see complete list, while list shown by Freeciv client only lists
214compatible servers.
215
216Any a.b.c release is network compatible with any a.b.d release. If you
217provide 2.6.c client, it can be used to play on 2.6.d server.
218

README.rulesets

1----------------------------------------------------------------------
2                       Freeciv Rulesets
3----------------------------------------------------------------------
4          (Originally by David Pfitzner, dwp@mso.anu.edu.au)
5
6Quickstart:
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       ./fcser -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
39The 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----------------------------------------------------------------------
47Using and modifying rulesets:
48-----------------------------
49
50Rulesets are specified using the server command "rulesetdir".  The
51command above of "./fcser -r data/civ1.serv" just reads a file which
52uses this command (as well as a few of the standard server options).
53The server command specifies in which directory the ruleset files
54are to be found.
55
56The ruleset files in the data directory are user-editable, so you can
57modify them to create modified or custom rulesets (without having to
58recompile Freeciv). It is suggested that you _don't_ edit the
59existing files in the "classic", "civ2civ3", "experimental",
60"multiplayer", "civ1", or "civ2"
61directories, but rather copy them to another directory and edit the
62copies. This is so that its clear when you are using modified rules
63and not the standard ones.
64
65The format used in the ruleset files should be fairly
66self-explanatory. A few points:
67
68- The files are not all independent, since eg, units depend on
69  advances specified in the techs file.
70
71- Units have a field, "roles", which is like "flags", but
72  determines which units are used in various circumstances of the
73  game (rather than intrinsic properties of the unit).
74  See comments in common/unit.h
75
76- Rulesets must be in UTF-8; translatable texts should be American English
77  ASCII.
78
79----------------------------------------------------------------------
80Restrictions and Limitations:
81-----------------------------
82
83units.ruleset:
84
85  Restrictions:
86
87    - At least one unit with role "FirstBuild" must be available
88      from the start (i.e., tech_req = "None").
89
90    - There must be units for these roles:
91      - "Explorer"
92      - "FerryBoat"        (Must be able to move at sea)
93      - "Hut"              (Must be able to move on land)
94      - "Barbarian"        (Must be able to move on land)
95      - "BarbarianLeader"  (Must be able to move on land)
96      - "BarbarianBuild"   (Must be able to move on land)
97      - "BarbarianBoat"    (Must be able to move at sea)
98      - "BarbarianSea"
99
100nations.ruleset
101
102  Restrictions:
103
104    - Government used during revolution can't be used as default_government
105      or init_government for any nation
106
107----------------------------------------------------------------------
108Implementation details:
109-----------------------
110
111This section and following section will be mainly of interested to
112developers who are familiar with the Freeciv source code.
113
114Rulesets are mainly implemented in the server. The server reads the
115files, and then sends information to the clients. Mostly rulesets
116are used to fill in the basic data tables on units etc, but in some
117cases some extra information is required.
118
119For units and advances, all information regarding each unit or advance
120is now captured in the data tables, and these are now "fully
121customizable", with the old enumeration types completely removed.
122
123----------------------------------------------------------------------
124Game settings defined in the ruleset:
125-------------------------------------
126
127Game settings can be defined in the section [settings] of the file
128game.ruleset. The name key is equal to the setting name as listed by
129'show all'. If the setting should be locked by the ruleset, the last
130column should be set to TRUE.
131
132set =
133    { "name", "value", "lock"
134      "bool_set", TRUE, FALSE
135      "int_set", 123, FALSE
136      "str_set", "test", FALSE
137    }
138
139----------------------------------------------------------------------
140Update information:
141-------------------
142
143The information about the changes in the definition of a ruleset between
144different versions of Freeciv is kept in the wiki at http://www.freeciv.org/
145The URLs below list the differences between the freeciv versions from 2.2.x
146to the current version:
147
148http://www.freeciv.org/wiki/How_to_update_a_ruleset_from_2.5_to_2.6
149
150http://www.freeciv.org/wiki/How_to_update_a_ruleset_from_2.4_to_2.5
151
152http://www.freeciv.org/wiki/How_to_update_a_ruleset_from_2.3_to_2.4
153
154http://www.freeciv.org/wiki/How_to_update_a_ruleset_from_2.2_to_2.3
155

README.scorelog

1
2Format description of the scorelog format version 2
3===================================================
4
5Empty lines and lines starting with '#' are comments. Each non-comment
6line starts with a command. The parameter are supplied on that line
7and are seperated by a space. Strings which may contain whitespaces
8are always the last parameter and so extend till the end of line.
9
10The following commands exists:
11  id <game-id>
12    <game-id> is a string without whitespaces which is used
13              to match a scorelog against a savegame.
14
15  tag <tag-id> <descr>
16    add a data-type (tag)
17      the <tag-id> is used in the 'data' commands
18      <descr> is a string without whitespaces which
19              identified this tag
20
21  turn <turn> <number> <descr>
22    adds information about the <turn> turn
23      <number> can be for example year
24      <descr> may contain whitespaces
25
26  addplayer <turn> <player-id> <name>
27    adds a player starting at the given turn (inclusive)
28      <player-id> is a number which can be reused
29      <name> may contain whitespaces
30
31  delplayer <turn> <player-id>
32    removes a player from the game. The player was
33      active till the given turn (inclusive)
34      <player-id> used by the creation
35
36  data <turn> <tag-id> <player-id> <value>
37    give the value of the given tag for the given
38    player for the given turn.
39

README.sound

1
2===========================================================================
3 Sound Support
4===========================================================================
5
6The server sends the client a list of primary and secondary sound tags
7for certain events. The 'primary' tags are those preferred by the
8current modpack. The client does not need to have these sounds. The
9'secondary' tags should refer to standard sounds that all
10installations of Freeciv should have.
11
12Tags are used to give an easy way to change sounds. A specfile is used
13to indicate which tags refer to which sound files. A change of spec
14file, given as an option at startup, will change sounds. For example,
15
16	freeciv-gtk3 --Sound mysounds.spec
17
18will read sound files from "mysounds.spec". You will need to download
19or copy or link those sounds into whichever directory is mentioned in this
20file first, or edit it to refer to the right files. All references are by
21default relative to the data/ directory. Soundpacks can be downloaded from
22the Freeciv website in the tar format. You will either need to unpack them
23with eg "tar -xzvf stdsoundsX.tar.gz" or use 7-Zip (for Windows etc.), and
24put the files in the data directory mentioned above.
25
26You can get additional soundsets (sound files and a spec file)
27from <http://files.freeciv.org/contrib/audio/soundsets>. At this
28address you find also extra sound files to change an existing soundset or
29create a new one.
30
31================================
32 Plugins
33================================
34
35The output of the sounds at the client side are done by plugins. The
36set of available plugins depend on the libraries found on the host
37system. You can choose the plugin the client should use via the
38command line:
39
40	freeciv-gtk3 --Plugin sdl
41
42You can choose "none" to mute the client. Freeciv currently supports
43the following plugins:
44  - dummy (none)
45  - SDL with SDL_mixer library (sdl)
46
47To add support for a new plugin, change these files (where "whatever"
48is the name of the new plugin):
49	configure.ac			/* add new test */
50	client/audio.c			/* link in new plugin */
51	client/Makefile.am		/* add the files below */
52	client/audio_whatever.c		/* audio plugin */
53	client/audio_whatever.h		/* audio plugin's header */
54
55================================
56 Tags
57================================
58
59There are two kinds of sound tags:
60 - defined in the rulesets
61 - defined in the program code
62
63While the former can be chosen freely the latter can't be changed.
64
65The sound tags associated with improvements (wonders and normal
66buildings), unit movements and unit fights have to be set in the
67rulesets. Freeciv just hand these sound tags over to the client where
68they are translated into the filenames of the sound files via the
69soundspec file. Every soundspec should have generic sound tags for
70wonders ("w_generic"), normal buildings ("b_generic"), unit movements
71("m_generic") and unit fights ("f_generic").
72
73Sound tags associated with certain events are generated in the Freeciv
74code and can't be configured from outside. The soundspec file also has
75to have mapping for these tags. The complete list of such tags can be
76found in data/stdsounds.spec. The name of the tag is enum name (see
77common/events.h) in lowercase. So E_POLLUTION becomes the tag
78"e_pollution". There is no generic event tag and no alternate tags are
79used.
80
81================================
82 TODO
83================================
84
85There are a few things that can be done to get better sound support in
86Freeciv still:
87  * add more plugins (gstreamer, arts, windows, etc)
88  * add a sound tag for each technology, as for buildings/units
89  * always add more event tags
90  * find or create better sound samples and make better spec-file
91
92================================
93 Misc
94================================
95
96Sound creators: Please name sound files intelligibly. Include a README
97where you present the licensing terms used (if public domain, say so)
98for the sound files.
99
100Modpack makers: Please give secondary tags that refer to standard tags
101so that those who have not downloaded the latest & greatest sound pack
102can still enjoy the game.
103

README.tilesets

1----------------------------------------------------------------------
2                       Freeciv Tilesets
3----------------------------------------------------------------------
4
5Quickstart:
6-----------
7
8Tilesets are a collection of images which are needed to display the
9map.
10
11----------------------------------------------------------------------
12Update information:
13-------------------
14
15The information about the changes in the definition of a tileset between
16different versions of Freeciv is kept in the wiki at http://www.freeciv.org/
17The URLs below list the differences between the freeciv versions from 1.14.x
18to the current version:
19
20http://www.freeciv.org/wiki/How_to_update_a_tileset_from_2.5_to_2.6
21
22http://www.freeciv.org/wiki/How_to_update_a_tileset_from_2.4_to_2.5
23
24http://www.freeciv.org/wiki/How_to_update_a_tileset_from_2.3_to_2.4
25
26http://www.freeciv.org/wiki/How_to_update_a_tileset_from_2.2_to_2.3
27
28http://www.freeciv.org/wiki/How_to_update_a_tileset_from_2.1_to_2.2
29
30http://www.freeciv.org/wiki/How_to_update_a_tileset_from_2.0_to_2.1
31
32http://www.freeciv.org/wiki/How_to_update_a_tileset_from_1.14_to_2.0
33