From a5ab8af71ad1c618f548406f25f3a1d29ecf67d5 Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Sun, 2 Nov 2025 20:40:52 +0200
Subject: [PATCH 21/21] Document custom government flags

See RM #1600

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 data/alien/governments.ruleset         | 11 +++++++++++
 data/civ1/governments.ruleset          | 11 +++++++++++
 data/civ2/governments.ruleset          | 11 +++++++++++
 data/civ2civ3/governments.ruleset      | 11 +++++++++++
 data/classic/governments.ruleset       | 11 +++++++++++
 data/goldkeep/governments.ruleset      | 11 +++++++++++
 data/granularity/governments.ruleset   | 11 +++++++++++
 data/multiplayer/governments.ruleset   | 11 +++++++++++
 data/ruledit/comments-3.4.txt          |  1 +
 data/sandbox/governments.ruleset       | 11 +++++++++++
 data/stub/governments.ruleset          | 11 +++++++++++
 data/webperimental/governments.ruleset | 11 +++++++++++
 12 files changed, 122 insertions(+)

diff --git a/data/alien/governments.ruleset b/data/alien/governments.ruleset
index a1d6e697a5..9eaa01a7ac 100644
--- a/data/alien/governments.ruleset
+++ b/data/alien/governments.ruleset
@@ -16,6 +16,16 @@ description = "Alien World governments data for Freeciv"
 options = "+Freeciv-ruleset-3.4-Devel-2025.Jan.17"
 format_version = 50
 
+[control]
+; Names for custom government flags. There can be up to 8 of these.
+; name          = rule name; In some circumstances user may see this
+;                 as part of some sentences, so try to make it descriptive
+;                 and sensible.
+; helptxt       = displayed in the help for unit types with this flag (optional)
+;flags =
+;  { "name", "helptxt"
+;  }
+
 [governments]
 during_revolution = "Anarchy"
 
@@ -59,6 +69,7 @@ during_revolution = "Anarchy"
 ;                      own title.
 ; ruler_female_title = The default female ruler title for the government type.
 ;                      See above ruler_male_title.
+; flags        = special flag strings; list of user flags defined above
 ; helptext     = optional help text string; should escape all raw newlines
 ;                so that xgettext parsing works
 ;
diff --git a/data/civ1/governments.ruleset b/data/civ1/governments.ruleset
index a6243fcf7d..a8c6132519 100644
--- a/data/civ1/governments.ruleset
+++ b/data/civ1/governments.ruleset
@@ -17,6 +17,16 @@ description = "Civilization I governments data for Freeciv"
 options = "+Freeciv-ruleset-3.4-Devel-2025.Jan.17"
 format_version = 50
 
+[control]
+; Names for custom government flags. There can be up to 8 of these.
+; name          = rule name; In some circumstances user may see this
+;                 as part of some sentences, so try to make it descriptive
+;                 and sensible.
+; helptxt       = displayed in the help for unit types with this flag (optional)
+;flags =
+;  { "name", "helptxt"
+;  }
+
 [governments]
 during_revolution = "Anarchy"
 
@@ -60,6 +70,7 @@ during_revolution = "Anarchy"
 ;                      own title.
 ; ruler_female_title = The default female ruler title for the government type.
 ;                      See above ruler_male_title.
+; flags        = special flag strings; list of user flags defined above
 ; helptext     = optional help text string; should escape all raw newlines
 ;                so that xgettext parsing works
 ;
diff --git a/data/civ2/governments.ruleset b/data/civ2/governments.ruleset
index d3ebc8d186..7d30905497 100644
--- a/data/civ2/governments.ruleset
+++ b/data/civ2/governments.ruleset
@@ -15,6 +15,16 @@ description = "Civ2 style governments data for Freeciv (Fundamentalism incomplet
 options = "+Freeciv-ruleset-3.4-Devel-2025.Jan.17"
 format_version = 50
 
+[control]
+; Names for custom government flags. There can be up to 8 of these.
+; name          = rule name; In some circumstances user may see this
+;                 as part of some sentences, so try to make it descriptive
+;                 and sensible.
+; helptxt       = displayed in the help for unit types with this flag (optional)
+;flags =
+;  { "name", "helptxt"
+;  }
+
 [governments]
 during_revolution = "Anarchy"
 
@@ -58,6 +68,7 @@ during_revolution = "Anarchy"
 ;                      own title.
 ; ruler_female_title = The default female ruler title for the government type.
 ;                      See above ruler_male_title.
+; flags        = special flag strings; list of user flags defined above
 ; helptext     = optional help text string; should escape all raw newlines
 ;                so that xgettext parsing works
 ;
diff --git a/data/civ2civ3/governments.ruleset b/data/civ2civ3/governments.ruleset
index 2faec11b7c..da1b16bf93 100644
--- a/data/civ2civ3/governments.ruleset
+++ b/data/civ2civ3/governments.ruleset
@@ -15,6 +15,16 @@ description = "Civ2Civ3 governments data for Freeciv"
 options = "+Freeciv-ruleset-3.4-Devel-2025.Jan.17 web-compatible"
 format_version = 50
 
+[control]
+; Names for custom government flags. There can be up to 8 of these.
+; name          = rule name; In some circumstances user may see this
+;                 as part of some sentences, so try to make it descriptive
+;                 and sensible.
+; helptxt       = displayed in the help for unit types with this flag (optional)
+;flags =
+;  { "name", "helptxt"
+;  }
+
 [governments]
 during_revolution = "Anarchy"
 
@@ -58,6 +68,7 @@ during_revolution = "Anarchy"
 ;                      own title.
 ; ruler_female_title = The default female ruler title for the government type.
 ;                      See above ruler_male_title.
+; flags        = special flag strings; list of user flags defined above
 ; helptext     = optional help text string; should escape all raw newlines
 ;                so that xgettext parsing works
 ;
diff --git a/data/classic/governments.ruleset b/data/classic/governments.ruleset
index e3f8b94429..5869161566 100644
--- a/data/classic/governments.ruleset
+++ b/data/classic/governments.ruleset
@@ -15,6 +15,16 @@ description = "Classic governments data for Freeciv (as Civ2, minus fundamentali
 options = "+Freeciv-ruleset-3.4-Devel-2025.Jan.17 web-compatible"
 format_version = 50
 
+[control]
+; Names for custom government flags. There can be up to 8 of these.
+; name          = rule name; In some circumstances user may see this
+;                 as part of some sentences, so try to make it descriptive
+;                 and sensible.
+; helptxt       = displayed in the help for unit types with this flag (optional)
+;flags =
+;  { "name", "helptxt"
+;  }
+
 [governments]
 during_revolution = "Anarchy"
 
@@ -58,6 +68,7 @@ during_revolution = "Anarchy"
 ;                      own title.
 ; ruler_female_title = The default female ruler title for the government type.
 ;                      See above ruler_male_title.
+; flags        = special flag strings; list of user flags defined above
 ; helptext     = optional help text string; should escape all raw newlines
 ;                so that xgettext parsing works
 ;
diff --git a/data/goldkeep/governments.ruleset b/data/goldkeep/governments.ruleset
index c9611d04b3..e2af88a520 100644
--- a/data/goldkeep/governments.ruleset
+++ b/data/goldkeep/governments.ruleset
@@ -17,6 +17,16 @@ description = "Goldkeep governments data for Freeciv"
 options = "+Freeciv-ruleset-3.4-Devel-2025.Jan.17"
 format_version = 50
 
+[control]
+; Names for custom government flags. There can be up to 8 of these.
+; name          = rule name; In some circumstances user may see this
+;                 as part of some sentences, so try to make it descriptive
+;                 and sensible.
+; helptxt       = displayed in the help for unit types with this flag (optional)
+;flags =
+;  { "name", "helptxt"
+;  }
+
 [governments]
 during_revolution = "Anarchy"
 
@@ -60,6 +70,7 @@ during_revolution = "Anarchy"
 ;                      own title.
 ; ruler_female_title = The default female ruler title for the government type.
 ;                      See above ruler_male_title.
+; flags        = special flag strings; list of user flags defined above
 ; helptext     = optional help text string; should escape all raw newlines
 ;                so that xgettext parsing works
 ;
diff --git a/data/granularity/governments.ruleset b/data/granularity/governments.ruleset
index ac9cc03963..d99c64af7c 100644
--- a/data/granularity/governments.ruleset
+++ b/data/granularity/governments.ruleset
@@ -15,6 +15,16 @@ description = "Granularity governments data for Freeciv"
 options = "+Freeciv-ruleset-3.4-Devel-2025.Jan.17"
 format_version = 50
 
+[control]
+; Names for custom government flags. There can be up to 8 of these.
+; name          = rule name; In some circumstances user may see this
+;                 as part of some sentences, so try to make it descriptive
+;                 and sensible.
+; helptxt       = displayed in the help for unit types with this flag (optional)
+;flags =
+;  { "name", "helptxt"
+;  }
+
 [governments]
 during_revolution = "Anarchy"
 
@@ -58,6 +68,7 @@ during_revolution = "Anarchy"
 ;                      own title.
 ; ruler_female_title = The default female ruler title for the government type.
 ;                      See above ruler_male_title.
+; flags        = special flag strings; list of user flags defined above
 ; helptext     = optional help text string; should escape all raw newlines
 ;                so that xgettext parsing works
 ;
diff --git a/data/multiplayer/governments.ruleset b/data/multiplayer/governments.ruleset
index e8bceb3fed..c3ec8e5aa1 100644
--- a/data/multiplayer/governments.ruleset
+++ b/data/multiplayer/governments.ruleset
@@ -15,6 +15,16 @@ description = "Multiplayer governments data for Freeciv (as Civ2, minus fundamen
 options = "+Freeciv-ruleset-3.4-Devel-2025.Jan.17 web-compatible"
 format_version = 50
 
+[control]
+; Names for custom government flags. There can be up to 8 of these.
+; name          = rule name; In some circumstances user may see this
+;                 as part of some sentences, so try to make it descriptive
+;                 and sensible.
+; helptxt       = displayed in the help for unit types with this flag (optional)
+;flags =
+;  { "name", "helptxt"
+;  }
+
 [governments]
 during_revolution = "Anarchy"
 
@@ -58,6 +68,7 @@ during_revolution = "Anarchy"
 ;                      own title.
 ; ruler_female_title = The default female ruler title for the government type.
 ;                      See above ruler_male_title.
+; flags        = special flag strings; list of user flags defined above
 ; helptext     = optional help text string; should escape all raw newlines
 ;                so that xgettext parsing works
 ;
diff --git a/data/ruledit/comments-3.4.txt b/data/ruledit/comments-3.4.txt
index b10e83aed1..ab182cc006 100644
--- a/data/ruledit/comments-3.4.txt
+++ b/data/ruledit/comments-3.4.txt
@@ -209,6 +209,7 @@ governments = "\
 ;                      own title.\n\
 ; ruler_female_title = The default female ruler title for the government type.\n\
 ;                      See above ruler_male_title.\n\
+; flags        = special flag strings; list of user flags defined above\n\
 ; helptext     = optional help text string; should escape all raw newlines\n\
 ;                so that xgettext parsing works\n\
 ;\n\
diff --git a/data/sandbox/governments.ruleset b/data/sandbox/governments.ruleset
index c4e7ca8789..7341589777 100644
--- a/data/sandbox/governments.ruleset
+++ b/data/sandbox/governments.ruleset
@@ -15,6 +15,16 @@ description = "Sandbox governments data for Freeciv"
 options = "+Freeciv-ruleset-3.4-Devel-2025.Jan.17"
 format_version = 50
 
+[control]
+; Names for custom government flags. There can be up to 8 of these.
+; name          = rule name; In some circumstances user may see this
+;                 as part of some sentences, so try to make it descriptive
+;                 and sensible.
+; helptxt       = displayed in the help for unit types with this flag (optional)
+;flags =
+;  { "name", "helptxt"
+;  }
+
 [governments]
 during_revolution = "Anarchy"
 
@@ -58,6 +68,7 @@ during_revolution = "Anarchy"
 ;                      own title.
 ; ruler_female_title = The default female ruler title for the government type.
 ;                      See above ruler_male_title.
+; flags        = special flag strings; list of user flags defined above
 ; helptext     = optional help text string; should escape all raw newlines
 ;                so that xgettext parsing works
 ;
diff --git a/data/stub/governments.ruleset b/data/stub/governments.ruleset
index 28148d49df..c94577fc18 100644
--- a/data/stub/governments.ruleset
+++ b/data/stub/governments.ruleset
@@ -6,6 +6,16 @@ description = "<modpack> governments data for Freeciv"
 options = "+Freeciv-ruleset-3.4-Devel-2025.Jan.17"
 format_version = 50
 
+[control]
+; Names for custom government flags. There can be up to 8 of these.
+; name          = rule name; In some circumstances user may see this
+;                 as part of some sentences, so try to make it descriptive
+;                 and sensible.
+; helptxt       = displayed in the help for unit types with this flag (optional)
+;flags =
+;  { "name", "helptxt"
+;  }
+
 [governments]
 during_revolution = "Anarchy"
 
@@ -49,6 +59,7 @@ during_revolution = "Anarchy"
 ;                      own title.
 ; ruler_female_title = The default female ruler title for the government type.
 ;                      See above ruler_male_title.
+; flags        = special flag strings; list of user flags defined above
 ; helptext     = optional help text string; should escape all raw newlines
 ;                so that xgettext parsing works
 ;
diff --git a/data/webperimental/governments.ruleset b/data/webperimental/governments.ruleset
index f0f32de9be..296a3db709 100644
--- a/data/webperimental/governments.ruleset
+++ b/data/webperimental/governments.ruleset
@@ -15,6 +15,16 @@ description = "Experimental web-client governments data for Freeciv (as Civ2, mi
 options = "+Freeciv-ruleset-3.4-Devel-2025.Jan.17 web-compatible"
 format_version = 50
 
+[control]
+; Names for custom government flags. There can be up to 8 of these.
+; name          = rule name; In some circumstances user may see this
+;                 as part of some sentences, so try to make it descriptive
+;                 and sensible.
+; helptxt       = displayed in the help for unit types with this flag (optional)
+;flags =
+;  { "name", "helptxt"
+;  }
+
 [governments]
 during_revolution = "Anarchy"
 
@@ -58,6 +68,7 @@ during_revolution = "Anarchy"
 ;                      own title.
 ; ruler_female_title = The default female ruler title for the government type.
 ;                      See above ruler_male_title.
+; flags        = special flag strings; list of user flags defined above
 ; helptext     = optional help text string; should escape all raw newlines
 ;                so that xgettext parsing works
 ;
-- 
2.51.0

