Recovering Source Code of my Old Game

Hello. A while ago, I was working on a Quest game, but I ended up giving up on it. Later, I had to reset my computer and forgot to copy the source code over. But now I'd like to get it back.

It is uploaded to this site, and I wanted to know if there's any way to recover at least part of the original source. When I download it, I only get the .quest file that plays the game itself. I have looked around and found a post saying to rename this to a .zip file and then open it, which I did. I can get a .alsx file out of it, which if I open in notepad or something, looks like it has my game code. However, when I open this .alsx file in Quest itself, I get a strange bug where only the top bar and left hand side with the object tree is visible. The right hand side, where I would edit attributes of said objects, is not appearing.

I can still add objects and play the game, but I can't edit any properties of any objects. Is there a way to recover any of this to be able to edit it again? Would it be possible to copy and paste parts of my .alsx file out into a blank one and open that in Quest.

Any help with this would be appreciated. I have a combat system I'm rather proud of and want to recover if possible.

Edit - I forgot to mention. I can use Quest to create a new blank game, and the editor in there works fine. So it seems like something in my old game is corrupted.


When you publish a game, it includes all of the core libraries. So for example, where your original file included the line <include ref="Core.aslx"/>, the .aslx file within the .quest file will contain the entire contents of the file "Core.aslx".

By default, when you create a new game it includes 3 files: Core.aslx (which includes other files to pull in all of the core functions), CoreEditor.aslx (which contains details of which controls to display on each tab in the editor), and English.aslx (which contains all the templates and human-readable text for the player to see).

When Quest is combining all these files together for publishing, it omits the information about the editor tabs, because it thinks you've finished editing. It also removes the two types editor_object and editor_room, which are used in the editor to determine which tabs to show for a given object.

It might work if you go back into the file and re-add the line <include ref="CoreEditor.aslx"/>. I'd suggest making a backup before you do this, as Quest can be a little weird about what order included stuff should come in. You might have to put it at the start of the file, or after some of the other stuff.

However, note that this might have issues.

  1. If the editor controls aren't properly labelled, try adding <include ref="EditorEnglish.aslx"/> as well. I'm not sure if this will be necessary, or if it should come before or after the CoreEditor include.
  2. You will be using the editor tab-layout from the version of Quest you currently have installed, but the core functions from the version the game was originally created with. This means that the editor might show new features that don't actually work in your game.
  3. I haven't tested this; I'm answering off the top of my head, so if it doesn't work it might be better to ask someone who actually has a Windows machine with Quest on it.

Hope that helps :)


Make a short game... 3 or 4 rooms, and add a few objects...
Save, then Publish it...
Change the .Quest to .zip
Open both games in 2 copies of Quest and look at the two games side by side...
delete everything from the second copy (the one that was published) that is not in the first, original, version...
Copy everything from the first version, that's missing in the second one...
IF, you got all that right, the second version should look like the first and you should be able to see the game in the UI...
Now... you know what to change to restore your game to be viewable in the UI...
(Hopefully...)
I'm testing this right now myself on a short game...
Looks like it will take a little work, but still less than rebuilding it over from scratch!


Or, maybe...
Just add to each room and object:

<object name="island">
        <inherit name="editor_object" /> 

<object name="room_12">
      <inherit name="editor_room" /> 

Oh... You will need to add:

<include ref="CoreEditor.aslx"/>

Before the game name="What ever the name is." line...

But, I don't think you need all the (first part I said) because everything looks just fine...
Altho, there are a few more tabs that may open up more options for each room...
(Hmmm... new toys to play with...)
No... just "core" tab names...
Yea... add in this order:

<include ref="EditorEnglish.aslx"/>
  <include ref="CoreEditor.aslx"/>
    <game name="The Lost unicorn">

And everything looks just like normal...


You already have some guides, here is my take.

  1. Rename from .quest to .zip (you may need to go into the Tools menu or View - Options of Windows explorer to get it to show the extension.

  2. Extract the .aslx file to another folder (i.e., unzip it).

  3. Open it in a text edit, such as Notepad.

  4. Change the first few lines to this (assuming it was in English):

<!--Saved by Quest 5.8.6809.15141-->
<asl version="580">
  <include ref="English.aslx" />
  <include ref="Core.aslx" />

Possibly the first and definitely the second will already be there, you need to add the third and fourth (the first does not matter).

You should now be able to open it in Quest. As others have said, Quest will not know it a thing is an item or room, so you will need to set that for each, but it is easier to do in Quest.

All the built-in functions, commands, etc. will be part of your game; you may want to delete them (if you are happy with XML that is easier to do from a text editor). Be carefully not to delete any you added yourself, they will be at the end (i.e., your functions will be at the end of the functions).


Alright, I got it (mostly) working. Thank you everyone for your help. For the record, all I had to do was to add the two "include" tags that DarkLizerd mentioned, and now the editor windows are working again. I have a lot of system functions and such to get rid of though.

I probably still will copy it over to a new file, mostly so I can be sure something won't break in the future, but it certainly will be much easier to do that now that I can see the structure and properties of the game itself.


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums