News:

11 March 2016 - Forum Rules

Main Menu

Tekken 4 text editing problem

Started by Szemigi, March 17, 2019, 01:31:00 PM

Previous topic - Next topic

Szemigi

Can somebody help me?

Whenever I edited a text in the game in a hex editor (PERFECT, K.O., etc.), I entered arcade mode as an example and the announcer said "WELCOME TO THE KING OF IRONFIST TOURNAMENT 4", but the select screen didn't appear. Instead, a blank screen appeared and the game didn't do anything.


Why did this happen?   

FAST6191

So the game crashed.

Three main choices I would go with at first.

1) The game does not allow modification. Usually means they will not boot but some go for more subtle approaches. Simple test here is find the text in the game. Find a word in it more than 4 characters long. Copy one of the middle characters in a word right in the hex window to the character before it (assuming it is a different character, idea being that the game already knows how to decode that character so should not be anything of the things after this). If the game crashes in the same place then it is likely that.

2) The text you entered was invalid and the game did not know what to do with it and crashed. Solution is enter valid text or make the text you are entering able to be parsed by the game (can be harder). This is common with hex editors as they are usually rather dumb tools and don't enter text in a way that most games care for, especially if this is a Japanese version of a game.

3) The text you entered in the game was a different size to the pointers or some kind of hard limit (menus and simple games often have fixed length sections). Solution is figure out if there are pointers or limits or something and either play to them, adjust the pointers or increase the limit/do a workaround for the limit.

Szemigi

I only changed PERFECT to KITUNO (which is the hungarian "excellent"). KITUNO is 6 letters while PERFECT is 7. Then the crash happened despite of this on the select screen.

Psyklax

Some more possibilities: perhaps the text you edited wasn't the text at all. Or if you're pretty sure it's the right text, you should do what I always do when I first find text: change one single letter. So maybe just change PERFECT to NERFECT or something. If the game crashes like that despite you changing just one (or two) byte(s) then the game doesn't like being changed. Not sure what to suggest if that's the case.

And yes, if the Hungarian word is only six letters, that might be a problem, but you should know that by now, szemigi. ;)

Szemigi

Well, the reason I told the PERFECT and KITUNO is that in Tekken 3 I didn't have problem with text editing. :D


Interesting that when I used KITUNO instead of PERFECT, no crash. But other text changes crashed the game.

FAST6191

How did you change it?

If you pressed delete at the end then everything following it would be shifted forward by one and in all likelihood break the game.

Most would instead try with a space at the end, or maybe some punctuation (be careful with this though as not all games will have everything here and you don't want to cause encoding issues on top of this, or perhaps instead of this).

Also that does not rule out encoding issues.

Worked example I see a lot in newer systems but could apply here as well
Japanese has many ways of encoding language in hex but a popular one, one seen in several games as well, is shiftJIS
http://www.rikai.com/library/kanjitables/kanji_codes.sjis.shtml

See all those nice Roman characters in that? They are not the same as the ASCII standard most people in English or European language countries are familiar with ( http://www.asciitable.com/ ) and likely what your hex editor stuffs in there when you type with it.
While many games nominally use ShiftJIS they don't all support ASCII text (or unicode which is sort of an expansion on the concept) despite shiftJIS on PCs doing as such. You type in ASCII and it will have no clue what to do half the time (and thus crashes and so forth).
This is why the use of hex editors for anything like this are discouraged unless you know all this, and in that case you probably still don't want to do more than a typo where tow chaaracters gto enterde in teh wrogn ordre.
This is also why all those "learn to hack" documents spent an inordinate amount of time going over what a table is and a pointer is.

Oh and yeah there probably should have been a fourth one there. Psyklax covered the start of it -- it might well have been that a string of text could be a file name or something and thus you broke it that way. Most people learn whether this is the case when doing the swap a couple of characters around trick though.

Szemigi

Well, I use Tekken 4 USA version and the "PERFECT" text was in normal hexadecimal form, so: 50 45 52 16 45 43 54.

There was "K.O....." (00 00 00 00 00 for the . you see) I used "KIUTES" and the game crashed after choosing any game mode (ARCADE or STORY MODE).


Psyklax

Okay, first question: is this the arcade game or the PS2 port? Makes a difference.

Second, how can you be sure that 'PERFECT' in ASCII text is the actual text? Do you have any evidence at the moment that that's the case? It's possible that it refers to something else, and since changing it currently crashes the game, you can't be certain.

If I were you, I'd start by trying to change the story mode text, since that's much more likely to be regular text than the end-of-round graphics.

Szemigi

PS2 USA version and I'm sure the PERFECT (and the round-related ones, too) text is in ASCII.

FAST6191

16? That is still when all sorts of control characters are playing (20 is space which is the first thing).
Assuming you just typoed on the numpad and meant 46.

Anyway Psyklax could be right. Could be for a hall of fame/stats section, could be a file name or reference the game uses internally... does not have to be the thing you want right now.

Easy to check though. Any of those characters should be valid things that the game understands. We don't know about anything else for that section at this point (I have seen more modern and older games shift line by line before) but those should work.
If you want to replace all those with 45 then it should come up EEEEEEE in the game.



Szemigi

In Tekken 3 I didn't have any problem. I changed K.O. to KIUTES (in hungarian) and even if it exceeded the character limit, no crash or anything else.

#

How are you applying this change?

FAST6191

Quote from: szemigi on March 18, 2019, 11:16:22 AM
In Tekken 3 I didn't have any problem. I changed K.O. to KIUTES (in hungarian) and even if it exceeded the character limit, no crash or anything else.
But that is an entirely different game. Sometimes knowing an older game (or game from the same developer/publisher) on the same system can give you some small insight or means to approach things but as far as actually doing anything then you need to hack the game in front of you.

Szemigi

I don't know how to hack Tekken 4.

#

Quote from: szemigi on March 18, 2019, 01:02:43 PM
I don't know how to hack Tekken 4.
The problem isn't the hacking. The issue is most likely due to the way you're patching it to the game.

Szemigi

I didn't patch anything. I used a brand new untouched ISO file, which I edited and like I said... crash.

FAST6191

Quote from: szemigi on March 18, 2019, 05:13:06 PM
I didn't patch anything. I used a brand new untouched ISO file, which I edited and like I said... crash.

This crash happens even when you find the string in question in a hex editor and just overwrite a couple of characters with others from the same string?

#

Quote from: szemigi on March 18, 2019, 05:13:06 PM
I didn't patch anything. I used a brand new untouched ISO file, which I edited and like I said... crash.
I meant applying rather than patching. Directly modifying an ISO file with a hex editor doesn't always work. You might want to find the file on the disc that contains the text or start by searching for the strings in the RAM of a running emulator. The last option will also give you a better idea of why it fails if it still does.

Psyklax

You also didn't say if you took my advice of changing just one letter and seeing if it made the change, rather than changing the entire word. Despite what you say, you STILL don't know for sure if the text that you found in the ISO is actually the text that refers to the on-screen text.

I'd also agree that you'd be better off unpacking the ISO and looking in the individual files for what you want, rather than treating it like a ROM file (which it isn't, just to be clear). As # said, looking in the RAM, if possible, will definitely help.

Also, Tekken 3 is on the PS1, Tekken 4 is on the PS2. Therefore, there's no reason whatsoever that they should both work in the same way. :)

Szemigi

The problem is that I unpacked the ISO file, (besides) concretely that part of the file, which contains the texts I mentioned. The problem is that when I reimported the modified version, the game didn't even start, just blank screen. Write-protection?