Hacking Legend of Heroes Translation

Status
Not open for further replies.

flame1234

Well-Known Member
Member
Joined
May 17, 2009
Messages
734
Trophies
0
XP
957
Country
United States
Nayuta is WAY more obvious in every script-related aspect.
Zero uses a code to specify the next scena file (I'm sure, because I would have seen it by now). No idea about the codes or which opcode they're in.
Nayuta doesn't do that. Instead, it specifies in plain text the next scena file. Check it out:
5i5CBU4.png

Even if you don't know a lot about rom hacking, you could probably figure out that, at this point in the script, it is going to load scena file mp_0004, and then jump to event label: EV_0_S03_alto_home.

ZnK is nowhere near that obvious. You're probably going to see a file number (rather than name) and you're going to see a function number (rather than name).
 
  • Like
Reactions: GHANMI

GHANMI

Well-Known Member
Member
Joined
Jun 10, 2012
Messages
969
Trophies
0
XP
914
Country
Nayuta is WAY more obvious in every script-related aspect.


I see you're working on the uncompressed file (which I tried to modify without any changes reflecting in the rebuilt-iso in-game).
How did you do to modify Nayuta no Kiseki? I know it's a very stupid (and late) question to ask at this point :P
 

flame1234

Well-Known Member
Member
Joined
May 17, 2009
Messages
734
Trophies
0
XP
957
Country
United States
Use the Falcom trick. That's all.
For Nayuta, it's in \USRDIR\pack\map
From there pick the file you'd like to work on, like mp0004.mpp.
Delete the entry (32 bytes) for mp0004.bin, re-insert, and the game is programmed to use the uncompressed versions if the compressed ones don't work.
 
  • Like
Reactions: GHANMI

zero_g_monkey

Well-Known Member
OP
Member
Joined
Aug 9, 2013
Messages
332
Trophies
0
Age
44
XP
321
Country
United States
Yep. The Falcom trick works on most games from them... except Ys vs Sora no Kiseki. It doesn't require it. And if you wanna edit dialog in the game, it is the bin format files with text.
 
  • Like
Reactions: GHANMI

zero_g_monkey

Well-Known Member
OP
Member
Joined
Aug 9, 2013
Messages
332
Trophies
0
Age
44
XP
321
Country
United States
Tomorrow (later today after I go to bed and wake up), I will be posting 10 dialog files in a spreadsheet. They will be completely random and may be difficult to translate. They will not have any kind of notes about context. Basically to those who are translating them, just go by what is being said at that exact moment. All I am asking for is a rough translation for now. After they are done. Hopefully we will be ready to insert for a playthrough to get a better idea of context.
 

zero_g_monkey

Well-Known Member
OP
Member
Joined
Aug 9, 2013
Messages
332
Trophies
0
Age
44
XP
321
Country
United States
Well I did it. I lied. Instead of 10 pages of dialog... I think I uploaded 21. Go to the first post and it is under DECEMBER BATCH in the 2nd spoiler tag. I left some notes on the first page. Have at it. I think we got lucky. I do believe some of the files are actually related. Also, if you have any questions about context, post here or over at the Legend of Heroes forum. Link is in my signature. Have at it. I am gonna go back to what I do best and that is butchering files to make really cool stuff. :P
 

zero_g_monkey

Well-Known Member
OP
Member
Joined
Aug 9, 2013
Messages
332
Trophies
0
Age
44
XP
321
Country
United States
So I am looking into make a python tool to help with a simple little task... I mean really, I don't mind do it manually, but it can get real time consuming to keep doing the same thing over and over. I am looking for some advice on how to approach it. What I need is something that will modify certain hex in a file changing them from 00 to FF or vice versa. It is for editing the bmp files that I work on in photoshop just adjusting whether or not there is transparency. The file uses 256 colors so it would need to modify 256 hex. Would it be better to list all the addresses or do something that goes like this skip skip skip change (the skip skip skip being the color hex and the change being the transparency code). And then finally stop at the exact same spot every time. A pseudo code would be a cool start (try not to be to complex and use plenty of notes - still trying to learn to make my own programs).
 

flame1234

Well-Known Member
Member
Joined
May 17, 2009
Messages
734
Trophies
0
XP
957
Country
United States
If you need to change the nth byte of your file:
filedata = filedata[:n] + (whatever you want the nth byte to be) + filedata[n+1:]
Is one way of doing it.
Just keep doing that and you can replace all the bytes in a file.

filedata -> some string. That it contains your file data is irrelevant.
filedata[:n] -> all of the characters of the string up to, but not including n
filedata[n+1:] -> all of the characters of the string from n+1 up to the end of the string

If you want to change a long sequence, just modify as needed to to that.

It will behave strangely if n is outside the length of your string, so don't do that.


That's the "slice notation" you need to learn. Play around with it at the Python shell prompt.
--------------------

I looked on StackExchange and didn't see an example of Python string replacement (for very general cases). Instead the advice was, "Make your own!"
I did so. You can find the function "replacestr" that I wrote in many of the insertion tools. The book one at the top of the first post has it. There are notes there about it. In case you couldn't guess, it replaces a string :)

------------------
Also try at the shell prompt:
'x'*10
It might be useful to you.
 

Kelebek

Well-Known Member
Member
Joined
May 25, 2012
Messages
165
Trophies
0
XP
156
Country
So I am looking into make a python tool to help with a simple little task... I mean really, I don't mind do it manually, but it can get real time consuming to keep doing the same thing over and over. I am looking for some advice on how to approach it. What I need is something that will modify certain hex in a file changing them from 00 to FF or vice versa. It is for editing the bmp files that I work on in photoshop just adjusting whether or not there is transparency. The file uses 256 colors so it would need to modify 256 hex. Would it be better to list all the addresses or do something that goes like this skip skip skip change (the skip skip skip being the color hex and the change being the transparency code). And then finally stop at the exact same spot every time. A pseudo code would be a cool start (try not to be to complex and use plenty of notes - still trying to learn to make my own programs).

This should do. I hope you don't need comments here, it's very simple and small:

Code:
import sys,struct
 
filedata = bytearray(open(sys.argv[1],'rb').read())
imgstart = struct.unpack('<I',filedata[0xa:0xe])[0]
 
for i in xrange(imgstart+0x3,len(filedata),0x4):
    filedata[i] = 0xff - filedata[i]
 
outfile = open(sys.argv[1],'wb')
outfile.write(filedata)
outfile.close()

Although, that changes every transparency byte in a file. Maybe I misunderstood, and you only want to change a small part of a BMP, I'm not sure. But if you're only aiming to change a small part of a BMP, surely you'd just do that in an image editing program anyway?
 

zero_g_monkey

Well-Known Member
OP
Member
Joined
Aug 9, 2013
Messages
332
Trophies
0
Age
44
XP
321
Country
United States
または“CP0&瀕死”
Or "CP0 & Near Death"

This is the translation for this. Question, is it saying your CP is 0 and near death? Just trying to work on some stuff (FINALLY Right). LOL!

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

Thanks for the code stuff guys. Will look at it when I get done with what I am doing. Don't want to lose my train of thought. It has been derailed many times trying to make sense of the files I am working with and my mother calling to tell me about these little babies (we had hoped had died due to something like carbon monoxide poisoning) only to find out the boyfriend beat them to death. That kind of stuff rattles your brain some.
 

zero_g_monkey

Well-Known Member
OP
Member
Joined
Aug 9, 2013
Messages
332
Trophies
0
Age
44
XP
321
Country
United States
Flame-
Those font size and color codes. They only work on certain files don't they or is there something special I need to do. Been checking them out in the books stuff to see how they look so that maybe I could get them to work in another file. So far I am having no luck.
 

zero_g_monkey

Well-Known Member
OP
Member
Joined
Aug 9, 2013
Messages
332
Trophies
0
Age
44
XP
321
Country
United States
I was trying to see if I could do something with the t_cook file. It doesn't seem to be working. But now there is a bigger problem. Just spent a few hours working on that file and not the insertion tool seems to remove all my spaces. Now sure if I really screwed up when I did some clean-up work (i.e. took out the breakpoints for space because it was confusing the piss out of me) but I kept it clean and made a nice looking file with the linebreak and terminalcodes still in place. Normally I wouldn't be uploading a file here but I'm in a hurry to finish up for the night and don't wanna look for a file host. I'm uploading the data format file that I am hopefully finished with. I tried nulling out the space command and switching the if / elif to pretend it didn't exist. But no luck. See if you can get it working if you don't mind.
 

Attachments

  • t_cook.zip
    865 bytes · Views: 169

flame1234

Well-Known Member
Member
Joined
May 17, 2009
Messages
734
Trophies
0
XP
957
Country
United States
Well if you look at the original file, it uses the space character for linebreaking...or something.
Have a look at the original file.
Because it means something to the game, it means something to the insertion tool...or something. Basically it deletes your spaces because it will mess up the game.

The link to the current code is here: http://pastebin.com/wpS44pZQ
Line 45 is deleting your spaces...on purpose. You can read about Python's string.translate for more details.

Try replacing your space character with some other non-printing character. Try 0x7F. See what happens.

I think the insertion tool for that file can't handle insertion of non-printing characters. Try modifying it so that it does. I think you can use Python's string.translate to get the job done, basically because that's what it's expressly for. The basic idea will be to take spaces in the input and replace them with some non-printing character. You shouldn't need to modify the sourcefiles at all.
 

zero_g_monkey

Well-Known Member
OP
Member
Joined
Aug 9, 2013
Messages
332
Trophies
0
Age
44
XP
321
Country
United States
Just stuck \xFF in the little hole in line 45 and that took care of the problem. Somehow I missed that when messing the with py file. Thanks for pointing that out.
 

zero_g_monkey

Well-Known Member
OP
Member
Joined
Aug 9, 2013
Messages
332
Trophies
0
Age
44
XP
321
Country
United States
The space stuff was just formatting and had no meaning other than that. I ended up removing all of it because I needed the space and it all turned out well. Here is a sloppy example (by sloppy, I mean no other files needed to make this completely english have been used and this is basically a test kind of thing). I hated changing "cancel" to "fix" but even if I used something like "heal" or "cure", some of the text would be off the side of the screen. Doing some tests to try and figure out a possible solution to the "star" issue. Gonna need them but they don't appear in the font that get used when just western characters are used. I have considered taking a x8140 on the end of lines to say "Hey, use the pspfont.dat instead of the sfont.itp". Reason I mention this, is because though very similar, the difference in the way the fonts appear from the two files is extremely noticeable. The pspfont.dat stuff is thinner and the sfont.itp stuff has a more bold look (See second shot - Top circle -> pspfont / bottom circle -> sfont). It may not look bad to some, but after looking at this for hours and hours. You see the difference.

NPJH50311_00001.jpg


NPJH50311_00002.png
 
  • 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
Need a quick image translation to answer a question... Here is an image of some memories in the game. Part of the visuals extras. Instead of a generic (actual translation of what is said), I was thinking that maybe there is some real information here that I may be do something nice with the translation description. Basically KeA says in the original "View [Memory 1]?, but I would prefer to maybe do something like "View [Memory - Sitting on the table... playing tiddly winks]?. And if there is some real info in this text, I could add that to the image you see in the game with little to no trouble. Make sense? Does the text describe the scene (memory)? Because there are a few more things like this, 12 total. Also gonna try to track down information about the other visuals and give them a better description than a generic one (the actual translation).

pictures for text.png


text.png




----------------------------------------------------------------------
EDITED PART

Here is the names of the scenery in the visuals.

scenery.png
 
  • Like
Reactions: Hargrun

Guren no heya kara

Well-Known Member
Newcomer
Joined
Jul 8, 2014
Messages
53
Trophies
0
XP
127
Country
Italy
Here:

Lloyd's Past Graphic
(1) Guy and Lloyd lived in a room of the Bellheim, an apartment located in West Street.
Cecil's family lived next door and they were close with all of them.
(2) A thirteen years old Lloyd surprised by Guy who suddenly said he was going to
the Remiferia Dukedom for a while.


- Old Path Country
- Rural Flower Bed
- Estuary Ruins
- Graveyard
- Mountain Path Waterfall
- Railway
- Tower of Stargaze
- Temple of Moon
- Ancient Battlefield Ruins
 
  • 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
Thanks a bunch Guren. Did I grant your Christmas wish for more stuff to translate? Because I can add some more. LOL! Seriously. To all those working on the scripts. THANK YOU.



Now I am gonna go work on updating the first post.
 

Guren no heya kara

Well-Known Member
Newcomer
Joined
Jul 8, 2014
Messages
53
Trophies
0
XP
127
Country
Italy
I had in mind a different kind of present for Christmas, but I'll take what I can get...:P
You should post that new link even in the forum, so if Korori and Cinnamon don't see it here they can know where to go and help.
 
Status
Not open for further replies.

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: Nut on the hill