FANDOM


(The entire procedure to convert a save file.)
(Improve the formatting of the guide. Explain how to load a save file.)
Line 1: Line 1:
 
[[Image:Barbaricum.png|frame|right|'''Barbaricum''' is the Barbarian capital city.]]
 
[[Image:Barbaricum.png|frame|right|'''Barbaricum''' is the Barbarian capital city.]]
   
'''Genseric''' wanted to own the wealth of the world. Genseric rallied many Barbarian Leaders, who recruited 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. Bored units will disband.
+
'''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. Bored units will disband.
   
 
But you intervened.
 
But you intervened.
   
You were formerly a tactician for one of the world's major civilizations. You defected to the [[barbarians]], because Genseric inspired you. You understood that the barbarian civilization has a permanent advantage over other civilizations, because Genseric can inspire free units. You changed the plan. You will conserve your units, defend your cities and take the world.
+
You were formerly a tactician for one of the world's major civilizations. You defected to the [[barbarians]]. As Genseric inspired free units, so Genseric inspired you. 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.
   
This guide is for ''playing as barbarians'', thus '''cheating'''. This guide will uncover some special facts about Freeciv, whether you play as barbarians, against barbarians or without barbarians.
+
This guide is for ''playing as barbarians''. This guide uncover some special facts about Freeciv. Your experience as a barbarian tactician might help you in other games, against barbarians or without barbarians.
   
 
== How to control barbarians ==
 
== How to control barbarians ==
 
This is the procedure for '''Freeciv 2.1.10'''. Other versions of Freeciv might work, or might be different.
 
This is the procedure for '''Freeciv 2.1.10'''. Other versions of Freeciv might work, or might be different.
   
This is cheating. Freeciv allows you to take barbarians, if you add the letter 'b' to the server option 'allowtake', but Freeciv never allows you to disable the barbarian AI. Any attempt to <tt style="padding: 2px; background: black; color: white;">/aitoggle Genseric</tt> replies with, "Cannot toggle a barbarian player." The only way to disable the barbarian AI is to edit a saved game.
+
This is cheating. Freeciv allows you to take barbarians, if you add the letter 'b' to the server option 'allowtake', but 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 only way to disable the barbarian AI is to edit a saved game.
   
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: black; color: white;">/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.
+
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.
  +
  +
<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'' (with a different flag).
  +
</div>
   
 
=== Converting a save file ===
 
=== Converting a save file ===
Line 20: Line 20:
   
 
# Find your save files. Unix clones (like Linux, BSD) tend to have <tt>~/.freeciv/saves</tt>, but other systems might have a different location.
 
# Find your save files. Unix clones (like Linux, BSD) tend to have <tt>~/.freeciv/saves</tt>, but other systems might have a different location.
#* Example: <tt style="background: black; color: white; padding: 2px;">$ cd .freeciv/saves</tt>
+
#* 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.)
 
# 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="background: black; color: white; padding: 2px;">$ zcat game5-turn270.sav.gz > barbarian5-turn270.sav</tt>
+
#* Example: <tt style="padding: 2px; background: #cccccc;">$ zcat game5-turn270.sav.gz > barbarian5-turn270.sav</tt>
 
# Open the decompressed file in a text editor.
 
# Open the decompressed file in a text editor.
#* Example: <tt style="padding: 2px; background: black; color: white;">$ mg barbarian5-turn270.sav</tt>
+
#* 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 use <tt>/set allowtake</tt> after you start the server, but this is easy to do now.)
+
# 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: black; color: white;">allow_take="HAhadOo"</tt> to <tt style="padding: 2px; background: black; color: white;">allow_take="HAhadOob"</tt>.
+
#* 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: black; color: white;">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: black; color: white;">ai.control=1</tt> to <tt style="padding: 2px; background: black; color: white;">ai.control=0</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.)
 
# Save the file. (Freeciv can already open <tt>.sav</tt> files, so there is no need to compress the file.)
  +
  +
<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'':
  +
  +
<pre>
  +
$ zdiff game5-turn270.sav.gz barbarian5-turn270.sav
  +
--- - Tue Jan 19 23:12:09 2010
  +
+++ 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 ===
 
=== Identifying a section for the barbarian player ===
Inside the save file, a barbarian player has a section with <tt style="padding: 2px; background: black; color: white;">nation="Barbarian"</tt> and either <tt style="padding: 2px; background: black; color: white;">ai.is_barbarian=1</tt> or <tt style="padding: 2px; background: black; color: white;">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.
   
 
<pre>
 
<pre>
Line 53: Line 81:
 
</pre>
 
</pre>
   
To disable the AI, change <tt style="padding: 2px; background: black; color: white;">ai.control=1</tt> to <tt style="padding: 2px; background: black; color: white;">ai.control=0</tt>. Also remember the name of the player. In this example, the name is Genseric.
+
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>.
  +
  +
=== Loading a converted save file ===
  +
This is the procedure after you convert the save file.
  +
  +
# 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 ==
(insert procedure to load a converted save file)
+
* Game glitches
  +
* Building a Palace
  +
* Defending against enemy invasions
  +
* Using your free units
 
[[Category:Gameplay]]
 
[[Category:Gameplay]]

Revision as of 04:24, January 20, 2010

Barbaricum

Barbaricum is the Barbarian capital city.

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. Bored units will disband.

But you intervened.

You were formerly a tactician for one of the world's major civilizations. You defected to the barbarians. As Genseric inspired free units, so Genseric inspired you. 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.

This guide is for playing as barbarians. This guide uncover some special facts about Freeciv. Your experience as a barbarian tactician might help you in other games, against barbarians or without barbarians.

How to control barbarians

This is the procedure for Freeciv 2.1.10. Other versions of Freeciv might work, or might be different.

This is cheating. Freeciv allows you to take barbarians, if you add the letter 'b' to the server option 'allowtake', but Freeciv never allows you to disable the barbarian AI. Any attempt to /aitoggle Genseric replies with, "Cannot toggle a barbarian player." The only way to disable the barbarian AI is to edit a saved game.

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": /set barbarians 4.) 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.

Each barbarian nation is one of two flavors: land barbarians and sea barbarians. In Freeciv 2.2, the sea barbarians became pirates (with a different flag).

Converting a save file

A save file is an ordinary, compressed text file. You can decompress your chosen save file, then open it in some text editor.

  1. Find your save files. Unix clones (like Linux, BSD) tend to have ~/.freeciv/saves, but other systems might have a different location.
    • Example: $ cd .freeciv/saves
  2. Decompress your chosen file, but keep the original save file. Freeciv 2.1, with default server options, saves .sav.gz gzip files. (Freeciv 2.2 saves .sav.bz2 bzip2 files.)
    • Example: $ zcat game5-turn270.sav.gz > barbarian5-turn270.sav
  3. Open the decompressed file in a text editor.
    • Example: $ mg barbarian5-turn270.sav
  4. In the open file, find the allow_take= line, and add the letter 'b', to allow players to take barbarians. (You can instead /set allowtake HAhadOob after you start the server, but this line is easy to edit now.)
    • Example: Change allow_take="HAhadOo" to allow_take="HAhadOob".
  5. In the open file, find a section for the barbarian player (nation="Barbarian") who is alive and has some cities. Note the name of the player. Disable the AI by changing ai.control=1 to ai.control=0.
  6. Save the file. (Freeciv can already open .sav files, so there is no need to compress the file.)

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:

$ zdiff game5-turn270.sav.gz barbarian5-turn270.sav
--- -   Tue Jan 19 23:12:09 2010
+++ 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

Identifying a section for the barbarian player

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.

Loading a converted save file

This is the procedure after you convert the save file.

  1. Start civclient, click "Load Saved Game".
  2. "Choose Saved Game to Load:" Select and load your .sav file. The file appears in the list, or else through the "Browse..." button.
  3. "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.
  4. In the Chat tab, say /list to list the nations. Find the barbarians in the list.
    • Example: Genseric (user Unassigned, Barbarian, difficulty level hard, Barbarian, Team 19)
  5. Now /take the barbarians.
    • Example: /take Genseric
  6. Enable AI for all other nations, except the barbarians.
    • One way is to say /set autotoggle 1 then say /set autotoggle 0.
  7. Optionally, change the tax rates.
  8. Optionally, change the city produtions.

TODO

  • Game glitches
  • Building a Palace
  • Defending against enemy invasions
  • Using your free units
Community content is available under CC-BY-SA unless otherwise noted.