Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: helpessfool on Fri 10/08/2018 03:26:50

Title: Can dialogs be accessed from an external file?
Post by: helpessfool on Fri 10/08/2018 03:26:50
So I lost my game to a weird "root element missing" error. The game won't open. I have a backup but it's missing a complex dialog I was just working on. I can see where the room scripts and such are in the the corrupted game's file folders, but I haven't uncovered where the dialogs are hiding yet.

I can redo the dialog but I'd like save a few hours if possible and just copy and paste the dialog into my backup.

Title: Re: Can dialogs be accessed from an external file?
Post by: Matti on Fri 10/08/2018 09:24:53
If you open game.agf, search for "<Dialogs>" and scroll down you should see all the dialogs.
Title: Re: Can dialogs be accessed from an external file?
Post by: Crimson Wizard on Fri 10/08/2018 10:05:24
Thing is that "root element missing" error means that Game.agf is corrupted, so there is high chance the contents are destroyed.

If that's the case, also check Game.agf.bak which is a copy of previous version of Game.agf made at the last save.
Title: Re: Can dialogs be accessed from an external file?
Post by: stanleydoss2018 on Thu 13/12/2018 09:26:12
So I read about this error and found out it has something to do with the extra character getting added to the start of a file when it is saved with the wrong encoding.
But how can it be fixed? No idea...
Title: Re: Can dialogs be accessed from an external file?
Post by: Crimson Wizard on Thu 13/12/2018 09:59:35
QuoteSo I read about this error and found out it has something to do with the extra character getting added to the start of a file when it is saved with the wrong encoding.
But how can it be fixed? No idea...

That should be easy to check if that's so, simply open Game.agf in the text editor that displays encoding and hidden characters (like Notepad++). Also if that's really the case then it would be simple to fix as well by saving in proper encoding. That won't answer the question how it got into wrong one though.