Gaming The Last Ranker Null char

  • Thread starter K.F
  • Start date
  • Views 3,120
  • Replies 18
  • Likes 1

K.F

Member
OP
Newcomer
Joined
Jan 10, 2015
Messages
7
Trophies
0
Age
36
XP
42
Country
Saudi Arabia
Hello everyone.

I am working on translating the Last Ranker, a PSP game. The game text is already translated by "Englishsubs4all", and I already found and extracted the text files and manually translated the intro and the tutorial and they work well. Now I am planning on writing a tool for the translation, but I am having trouble with the null character. The files are in utf-8 format and as with most PSP games, all strings are tailed by a null character. My problem is that when I shift the null character to make a string shorter while the adjacent string longer - the file size stay the same- the game does not allow that and it crashes when the shifted null string is reached to be displayed.

Is there a way to shift the null character to lengthen a string size that needs more space by reducing the other that doesn't? I can continue writing a tool that deals with constant size strings, but that would be a pain to change the translation just because the string is too small.

When I add a null in the middle of the string, the game display the first half the string, then jumps to the next string skipping the other half without crashing which rules out that game is using either using string length and displaying strings sequentially. It was suggested to me that the game may use offset for strings, but I cannot find their locations.

a sample of the files can be found here:

http://wikisend.com/download/169400/MAP_T_KAN_00
 
  • Like
Reactions: Majima

K.F

Member
OP
Newcomer
Joined
Jan 10, 2015
Messages
7
Trophies
0
Age
36
XP
42
Country
Saudi Arabia
The past last Ranker translation threads are in here, so I put mine here too.

Mods can put it where it belongs.
 

K.F

Member
OP
Newcomer
Joined
Jan 10, 2015
Messages
7
Trophies
0
Age
36
XP
42
Country
Saudi Arabia
Not sure if you are asking about extracting the text files or extracting the text itself from the files. If you are asking about the former, the files are at "USRDIR\GAMEDATA\FLD\MAP", they are .BIN files compressed using GZIP so you can simply extract them with 7zip, modify them and compress them again with 7zip using GZIP format.

If you are asking about extracting the text itself, then that is my next objective. I haven't done anything yet until I can solve this problem that I created this thread for. For the intro, as I said, I edited the file manually. I can proceed with constant length strings, but I prefer not to.
 

StorMyu

"I'm way too old for this"
Member
Joined
Jan 2, 2010
Messages
943
Trophies
1
Age
97
XP
1,093
Country
France
Ok I wanted to be sure, I do know everything about that already, just wanted to ask if you knew what a pointer was since apparently you're asking about the NULL character which is irrelevant.
 

K.F

Member
OP
Newcomer
Joined
Jan 10, 2015
Messages
7
Trophies
0
Age
36
XP
42
Country
Saudi Arabia
NULL character which is irrelevant.

Why does the game crashes when I shift a null location then?

When I started, I thought -hoped?- that the game displayed strings sequentially with nulls indicating a string end, but after some tests, it is obviously not the case.

As I said, I can't find where the offsets are, nor how they are stored, or even if the games uses them in the first place.

just wanted to ask if you knew what a pointer was

I am not a professional programmer, but I know the basics. So yeah, I know what a pointer is.

Most of my programming background is for small engineering programs, so I haven't worked with a lot of strings or pointers before.
 

Scorp

Well-Known Member
Member
Joined
Sep 23, 2010
Messages
248
Trophies
0
XP
296
Country
Kazakhstan
Basically this means, that there is a list of offsets somewhere, pointing to the beginning of each line. So in order to edit that freely you must find that and correct for every phrase. Usually you write a small script which would extract that text into some CSV or Excel and after that make another script which will assemble all back. All you need is find the format. I am novice in this too, so it is just a guess.
 

K.F

Member
OP
Newcomer
Joined
Jan 10, 2015
Messages
7
Trophies
0
Age
36
XP
42
Country
Saudi Arabia
Yes, this is my understanding too. All what I need to do this is to find these offsets, and I have no Idea how, assuming that is how it works in the first place. Again, this is not necessary to finish the translation, but it would help ALOT and save us so much hassle.
 

StorMyu

"I'm way too old for this"
Member
Joined
Jan 2, 2010
Messages
943
Trophies
1
Age
97
XP
1,093
Country
France
Just wanted to say, I was about to do it too, then give that project to some people who lost interest, then Englishsubs4all did the translation so I might look at it again but it's not as simple as looking at the text and changing it, especially with that game. I have to change the way the game buffer the text too, I remember it being a dick and not drawing after like ~11 chars per line.

If it was that simple, believe me it would have been already done, by me. I like that game !
 

K.F

Member
OP
Newcomer
Joined
Jan 10, 2015
Messages
7
Trophies
0
Age
36
XP
42
Country
Saudi Arabia
Thanks for the heads up. I already translated the intro section and tutorial and it is working for me. Of course that doesn't mean that there will be no problems for the rest of the game, and i'm not giving any promises other than that I will try.
 

StorMyu

"I'm way too old for this"
Member
Joined
Jan 2, 2010
Messages
943
Trophies
1
Age
97
XP
1,093
Country
France
That was my question, how did you translated the intro without any text extraction ? Hex editing ? That's just sounds messy to me.
 

K.F

Member
OP
Newcomer
Joined
Jan 10, 2015
Messages
7
Trophies
0
Age
36
XP
42
Country
Saudi Arabia
Yes, and of course it's messy, I just did it as a proof of concept. Now that I know it works without problems, I can write a tool to extract the text.
 

macaronron

Well-Known Member
Newcomer
Joined
Oct 24, 2013
Messages
94
Trophies
1
XP
237
Country
United States
My recommendation: If you figure out your end, get yourself a decent translation checker. Englishsubs4all admits that there may be gratuitous errors in their translation; hopefully having a fully extracted script to check against compared that giant playlist of videos will encourage someone to check for mistakes and fix them.
 

Verard

Member
Newcomer
Joined
Oct 3, 2014
Messages
9
Trophies
0
XP
66
Country
Italy
I'm rooting for her , after all I asked the game XD I have not unfortunately able to help you , but you have all my support u.u
 

Scorp

Well-Known Member
Member
Joined
Sep 23, 2010
Messages
248
Trophies
0
XP
296
Country
Kazakhstan
Just wanted to say, I was about to do it too, then give that project to some people who lost interest, then Englishsubs4all did the translation so I might look at it again but it's not as simple as looking at the text and changing it, especially with that game. I have to change the way the game buffer the text too, I remember it being a dick and not drawing after like ~11 chars per line.

If it was that simple, believe me it would have been already done, by me. I like that game !

Does it really that hard? From what you told all looks quite simple... Normal format for text. normal lookup tables... Find the limiter is not hard too, by me...
 

Scorp

Well-Known Member
Member
Joined
Sep 23, 2010
Messages
248
Trophies
0
XP
296
Country
Kazakhstan
Yes, this is my understanding too. All what I need to do this is to find these offsets, and I have no Idea how, assuming that is how it works in the first place. Again, this is not necessary to finish the translation, but it would help ALOT and save us so much hassle.

If I were you (lol :)), I would just go in debugger, find the address in the memory with text, put a breakpoint on read there, and after check how the routine where you fall back works... MIPS assembler is the dumbest thing I ever saw (comparing with PC or even Z80), this could save you some time in understand it (as there is really 10 different operationgs in max), but as all got compiled from C++, it not straightforward at all to understand what human logic was behind that assembler code...

I think it only on my small experience (I digged max 2 games), so I could be wrong.
 

StorMyu

"I'm way too old for this"
Member
Joined
Jan 2, 2010
Messages
943
Trophies
1
Age
97
XP
1,093
Country
France
Does it really that hard? From what you told all looks quite simple... Normal format for text. normal lookup tables... Find the limiter is not hard too, by me...
could be simple, could be not, I've just handed over the project to someone some time ago and they didn't finish the job, I guess I could try to look at it again one day...
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    AncientBoi @ AncientBoi: Que dices?