Project

General

Profile

Bug #764299

When using default/nationlist.ruleset, can't set ruleset default_government to one not in its allowed_govs

Added by Gyubal Wahazar 9 months ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Tribal government was added to civ2civ3 ruleset, but it is not possible to change it as default or initial government, because it is not enlisted in allowed_govs.

History

#1 Updated by Marko Lindqvist 9 months ago

  • Subject changed from Lack of Tribal in allowed_govs list in default/nationlist.ruleset to Lack of Tribal in allowed_govs list for civ2civ3

default/nationlist.ruleset (and the nations it includes) are meant for all standard rulesets, not only civ2civ3. Allowing tribal would break rulesets that do not have it.

#2 Updated by Jacob Nevins 8 months ago

(The poster's original problem statement is on the forum: http://forum.freeciv.org/f/viewtopic.php?f=11&t=90346&p=98832#p98832)

#3 Updated by Jacob Nevins 8 months ago

I can see their problem. This is better in 2.6 than 2.5.

I think they edited default_government in their nations.ruleset in their 2.5-based ruleset. This is a ruleset-specific file, so it's reasonable to reference ruleset-specific governments in it, but you still get an error from the generic nationlist restriction: 'Nation Abkhaz: init_government "Tribal" not allowed.'

2.6 doesn't have this problem. I think this is because in 2.5, the ruleset's default_government was simply propagated into nations at ruleset load time, but in gna patch #7278, I made a stronger distinction between ruleset and nation government. (To fix what I thought was a cosmetic issue, but it seems to have helped with this.)

The allowed_govs restriction in the generic nation list is there for a good reason, but it's getting in the way of legitimate constructs in 2.5, so it would be nice to lift the restriction in this case if it's easy. I don't think there's anything that needs doing for later branches.

#4 Updated by Gyubal Wahazar 8 months ago

EDIT: I found workaround, just copied nationlist.ruleset to my ruleset dir and change include statement in my nations.ruleset.
Ticket can be closed.

#5 Updated by Jacob Nevins 8 months ago

Sure, but you shouldn't have needed a workaround; the first thing you did should have worked. The point of default/nationlist.ruleset is for people to be able to use it in custom rulesets.

Attached a patch. Slightly faffy because I had to inline bits of lookup_government(), but it dies with S2_5, so I can live with that.

#6 Updated by Jacob Nevins 8 months ago

  • Subject changed from Lack of Tribal in allowed_govs list for civ2civ3 to When using default/nationlist.ruleset, can't set ruleset default_government to one not in its allowed_govs

#7 Updated by Jacob Nevins 8 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF