Hacking Steins;Gate my Darling Embrace translation patch?

Kapo4067

Member
OP
Newcomer
Joined
Jan 26, 2019
Messages
12
Trophies
0
Age
31
XP
71
Country
Argentina
As you may know the game just released on steam in English. Could it be possible to make a translation patch for the psvita version of the game?
 

RedL

Well-Known Member
Member
Joined
Aug 5, 2018
Messages
112
Trophies
0
Age
36
XP
707
Country
France
As you may know the game just released on steam in English. Could it be possible to make a translation patch for the psvita version of the game?
Get both, look at the files in both (don't forget to decrypt the PSVita files). If similar, you can try.
 

Mythical

Well-Known Member
Member
Joined
May 11, 2017
Messages
2,153
Trophies
1
Age
25
XP
3,003
Country
United States
They're still making vita games?? Also I'm sad that I'll probably only ever enjoy the first two seasons of the anime (the second one wasn't as good and was just sad as fuck)
 

RedL

Well-Known Member
Member
Joined
Aug 5, 2018
Messages
112
Trophies
0
Age
36
XP
707
Country
France
As you may know the game just released on steam in English. Could it be possible to make a translation patch for the psvita version of the game?
I took a look at both. Steam is in MPK archives while PSV is in CPK archives. Both format already got un-archivers ready (and CPK is common enough to be repacked nowadays).

Mostly looked at script.mpk and script2.cpk. They both contain 93 SCX files, but are named differently. As far as I can tell, a translation port is doable, but it will require manual work on the SCX files

Quick start, if you want to work on it:
  • (STM)_ATCH.SCX => (PSV)0.bin
  • (STM)MAIN00.SCX => (PSV)9.bin
Things to keep in mind:
  1. Get the PSV version off NPS and use psvpfsparser to decrypt the game files, otherwise you'll never be able to unpack the CPK files.
  2. A quick way to match an (US)SCX file to its (JP)bin file is to sort them all by size. That's basic heuristics, then looking at the file structure (how I found the first two matched files).
  3. The SCX script format works by referencing other script files and loading them into the engine: the file names are NOT hardcoded by the engine. Therefore, there MUST be parsing/editing of the SCX script format to keep both the STM script and the PSV file reference (which I'm curious about, I wonder how file loading works when the file is packed inside a CPK archive).
 
  • Like
Reactions: sadoku

games_

Member
Newcomer
Joined
Apr 1, 2019
Messages
18
Trophies
0
Age
80
XP
123
Country
Senegal
I took a look at both. Steam is in MPK archives while PSV is in CPK archives. Both format already got un-archivers ready (and CPK is common enough to be repacked nowadays).

Mostly looked at script.mpk and script2.cpk. They both contain 93 SCX files, but are named differently. As far as I can tell, a translation port is doable, but it will require manual work on the SCX files

Quick start, if you want to work on it:
  • (STM)_ATCH.SCX => (PSV)0.bin
  • (STM)MAIN00.SCX => (PSV)9.bin
Things to keep in mind:
  1. Get the PSV version off NPS and use psvpfsparser to decrypt the game files, otherwise you'll never be able to unpack the CPK files.
  2. A quick way to match an (US)SCX file to its (JP)bin file is to sort them all by size. That's basic heuristics, then looking at the file structure (how I found the first two matched files).
  3. The SCX script format works by referencing other script files and loading them into the engine: the file names are NOT hardcoded by the engine. Therefore, there MUST be parsing/editing of the SCX script format to keep both the STM script and the PSV file reference (which I'm curious about, I wonder how file loading works when the file is packed inside a CPK archive).
Great write up! Do you know if the archive formats are consistent across the SciADV series? It would be great if we could port the steam or switch scripts of robotics;notes (if they ever come out in english) to the vita versions.
 

RedL

Well-Known Member
Member
Joined
Aug 5, 2018
Messages
112
Trophies
0
Age
36
XP
707
Country
France
Great write up! Do you know if the archive formats are consistent across the SciADV series? It would be great if we could port the steam or switch scripts of robotics;notes (if they ever come out in english) to the vita versions.
For the consistency of ARCHIVE formats, CPK is a standard Sony format and MPK seems to be used across multiple SciAdv games (including Chaos;Child), so you could theorically try it on Robotics;Note

For the SCX format, it seems like it IS consistent across SciAdv games, though some will use different versions of the script format, it seems like it keeps the same basic structure.

Also, I was missing something: the best way to match SCX to bin files is to start with the Japanese PC version and match the files, then use the English PC version to do the replacement (sill have to work on the script names relationship though, so a full reverse-engineer is required).
 

KenBaum

Member
Newcomer
Joined
May 1, 2019
Messages
14
Trophies
0
Age
25
XP
323
Country
United States
Out of curiosity, what about the file structure of the switch version?
I'd imagine that the file structure for that version would be different than the PC version.
 

RedL

Well-Known Member
Member
Joined
Aug 5, 2018
Messages
112
Trophies
0
Age
36
XP
707
Country
France
Out of curiosity, what about the file structure of the switch version?
I'd imagine that the file structure for that version would be different than the PC version.
Haven't checked and haven't managed yet to unpack Switch games, maybe @froid_san would know?

But once you get past that step, it's all the same: unpack, check files, match them, rewrite scripts to link them properly, repack, distribute rePatch folder.
 

RedL

Well-Known Member
Member
Joined
Aug 5, 2018
Messages
112
Trophies
0
Age
36
XP
707
Country
France
Really wish this project will come to life! I'd love to play Steins;Gate My Darling's Embrace on Vita! :yaypsp:
By this point, I've written a (somewhat) good enough guide and (almost) anybody could work on it.

All that's required now for anyone determined is:
- a computer running Windows to install the original game and run various tools to unpack/repack stuff.
- a lot of hard drive storage to hold both games, their crypted and decrypted files, etc...
- a bit of programming knowledge to automate some of the process and unpack/repack the scripts, but that part doesn't require reverse-engineering since the specs are already done.
- a good process to do the whole "unpack-replace-repack" efficiently.
 
  • Like
Reactions: Spazzery

Spazzery

Well-Known Member
Newcomer
Joined
Jun 30, 2019
Messages
88
Trophies
0
Age
23
XP
1,377
Country
Estonia
By this point, I've written a (somewhat) good enough guide and (almost) anybody could work on it.

All that's required now for anyone determined is:
- a computer running Windows to install the original game and run various tools to unpack/repack stuff.
- a lot of hard drive storage to hold both games, their crypted and decrypted files, etc...
- a bit of programming knowledge to automate some of the process and unpack/repack the scripts, but that part doesn't require reverse-engineering since the specs are already done.
- a good process to do the whole "unpack-replace-repack" efficiently.

Would it really be such a short process? And would it spoil the game for the person who works on it?
 

RedL

Well-Known Member
Member
Joined
Aug 5, 2018
Messages
112
Trophies
0
Age
36
XP
707
Country
France
Would it really be such a short process? And would it spoil the game for the person who works on it?
From my own evaluation:
  1. Extracting is short, I managed to do it in less than one hour, including finding Mac-based tools (plus some VM hackery for Windows tools), until my HDD failed on me.
  2. Matching script files shouldn't be that hard if you get a JP PC copy along with the US PC copy and check the MD5 of all SCX files across all copies (writing a script to automate takes five minutes), but if that's not working, you'll have to do step 4 to extract them all and match corresponding actions/dialogs (ie: "this US scene starts with Yukari talking to Okarin, so does this JP one, they match", or "this US scene starts by loading background X, and so does the JP scene, they match") one by one, which would be harder/longer. If they REALLY don't match in structure (which is something I really cannot envision as being possible), you'll have to replace the translated lines one-by-one during step 4.
  3. Matching pictures files should take a bit longer, so we'll work on that later.
  4. Rewriting the scripts to re-do the references between them (the files seem to be loaded by name, and they differ between PC and PSV versions) will be the crux of your work, but if you follow the SCX guidelines I linked to earlier, it's doable without too much hair-pulling.
  5. Obviously, you won't make it on the first try, so you need some scripts to repack stuff automatically in archives you can put back on your Vita for testing. This all depends on how you like to work. For myself, I'd use a local SQLite DB to keep track of both sets of files and how they relate to each other, their path in the archives, the archive type for repack,...
  6. Testing means you'll have to play through the entire game on your PSV, so spoilers beware, yes.
  7. Matching pictures is another thing entirely. The PC format was readable, but I cannot recall the formats the PSV used, so you'll have to work on more unpack/repack for that.
Now, take that evaluation and (as anything related to computer development), multiply the time you think it's gonna take by an order of five or ten.

Step 2, 3/7 and 4 are obviously the worst parts. Haven't looked enough into step 2 to make sure it won't take an eternity and step 3/7 is a complete unknown. Step 4 can either be very simple or very complicated depending on whether you manage to build the SCX packer/repacker, but you can approach the translation groups working on Chaos;Head to ask (kindly) if they could help you on that front.
 
  • Like
Reactions: Spazzery

Spazzery

Well-Known Member
Newcomer
Joined
Jun 30, 2019
Messages
88
Trophies
0
Age
23
XP
1,377
Country
Estonia

RedL

Well-Known Member
Member
Joined
Aug 5, 2018
Messages
112
Trophies
0
Age
36
XP
707
Country
France

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    SylverReZ @ SylverReZ: @OctoAori20, Cool. Same here.