Author Topic: Editing a game when you just have the .EXE file?  (Read 675 times)

miabi

  • Posts: 5
I made a game with some friends in AGS a few years ago. Recently, we thought of translating it into a few other languages--the problem is, none of us have the game files anymore, just the .exe and acsetup.cfg files. Is there any way to re-edit the game from its .exe format in the program or are we essentially out of luck?

Crimson Wizard

  • Posts: 8,722
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Lifetime Achievement Award Winner
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Re: Editing a game when you just have the .EXE file?
« Reply #1 on: 24 Feb 2018, 14:29 »
Hello. There are two questions here:

1) Is it possible to regenerate a game project from compiled game (exe).

The short answer is - only partially.
The long answer: it is possible to extract all resources: sprites, audio, rooms, but the scripts will be in compiled form (aka byte-code), and we do not have real decompiler that would recreate them in actual AGS script.
If the game was made with AGS 2.72 or earlier, then the package also contains original room script texts (for unknown reasons, because they are not actually used in-game); AGS 3.0 and higher don't have them, so room scripts are also unrecoverable if game is compiled with these versions.

To sum up, depending on the AGS version game was compiled with you may restore room scripts, but not global script, or no scripts at all. If you are willing to rework your game from those recovered resources, then this may be a way to go. There are extracting tools that may help you in this.

2) Is it possible to add translation to compiled game without having a project source.

The short answer is - yes.
Longer answer: this has been done by "unofficial" translators for years now (sometimes illegally, but oh well), using home-baked tools that extract strings from the game into TRS file, and compile TRA file which you may then distribute along with original exe.

Now, the issue here is "only" to find the proper tools. There was a time I had a link to one used by Russian hackers translators, but I lost it and their site is down. Maybe I will be able to find it later.

There is also another one posted recently in this thread: http://www.adventuregamestudio.co.uk/forums/index.php?topic=55795.0
The tool is open source and its source code, as well as downloadable archive may be found here: https://bitbucket.org/Taktloss/ags_translationeditor
There is however another problem with it... it seems it has mistakes, which make it impossible to use extended latin characters (as noted in the forum thread), and maybe something else. I was planning to look into that, but could not find time yet.

So, this is a bit awkward situation, the solution is 100% existing, but I cannot direct you to a 100% working tools at this very moment :/.
« Last Edit: 24 Feb 2018, 14:35 by Crimson Wizard »

miabi

  • Posts: 5
Re: Editing a game when you just have the .EXE file?
« Reply #2 on: 24 Feb 2018, 15:38 »
Thank you for your information! I can't entirely remember which version we used, but the game was made about 3-4 years ago. I'll take a look at the links you listed and see if I have any luck with those programs... Or hope that Russian site comes back, I suppose.

I'm glad the solution exists though, even if it may be a bit tricky to work out.

Edit: It's possible I am missing something, but I can't seem to find any way to open the EXE with the AGS Translation Editor without the TRS file.
« Last Edit: 24 Feb 2018, 15:48 by miabi »

Crimson Wizard

  • Posts: 8,722
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Lifetime Achievement Award Winner
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Re: Editing a game when you just have the .EXE file?
« Reply #3 on: 24 Feb 2018, 16:19 »
Edit: It's possible I am missing something, but I can't seem to find any way to open the EXE with the AGS Translation Editor without the TRS file.

I never used it before. It looks like the program requires either TRS or TRA file from the game. Does your game have any translation available, or only original language?
NOTE: it does not open the EXE, it reads TRS or TRA files.
I thought it will load strings from EXE, but idk if it does. Maybe not, in which case it's a real shame.
« Last Edit: 24 Feb 2018, 16:21 by Crimson Wizard »

miabi

  • Posts: 5
Re: Editing a game when you just have the .EXE file?
« Reply #4 on: 24 Feb 2018, 16:23 »
Edit: It's possible I am missing something, but I can't seem to find any way to open the EXE with the AGS Translation Editor without the TRS file.

I never used it before. It looks like the program requires either TRS or TRA file from the game. Does your game have any translation available, or only original language?
NOTE: it does not open the EXE, it reads TRS or TRA files.
I thought it will load strings from EXE, but idk if it does. Maybe not, in which case it's a real shame.

Sadly, just the original language.
Yeah... It seems to only open the EXE file along with a TRS file OR it needs a TRA file so it seems I may be out of luck with that program then. I guess I'll have to hope that Russian site pops back up.

Danvzare

  • Posts: 2,724
  • The Man with No Name
    • I can help with AGS tutoring
    • I can help with proof reading
    • I can help with scripting
    • I can help with voice acting
Re: Editing a game when you just have the .EXE file?
« Reply #5 on: 27 Feb 2018, 13:31 »
It's possible I am missing something, but I can't seem to find any way to open the EXE with the AGS Translation Editor without the TRS file.
You have to extract all of the strings yourself.
Open up the .exe in notepad++ or something similar, and then find all of the strings, copying each one to a .TRS file.
It's a very laborious job, especially since all of the strings are scattered about, and you may not find them all.
To find a section with some strings, just search for a common word such as "not" or "and" or even "the".

miabi

  • Posts: 5
Re: Editing a game when you just have the .EXE file?
« Reply #6 on: 27 Feb 2018, 14:15 »
It's possible I am missing something, but I can't seem to find any way to open the EXE with the AGS Translation Editor without the TRS file.
You have to extract all of the strings yourself.
Open up the .exe in notepad++ or something similar, and then find all of the strings, copying each one to a .TRS file.
It's a very laborious job, especially since all of the strings are scattered about, and you may not find them all.
To find a section with some strings, just search for a common word such as "not" or "and" or even "the".

Thank you. I'll give it a shot! The only thing is the game is actually in Russian so I'm not entirely sure how well I'll be able to find all the text this way, but I'll keep my fingers crossed.

Is there anything I should keep in mind while trying to make the .TRS file?

Edit: Unfortunately, it says the .exe is too big to open in Notepad++. Is there a way for Notepad++ to allow me to open bigger files or a recommended similar program?
« Last Edit: 27 Feb 2018, 14:17 by miabi »

Crimson Wizard

  • Posts: 8,722
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Lifetime Achievement Award Winner
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Re: Editing a game when you just have the .EXE file?
« Reply #7 on: 27 Feb 2018, 14:44 »
It's possible I am missing something, but I can't seem to find any way to open the EXE with the AGS Translation Editor without the TRS file.
You have to extract all of the strings yourself.
Open up the .exe in notepad++ or something similar, and then find all of the strings, copying each one to a .TRS file.
It's a very laborious job, especially since all of the strings are scattered about, and you may not find them all.
To find a section with some strings, just search for a common word such as "not" or "and" or even "the".

Same amount of time could be spend to learn coding and write a simple utility that loads AGS game data, takes out strings, and prints them out to a text file.
Game format is known, and there is a relatively clean code that reads it in the engine which may be used for a reference.
In the end you not only have a desired TRS file, but also a program that may be used further by anyone, and you've learnt how to code! :)
« Last Edit: 27 Feb 2018, 15:56 by Crimson Wizard »

miabi

  • Posts: 5
Re: Editing a game when you just have the .EXE file?
« Reply #8 on: 27 Feb 2018, 14:48 »
It's possible I am missing something, but I can't seem to find any way to open the EXE with the AGS Translation Editor without the TRS file.
You have to extract all of the strings yourself.
Open up the .exe in notepad++ or something similar, and then find all of the strings, copying each one to a .TRS file.
It's a very laborious job, especially since all of the strings are scattered about, and you may not find them all.
To find a section with some strings, just search for a common word such as "not" or "and" or even "the".

OR you could spend same time learning programming and writing a simple utility that loads AGS game data, takes out strings and writes them to a text file.
Game format is known, and there is a relatively clean code that reads it in the engine which may be used for a reference.

Well, I'd be happy to try that option as well if you can point me in a good direction that can help with figuring that out too. :P
In general, I'm willing to put the work in for any options.

Crimson Wizard

  • Posts: 8,722
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Lifetime Achievement Award Winner
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Re: Editing a game when you just have the .EXE file?
« Reply #9 on: 16 Apr 2018, 14:46 »
Alright, thanks to user chyron, I was given the link to the text extracting tool again. Here is the post with download links:
https://vk.com/topic-17976818_29383366?post=100

In case you don't want to download from vk.com, I have put most recent version in my dropbox:
https://www.dropbox.com/s/4n3y8ysfkcv3hcr/AGSTool%206.zip?dl=0
« Last Edit: 16 Apr 2018, 15:35 by Crimson Wizard »

tom567

  • Posts: 3
Re: Editing a game when you just have the .EXE file?
« Reply #10 on: 16 Apr 2018, 18:49 »
Thank you very much! I'll look into this!