News: 11 March 2016 - Forum Rules

Author Topic: PC Video Game Hacking and Translating  (Read 5820 times)

Bob Liu

  • Sr. Member
  • ****
  • Posts: 253
    • View Profile
PC Video Game Hacking and Translating
« on: April 30, 2014, 05:25:12 pm »
I hope running 2 topics at the same time isn't bothering anyone, anyway I was wondering about PC game Hacking and Translating. How do people generally go about doing that, also how much different is it from console and handheld games. Im interested into translating a PC game or two in the future and am wondering about the process.

MrBing

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
Re: PC Video Game Hacking and Translating
« Reply #1 on: April 30, 2014, 05:40:07 pm »
A few things:
- PC games have become very difficult to reverse-engineer. So many cards and so many configurations. Reverse-engineering DirectX is not a cakewalk, either. .Net is a little simpler, as is Java, because in those cases the code is naught but operations and interface calls (which are akin to the BIOS of yore).
- Fortunately, data compression on PC is nearly non-existant. Files may be archived and the files themselves may be in compressed formats, but actual compression of text is rare. You should be able to find what you're looking for with a hex editor. You should be able to deduce the compression format by looking at the start of the file. From there find a compressor for the attendant formats and decompress the data. Sometimes it's right out in the open. In Java, the format is always JAR, which you can open with WinRAR, probably.

FAST6191

  • Hero Member
  • *****
  • Posts: 3523
    • View Profile
Re: PC Video Game Hacking and Translating
« Reply #2 on: April 30, 2014, 06:06:21 pm »
A similarly themed recent thread with a few answers
http://www.romhacking.net/forum/index.php/topic,17867.0.html

As MrBing said though it is basically as varied as PC programming, all with a nice added twist of people wanting and making efforts to obscure things a lot of the time.

Bob Liu

  • Sr. Member
  • ****
  • Posts: 253
    • View Profile
Re: PC Video Game Hacking and Translating
« Reply #3 on: May 01, 2014, 10:21:25 am »
I'll be sure to give that topic a read, im guessing PC games aren't as easy as many would think but what about visual novel type games. Would they be much easier to hack and translate.

Bonesy

  • Hero Member
  • *****
  • Posts: 1436
    • View Profile
Re: PC Video Game Hacking and Translating
« Reply #4 on: May 01, 2014, 03:35:05 pm »
*facepalms*

FAST6191

  • Hero Member
  • *****
  • Posts: 3523
    • View Profile
Re: PC Video Game Hacking and Translating
« Reply #5 on: May 01, 2014, 04:10:52 pm »
Most visual novels are somewhat static 2d affairs, personally I would rather figure out a format there than a lot of custom 3d ones that most other modern games use. Likewise translating visual novels is, at least by the amount of numbers of them done, one of the more popular PC game translation type hacks, some of them are even made with similar engines or otherwise documented formats.

Frankly though it is the same as everything -- I have had basic text engines take me hours to even scratch the surface of and I have had what technically falls under the umbrella of assembly hacks be done as I am winding up a sales/survey type on the phone.

Bob Liu

  • Sr. Member
  • ****
  • Posts: 253
    • View Profile
Re: PC Video Game Hacking and Translating
« Reply #6 on: May 01, 2014, 04:16:27 pm »
That's interesting to note, is there any specific programs people use to Hack and translate PC Visual Novel games.

Pennywise

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 2450
  • Prepare thyself for holy judgment
    • View Profile
    • Yojimbo's Translations
Re: PC Video Game Hacking and Translating
« Reply #7 on: May 01, 2014, 04:34:02 pm »
They use a debugger. Translating PC games almost certainly requires some knowledge of high-level programming such C etc. You can't just load up a table in a hex editor and expect to translate a game from there. PC games like to use custom formats etc that require custom tools for the job. Sure, people have reverse-engineered some of them, but I believe it's rare that someone goes out of their way to make all the tools for a game and not want to work on it themselves afterward. What I believe is more common is that someone decodes a file format and releases tool/source, but you need to be able to be able to write a program to reencode the file etc.

Bob Liu

  • Sr. Member
  • ****
  • Posts: 253
    • View Profile
Re: PC Video Game Hacking and Translating
« Reply #8 on: May 01, 2014, 05:26:34 pm »
They use a debugger. Translating PC games almost certainly requires some knowledge of high-level programming such C etc. You can't just load up a table in a hex editor and expect to translate a game from there. PC games like to use custom formats etc that require custom tools for the job. Sure, people have reverse-engineered some of them, but I believe it's rare that someone goes out of their way to make all the tools for a game and not want to work on it themselves afterward. What I believe is more common is that someone decodes a file format and releases tool/source, but you need to be able to be able to write a program to reencode the file etc.

That's probably beyond my capabilities, im guessing you can't just relative search and build a table. It probably works way different than what im used to.

furrykef

  • Full Member
  • ***
  • Posts: 132
    • View Profile
Re: PC Video Game Hacking and Translating
« Reply #9 on: May 01, 2014, 09:37:23 pm »
Since text in games almost always uses a standard encoding such as ASCII, Shift-JIS (by far the most likely for a Japanese game), or Unicode, relative searching is pretty pointless. However, it's pretty common for the text to be compressed or encrypted in some fashion so you can't easily find it. There's an MS-DOS game I'm trying to hack at that has lots and lots of text that simply doesn't appear in any of the files, and I can only assume it's compressed with Huffman or something (which isn't unlikely given this game's age; back then this could make the difference between whether or not the game will fit on a floppy). For a game made in the 90s or later, it's unlikely you'll see any text-specific compression, but the text might still be bundled together with other files that are compressed in some fashion.

FAST6191

  • Hero Member
  • *****
  • Posts: 3523
    • View Profile
Re: PC Video Game Hacking and Translating
« Reply #10 on: May 02, 2014, 04:12:59 am »
Good enough logic for most games and one that I would suggest using as a first part (with the addition of EUC-JP to the encoding list), however in the visual novel world you can still get text as graphics (easier than font handling sometimes), odd markup styles, the occasional bit of compression (why when you use uncompressed wave audio and MPEG1 video I do not know but hey) and the slightly more than occasional encryption, though you mentioned the last two.

Bob Liu

  • Sr. Member
  • ****
  • Posts: 253
    • View Profile
Re: PC Video Game Hacking and Translating
« Reply #11 on: May 02, 2014, 10:31:06 am »
Any clues on where to find the text in a visual novel game and change it, the one im interested in is from 2001.

FAST6191

  • Hero Member
  • *****
  • Posts: 3523
    • View Profile
Re: PC Video Game Hacking and Translating
« Reply #12 on: May 02, 2014, 02:31:42 pm »
Though I would probably say something similar for any era, if only because engine reuse is a thing, 2001 is old enough to still be assembly and nice low level stuff and new enough to be something more scripting based.

That said if you are not going to play with a debugger of some sort (even http://www.nirsoft.net/utils/opened_files_view.html can reveal good stuff from time to time) then you get the usual ways.

File names, sizes and extensions both positive (a folder called text housing a bunch of xml files with nice names.....) and negative (a folder called video and housing a bunch of MPEG files might not contain text, or if it does then it will be hardcoded into the videos) are a good start.

Corruption is an option, many frown upon it but it can produce results. Sadly not as useful on the PC where corruption can trigger anti piracy and other things but still worth trying.

Basic analysis with a hex editor -- most people that edit enough shiftJIS and EUC-jp can spot it in a hex editor. You can try some relative search type stuff but there is no set order really so it is not great for Japanese.

Bob Liu

  • Sr. Member
  • ****
  • Posts: 253
    • View Profile
Re: PC Video Game Hacking and Translating
« Reply #13 on: May 02, 2014, 04:43:30 pm »
Thanks for your help guys, I don't really think relative searcher will work but im gonna give it a try.