Author Topic: How do you think they coded the automatic accent generator in Chrono Cross?  (Read 2598 times)

Beach Bum

  • Guardian (+100)
  • *
  • Posts: 143
    • View Profile
In the developer's room ending, one of the devs explains the automatic accent generator. Basically they would input text, and the game would automatically change it to the accent of whichever character is in the party.

I do have some experience in game programming, enough to understand the basics at least. But I can't figure out how they did this.

Anyone else here with programming experience who has an idea of how they accomplished this?

alfadorredux

  • Entity
  • Mystical Knight (+700)
  • *
  • Posts: 746
  • Just a purple cat
    • View Profile
The executable contains lists of the short strings used to create the accents. For example, one list contains all the variations on "can't you" used by the various characters. There are a bunch of unknown bytes packed around the lists that presumably map each variation to the characters who use it. From there, all you need is a simple substitution function, with special characters for the text you want to change:

Hey, {can't you} see it?
(Select character Korcha and substitute in) -> Hey, can'tCHA see it?
(Select Norris instead) -> Hey, can't you see it?

Beach Bum

  • Guardian (+100)
  • *
  • Posts: 143
    • View Profile
That seems incredibly ambitious though. Just how many phrases would they have had to put in a database? There are so many possible variations.

alfadorredux

  • Entity
  • Mystical Knight (+700)
  • *
  • Posts: 746
  • Just a purple cat
    • View Profile
There are 26 strings in the auto-accent database. Most of them are suffixes or short-but-common words ("the", "you", etc.) See https://www.chronocompendium.com/Term/Chrono_Cross_File_0000.html .

You have to remember that not all character-specific text is produced by running generic text through the auto-accenter. There are a few cases where actual variant lines for different characters are stored in the script (the ghost ship chapter has several, frex), and a lot more cases where an event can only occur if a specific character is present, so the stored lines can be written for them directly.