Page 1 of 1

2.5.0 New Nation ruleset not applying?

Posted: Wed Aug 12, 2015 4:02 am
by shanesurk500
Hi all, I wasn't sure where to post this, but I figured this would be the most appropriate spot. I've checked every tutorial in the book on adding a new nation, and for the life of me can not get it to work. When I add my nation (aeduian.ruleset) to the end of the list in nationlist.ruleset, the game loads fine, but my nation simply does not appear in the list. This also occurs if, say, I rename aedui.ruleset to like afghani.ruleset and replace the default Afghani nation. It doesn't read the nation at all and the nation count in the extended nationset drops to 554 instead of 555. However, if I place "*include "nations/aeduian.ruleset"" to the middle or top of the list in nationlist.ruleset, the game crashes when starting the server. I tried to debug by running the server manually with a .bat file and a "pause" command after running the server so I could see the output and it gave an "expected value" error. I am running Windows, which I have read may create a problem with file encoding with line endings, but I have been using Notepad++ for all of my editing purposes, as I understand it negates the problem. I am simply unsure what else to try. I apologize for the length of the post, but I wanted to be thorough.

Here are the contents of aeduian.ruleset:

Code: Select all

[nation_Aeduian]

name=_("Aeduian")
plural=_("?plural:Aedui")
groups="Ancient","European"
legend=_("The Aedui were a Gallic people of Gallia Lugdunensis,\
who inhabited the country between the Arar (Saone) and Liger (Loire),\
in today's France. Their territory thus included the greater part of\
the modern departments of Saone-et-Loire, Cote-d'Or and Nievre.")

leaders = {
 "name",         "sex"
 "Dumnorix",     "Male"
 "Diviciacus",   "Male"
 "Cavarillos",   "Male"
 "Cotos",        "Male"
 "Divitiacos",   "Male"
 "Liscos",       "Male"
 "Litaviccos",   "Male"
 "Valetiacos",   "Male" 
 "Viridomaros",  "Male"
}

ruler_titles = {
 "government",       "male_title",      "female_title"
 "Despotism",      _("Chieftain %s"),  _("?female:Chieftain %s")
 "Republic",       _("Consul %s"),    _("?female:Consul %s")
 "Fundamentalism", _("Druid %s"),    _("?female:Druid %s")
}

flag = "aedui"
flag_alt = "-"
city_style = "Celtic"

init_techs=""
init_buildings=""
init_units=""

conflicts_with = "Gallic"
civilwar_nations = "Gallic", "Helvetian", "Boian"

cities =
 "Bibracte",
 "Augustodunum",
 "Cabillonum",
 "Matisco"
I also have created all flag and shield files for the nation and placed them in data/flags. I have also added the flags and shields to their respective .spec files.

Re: 2.5.0 New Nation ruleset not applying?

Posted: Wed Aug 12, 2015 9:00 am
by Alien Valkyrie
Did you add a newline to the end of the file? Everything after the last line break is ignored if I'm not mistaken, so in this case, it reads the comma after "Cabillonum" and expects another string, which it doesn't get.

Re: 2.5.0 New Nation ruleset not applying?

Posted: Wed Aug 12, 2015 10:35 am
by shanesurk500
Caedo wrote:Did you add a newline to the end of the file? Everything after the last line break is ignored if I'm not mistaken, so in this case, it reads the comma after "Cabillonum" and expects another string, which it doesn't get.
Thanks for the quick reply! So then adding an empty line at the end should fix the issue?

Re: 2.5.0 New Nation ruleset not applying?

Posted: Wed Aug 12, 2015 10:39 am
by shanesurk500
Thank you Cadeo! This fixed the issue.

Re: 2.5.0 New Nation ruleset not applying?

Posted: Thu Aug 13, 2015 7:18 pm
by cazfi
Caedo wrote:Did you add a newline to the end of the file? Everything after the last line break is ignored if I'm not mistaken, so in this case, it reads the comma after "Cabillonum" and expects another string, which it doesn't get.
I checked that, didn't find easy way to fix it (= it has to wait until someone has more time to invest) but this patch adds at least a warning so that user knows what's the problem: patch #6230. It's too late to get this to freeciv-2.5.1, but hopefully we get it to 2.5.2.