add spanish characters for translation of PoPoLoCrois Monogatari II

Started by Larry_Wilco, July 08, 2022, 06:51:43 PM

Previous topic - Next topic

Larry_Wilco

Hello, greetings from Colombia. On March 22, user LostOkina posted a utility for the game PoPoLoCrois Monogatari II that allows you to edit its texts. I am interested in starting a Spanish translation of it, I have already tried the program and it is easy to use, the only problem I have is the use of Spanish characters like "á é í ó ú ¿ ¡ ñ Ñ". I don't know what I could do to implement these characters in a way that they show up in the game, so I wanted to see what you guys recommend.

FAST6191

Three main possibilities.

The utility you reference does not know how to handle those characters (might also be a problem for some means of editing later). Most likely not as most people that make things that are nice to use do it properly but I note it anyway.

Anyway the other two are you get to edit the font in some manner.

Traditionally you would be told get the font (or fonts -- some games have many used for different things) and edit characters to replace things accordingly. Naturally this works far better in Japanese where you might have several dozen at least to play with where English games might even be stripped down to just the capitals needed for that part of the menu at times.
Hopefully it is nicely named within the game and responds well enough to a tile editor that you can get it done easily.

More modern stuff with nice font formats (PS1 having some of these, though not as common as some might like) can actually have new/previously unknown encoding values included within the font relatively simply as opposed to older games where that is a considerable hack. There are so many possibilities for what a font might include here that I don't know what I want to cover and still keep this reasonable. If you are lucky it will be a simple fixed font and encodings included somewhere, slightly worse but also slightly better is if it includes height and width values so you have to set those as well (height and width/variable width font can also be a problem for the overwrite unnecessary characters thing noted above). I doubt you will get PC style http://osmanassem.com/wp-content/uploads/2019/07/Anatomy-of-Typography.png and more aspects included in the font, especially not for a Japanese game, but I have been surprised by PS1 stuff in the past.

Beyond that is the more considerable hack where you find the text handler, figure out how it decodes things, figure out how it sorts fonts out and then you will know how to edit things there, or indeed how to edit the game  to do something it was not originally made to do. Yes it is hard.

Larry_Wilco

Thank you very much. What I have done is use the Tim2view to find the font and I did what you said.  I already have the characters I need, although now the problem is with the menus, :banghead:  since the tool I am using does not allow them to be modified, and although I have already created the corresponding table and identified where these texts are, what I do not know is how increase the space, since there are cases like the verb "Buy" which in Spanish is "Comprar" so, as you see, I cannot write the word and there is no abbreviation for it.

aquagon

You'd need to find the pointer tables for these texts and modify them accordingly in order to be able to insert larger texts than the ones already present in the English translation.

Larry_Wilco

What Dumper would you recommend me for this case?  I've been reading about it and I don't know which one to use.  Also, I have two questions:
1. I've seen the word "script" a lot and I think I know what it means but since this is a menu, I don't know if I just need the pointer to the first character of the first menu option, or if I need a pointer for each initial of each menu item.
2. when I have the pointers with their respective text, how do I reinsert them into the game?

FAST6191

If it is for a short and sweet menu (maybe 10 words or so for the average menu) you can probably get away without a dumper if you wanted to. Dumpers and the effort of setting one up (text can come in many forms, accordingly dumping tools like atlas or kruptar2 are almost programming languages unto themselves. See https://transcorp.romhacking.net/scratchpad/Table%20File%20Format.txt and any text dumper then has to handle all those scenarios and more besides) usually only make sense when you have many words and it sounds like you have a tool for that already. It is certainly cruder doing it this way and I almost don't want to suggest it but hey.

Script around here tends to mean any text that works as a normal text setup might (so basically not graphical text on the title screen or banner of in game shop or whatever). If you go to pokemon hacking sites then script and scripting might mean how the NPCs act (think the AI's scripted behaviours make the game predictable) which is a bit confusing but I note it anyway.

If you know where the pointers are that deal with the text and how they work for this game (there are multiple approaches to pointers*) you already know what you need to know for 2. Make sure all the text changes happen before you start editing pointers though else you will have to go back and edit them (I usually describe pointers as being like contents pages of a book, rip a bunch of pages out or put some in and the numbers make no sense to a machine just counting pages turned like a dumb computer. Rip pages out and put new ones in for all sorts of random points and it makes even less sense for everything following the first edits, try to update page numbers while you are still ripping things out and putting new in and you just make a headache for yourself).


*I have not the time to cover it all right now but usually noted as being normal (where the pointer says is where it is in memory/the file, give or take endianess/byte flipping), offset (like normal but a fixed distance away, usually in most games this means it starts counting where the text starts rather than where the file starts) and relative (take pointer location itself and add the value found at that location to make final destination, mostly a hangover from older styles of computing. You might also see just plain sizes, and for menus that gets more common than normal text (only games with custom length names that don't want to leave a gap when someone names their character A and another might do a 10 character name being more likely to note sizes, and sizes in the save as well actually). I usually take the list of pointers (or what I think are pointers), make a list of lengths of/locations of text (hopefully they have a nice 00 or something you can easily search for between entries in the list) and compare them to see how they line up.
Menus in text hacking can also be some of the stranger aspects of text editing -- it is usually where I expect to find things I don't elsewhere like fixed length sections (everything has a limit of 10 characters and you have to pad it out with blank or space or something between entries), parsed sections (while newer games tend to have auto new line rather than use pointers they don't tend to do much more than that where a document reader on PC will be always converting things to reflect window size/zoom level, menus can adopt something like this and have lengths be not noted anywhere and instead each entry be separated and it calculate it as it is reading it from its host file, usually with such things separated by a 00). As such you might want to see what happens when you go longer than the original line, if you change the location of any values between entries and such like. I also already noted that menus might use a different font to the rest of the game.

Larry_Wilco

I'm modifying all the options and descriptions of the menus in WindHex trying to adapt them to the space I have. Today I was curious to see if I could increase the space of that "Buy" to put the complete word "comprar", so I have tried with Kruptar 7 and although I have found and modified the texts as you can see in the image, I don't know what to put in "Text Insert Range":

https://drive.google.com/file/d/1HolL6BeiiRE3BdNydseC6NBRmQUBCnez/view?usp=sharing

And when I click green boton above I get a message that says:

https://drive.google.com/file/d/1LUO657PbhQGNNvV4690XUyk7qRrLsXPT/view?usp=sharing

aquagon

That's because you don't have enough space in the original place where the texts are located. You need to find empty space in the ROM to put the longer texts in, and then modify the pointer tables to point to that area instead of where the text was originally located.

Larry_Wilco

Thanks a lot.  I've been able to successfully edit the menus, I only have a problem with the word "Comprar" as it only lets me put "Compr" before the menu graphics behave a bit weird showing text where it shouldn't.  I'm already finishing the descriptions of the items among other things, but I had a question: what would happen if I didn't define a "text range insert" in Kruptar and instead left that part blank and only push the green arrow?

Besides, tking advantage that I'm entering into this world of Romhacking, I wanted to ask about something that happened to me when I tried to edit Thread of Fate more than a year ago to translate it into Spanish, the game is not compressed and the texts can be edited with Kruptar, but the boxes of text gave me problems.  To give an example, there is a text that says "Tale of a Spunky girl" which in Spanish can be translated as "Historia de una chica Valiente" That text box already had 2 lines, in the first was the name of the character and in the second the text in English, so for the text in Spanish to be fully displayed, the text box would have to have 3 lines. I added an extra line break to it, but when it came down to it, it only showed the last two lines with the message and left out the character's name, so it looks like the box isn't dynamic, so I'd need to increase its size as it was done in the French translation made by fans, but I don't know what could be done in such cases.

gadesx

I don't know the space unused by the font.
But, like the trick drawing ... to 1byte character, maybe
can be designed "Comp" and "rar"
Or Co mp ra r
with less width as the font used, obviously

danuffo

Quote from: Larry_Wilco on July 25, 2022, 09:33:42 PMThanks a lot.  I've been able to successfully edit the menus, I only have a problem with the word "Comprar" as it only lets me put "Compr" before the menu graphics behave a bit weird showing text where it shouldn't.  I'm already finishing the descriptions of the items among other things, but I had a question: what would happen if I didn't define a "text range insert" in Kruptar and instead left that part blank and only push the green arrow?

Besides, tking advantage that I'm entering into this world of Romhacking, I wanted to ask about something that happened to me when I tried to edit Thread of Fate more than a year ago to translate it into Spanish, the game is not compressed and the texts can be edited with Kruptar, but the boxes of text gave me problems.  To give an example, there is a text that says "Tale of a Spunky girl" which in Spanish can be translated as "Historia de una chica Valiente" That text box already had 2 lines, in the first was the name of the character and in the second the text in English, so for the text in Spanish to be fully displayed, the text box would have to have 3 lines. I added an extra line break to it, but when it came down to it, it only showed the last two lines with the message and left out the character's name, so it looks like the box isn't dynamic, so I'd need to increase its size as it was done in the French translation made by fans, but I don't know what could be done in such cases.

I can tell you my case, I was translating a bit with the games MegaMan Legends 1&2 using only the Hexadecimal editor, and all I did to change the box size is changing 2 bytes(or numbers) that are just placed a bit before starting the text, it works something like this: 0108"Megaman, ¿qué es eso?

Let's suposse the byte 01 indicates the vertical size, or the number of rows you want. If you need two rows, you put 02. For my project I use the symbol "<" to indicate the line break to put the next text below the first one: 0208"Megaman, ¿qué es eso?<Parece un kit de minas explosivas.

Now, the byte 08 indicates the horizontal size, as you can see my second text is longer so I need to change it, let's supose I want it to be 10 cm size instead of the 8 cm so I will write "0A" (remember we are working with numbers in hexadecimal system not decimal system), if I want 11 it's "0B", if I want 12 it's "0C", if I want 16 it's "0F", if I want 17 it's "10".  Ok, I give 10 cm of value: 020A"Megaman, ¿qué es eso?<Parece un kit de minas explosivas.

That's the solution to my box size problem. In other games is not necessary, I guess Fates of Thread and the other one may be a similar way, I never have inspected those ones.
.

Larry_Wilco

Thanks for the information. In the end I managed as best I could. Regarding the Thread of Fate thing, I still want to translate it, but it would be after finishing this game and giving myself some time off.

Now what I need is help from a user to translate the graphics. Image editing has never been my thing.