Hacking Legend of Heroes Translation

Status
Not open for further replies.

zero_g_monkey

Well-Known Member
OP
Member
Joined
Aug 9, 2013
Messages
332
Trophies
0
Age
44
XP
321
Country
United States
There is monster data in:
\data\monsnote\monsnote.dt2
\data\battle\dat\mn#####.dat (##### = 5 numbers, a bunch of files like this in this folder)

The reference entries for the Falcom trick (*.dat files) are in:
\data\cclm\battle\btasm1.bcc

After stepping through the program, it looks like there are no pointers for the .dat files (still not sure about monsnote). It's an "opcodes" type of format.
The subroutine that reads the .dat files is at 0x888247C. It looks like it is is incrementing s2 and then moving data a bunch of times.
Like for example, at 0x8892BF4, it will skip that whole block if the byte is zero (and just increment s2 by 1). But if it's not zero, it will do the block, and then jump 0x18 spaces forward at 0x8892C68 towards the end of the block.
And by the way, it copies the *.dat data to 0x9E34000 and then works on it with the subroutine. It does so with each *.dat file that's applicable to the battle you are entering.

To solve, rather than try to decode the whole .dat file format, I think I will just try to extract the text and its position from the .dat files and then just insert the translations at those positions. When the program gets to the text parts, they have length-measuring stuff in there, so it should probably work. I looks like space could be a problem for monster ability names, so we'll have to try some substitute characters to see how they work. Does this seem like an OK solution?

Still not sure about monsnote though. Zero G gave me this:
http://i58.tinypic.com/wv1f0p.png
There don't appear to be any pointers in monsnote.dt2. There must be pointers for this somewhere because it is such a big file. I will need to step through the code that reads the monsnote file to see what's going on.
--------------
For the cooking file, you serendipitously discovered that, for the cooking file:
-Spaces are deleted
-Comma + space = Space
So you can edit the translations to reflect that if you like (to make spaces wherever you would like), by find replacing " " (space) with ", " (comma + space). It also means we can't have any commas in this file. Bummer. Not a big deal - they are not really necessary for this file. As a test run, you could try two commas in a row to see if that will coax the comma into showing up.

That screenshot is just basically showing how the BIG file with all the data for monsters is set up. The red box is a reference to the image file and the single file used for the information when you look at the monster during battle. Kind of a way to know which file it is you are looking for in case you want to decrypt the image and to make sure your information matches in the big file with the singles. The monsnote file is for the notebook and it has the exact same information as the singles with a few extra bits of data. You can literally do a copy/paste search from the singles to find the data in the monsnote file. There probably is some pointers for all this stuff... but like all things FALCOM, who knows where it is right this second. I haven't made that far into looking. I really want to get this VWF done so I can put the finishing touches on the stuff we have translated. I already have a plan for getting that stuff just right. I hate overlapped edges in my text.
 

Blazer

Well-Known Member
Member
Joined
Aug 10, 2008
Messages
281
Trophies
0
XP
470
Country
United States
As I probably said before, I wish I could help but sadly I can't (no idea what that compression shown in a hex editor before was, and not familiar with image conversion in this context at all >_>), but I just wanted to remind you plenty of people are paying attention to this and are looking forward to this, so thanks for all the hard work! We don't expect anything from you guys since you're doing it for free but if you do manage to complete this, it would certainly be amazing.

Best of luck :)
 
  • Like
Reactions: Pablitox

flame1234

Well-Known Member
Member
Joined
May 17, 2009
Messages
734
Trophies
0
XP
957
Country
United States
I don't know anything about graphics programming. Where do I start looking? Is there an example of a graphics hack somewhere (re: image file format)?
 

zero_g_monkey

Well-Known Member
OP
Member
Joined
Aug 9, 2013
Messages
332
Trophies
0
Age
44
XP
321
Country
United States
NPJH50311_00024.jpg

NPJH50311_00025.jpg

NPJH50311_00026.jpg




Photoshop :) - Me HAPPY!!!!!

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

In case this may not make sense to others. I have a ton of files that look like this that require a bunch of text replacement. Not only do I have to clean the files up, but I also was originally gonna have to pixel by pixel insert the dialogs. Real long process. The program I normally use for image editing has absolutely no text insertion support. Can't even copy and paste it in.

I have been talking with JamRules off and on about image conversion for a few weeks now. I'm not entirely sure what happened to get this figured out but I will credit a lot of it to his help in just offering insight and suggestions. Thanks.

So here was the problem. Normally the original file has a BM6 and a bunch of FFs in the header. Well Photoshop changed the header to BM8 and replaced the FFs with 00s. After a dirty copy and paste though, using Photoshop is now a possibilty.......


......unless something else stupid comes up. LOL!













And it usually does!
 
  • Like
Reactions: GHANMI and JamRules

flame1234

Well-Known Member
Member
Joined
May 17, 2009
Messages
734
Trophies
0
XP
957
Country
United States
Results of the above effort...
http://imgur.com/a/GBuEm
Note: "Dissonance" is an enemy skill. The player skills were already working.
Some editing required!

You should start seeing more English and less Japanese in these progress posts. The truth is, most of the text you see during the gameplay sections comes from the eboot, which we have mostly finished.
 

zero_g_monkey

Well-Known Member
OP
Member
Joined
Aug 9, 2013
Messages
332
Trophies
0
Age
44
XP
321
Country
United States
Got the inserter figured out. Nice. I was really distracted today and really meant to get to helping format that stuff. Then I got sidetracked with the VWF and editing those images. Thankfully with a little clean up work and some nice copy paste texting. Those are gonna be a WHOLE lot easier.



...and to second Flame's comment. More english stuff from now on. These are just dirty shots of quick builds. If I would quit screwing around with the eboot.... it would be finally (once and for all) done. I keep coming up with crazy ideas and such. Like whole text block relocation or mapping out a bunch of junk. :P

Night all. It's 3:35 am and I'm tired.
 
  • Like
Reactions: Star-scream

zero_g_monkey

Well-Known Member
OP
Member
Joined
Aug 9, 2013
Messages
332
Trophies
0
Age
44
XP
321
Country
United States
SCRATCH THIS SHOT. I AM GONNA USE ANOTHER FONT... But you get the basic idea of it.

25yykut.jpg


Not my personal favorite for fonts I chose. May end up changing it. But can definitely be done with a whole lot more ease with Photoshop.
 
  • Like
Reactions: Hargrun

zero_g_monkey

Well-Known Member
OP
Member
Joined
Aug 9, 2013
Messages
332
Trophies
0
Age
44
XP
321
Country
United States
Here it is beginning to load some text. Using a mostly clean build. It seems the game loads multiple textures at one time to my untrained eye. I could be wrong though. It goes through a 3 click cycle (clicking step prim) and then it starts the next batch of textures for letters. I posted 3 shots (1 cycle).
Trying to search out the texture routine so that a VWF could possibly be added in. When I was trying to use the english game file (this is the opening save dialog crap screen), the textures didn't appear normally but acted like they did. In the game though, they show just fine. It is a completely different font for the english characters (sfont.itp file in data/system folder). I suspect the rest of the time, the game is using another text file, there is a few of them in the same folder. It could either be PSPFONT.dat or something else. I just know it is 16x512 px (and there is a few different ones) with the same specs in size that load at different addresses.

clean 1.png
clean 2.png
clean 3.png



I am just wondering if I am headed in the right direction to locating the routine so that maybe I can finish the little hurdle to move on to the other goodies.... (that already are done and waiting on me to edit and insert),
 

zero_g_monkey

Well-Known Member
OP
Member
Joined
Aug 9, 2013
Messages
332
Trophies
0
Age
44
XP
321
Country
United States
That is what I am thinking. I took at SOL TRIGGER since I had it handy and the way it loads is completely different. It does go 1 by 1. Since the game is using textures for everything, would it matter what I was looking at when trying to narrow down how it loads? The monster information screen from the battles, loads some singles when using the prim. Blasted FALCOM. Takes me back to the days of ENIX and the NES?SNES era encryption....
 

JamRules

.....
Member
Joined
Jan 9, 2014
Messages
527
Trophies
1
XP
2,204
Country
United States
You might want to test with the english text since you said it uses a different font it may render differently. Its possible that it is creating the texture at runtime but what's confusing me is the texture is 16x512 not 512x16, it could be auto-wraping but if so I have no idea how you would add vwf
 

flame1234

Well-Known Member
Member
Joined
May 17, 2009
Messages
734
Trophies
0
XP
957
Country
United States
Its funny you guys are doing this work, because Falcom, hired by XSEED to do programming for Trails in the Sky (USA ver.), didn't even do it (didn't add the VWF to the game).
Of course the localized Windows version of Trails does have VWF. It was added by the programmer XSEED hired directly (not Falcom).
 

Diag

Well-Known Member
Member
Joined
Feb 25, 2014
Messages
149
Trophies
0
Age
38
XP
316
Country
Gambia, The
xseed should hire you guys for this translation :D i just loaded the evolution demos and they look so awesome :/ if you really should complete this translation, i hope xseed will use it for zero no kiseki evolution and give you some credit, because i dont think they will be faster regarding how long trails 2 takes:/
 

JamRules

.....
Member
Joined
Jan 9, 2014
Messages
527
Trophies
1
XP
2,204
Country
United States
It seems like it could require a lot of effort to get vwf working since it might be necessary to make the letters draw one at a time
 

zero_g_monkey

Well-Known Member
OP
Member
Joined
Aug 9, 2013
Messages
332
Trophies
0
Age
44
XP
321
Country
United States
Here is a tech patch. It serves no purpose to anybody unless you are helping in the technical aspects of the game. I can't stop you from downloading it, but don't complain if it breaks your game. I warned you. :P


Hopefully this will be a working patch since I never used xdelta before for creating them. If it doesn't work, let me know and I will try to get on it. This is so that anybody helping with programming can have the exact same version I am working with.
 

Attachments

  • ZeroTechPatch.zip
    1.5 MB · Views: 144

zero_g_monkey

Well-Known Member
OP
Member
Joined
Aug 9, 2013
Messages
332
Trophies
0
Age
44
XP
321
Country
United States
If I set a breakpoint for the address x90ecfe6 and then try to talk to people, it hits. Turn it off and game back to normal. But this is so far the only time it hits is when you begin to talk to somebody.


I keep seeing this thing that says 04060010: DrawPrim type 6: RECTANGLES count: 16 vaddr= 09045c80 and sometimes the RECTANGLES is something like triangle or other stuff. Also the count number changes anywhere from 0 to up in the hundreds. What kind of significance is there to this? I understand that this is telling the game what kind of textures to do, but show this be something to keep track of? When looking at the text, it is always rectangles that I have seen so far.

Sadly it looks like the game loads the dialog in blocks. Trying to figure out if there is a pattern to it or if it is completely random. Just checked another spot of dialog and the breakpoint address didn't hit. Competely different part of the game though.

The vaddr I should be looking at. Does it come right before the line that gets highlighted when doing prim steps to get the stuff to appear or is it after it further down the line?
 

JamRules

.....
Member
Joined
Jan 9, 2014
Messages
527
Trophies
1
XP
2,204
Country
United States
DrawPrim is used to well draw a primative, all of the game's models should be using triangle which is why you have very high counts.
I've actually never used rectangle mode before, its been deprecated for years.

Can you tell if the texture looks like the actual text that is drawn? It looks like it the letters are stacked on top of each other. SetVertexType looked interesting but I'm not sure what it does. My guess is that this is what sets the UVs for each letter.

The vaddr to look at is on the line, like in your example
04060010: DrawPrim type 6: RECTANGLES count: 16 vaddr= 09045c80
the vertices would be at 09045c80. Normally you could work backwards on the x and adjust the spacing, but in your case this isn't possible. If the letters are indeed stacked I have a feeling the only way you could add vwf is to rewrite it so each letter is rendered separately.
 

zero_g_monkey

Well-Known Member
OP
Member
Joined
Aug 9, 2013
Messages
332
Trophies
0
Age
44
XP
321
Country
United States
You see how that big red box is in the screens I posted. Basically what I would do is 1) hit prim 2) hit prim again (second shot) 3) hit prim again for the text to show up.

I have seen triangles (graphics mostly), points and rectangles in the drawprim stuff. For text the mostly follow that example of a drawprim I posted.
 

JamRules

.....
Member
Joined
Jan 9, 2014
Messages
527
Trophies
1
XP
2,204
Country
United States
You see how that big red box is in the screens I posted. Basically what I would do is 1) hit prim 2) hit prim again (second shot) 3) hit prim again for the text to show up.

I have seen triangles (graphics mostly), points and rectangles in the drawprim stuff. For text the mostly follow that example of a drawprim I posted.

I assume Points will be for particle effects.
And yeah I know how to do it, just the text is white on a checkered background and difficult to see.
 

GHANMI

Well-Known Member
Member
Joined
Jun 10, 2012
Messages
969
Trophies
0
XP
914
Country
SCRATCH THIS SHOT. I AM GONNA USE ANOTHER FONT... But you get the basic idea of it.

25yykut.jpg


Not my personal favorite for fonts I chose. May end up changing it. But can definitely be done with a whole lot more ease with Photoshop.


I really recommend using a bitmap pixel font for this one, or something that looks better at small sizes.
 
Status
Not open for further replies.

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • A @ anotherthing:
    Online was free on the 3DS as well, and it worked well.
    +1
  • S @ salazarcosplay:
    I can't help but think nintendo switch online is the reason we did not get a gameboy/n64/gamecube
    mini classic edition
    +1
  • Xdqwerty @ Xdqwerty:
    @salazarcosplay, i think it would have been impossible to see anything in a gameboy mini
  • S @ salazarcosplay:
    well I meant that as a figure of speech
  • S @ salazarcosplay:
    they could just rerelease a modern gameboy
  • S @ salazarcosplay:
    like the pocket analogue
  • S @ salazarcosplay:
    but nintendo licensed
  • LeoTCK @ LeoTCK:
    dammit that thread got moved from offtopic to edge, well since that happened
  • Xdqwerty @ Xdqwerty:
    @LeoTCK, atleast it's still avaliable
  • LeoTCK @ LeoTCK:
    yes but it wasn't meant to be a comedy thread
  • LeoTCK @ LeoTCK:
    and edge of the forum is mostly comedy and games
  • LeoTCK @ LeoTCK:
    so I don't get why it got moved at all
  • Xdqwerty @ Xdqwerty:
    @LeoTCK, mods are probably hating you
  • LeoTCK @ LeoTCK:
    on most sites mods hated me, sooner or later, but usually over time I get either banned or the mods get used to me
  • LeoTCK @ LeoTCK:
    sometimes to the point of thanking me for my quick actions etc against spam and other stuff, but yea...its either they come to respect me or outright hate me
    +1
  • BigOnYa @ BigOnYa:
    If it's not game related, it will be moved to the Egde of the forum. Mods have moved a few of my threads also.
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, it was in the off topic chat forum
  • BigOnYa @ BigOnYa:
    Well atleast they didn't delete it completely.
  • LeoTCK @ LeoTCK:
    hmm
  • Xdqwerty @ Xdqwerty:
    uoiea
  • LeoTCK @ LeoTCK:
    huh?
  • Xdqwerty @ Xdqwerty:
    Aeiou backwards
    Xdqwerty @ Xdqwerty: Aeiou backwards