## 2.6 beta won't recognize new units.ruleset files

You can get help here if Freeciv doesn't start on your computer, or if you keep getting fatal errors while playing etc.
ahfretheim
Posts: 49
Joined: Sat Apr 05, 2014 9:29 pm

### 2.6 beta won't recognize new units.ruleset files

Hey all, I've tried making a small modification to the Archers unit listing in the 2.6 ruleset I'm building, asking it to use a new technology for its Req (I'm rebuilding the tech tree to keep civilizations in antiquity a bit longer) and Freeciv seems to refuse to accept the modified .ruleset file and will not load the directory with it in it. As soon as I replace the file with the original units.ruleset from classic, this goes away. Advice?

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

### Re: 2.6 beta won't recognize new units.ruleset files

What error message it gives? Run freeciv server separately (not automatically started by client) to see its messages.

ahfretheim
Posts: 49
Joined: Sat Apr 05, 2014 9:29 pm

### Re: 2.6 beta won't recognize new units.ruleset files

cazfi wrote:What error message it gives? Run freeciv server separately (not automatically started by client) to see its messages.

Not sure what you mean by running freeciv server separately, but this is the message I'm getting:

In secfile_from_input_file() [../../../../utility/registry_ini.c:407]: secfile 'data\big\units.ruleset' in section 'NULL': Expected entry name
file "data\big\units.ruleset", line 1, pos 0
looking at: '﻿'

ahfretheim
Posts: 49
Joined: Sat Apr 05, 2014 9:29 pm

### Re: 2.6 beta won't recognize new units.ruleset files

Okay I opened the main server and tried opening the ruleset directory there, error message is Illegal String Conversion. Specifically "UTF-8 to CP1252:" It's from the very first character, which actually still comes from the original units.rulesets file. I think there might be something about how Freeciv is reading units.rulesets that is thrown off by how Windows currently interprets text files. My guess is it doesn't throw off the factory files because they're already compiled in the system somehow or cached for perf.

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

### Re: 2.6 beta won't recognize new units.ruleset files

What program you have used to edit the file? Sounds like the ruleset has been saved in an illegal format. Wordpad should be fine.

JTN
Elite
Posts: 462
Joined: Wed Jan 30, 2013 12:15 am

### Re: 2.6 beta won't recognize new units.ruleset files

ahfretheim
Posts: 49
Joined: Sat Apr 05, 2014 9:29 pm

### Re: 2.6 beta won't recognize new units.ruleset files

Thank you this is an extremely helpful comment! It didn't cause me issues before the Windows update, but now I seem to have these issues. As crazfi said though, WordPad should be fine, so I'll just use that instead.

Here's the funny part though: I was able to edit techs.ruleset and governments.ruleset just fine in Notepad before it.

JTN
Elite
Posts: 462
Joined: Wed Jan 30, 2013 12:15 am

### Re: 2.6 beta won't recognize new units.ruleset files

Could be that units.ruleset contains UTF-8 characters, whereas techs.ruleset and government.ruleset contain only ASCII.

My bet is on this in most 2.6 units.ruleset files:

Code: Select all

[unit_diplomat]name          = _("Diplomat"); ...veteran_names =; /* TRANS: diplomatic rank. */  _("?diplomatic_rank:attaché"),

(2.5 and prior rulesets did not include any literal UTF-8 characters, because of a limitation in our localisation system.)