pleonex / Ninokuni

Hacks and tools for "Ni no Kuni" Nintendo DS game
Apache License 2.0
25 stars 10 forks source link

Keyboard: give more spaces on password and saved game name #3

Open ouioui2003 opened 9 years ago

ouioui2003 commented 9 years ago

Hi, I open another issue : I have said "You can improve this game by doing a similar hack of fix_familiar_length (names with 7 chars instead of only 4) on the three ways the kerboard is used: The savedgame name could use 11 chars instead of only 6, and password when you catch the cauldron in bikini to 19 chars instead of 10. If you can know where that values are, it will be perfect to customize them."

For the saved game name, it could be useful to give users a way to add their real name in. For french, you have 'Jean-jacques' or for spanish 'Cristobal' that the game could save without hang and the japanese limitation abort this try. And if this is not a real name, a long nickname couldn't be saved too, like 'Ouioui2003' or 'Pleonex'...

For the password, the french translation for the Cauldron password in bikini is "Belle-âme, ouvre toi", so 20 chars (Remember: I translate this game with all materials picked up in the PS3 version). For now, there is no way to use it.

I have hack your keyboard to use it with my own fonts, and i can put 8 chars (the max) on the familiars name (It's because my keyboard use only 1 byte chars). So, with a fix_password_length hack, i hope i could use 20 chars on passwords and put the PS3 translation in. But I need you for that work, because i don't know how to use a debugger with DS games. I don't know for now how to find the offset of that values.

Regards

pleonex commented 9 years ago

Player name

It can not be increased since it's stored in the save file (at 0x4) encoded with a custom table, as I said in #2. The problem is that there are reserved only 8 bytes... So the workaround could be move that name to another position in the save file, but first it would be good to know the full file structure to not override anything. In fact I don't know what is after the name in the save, I only know that the game reads 8 bytes.

Password text

In this case, since it's stored in the scripts the text limit is just internal, so it could be done. We should just where that constant is stored and change it. First we would need to finish the keyboard hacks.

ouioui2003 commented 9 years ago

Maybe 8 chars for the player name could be enough for a first try.

After that, you could try with this: compare

Here is a binary files diff from a 1.sav, a sav just after naming at the begining of the game, and 7.sav, a full played game with all familiars (except the dlc only ones), all quests done (quests dlc done too), all hidden chests found, ... saved after the second end. You can probably use safely spaces left from 0x17 to 0x28 for the name.

pleonex commented 9 years ago

Thanks for the info. I will give it a try :+1:

pleonex commented 9 years ago

Finally, the maximum size for the player name (keeping the original position in the save) is 7 bytes (7 chars + null char) and this is going to be the value for the Spanish translation.

Anyway, before moving it for others translations I would like to understand 100% the save file to make sure it's a free place (maybe that bytes in some place in the game are used, for instance to know how many missions are left before something happens...).

About the password or response for quiz, it could be easily changed in the file _Assembly/keyboard/textboxlongNames.asm. I have not tested it, so I don't know if it would need more changes to make it work.