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

Author Topic: Cartographer - fixed string lengths  (Read 524 times)


  • Full Member
  • ***
  • Posts: 177
    • View Profile
    • Jetran
Cartographer - fixed string lengths
« on: September 20, 2018, 08:46:40 am »
Hoping someone may know if there's a solution to my Cartographer dumping issue.

I have a game which is fixed to 18 bytes per sentence filling any remaining bytes with spaces and a 1 byte value that tells the sentence if there is one line, two lines or three lines to follow.
Code: [Select]
<2 lines>Sentence line     <end>
Sentence goes here<end>

My issue is when I set the dumper to format the sentences so each sentence is on a new line, there is a control byte to begin the sentence which tells the box how many lines of text there are. So, when I dump it the first 18 bytes are the control code + 17 characters of the first sentence putting the last character into the next line... and so on.
Code: [Select]
<2 lines>Sentence line    <end>
 Sentence goes her<end>

Any way around this?
« Last Edit: September 20, 2018, 09:08:53 am by Jazz »
Jetran Website
View for Gameboy english translation projects

Discord: Jarryn #9202


  • Full Member
  • ***
  • Posts: 140
    • View Profile
Re: Cartographer - fixed string lengths
« Reply #1 on: September 21, 2018, 05:30:11 pm »
I don't think there's any way for Cartographer to handle this gracefully. If Cartographer is dumping all of the text, though, you could try reformatting the dump in a text editor with a search-and-replace function that supports regular expressions; something like searching for "(<end>\n)(.)" (without the quotes) and replacing with "\2\1" (again, no quotes) should do the trick.