project-navigation
Personal tools

Author Topic: Bad xml file for savegames  (Read 5253 times)

Offline Pillat

  • Cannon Fodder
  • **
  • Posts: 5
    • View Profile
Bad xml file for savegames
« on: January 19, 2015, 01:28:19 am »
Hi,
I am new here, but played UFO:AI for a long time now.. I started with XForce: Fight for Destiny, but that game was/is not finished at all and it was quite fast very boring.. so I downloaded UFO:AI some time ago and it is still awesome to play.. but unfortunately, I can't finish the campaign because at a certain point, my savegame(s) get corrupted, and all the game says is 'Bad XML data' or something like that, and then I can start from 0.. quite frustrating.. so I hope you can help me out with this.
Anyway, I download 2.6 atm, and I am kind of a Bugreporter for another game, so if you want, I can do that here too^^

And one last question:
Is it possible to add new weapons like assault rifles and so on just by copy+pasting the existing assault rifle, and then change parameters? I can't model, but I want at least some imaginary variety here for myself, so would be nice if you can explain me the steps for doing this ;)

Thanks in advance :)

Offline DarkRain

  • Project Coder
  • Captain
  • ***
  • Posts: 746
    • View Profile
Re: Bad xml file for savegames
« Reply #1 on: January 19, 2015, 04:21:10 am »
HI Pillat, and welcome to the forum,

It seems that you have encountered bug #5392 if you can provide a savegame where this is easily reproducible it would be a big help
BTW the bug tracker I linked is the preferred place to report this kind of issues, and sure we appreciate all the help people can give :)

Yes what you ask is possible I suggest that you start by reading this thread first but keep in mind that the number of items that can be added to the game is limited


« Last Edit: January 19, 2015, 04:27:10 am by DarkRain »

Offline Pillat

  • Cannon Fodder
  • **
  • Posts: 5
    • View Profile
Re: Bad xml file for savegames
« Reply #2 on: January 19, 2015, 04:38:24 am »
Unfortunaly, this is now the 2nd time I encountered this bug.. the first time I was like 'ah man.. okay that won't happen again' so I saved 4 savegames each time when I started a new campaign.. and now all 4 have this error again

Attached is one of my 4 savegames.

Yes I already encountered that object limit.. too bad that there is no script-define for this atm :/ And when I add a new rifle and then add it to the campaign inital market, the campaign wont start anymore?
« Last Edit: January 19, 2015, 04:43:12 am by Pillat »

Offline DarkRain

  • Project Coder
  • Captain
  • ***
  • Posts: 746
    • View Profile
Re: Bad xml file for savegames
« Reply #3 on: January 20, 2015, 05:05:00 am »
Is that save before or after the bug? (I could take a look later of course)

Well I guess the number of items could be increased, Duke was palnning to increase it some more but testers didn't report back, on the other hand the game has worked fine so far with his experimental increase of two items (only in 2.6-dev) so there shouldn't be a problem going along with his original plan, I guess?

And when I add a new rifle and then add it to the campaign inital market, the campaign wont start anymore?
With which error? Maybe you missed to add the required technology for the rifle to be available?

Offline Pillat

  • Cannon Fodder
  • **
  • Posts: 5
    • View Profile
Re: Bad xml file for savegames
« Reply #4 on: January 20, 2015, 07:01:22 pm »
The save is after the bug^^ So you won't be able to load that save anymore :D

Hmm no error.. I just can't start a new campaign.. there's just an empty worldmap, and I can't do anything^^
Well what do I have to add to play the campaign with the new items?

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2560
    • View Profile
Re: Bad xml file for savegames
« Reply #5 on: January 20, 2015, 10:47:35 pm »
I've opened your savegame (with cli tools) and it was broken on the very same message (Alien activity was detected), the very same way. More over: you are playing on German language just like the last reporter did. So I've opened the language file with PoEdit, looked up the string aaand found something like:

Code: [Select]
msgid "Alien activity has been detected in %s."
msgstr "Alien Aktivitäten wurden gemeldet in: '%s'."

msgid "Alien activity has been detected."
msgstr "Außerirdische Aktivitäten wurden gemeldet in: '%s'."

The second pair is the problem. The original text does not need a %s template but the translation has one, which on saving get replaced by some memory-garbage which corrupts the XML.

I can't imagine that it could happen, especially with so many German ppl in the team. :)
I fixed the po file in the branch for next releases. For a workaround: please play on English.

-geever

Offline Pillat

  • Cannon Fodder
  • **
  • Posts: 5
    • View Profile
Re: Bad xml file for savegames
« Reply #6 on: January 20, 2015, 11:43:38 pm »
Ok.. uhm.. can you correct the savegame and give it back to me? :D Don't want to start from new again

Offline DarkRain

  • Project Coder
  • Captain
  • ***
  • Posts: 746
    • View Profile
Re: Bad xml file for savegames
« Reply #7 on: January 21, 2015, 06:58:06 am »
Hmm no error.. I just can't start a new campaign.. there's just an empty worldmap, and I can't do anything^^
Odd I thought the game would throw an error and exit... anyway you can find your ufoconsole.log which should contain any errors, that might have been generated that weren't bad enough for the game to exit (or crash).

Quote
Well what do I have to add to play the campaign with the new items?
You'll need to add a tech that 'provides' the item (one for each item) (see research.ufo) and if you want it to be available from the start you might need to add that techs to the appropriate list in researched_list.ufo

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2560
    • View Profile
Re: Bad xml file for savegames
« Reply #8 on: January 21, 2015, 07:35:13 pm »
Odd I thought the game would throw an error and exit...

Well, honestly, I did not test it. I just assumed that it caused the issue. Let's hope it is enough. :D

-geever