secfile error - help needed

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
publo
Posts: 6
Joined: Sat May 18, 2019 6:23 am

secfile error - help needed

Postby publo » Sat May 18, 2019 6:31 am

Hello,

I cannot find out how to solve this:

Image

I have added a nation (the roma) to data/nation/ and data/flags/ and data/default/nationlist.ruleset, following and re-checking the instructions carefully. It is not the first time I created nations (did so in earlier freeciv versions, as well as in this version). In fact, this nation was working before in this version (2.6.0). Somehow now it doesn't aymore. Seems another (registry?) file is pointing to a conflicting location or command, but I don't know where to look. Reinstalling does not work either. Please, can somebody help out?

cazfi
Elite
Posts: 1720
Joined: Tue Jan 29, 2013 6:54 pm

Re: secfile error - help needed

Postby cazfi » Sat May 18, 2019 7:33 am

Can you attach your roma ruleset?

In freeciv-2.6 it's also possible to add local nations files without modifying the freeciv installation files such as nationlist.ruleset. See README.nations chapter "Local Nation files"

publo
Posts: 6
Joined: Sat May 18, 2019 6:23 am

Re: secfile error - help needed

Postby publo » Sun May 19, 2019 2:53 am

Hi cazfi,

Thanks for your reply. Below is the code of my ruleset.

As to the override folder, I don't understand the instructions. I tried pasting the text from roma.rulest into the data/override/nations.ruleset, but I get the same error message as above. I tried by only writing *include "nation/roma.ruleset" in the data/override/nations.ruleset file (and having the roma.ruleset file in the nation directory) - no result. I tried by just dumping the roma.rulest in the data/override folder, no result.

The readme file speaks about "user data directory, ~/.freeciv/<freeciv version>/override/" but I cannot find that file on my PC.

I'm not an experienced programmer, sorry :/

Thanks for your help!

Code: Select all

[nation_roma]

name=_("Roma")
plural=_("?plural:Roma")
groups="European", "Asian", "Modern", "Early Modern", "Medieval"
legend=_("Long ago, the ancestors of the Roma people started\
 migrating from India westward, for reasons yet unknown.\
 For at least a millennium they led an itinerant lifestyle, offering their services from door to door, from town to town.\
 With groups specializing in different trades, such as coppersmithing, horse dealing and music,\
 the Roma evoked varying attitudes across the Middle East, Europe and the Americas,\
 ranging from admiration for their skills, to outright hostility because of their exotic and anarchic customs.\
 Recently, under pressure from their industrializing and urbanizing surroundings, this proud nation has massively turned to sedentary life.\
 Many Roma communities preserve ancient traditions and speak\
 as their mother tongue Romani, a language related to Sanskrit and Hindi.\
 As far as history tells, the Roma people have never started a war\
 on another nation, let alone formed a state.\
 Will you lead them to found their first city, and beyond?")

leaders = {
 "name",                        "sex"
 "Django Reinhardt",            "Male"; Belgian guitarist, jazz legend
 "Ricardo Quaresma",         "Male"; Portuguese soccer football player
 "Robert Plant",             "Male"; Lead singer of Led Zeppelin (Roma from mother's side)
 "Nicole Barr",                 "Female" ; English student with one of the highest IQ's in the world (higher than Einstein and Hawking)
 "Esma Redzepova",              "Female" ; Macedonian folk singer
 "Juscelino Kubitschek",      "Male"; Former Brazilian president, founder of Brasilia
 "Šaban Bajramovic",         "Male"; Yugoslav folk singer
 "György Cziffra",            "Male"; Hungarian classical pianist
 "Romica Puceanu",             "Female" ; Romanian folk singer
 "Vera Bila",                "Female" ; Czech folk singer
 "Carmen Amaya",                "Female" ; Spanish flamenco dancer
 "Sando de América",         "Male"; Argentinean pop singer
 "Ivo Papazov",             "Male"; Bulgarian ethno jazz clarinetist
 "Camarón de la Isla",         "Male"; Spanish flamenco singer
 "Settela Steinbach",         "Female"; Dutch Roma girl murdered by the Nazis. Footage of her peeping out of a train set for Auschwitz appears in many documentaries and became an icon of the Holocaust, of which Roma were a target, alongside Jews and other groups. Up to 1,5 million Roma are estimated to have been killed in Nazi Germany and occupied lands.
 "Mateo Maximoff",             "Male"; French writer and evangelical pastor
 "Ian Hancock",             "Male"; Roma scholar and political advocate (Univ. of Texas at Austin)
 "Ionel Rotaru",            "Male"; French Roma leader and first president of the World Gypsy Community
 "King Tene Bimbo",            "Male" ; American Roma leader and criminal
 "Ion Cioaba",                  "Male" ; Romanian self-proclaimed 'King of all Roma Everywhere'
 "Janusz Kwiek",                "Male" ; Polish Roma King, endorsed widely in the Roma community as well as by state officials; asked Mussolini for a Roma Homeland l
 "Stefan Razvan",            "Male"; 16th century King of Moldavia
 "Washington Luís",            "Male"; 19th century Brazilian president
}

ruler_titles = {
 "government",      "male_title",           "female_title"
 "Monarchy",        _("Amperato %s"),        _("Amperatasa %s") ; 'Emperor'
 "Republic",        _("Prezidento %s"),     _("Prezidentka %s")
 "Democracy",       _("Mujalo %s"),       _("Mujali %s") ; 'Speaker'
 "Despotism",       _("Rom Baro %s"),       _("Romni Bari %s") ; 'Big Man/Woman'
 "Communism",       _("Amal %s"),           _("Amalin %s"); 'Comrade'
 "Anarchy",         _("Phuro %s"),         _("Phuri %s"); 'Elder'
 }

flag = "cigan"
flag_alt = "-"
style = "Celtic"

init_techs=""
init_buildings=""
init_government="Despotism"
init_units=""
civilwar_nations="slavic", "swazi"

cities =
 "Baro Foro", ; 'Big Town' in Romani
 "Romanesthan", ; Proposed name for utopian Roma state
 "Šuto Orizari", ; Municipality in Macedonia with Roma majority, Roma mayor. Only local administrative unit in the world to have adopted Romani as an official language
 "Triana", ; Neighborhood of Sevilla famously associated with flamenco and Romani history
 "Les Saintes-Marie-de-la-Mer", ; Town in Southern France famous for being a site of pilgrimage of the Roma
 "Stolipinovo", ; Largest Roma community in Europe (district of Plovdiv, Bulgaria)
 "Casilino 900", ; Former largest Roma camp (Rome, destroyed 2009)
 "Buckles Lane", ; Largest Travellers site in Europe (as of 2018, South Ockendon, UK)
 "Gradets", ; Probably the largest Roma village in the world (Bulgaria)
 "Csenyéte", ; Probably the municipality with the highest percentage of Roma inhabitants in the world (93,4% in 2004, Hungary)
 "Kalderasko Foro", ; 'Town of the Kalderas (subgroup of the Romani people)'
 "Sintitiko Foro",   
 "Erlisko Foro",
 "Xoraxano Foro", 
 "Kalengo Foro",
 "Romungricko Foro",   
 "Džambasko Foro",
 "Lovaricko Foro",
 "Ursaritiko Foro",
 "Arlicko Foro",
 "Gurbetsko Foro",
 "Xaladitko Foro",
 "Bergitko Foro",
 "Kalajdžisko Foro",
 "Lofitko Foro",
 "Rusko Foro",
 "Servitko Foro",
 "Polsko Foro",
 "Churaritiko Foro",


User avatar
Caedo
Elite
Posts: 476
Joined: Sun Feb 10, 2013 10:21 pm
Location: Stuttgart, Germany

Re: secfile error - help needed

Postby Caedo » Sun May 19, 2019 1:06 pm

The city names list ends with a comma. My guess would be that the parser is expecting another city name, but instead, the file ends, so the beginning of the next nation file (the barbarians) causes an error, 'cause it's not a city name.
~S.C. L.

publo
Posts: 6
Joined: Sat May 18, 2019 6:23 am

Re: secfile error - help needed

Postby publo » Tue May 21, 2019 2:41 am

Thank you Caedo! That solved it!

I don't know how to do the override thing yet, but I suppose some day I will find out...

Also, I don't understand how it works to load the flags. Perhaps anyone can help there? Right now when I select the Roma, they have the "unknown flag" sign (blue background with three question marks)... I guess my carefully crafted png-files are no longer supported (they were in previous civ-versions)... In the readme-file it says that I should add an SVG-version of the flag to the "flags" directory. I did this too, but nothing happens. Neither my png nor my svg files are loaded. :(

madmax
Veteran
Posts: 56
Joined: Sun Mar 26, 2017 5:34 pm

Re: secfile error - help needed

Postby madmax » Tue May 21, 2019 6:52 pm

In the readme-file it says that I should add an SVG-version of the flag to the "flags" directory.


It says a bit more than that:

Flag Specifics
==============

To add a flag you'll have to edit the following files:

data/flags/<flagname>.svg
[...]
data/flags/<flagname>.png
data/flags/<flagname>-shield.png
[...]

data/misc/flags.spec

This file has a reference to the flag PNG graphic. The "tag" here must
match the flag tag you put in the nation ruleset file
(usually f.<flagname>) and the "file" should point to the PNG image at
flags/<flagname>.png.

data/misc/shields.spec
[...]


So you have to add a reference to your pngs (if I get it right it's the png, not the svg the file the client uses) in the spec files.

publo
Posts: 6
Joined: Sat May 18, 2019 6:23 am

Re: secfile error - help needed

Postby publo » Wed May 22, 2019 4:43 am

Thanx madmax, I edited the .spec files (also the "flag-large.spec" and "shield-large.spec", which are somehow not mentioned in the instructions, but just in case) and now my png-files are implemented... But not everywhere... It's visible in the "Pick Nation" menu, but after starting the game, the shields are again showing question marks... It seems some of my png-files are rejected...

That brings me back to the SVG-to-PNG conversion which is stated to be mandatory in the current version. My png-files were hand-made, instead of converted from SVG. So I tried to figure out how to convert, but again I don't understand the instructions in the Readme.file:

To run the conversion program you
will need to install Inkscape, ImageMagick, and (optionally) pngquant.
Once these are installed change to the data/flags directory and run
./convert_png <nationname>.svg


I installed all three of these software, and I put the svg file in the data/flags directory, but that's as far as I get. Which one is the "conversion program"? In which command prompt should I run that line? I tried it in the Freeciv server, and in the general Windows command prompt, to no avail...

Hope you guys forgive my ignorance, it's been perhaps 20 years since I haven't used command lines :)

cazfi
Elite
Posts: 1720
Joined: Tue Jan 29, 2013 6:54 pm

Re: secfile error - help needed

Postby cazfi » Wed May 22, 2019 5:35 am

svg-files are not technically required. They are required for nations to be accepted to official freeciv distribution.

publo
Posts: 6
Joined: Sat May 18, 2019 6:23 am

Re: secfile error - help needed

Postby publo » Thu May 23, 2019 1:57 am

Hi cazfi,

Ok, I get it. I'll see if some day I can learn to convert from SVG as prescribed, because as said, not all of my current PNG's are working in the game. And of course it would also be nice to submit nation proposals.

So, all in all, I have made some progress, thanks to all of you. But now I added another nation and I get the following error:

Patagonian error.jpg

Any idea what could be wrong with this one?

cazfi
Elite
Posts: 1720
Joined: Tue Jan 29, 2013 6:54 pm

Re: secfile error - help needed

Postby cazfi » Thu May 23, 2019 4:57 am

Error message seems quite clear. It says nation_patagonian.style entry does not exist. Does your ruleset have 'style' entry?