Legend of Heroes Translation

Discussion in 'PSP - Hacking & Homebrew' started by zero_g_monkey, May 17, 2014.

Thread Status:
Not open for further replies.
  1. zero_g_monkey
    OP

    zero_g_monkey GBAtemp Fan

    Member
    332
    203
    Aug 9, 2013
    United States
    The Legend of Heroes. What can be said about these games for people who are not already familiar with the series. So far, as it stands, there has been 3 different universes in the series since it originally broke from the Dragon Slayer flagship. Here is a small breakdown of the series.

    No Official Name Saga
    Dragon Slayer - The Legend of Heroes I
    Dragon Slayer - The Legend of Heroes II

    Gagharv Trilogy
    The Legend of Heroes III - Shiroki Majo
    The Legend of Heroes II - Prophecy of the Moonlight Witch
    The Legend of Heroes IV - Akai Shikuku
    The Legend of Heroes - A Tear of Vermillion
    The Legend of Heroes V - Umi no Oriuta
    The Legend of Heroes III - Song of the Ocean

    [These next ones take place in the same universe]

    Liberl Kingdom Arc
    The Legend of Heroes VI - Sora no Kiseki
    The Legend of Heroes - Trails in the Sky (XSEED)
    The Legend of Heroes VI - Sora no Kiseki SC
    The Legend of Heroes - Trails in the Sky SC (XSEED)
    The Legend of Heroes VI - Sora no Kiseki The 3rd
    The Legend of Heroes - Trails in the Sky The 3rd (XSEED - tentative title if they release it)

    Crossbell Arc
    The Legend of Heroes VII - Zero no Kiseki
    The Legend of Heroes VII - Trails of the Void (It will earn this name!)
    The Legend of Heroes VII - Ao no Kiseki
    The Legend of Heroes VII - *haven't given it a proper name yet... that I can remember what it was*

    Erebonian Empire Arc
    The Legend of Heroes VIII - Sen no Kiseki
    The Legend of Heroes - Trails of Cold Steel (XSEED)
    The Legend of Heroes VIII - Sen no Kiseki II
    The Legend of Heroes - Trails of Cold Steel II (XSEED)
    The Legend of Heroes VIII - Sen no Kiseki III
    The Legend of Heroes - Trails of Cold Steel III (XSEED - tentative title if they release it)

    There you have it. All of the games in the series to date. Now back to talking about it. The series is a very difficult bunch of games to work on due to the sheer amount of text involved. The games are constantly changing. You can do the smallest accomplishment in the game and the whole dialog from the NPC characters will change. There is a lot of background and relationship stuff happening in each of the games. It may not be as obvious as something like a Persona game but it is there. It is all about story telling in these games. No super high end graphics, no overtly sexy under aged girls (**well not as a selling point**) or any of the crap that has ruined the RPG genre in my opinion. They really are good games. Any game that you can get a good 50 hours of play time minus using a ton of movies, is all right in my book. Ready to play them yet!?

    -----------------------------------------------------------------------------------------



    This project started in May 2014 after the Falcom Trick (neoxephon first did it) was discovered. It let the flood gates open to work on multiple Falcom games. Myself (being the lunatic I am) decided to take on Zero no Kiseki. Shortly after my announcement, Flamethrower came on board as a programmer and we started getting traction. Various others have helped and a few random translators have chipped in but Guren no heya kara and yangxu (youtube videos of playing the Chinese PC version fame) are our main two.

    Originally we had a very open project here. Spreadsheets in public view and all of the tools for working on the games were being posted. I like to share information and get feedback from people on certain stuff. But there is some touchy areas of romhacking that most sites don't want to deal with, so we went a little bit private to keep their noses clean and so we could have open discussions about stuff that could possibly spoil the game for those waiting on the English version coming out December 2016 (ETA). Then I started to notice some problems with the translations in the spreadsheets. Somebody was committing a HUGE no no when it comes to using machine translations. I have said it once, I will say it again, you CAN use machine translations for SIMPLE stuff (like items, weapons and etc.) and maybe get a good clean hit. Never for any kind of real dialog stuff. It just does not work. So we started moving the links around and just hosting them on our forum.

    We started catching a few more eyes among the Falcom fan community and along comes SkyWeise (gonna be the graphic guy because he is a lot better at that stuff than I am. I hope he knows this!). He provided us with a new home and a better forum. People should really come by to talk to us. That is where the latest info is on the projects. Back during the summer, a fellow that I can't remember his name, thought he would just randomly start editing the scripts. I was furious about this and stopped the translation work until I could get everything back in order. So if you are ever wondering why they are hidden from public view and you have to login in to edit them... This is why. I am taking this project very seriously and I am a perfectionist. A lot of sleep is lost thinking about solving problems that arise in the game.

    The good news. The previous 3 paragraphs were kind of small overview of what has been happening in the project. There is other bits of goodies thrown into all this information I posted here. Going to give a quick breakdown of the status now: LOOK BELOW IN THE SPOILER TAG ^_^

    Warning: Spoilers inside!

    Formal Team Members
    zero g monkey (zeromonkey) - Various positions but looking forward to writing the script and QC
    flamethrower - programming and getting my ass out of a bind
    Guren no heya kara - translation machine
    yangxu - translator and youtube connoisseur
    SkyWeise - graphics guy and lord of the domain (hosting)

    We also have various other members on our team who jump into the fray when they are needed. I'm not gonna name them all because I have been sitting here for an hour and don't want to sit here much longer.

    If you didn't see the announcement before, get your copy of the Japanese PC release if you want to play it on the computer. We are working on that one too!
     
    Last edited by zero_g_monkey, Jan 3, 2016


  2. omarrrio

    omarrrio GBAtemp Advanced Fan

    Member
    633
    175
    Feb 18, 2010
    Macau
    nowhere
    i don't get it, what do you exactly need ? a coder ? a translator ? both ?
     
  3. zero_g_monkey
    OP

    zero_g_monkey GBAtemp Fan

    Member
    332
    203
    Aug 9, 2013
    United States
    Translators down the line are mainly what I am trying to stir up. Like we all know... there is a lot being said in these games. Some tools for extraction and insertion would be nice that could auto update the pointers but not mandatory. So far, I haven't come across anything in the game that I can't do with my old hex editing skills. I don't think there is any code in the game that will need changing but I haven't dug that deep. Down the line could possibly use some help with image editing if I can't figure it out on my own. I've worked on games for 16 years so this isn't anything new. Just taking the jump from single file roms to multiple file discs. Make any more sense than original post?
     
  4. Kelebek

    Kelebek GBAtemp Regular

    Member
    165
    62
    May 25, 2012
    Where are the pointers? I started having a look, but this format is entirely different to Brandish. The strings themselves are built into the script, rather than all at the end. There seems to be a whole bunch of tables in the script files with weird values all over. I can't see any values that actually match the string lengths yet though. Some strings are broken up by nulls as well, without anything that seems to start a new one, so doesn't seem to be that either, although maybe. There's a lot of absolute values in the file too, so modifying length seems to be pretty difficult manually.

    How are you modifying the files so far?
     
  5. zero_g_monkey
    OP

    zero_g_monkey GBAtemp Fan

    Member
    332
    203
    Aug 9, 2013
    United States
    Been looking into the dialog files and there is a bunch of stuff there. Working on nailing down a definite starting point to find the pointers.

    As for the files containing stuff like weapons, items and monsters they each have a different setup.
    The items/weapons etc are stored in t_ttxt._dt and t_ittxt2._dt - pointers are as follows. At the beginning of the file is a table with the value that leads to the item BUT there is actually two more pointers for the actual item name and one for the description. If you open t_ittxt up in a hex editor you can see at position 14 is the pointer for the first item (not sure what it is because its just a bunch of numbers) which is 24 04 (reverse it) to 04 24. It will point to the following hex below. 00 terminates the end of the line usually.


    00 00 - 00 00 - 2C 04 - 2E 04 - 20 00 - 82 4F 82 50 82 51 82 52 82 53 82 54 82 55 82 56 82 57 82 58 31 30 31 31 31 32 31 33 31 34 31 35 31 36 31 37 31 38 31 39 32 30 32 31 32 32 32 33 32 34 32 35 32 36 00

    00 00 (I'm guessing this represents a marker for the item number)
    00 00 (????)
    2C 04 (points to item name)
    2E 04 (points to item description)
    20 00 (????)
    82 4F 82 50 82 51 82 52 82 53 82 54 82 55 82 56 82 57 82 58 31 30 31 31 31 32 31 33 31 34 31 35 31 36 31 37 31 38 31 39 32 30 32 31 32 32 32 33 32 34 32 35 32 36 00 (dialog)

    This one is located at 65 04 in the first table at the begining of the file.

    Something that might make more sense.
    01 00 - 00 00 - 6D 04 - 76 04 - 91 7B 8D B8 8E E8 92 A0 00 8C 78 8E 40 8A AF 82 CC 90 67 95 AA 82 F0 8F D8 96 BE 82 B7 82 E9 81 41 8C 78 8E 40 96 E4 82 AA 93 FC 82 C1 82 BD 8D 95 8A 76 82 CC 8E E8 92 A0 81 42 5C 6E 91 7B 8D B8 8F F3 8B B5 82 CC 8B 4C 98 5E 82 C6 8A 6D 94 46 81 41 82 A8 82 E6 82 D1 8A 65 8E ED 8F EE 95 F1 82 AA 8E 51 8F C6 82 C5 82 AB 82 E9 81 42

    01 00 (See why I think the items are numbered)
    00 00 (????)
    6D 04 - (Item - 捜査手帳)
    76 04 - (Description - \n is a line break and takes whatever is next to the second line) [Like in the above item screenshot [STR+5 DEF+3] seperates the Crossbell line with a \n]


    (91 7B 8D B8 8E E8 92 A0 00) - 捜査手帳
    (8C 78 8E 40 8A AF 82 CC 90 67 95 AA 82 F0 8F D8 96 BE 82 B7 82 E9 81 41 8C 78 8E 40 96 E4 82 AA 93 FC 82 C1 82 BD 8D 95 8A 76 82 CC 8E E8 92 A0 81 42 5C 6E) - 警察官の身分を証明する、警察紋が入った黒革の手帳。\n
    (91 7B 8D B8 8F F3 8B B5 82 CC 8B 4C 98 5E 82 C6 8A 6D 94 46 81 41 82 A8 82 E6 82 D1 8A 65 8E ED 8F EE 95 F1 82 AA 8E 51 8F C6 82 C5 82 AB 82 E9 81 42 00) 捜査状況の記録と確認、および各種情報が参照できる。

    Other files in the text folder have a very close pointer setup but not exact. From a quick breeze through it looks like stuff with a description has the initial pointer and then the follow up pointers.

    Just trying to knock out the easy stuff right now. But have been trying to find the differences in the dialog stuff. For whatever reason, they decided to include duplicates the lines in the game. If I can figure out the differences, might be able to wipe them completely out of the file and use it for expanding the script.

    If I can nail down the exact point the dialog is being read, I can do a search through the files to see if I can find a match.
     
  6. Kelebek

    Kelebek GBAtemp Regular

    Member
    165
    62
    May 25, 2012
    Oh for the basic text yeah those are simple, I meant the scene files, since you were talking about Brandish in the OP, I thought the scene files would be related. For some reason I can't get the script to breakpoint in PPSSPP at all, that's a problem.
     
  7. zero_g_monkey
    OP

    zero_g_monkey GBAtemp Fan

    Member
    332
    203
    Aug 9, 2013
    United States
    PPSSPP just recently began being able to actually run the game. Use to lock up or not even get past the Falcom logo. I wish I could remember how to do programming but a car accident kind of scrambled my ability to remember much. Being to do stuff like breakpoints and all that would be helpful for other stuff I am working on. Right now though, all others have been put on hold till I get to my first roadblock in this game.

    If you wanna do a search for the opening dialog in the game use - 82C782A482BE816381638365834283498148 in file m3000.bin in the scena folder. That is the uncompressed one. It shows up twice in the file. There is some minor differences in the preceding code with it. Will have a look and see which one matters if you edit the dialog later. Got errands to run now.
     
  8. Kelebek

    Kelebek GBAtemp Regular

    Member
    165
    62
    May 25, 2012
    Ah that was it. I had found that file and I was breakpointing on the first string which never hit, but the second one does, thanks for reminding me there's more than 1. :P

    EDIT: Yeah wow, this is a lot more involved than Brandish, a lot more. Lol.
     
  9. zero_g_monkey
    OP

    zero_g_monkey GBAtemp Fan

    Member
    332
    203
    Aug 9, 2013
    United States
    Yeah. It is definitely a lot more involved but considering the age difference between to two I can see why. Should be some good fun messing with this game. In the Garghav saga games, Falcom used a lot of files inside of single files. I have been trying to see if that is what is going on with the dialog stuff. With the other games, you could tell it was a new file inside of it by the TYO header. So far I haven't seen a header but I have been mostly concentrating on getting the "easy" stuff done up first (stuff in the text folder and eboot).
     
  10. NicoBlogs

    NicoBlogs GBAtemp Regular

    Member
    289
    89
    Apr 19, 2013
    United States
    USA
    Wow zero no kiseki i never expected someone to pick this one :gba:
     
  11. Kelebek

    Kelebek GBAtemp Regular

    Member
    165
    62
    May 25, 2012
    The 0x2 opcode is a real killer. It's variable-length and I can't figure out how to get the right length. It always ends with a dword for a jump location (it's a conditional jump I think), but other than that, the length of it varies hardcore. It goes byte and byte and does different things depending on what the byte is, but I can't find any real. 0x1e is always followed by 2 bytes, 0x7/0x8/0x9 are all simple bytes, 0x1 makes it jump out of the loop, and that comes before the dword jump at the end, but not always. Other 0x2 opcodes have no 0x1 byte in at all and just have a bunch of random 0x0s and others just end.

    0x70 is the same deal. Probably more as well. Quite a few opcodes have jump locations in them, so fixing the script files is a really huge task. In terms of needing to go through every opcode, finding all the ones which affect flow control, and fully mapping out the coding and data types for each one.

    Way too big for me, but I wish you luck. \o/
     
  12. MrShyCity

    MrShyCity Member Class Zero - No.00 SHY

    Member
    218
    31
    Sep 13, 2012
    Flip
  13. GHANMI

    GHANMI GBAtemp Advanced Fan

    Member
    966
    491
    Jun 10, 2012
    Really glad someone finally took a stab at those, wishing you good luck. This is quite the massive task you're undertaking.
    The Ancient Lands of Ys forums certainly have people who'd love to help you on this.
    But I wish that, god forbid in case you decide to drop this, that unlike others you'll be open to sharing your work.
    Nayuta no Kiseki is back to case one and it's not even as massive as this one.
    (Really sorry to hear about your accident, hope that the memory loss isn't some permanent serious condition)

    I really recommend also that you make quantity have more priority than quality in this specific case (given the sheer amount of text) if you're the perfectionist type.
     
  14. zero_g_monkey
    OP

    zero_g_monkey GBAtemp Fan

    Member
    332
    203
    Aug 9, 2013
    United States
    I'm gonna try to balance the quantity and quality. Since I am not a programmer, some stuff might be limited to me. But I definitely am gonna make for sure that I stick as close as possible to the original script as possible. These games have wonderful stories and plenty of value when done right. XSEED did a real good job with Trails (though they did leave some really cool orbs out of the game - you can use codes to get them but unfortunately they are buggy as hell and can screw your game up). I do plan on sharing all my work on the games in hopes that maybe somebody can take and use it for possibly the PS3 and PC versions. I don't plan on sharing them for somebody to make a profit off of........ I also feel it to beneficial that sharing the information might persuade others to take a stab at other Falcom games. There are some similarities in the games but also a lot of differences and the more information out there, the better chances we have of maybe catching up to Japan.

    I don't have an account at The Ancient Lands of Ys forums but if you do and want to send those interested parties this way, feel free to.

    As for the accident, it is permanent. Severe blunt force trauma to the head. Note to self, if you ever hear the person driving the car say "Oh blank, we're not gonna make it". Hope you are not in the backseat with 4 cubes of soda. Those things are vicious when flying at the force of impact. Lol.
     
    GHANMI likes this.
  15. GHANMI

    GHANMI GBAtemp Advanced Fan

    Member
    966
    491
    Jun 10, 2012
    Don't count your luck out yet :P You're still alive and kicking (I was involved in a relatively clean car crash before and can't still get over that awful memory, I definitely can relate), and stranger recoveries from severe conditions happened before (the human brain is a mysterious thing indeed). Keeping hope and having your loved ones by your side supporting you can and will help you a lot (I'm not making this up)

    Thanks a lot for the trivia about the first Trails! Didn't expect Xseed of all people to remove content during localization (assuming it's not Falcom's fault). Tried looking it up but didn't come up with anything relevant, do you mind sharing specifics here? (apologies for the off-topic talk)

    You don't need programmers in the sense of someone doing assembly/hacking work on the game, since they are already localization-ready (correct width for English letters, etc). Custom Falcom graphical archive format, and Playstation PMF video formats are already detailed in the Brandish topic.
    The only hindrance is finding someone who could whip up a script extractor/insertor to automate what you already did by hex -really hope you're not using text editors, especially for fragile eboot files and the like-
    And the translation work first and foremost.
     
  16. zero_g_monkey
    OP

    zero_g_monkey GBAtemp Fan

    Member
    332
    203
    Aug 9, 2013
    United States
    Tried to load Trails up in a emu for a quick reference to what I was talking about the missing items. It could be just something that was over looked. Here is the codes I made awhile back for the game. Gotta use real hardware to make them work I believe. Also keep in mind they "will" over write all your inventory. There is something that I missed in the process of making them that caused your inventory to be all jacked up. So don't save after using them. I left some out when I made this because I hate when trash items are left in codes but you can mess around with them if you know how to edit stuff with TempAR via the memory viewer. All the locations are generally bunched together.


    Currently I am trying to figure out to convert my text rips to spreadsheets for uploading to the internet since that seems to be an effective way of getting stuff translated. Any know of a good guide for that? They are a mix of files created in regular old notepad (notepad++ is missing some of the characters) and madedit stuff.
     

    Attached Files:

  17. flame1234

    flame1234 GBAtemp Advanced Fan

    Member
    711
    399
    May 17, 2009
    United States
    If you send me a sample I can try to help with that (putting the text in spreadsheets). Copying/pasting text (with line breaks) directly into a spreadsheet program usually works, copying into one cell per line. If you want something fancier I have word and excel at work and know about macros; I could put something together for you. If you want to look at what we did for our Brandish project, there's links to our online spreadsheet in our thread.

    The other thread I am active in is Brandish the Dark Revenant. I don't want to get too sidetracked here but:
    Tom from XSEED posted that there was interest in localizing that game (Brandish) and our main translator G-Han stopped work on the project because of it (I kept going). Now here, I feel there is a real, actual chance of localization (but not anytime soon - I think mid 2016 is the earliest you'd see it). Because supposedly Trails in the Sky 2 is coming out in a few months. Assuming it's successful, the next game in that series that would be up for localization is this game (Trails 3 would likely be skipped).

    I feel Brandish will never receive an official localization which is why I kept working on the Brandish project. But here it looks like there is an actual chance, even though it's not going to be anytime soon.

    Also I want to ask why you won't release unfinished patches. I released unfinished patches for Brandish (the latest one is unfinished too) because our hackers gave me the tools and maybe people will help with the project if I do so (but it didn't work).
     
  18. zero_g_monkey
    OP

    zero_g_monkey GBAtemp Fan

    Member
    332
    203
    Aug 9, 2013
    United States
    I may have found something that has to do with the pointers for the dialog. I'm having a little trouble figuring out if there is a missing link somewhere. What I have been doing is just trying to make the second dialog (Tio) replace the first one (Lloyd). The pointers (as far as I can guess) are located in the cclm\map4\m3000.pre file. They look something like this 01 00 CC CC "5B 18" 00 00 C0 17 00 and there is a table at the begining of the file that points to this. Maybe somebody can take a look at this and lend a hand. The part in the parenthesis is the pointer for the dialog in the scena\m3000.bin file and cclm\map4\m3000.mc1 (compressed version of previous m3000). Any help with this would be great.

    On a side note I managed to figure out a few of the meaning with the OP codes I believe with the dialog. See screens below.

    \#0001F#11Pどうだ……ティオ?- Text view
    5C 01 01 23 30 30 30 31 46 23 31 31 50 82 C7 82 A4 82 BE 81 63 81 63 83 65 83 42 83 49 81 48 - Hex view

    \ - This is where the pointers mentioned earlier point to. Goes for pointers after this one also.
    #0001F - This is an image for the face. Tested changing it around with others. Works.
    #11P - Dialog box position
    ...then the dialog.

    For the screens I changed the #11P to #12P (I think) and you can see the results.
    Tried see if the position of the #11P might affect the placement of the image but so far haven't made much progress due to about 1 billion distractions. Hopefully this makes sense. Kind of rushed in posting it.
     

    Attached Files:

  19. Kelebek

    Kelebek GBAtemp Regular

    Member
    165
    62
    May 25, 2012
    Ah nice one, had no idea about that file at all. Luckily though, since everything is contained within a single string (a single 5c opcode), including new pages of text, that's likely all that you need to update, since you don't really need to actually add anything.

    You still need to be careful of fixing jump locations though, because they're littered throughout the file. The files seem to have differing numbers of tables too, c0000 has a table at the start which points to map location names at the end of the file, m0000 doesn't have that. I'm still confused by the layout.

    There's a table at the start of the main script which point to various locations in the script. Now, I thought this was a table listing the different events, and it would run through one when that event triggered, but since you pointed out that other file I'm not sure anymore.

    In m3000.bin I believe the main script starts at 0x6f8, and it starts with 17 entries of pointers to places in the script below, which I assumed to be each event. That also matches up with what the game reads as well, the first event in the game (which is at 0x2b77, the second-last entry in the table), ends at 0x30eb.

    I also don't know why events are split up so much. The first event is in m0000, but the next one, which is right through just 2 small areas, is in m0002. Why is it so split up like that? That just leads me to think there's barely any events and dialogue in the game at all.
     
  20. flame1234

    flame1234 GBAtemp Advanced Fan

    Member
    711
    399
    May 17, 2009
    United States
    I'm no hacker but I'll do my best to help.

    I figured out something about m3000.pre
    Those pointers seem to be 12 bytes long each. Or 10 bytes long each with two zero bytes of padding at the end.
    The entry in the pre files at 0x0C tells you where the table entry ends and the list of pointers begin.
    The pointer to the first pointer in the pre file is at 0x20 bytes (in files with dialog).
    -Confirmed using m3000.pre and m3002.pre. m3001.pre is an interesting case as there's no dialog in m3001.bin, so the pointer that 0x20 points to doesn't follow the standard format for a dialog pointer.
    In the header, the description of the first block always starts at 0x14 (in .pre files with dialog in them; in m3001.pre the entry at 0x14 is all zeros).
    Each block description is always 16 bytes long.
    I can't figure out the first two DWORDs of the block description. The third DWORD says how many 12-byte pointers are in that block. The fourth DWORD says the address of the first pointer in the block.

    About the pointers themselves:
    That CCCC code (3rd and 4th bytes of each pointer) seem like they're a dead giveaway for dialog pointers. But I don't really know.
     
Thread Status:
Not open for further replies.