Freeciv
(Revise top text again.)
(Rewrite for newer Freeciv; we no longer need to edit the save file. Give less obsolete info and more current info.)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
  +
In regular games, the AI plays the [[barbarians]] and the pirates. Their units act berserk and attack the nearest city. They waste units against cities with strong defenses. They neglect to defend cities after conquering them. Someone else always defeats the barbarians! Unless you help them...
'''Genseric''' wanted to own the wealth of the world. Genseric had the special ability to recruit many free units to fight for Genseric. So Genseric pondered how to raid some cities. Genseric created a simple plan. All units will act berserk and attack the nearest city.
 
   
  +
With some slight cheating, ''you can take control'' of the barbs! They get free units and extra gold whenever the game creates a barbarian uprising, but there are also some disadvantages to playing barbs.
This is why [[barbarians]] always fail! Barbarians attack too much and waste their free units. Barbarians neglect the defense of their conquered cities. Someone else always defeats the barbarians! Unless you help them...
 
   
 
== Your defection ==
 
== Your defection ==
  +
You can't take the barbarians at the beginning of the game, because they don't exist until the first uprising. You either need a saved game with barbarians, or you need to start a new game and wait for barbarians to appear. You may play a regular civ, and ''defect'' to the barbarians after they appear; or you may observe an AI game (with no human players).
[[Image:Barbaricum.png|frame|right|'''Barbaricum''' is the Barbarian capital city.]]
 
   
 
The basic idea is to add the letter 'b' to the server option 'allowtake'. When you defect, you enter commands in chat: <tt style="padding: 2px; background: #cccccc;">/take Genseric</tt> to switch civs and <tt style="padding: 2px; background: #cccccc;">/aitoggle Genseric</tt> to disable the barbarian AI.
You were formerly a tactician for one of the world's major civilizations. You defected to the barbarians. You understood that the barbarian civilization has a permanent advantage over other civilizations. You changed the plan. You will conserve your units, defend your cities and take the world.
 
   
  +
=== Setting the server options ===
With some slight cheating, you can control the barbarian units. (This guide is for '''Freeciv 2.1.x'''. Other versions of Freeciv might work, or might be different.) The basic idea is to add the letter 'b' to the server option 'allowtake', then <tt style="padding: 2px; background: #cccccc;">/take Genseric</tt>. The problem here is that Freeciv never allows you to disable the barbarian AI. Any attempt to <tt style="padding: 2px; background: #cccccc;">/aitoggle Genseric</tt> replies with, "Cannot toggle a barbarian player."
 
  +
The default for 'allowtake' is "HAhadOo". You need to add the 'b'. You may also want to change 'barbarians' and 'onsetbarbs' to get more and earlier barbarian uprisings.
   
 
<pre>
You must understand that the only way to disable the barbarian AI is to edit a saved game.
 
  +
/set allowt HAhadOob
  +
/set barb HORDES
  +
/set onsetb 1
 
</pre>
   
  +
(TODO: find and link to the instructions for an AI game without human players.)
=== Editing a save file ===
 
So you need an '''existing save file''' that you can convert for playing as barbarians. You want a save file where the barbarians ''already control'' one or more cities. (This is more probable if the game has "raging hordes, lots of barbarians": <tt style="padding: 2px; background: #cccccc;">/set barbarians 4</tt>.) You might already have a save file with barbarian cities. Otherwise, you can play a normal game on your own civserver, and you can save when you see barbarian cities.
 
   
  +
=== Taking barbarians or pirates ===
<div style="margin: 32px; padding: 8px; background: #ffcccc;">
 
Each barbarian nation is one of two flavors: ''land barbarians'' and ''sea barbarians''. In Freeciv 2.2, the sea barbarians became ''pirates''.
+
There are 2 barb civs, ''land barbarians'' and ''sea barbarians''. In Freeciv 2.2, the sea barbarians became ''pirates''. It is better to play the pirates, because there are more uprisings from water tiles. (The land barbs stop having uprisings after the other civs take all the huts and fill the land with cities.)
</div>
 
   
  +
When the game creates a barb civ, it messages all players and observers. "Pirates gain a leader by the name Anne Bonny. Dangerous times may lie ahead." You can also enter <tt style="padding: 2px; background: #cccccc;">/list</tt> in chat to check if barbarians exist.
A save file is an ordinary, compressed text file. You can decompress your chosen save file, then open it in some text editor.
 
   
  +
* You might defect as soon as the pirates "gain a leader". The risk is that you die if the first stack of pirates can't capture a city.
# Find your save files. Unix clones (like Linux, BSD) tend to have <tt>~/.freeciv/saves</tt>, but other systems might have a different location.
 
  +
* You might defect after the pirates have a city. If you are defecting from a regular civ, you might prepare some cities for the pirates to conquer.
#* Example: <tt style="padding: 2px; background: #cccccc;">$ cd .freeciv/saves</tt>
 
# Decompress your chosen file, but keep the original save file. Freeciv 2.1, with default server options, saves <tt>.sav.gz</tt> gzip files. (Freeciv 2.2 saves <tt>.sav.bz2</tt> bzip2 files.)
 
#* Example: <tt style="padding: 2px; background: #cccccc;">$ zcat game5-turn270.sav.gz > barbarian5-turn270.sav</tt>
 
# Open the decompressed file in a text editor.
 
#* Example: <tt style="padding: 2px; background: #cccccc;">$ mg barbarian5-turn270.sav</tt>
 
# In the open file, find the <tt>allow_take=</tt> line, and add the letter 'b', to allow players to take barbarians. (You can instead <tt style="padding: 2px; background: #cccccc;">/set allowtake HAhadOob</tt> after you start the server, but this line is easy to edit now.)
 
#* Example: Change <tt style="padding: 2px; background: #cccccc;">allow_take="HAhadOo"</tt> to <tt style="padding: 2px; background: #cccccc;">allow_take="HAhadOob"</tt>.
 
# In the open file, find a section for the barbarian player (<tt style="padding: 2px; background: #cccccc;">nation="Barbarian"</tt>) who is alive and has some cities. Note the ''name'' of the player. Disable the AI by changing <tt style="padding: 2px; background: #cccccc;">ai.control=1</tt> to <tt style="padding: 2px; background: #cccccc;">ai.control=0</tt>.
 
# Save the file. (Freeciv can already open <tt>.sav</tt> files, so there is no need to compress the file.)
 
   
  +
To defect, enter a command like <tt style="padding: 2px; background: #cccccc;">/take "Anne Bonny"</tt>, or use the [[Editor]] (Edit Mode) to switch sides. Then enter <tt style="padding: 2px; background: #cccccc;">/aitoggle "Anne Bonny"</tt> to disable the pirate AI. Use another aitoggle to give your old civ to the AI. (Another way is to <tt style="padding: 2px; background: #cccccc;">/set autotoggle 1</tt> to automatically toggle AI when you switch civs.)
<div style="margin: 32px; padding: 8px; background: #ffcccc;">
 
You need to edit only two lines. For example, I changed only two lines when I converted ''game5-turn270.sav.gz'' to ''barbarian5-turn270.sav'':
 
   
 
=== Editing the save file (obsolete) ===
<pre>
 
  +
''This section is obsolete, because recent versions of Freeciv allow you to toggle the barbarian AI without editing the save file.''
$ zdiff game5-turn270.sav.gz barbarian5-turn270.sav
 
  +
--- - Tue Jan 19 23:12:09 2010
 
  +
Back in Freeciv 2.1.x, <tt style="padding: 2px; background: #cccccc;">/aitoggle Genseric</tt> failed with, "Cannot toggle a barbarian player." The only way to disable the barbarian AI in 2.1.x was to edit a saved game. A save file is an ordinary, compressed text file. You can decompress your save file, then open it in some text editor.
+++ barbarian5-turn270.sav Fri Jan 8 17:29:52 2010
 
@@ -72,7 +72,7 @@
 
occupychance=0
 
autoattack=0
 
demography="NASRLPEMOqrb"
 
-allow_take="HAhadOo"
 
+allow_take="HAhadOob"
 
borders=4
 
happyborders=1
 
diplomacy=2
 
@@ -28715,7 +28715,7 @@
 
city_style_by_name="European"
 
is_male=1
 
is_alive=1
 
-ai.control=1
 
+ai.control=0
 
ai={ "love","spam","countdown","war_reason","patience","warn_space","ask_peace","ask_alliance","ask_ceasefire"
 
1,0,-1,5,0,0,0,0,0
 
1,1,-1,5,0,0,0,0,0
 
</pre>
 
</div>
 
   
=== Identifying a section for the barbarian player ===
 
 
Inside the save file, a barbarian player has a section with <tt style="padding: 2px; background: #cccccc;">nation="Barbarian"</tt> and either <tt style="padding: 2px; background: #cccccc;">ai.is_barbarian=1</tt> or <tt style="padding: 2px; background: #cccccc;">ai.is_barbarian=2</tt>. Here is an example.
 
Inside the save file, a barbarian player has a section with <tt style="padding: 2px; background: #cccccc;">nation="Barbarian"</tt> and either <tt style="padding: 2px; background: #cccccc;">ai.is_barbarian=1</tt> or <tt style="padding: 2px; background: #cccccc;">ai.is_barbarian=2</tt>. Here is an example.
   
Line 85: Line 58:
 
To disable the AI, change <tt style="padding: 2px; background: #cccccc;">ai.control=1</tt> to <tt style="padding: 2px; background: #cccccc;">ai.control=0</tt>.
 
To disable the AI, change <tt style="padding: 2px; background: #cccccc;">ai.control=1</tt> to <tt style="padding: 2px; background: #cccccc;">ai.control=0</tt>.
   
  +
== Your strategy ==
=== Loading a converted save file ===
 
 
You were formerly a tactician for one of the world's major civilizations. You defected to the barbarians or pirates, because their ability to inspire uprisings gives them a permanent advantage over other civilizations. You want to exploit these uprisings and conquer cities, but you also want to manage your cites like a regular civ.
This is the procedure after you convert the save file.
 
  +
  +
=== Barbarian uprisings ===
  +
When you get a barbarian uprising, the stack of units appears on your map. You also receive a map of the nearest city, so you can direct your new barbs toward the nearest civilization. (Freeciv 2.1.x might have had glitches, but recent versions of Freeciv seem to correctly update the map in the client playing the barbarians.)
  +
  +
In civ2civ3 and classic rules, each stack has a Barbarian Leader and some military units:
  +
  +
* Land barbarians: Horsemen (without tech), Knights, Musketeers, Cannons, or Partisans.
  +
* Pirates: Legions (without tech), Knights (classic only), Musketeers, Dragoons (classic only), or Marines. The stack is on a Caravel or Galleon.
  +
  +
You may get these units if 2 non-barb civs know the technology. Otherwise, you get only Horsemen or Legions. The new Barbarian Leader comes with 100 gold to pay the ransom, but you can probably avoid the ransom and keep the gold. The units start with no veteran levels.
  +
  +
You want to use the first uprisings to conquer cities. Prefer to cities without walls. You might be able to grab newer cities before their owners build more defenders. Remember that cities at size 1 get razed; you might wait for them to grow to size 2 before conquering them.
  +
  +
=== Managing cities ===
  +
A barb city can build any city improvement or wonder (with the usual requirements), but they can only build a small set of units. These are the same units that the AI units would build. This gets enforced by the ruleset in recent versions of Freeciv. (Back in 2.1.x, human barbarians built any units like regular civs.)
  +
  +
In civ2civ3 and classic rules, the set of units is Legions (without tech), Cannons, Dragoons, Musketeers.
   
  +
You also can't upgrade to units that you can't build. For example, you can never upgrade your Musketeers to Riflemen.
# Start ''civclient'', click "Load Saved Game".
 
# "Choose Saved Game to Load:" Select and load your <tt>.sav</tt> file. The file appears in the list, or else through the "Browse..." button.
 
# "Choose a nation to play:" This list never includes the barbarians, so you must choose one of the other nations. Choose any nation and start the game.
 
# In the Chat tab, say <tt style="padding: 2px; background: #cccccc;">/list</tt> to list the nations. Find the barbarians in the list.
 
#* Example: ''Genseric (user Unassigned, Barbarian, difficulty level hard, Barbarian, Team 19)''
 
# Now ''/take'' the barbarians.
 
#* Example: <tt style="padding: 2px; background: #cccccc;">/take Genseric</tt>
 
# Enable AI for all other nations, except the barbarians.
 
#* One way is to say <tt style="padding: 2px; background: #cccccc;">/set autotoggle 1</tt> then say <tt style="padding: 2px; background: #cccccc;">/set autotoggle 0</tt>.
 
# Optionally, change the tax rates.
 
# Optionally, change the city produtions.
 
   
== TODO ==
+
=== TODO ===
 
[[Image:Barbaricum.png|frame|right|'''Barbaricum''' was the Barbarian capital city in Freeciv 2.1.x.]]
* Game glitches
 
 
* Building a Palace
 
* Building a Palace
  +
* Settling cities without own Settlers
 
* Defending against enemy invasions
 
* Defending against enemy invasions
* Using your free units
 
 
[[Category:Gameplay]]
 
[[Category:Gameplay]]
  +
[[category:game mods]]

Latest revision as of 21:50, 10 May 2019

In regular games, the AI plays the barbarians and the pirates. Their units act berserk and attack the nearest city. They waste units against cities with strong defenses. They neglect to defend cities after conquering them. Someone else always defeats the barbarians! Unless you help them...

With some slight cheating, you can take control of the barbs! They get free units and extra gold whenever the game creates a barbarian uprising, but there are also some disadvantages to playing barbs.

Your defection[]

You can't take the barbarians at the beginning of the game, because they don't exist until the first uprising. You either need a saved game with barbarians, or you need to start a new game and wait for barbarians to appear. You may play a regular civ, and defect to the barbarians after they appear; or you may observe an AI game (with no human players).

The basic idea is to add the letter 'b' to the server option 'allowtake'. When you defect, you enter commands in chat: /take Genseric to switch civs and /aitoggle Genseric to disable the barbarian AI.

Setting the server options[]

The default for 'allowtake' is "HAhadOo". You need to add the 'b'. You may also want to change 'barbarians' and 'onsetbarbs' to get more and earlier barbarian uprisings.

/set allowt HAhadOob
/set barb HORDES
/set onsetb 1

(TODO: find and link to the instructions for an AI game without human players.)

Taking barbarians or pirates[]

There are 2 barb civs, land barbarians and sea barbarians. In Freeciv 2.2, the sea barbarians became pirates. It is better to play the pirates, because there are more uprisings from water tiles. (The land barbs stop having uprisings after the other civs take all the huts and fill the land with cities.)

When the game creates a barb civ, it messages all players and observers. "Pirates gain a leader by the name Anne Bonny. Dangerous times may lie ahead." You can also enter /list in chat to check if barbarians exist.

  • You might defect as soon as the pirates "gain a leader". The risk is that you die if the first stack of pirates can't capture a city.
  • You might defect after the pirates have a city. If you are defecting from a regular civ, you might prepare some cities for the pirates to conquer.

To defect, enter a command like /take "Anne Bonny", or use the Editor (Edit Mode) to switch sides. Then enter /aitoggle "Anne Bonny" to disable the pirate AI. Use another aitoggle to give your old civ to the AI. (Another way is to /set autotoggle 1 to automatically toggle AI when you switch civs.)

Editing the save file (obsolete)[]

This section is obsolete, because recent versions of Freeciv allow you to toggle the barbarian AI without editing the save file.

Back in Freeciv 2.1.x, /aitoggle Genseric failed with, "Cannot toggle a barbarian player." The only way to disable the barbarian AI in 2.1.x was to edit a saved game. A save file is an ordinary, compressed text file. You can decompress your save file, then open it in some text editor.

Inside the save file, a barbarian player has a section with nation="Barbarian" and either ai.is_barbarian=1 or ai.is_barbarian=2. Here is an example.

[player20]
name="Genseric"
username="Unassigned"
ranked_username="Unassigned"
nation="Barbarian"
...
is_male=1
is_alive=1
ai.control=1
...
ai.skill_level=7
ai.is_barbarian=2
gold=2806
tax=100
science=0
luxury=0
...

To disable the AI, change ai.control=1 to ai.control=0.

Your strategy[]

You were formerly a tactician for one of the world's major civilizations. You defected to the barbarians or pirates, because their ability to inspire uprisings gives them a permanent advantage over other civilizations. You want to exploit these uprisings and conquer cities, but you also want to manage your cites like a regular civ.

Barbarian uprisings[]

When you get a barbarian uprising, the stack of units appears on your map. You also receive a map of the nearest city, so you can direct your new barbs toward the nearest civilization. (Freeciv 2.1.x might have had glitches, but recent versions of Freeciv seem to correctly update the map in the client playing the barbarians.)

In civ2civ3 and classic rules, each stack has a Barbarian Leader and some military units:

  • Land barbarians: Horsemen (without tech), Knights, Musketeers, Cannons, or Partisans.
  • Pirates: Legions (without tech), Knights (classic only), Musketeers, Dragoons (classic only), or Marines. The stack is on a Caravel or Galleon.

You may get these units if 2 non-barb civs know the technology. Otherwise, you get only Horsemen or Legions. The new Barbarian Leader comes with 100 gold to pay the ransom, but you can probably avoid the ransom and keep the gold. The units start with no veteran levels.

You want to use the first uprisings to conquer cities. Prefer to cities without walls. You might be able to grab newer cities before their owners build more defenders. Remember that cities at size 1 get razed; you might wait for them to grow to size 2 before conquering them.

Managing cities[]

A barb city can build any city improvement or wonder (with the usual requirements), but they can only build a small set of units. These are the same units that the AI units would build. This gets enforced by the ruleset in recent versions of Freeciv. (Back in 2.1.x, human barbarians built any units like regular civs.)

In civ2civ3 and classic rules, the set of units is Legions (without tech), Cannons, Dragoons, Musketeers.

You also can't upgrade to units that you can't build. For example, you can never upgrade your Musketeers to Riflemen.

TODO[]

Barbaricum

Barbaricum was the Barbarian capital city in Freeciv 2.1.x.

  • Building a Palace
  • Settling cities without own Settlers
  • Defending against enemy invasions