News:

11 March 2016 - Forum Rules

Main Menu

How i edit Tomodachi collection text?

Started by Jookkkkkk, November 05, 2022, 09:10:07 PM

Previous topic - Next topic

Jookkkkkk

How i edit Tomodachi collection text without abbreviating words?

FAST6191

Most games will feature so called pointers, usually at the start of whatever file contains the text but occasionally in another file in the same directory or something. There are a variety of approaches used for the concept* but in the end they all do the same thing of indicate, point if you will, the way to the text in question. Edit these and you can edit the length of text, presumably then giving you enough room to edit things without having to condense your phrasing or word use too harshly.

*I usually note there as being three approaches, maybe four, beyond fixed stuff you sometimes see in menus for things.

1) Standard. Give or take byte flipping/endianness then where the value the pointer has points at is where the final result starts. I suppose it could also encompass memory level pointers wherein rather than file level it is where the file is found when the game puts it in memory, for the DS I see this more in binaries rather than text but I can probably find examples.
2) Offset. Again give or take endianness then similar to 1) but a given distance away if you start counting at the start of the file, typically this means it starts counting from the start of the text section.
3) Relative. Take pointer location, add value it contains, end result is where you want to go.
4) Length. Not really a pointer but has been seen in many games over the years. Here the length of the section is the only thing there so you have to add up everything before it to find what you want, though conversely editing a length means you only need to edit that pointer rather than everything that follows it like all the other pointer types.

I typically open up a file, see if I can find the end of sections for things (sometimes there is a special value, sometimes it is just a full stop or something, pointers on older consoles might be also used to indicate end of line but this is rarer on the DS which usually goes automatically or has additional formatting in the text itself to indicate a new line) and make a list of locations. Compare that to the things you suspect are pointers and you can usually figure things out -- standard is then fairly obvious, offset will mean everything is off by a fixed value, and relative then tends to mean each new pointer is "out" by an additional amount (probably 4 bytes but might be more if there is formatting or something else included).


You can occasionally get a fancy scripting engine (Wizard of Oz on the DS being a favourite example of this, each text line was actually more of a part of a scripting engine each command of which included the length of the command) but I will skip that for now.

Alternatively most Japanese games use 16 bit encodings (8 bit means 256 total characters without annoying swapping out, fine for kana but start even with a modest kanji list and that goes nowhere fast) so some swap to 8 bit encodings. This is quite an advanced trick, especially if you are only just learning of pointers, but there are some formats on the DS that can make this a bit easier -- the NTFR font format that is somewhat popular has encodings in it so you might be able to get it to decode 8 bit values and use those instead. Most will use this in addition to pointers though rather than an alternative method.

Jookkkkkk

Sorry but I didn't understand any of this :( I think I just don't understand these things.

FAST6191

It can take a while but most usually get there in the end.

You say no abbreviation. This means you have presumably grasped that computers (which speak in binary, or for the sake of convenience groups of 4 bits to make hexadecimal) don't understand text and instead represent it in some way.

You probably also found that unlike the thing we are writing this on, your word processor or indeed most modern computing that you can't just add more and it understands what is going on and acts accordingly. The DS probably could do this but it takes resources to do compared to being told where to start each line, which does not change (the Read Only part of ROM). Some do try to abbreviate and twist their chosen alterations to fit within the original, even in commercial games but we do not mention those in polite conversation, but soon find it... unworkable.
This being told where to go is a concept called pointers and forms the second major aspect of translation and text hacking (indeed between figuring out encodings/table making and pointers then you can do a lot of that).
I usually liken pointers to that of a contents page in a book -- they give page numbers to go to and if you count pages you will get there, computers being rather dumb things count pages rather than look at original page numbers so if a bunch of pages got ripped out or inserted in then it is going to get messed up in a hurry.
You get to find these pointers (usually very close to the text) and edit them to correspond to your alterations.
Going back to my numbered list above and continuing with the contents page analogy

1) This you count pages in starting from the first and there you have it.
2) If you have dealt with "front matter" usually numbered in Roman numerals then this is offset.
3) If you have done a choose your own adventure book where you might be told to go forward 10 pages this is that.
4) Some books, usually older compilations, might have list of lengths of sections, annoying to have to do maths but wonderful if you do want to add things in and not have it break the contents list.

The alternatively part was noting that Japanese games use 16 bits for each character in most vaguely modern games (Japanese having thousands of Kanji which does not fit into the 8 bit (2 to the power 8 is 256, which handily does every Roman language in both cases, numbers, punctuation, Greek letters, weird additions the non English languages have... with room to spare). If you are good you can convert to 8 bit encodings and thus double the available space (give or take screen limitations). Some do this for translations for various reasons (usually running out of storage or memory) but it is almost certain to be done in conjunction with editing pointers (if you can do an 8 bit conversion then you can edit pointers).