News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Help - game code printing to a new line.  (Read 1751 times)

Hummy

  • Newbie
  • *
  • Posts: 3
    • View Profile
Help - game code printing to a new line.
« on: August 08, 2014, 09:06:56 am »
Hi. I'm trying to translate Dramatic Dungeon Sakura Taisen for the DS, but I keep getting errors when I try inserting new text.

For example, the word "commander" keeps getting priinted on another line. Here is an image for reference: http://i.imgur.com/vK4gSaj.png

I think this may be happening because the word exceeds the original character length in Japanese. I'd like to know if it is possible to exceed the character length without errors showing up or if I have to stick to the original character length.

Thanks!

EDIT: Yes, it works fine when I change "commander" to "Cmdr". I'd appreciate any assistance in helping me insert more characters without errors.
« Last Edit: August 08, 2014, 09:17:03 am by Hummy »

FAST6191

  • Hero Member
  • *****
  • Posts: 2648
    • View Profile
Re: Help - game code printing to a new line.
« Reply #1 on: August 08, 2014, 11:14:24 am »
Three possible options, I have not pulled apart the game at this point to see what goes.

1) Pointers
2) Fixed length menus
3) New line commands.

1) Games do not know when a new line starts, or indeed a section of text ends. To this end they often have pointers, these are numbers that indicate where something starts/ends/does something (I usually like to make an analogy between them and the contents page of a book). There are many types of pointers and ways games, especially on modern consoles like the DS, handle such things. Typically there are numbers before the text section that count from the start of the file, however this is far from universal.
2) Menus are often a special case in games. Here they might well be hardcoded to a certain length somewhere. Working around this can be hard, however there are also cheat methods like combine multiple characters into fewer tiles. I usually like to do this with double l, i,j..... type characters but you can do it with others too. Often with fixed length things you will see the extra space padded out with blank characters.
3) Though games often use pointers for this job they can still have a new line command somewhere in the text, or a length value somewhere in the text.

2 and 3 can be combined too to give something like a new line every ? characters regardless.

Hummy

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Help - game code printing to a new line.
« Reply #2 on: August 08, 2014, 12:05:25 pm »
I think I can rule out the menus having fixed lengths; I managed to get "Commander" on the same line as the name (accidentally), so it is probably possible to expand them somehow. I will try to look for pointers or new line commands, to see if I can use those.

Thanks for the helpful response, FAST!

weissvulf

  • Sr. Member
  • ****
  • Posts: 324
  • Good news! An anomaly solved the enigma.
    • View Profile
Re: Help - game code printing to a new line.
« Reply #3 on: August 08, 2014, 12:56:36 pm »
I ran into a similar thing on the Playstation game I'm working on and it was an auto-next-line function built into the text routine. The routine raised a counter by 1 every time a character was printed on screen and then compared the count to a fixed max-characters value.  If the two matched, it ran a 'next line' routine and reset the count to 0.

If it's something like this, you might be able to simply search for the max-character value in the data and increase it.

Hummy

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Help - game code printing to a new line.
« Reply #4 on: August 08, 2014, 06:28:26 pm »
Looking further, there are multiple hex codes that create a new line in this game (00, 02 and 92) but the previous character limit is still there, even after removing the line creators.

I'll try seeing if your method works for this game, Weissvulf. Thanks!

EDIT: Managed to expand the text limit with the use of pointers.
« Last Edit: August 11, 2014, 11:02:49 am by Hummy »