The International Simutrans Forum

Simutrans Extended => Simutrans-Extended development => Topic started by: wlindley on October 16, 2013, 10:12:19 AM

Title: What changed in config? [passenger-generation]
Post by: wlindley on October 16, 2013, 10:12:19 AM
Building the latest from passenger-generation branch in git, and copying into same directory as I can successfully run the latest 'master' branch, I get:

Reading low level config data ...
Simutrans version 112.5 Experimental Development build 12.9000 from Oct 16 2013 r129000
FATAL ERROR: loadsave_t::rdwr_str() - expected "<bool>", got "<i16>8"
Aborting program execution ...

For help with this error or to file a bug report please see the Simutrans forum:
http://forum.simutrans.com
FATAL ERROR: loadsave_t::rdwr_str() - expected "<bool>", got "<i16>8"
Aborting program execution ...

For help with this error or to file a bug report please see the Simutrans forum:
http://forum.simutrans.com

(core dumped) ./sim-psg -objects pak128.Britain-Ex-link/ -debug 5


It would be really nice to know in which file the error occurred instead of just "something went wrong somewhere." 

Any clue what "low-level" file(s) change between master and passenger-generation?  I hope to keep running the latest version.
Title: Re: What changed in config? [passenger-generation]
Post by: Dwachs on October 16, 2013, 10:27:05 AM
Most likely settings.xml (or similar experimental-related cousins).
Title: Re: What changed in config? [passenger-generation]
Post by: jamespetts on October 16, 2013, 10:33:36 AM
You will need to delete settings-experimental.xml if you are upgrading from one self-compiled build on the passenger-generation branch to another. This problem will not occur when upgrading from one release version to another, as the version numbers will be different.
Title: Re: What changed in config? [passenger-generation]
Post by: wlindley on October 16, 2013, 01:37:04 PM
OK that did it.  The file is in ~/simutrans on Linux. ...But, good grief -- an XML file should have key-value pairs -- not just a bunch of values.  The whole point of using a text file is to be extensible and obvious, but here's the XML file we get:

<?xml version="1.0"?>
<Simutrans version="0.112.6" pak="settings only">
<umgebung_t>
  <i16>1</i16>
  <bool>false</bool>
  <i8>0</i8>
  <i32>0</i32>
...


Eggggh.  Each of those i8 and such, should be the name of the parameter!  Otherwise what's the point of using XML?  =faceplant=
Title: Re: What changed in config? [passenger-generation]
Post by: wlindley on October 16, 2013, 02:11:00 PM
Latest is very stable and the passenger/mail volumes seem much better now.  Cities still grow all over the map following intercity roads, but that's slated for change, isn't it.

Kudos! 
Title: Re: What changed in config? [passenger-generation]
Post by: jamespetts on October 16, 2013, 08:26:59 PM
Thank you for testing! Yes, the XML format is insane and, sadly, not proper XML - this is an inheritance from Standard, and a rather old one at that.

The cities are indeed slated for change, but that will be quite a bit of work, and will be in the next major version. Glad that things are working so far!
Title: Re: What changed in config? [passenger-generation]
Post by: prissi on October 16, 2013, 10:50:47 PM
XML does not have to be human readable at all. It is just a way to save data. And for simutrans there is really no other way to make XML without a very huge effort.
Title: Re: What changed in config? [passenger-generation]
Post by: jamespetts on October 16, 2013, 10:57:42 PM
Yes, I suppose that XML parsers are difficult. There are probably some pre-existing LGPL XML parsers out there, though? The confusion is that this file format is in a sort of quasi-XML, but has an XML extension.