Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Crimson Wizard on Wed 09/12/2009 19:22:56

Title: Translation related: what's tra text format?
Post by: Crimson Wizard on Wed 09/12/2009 19:22:56
I need to know, when translation file is filled and then imported to the game, in which text format text is stored? Is it ANSI or other? How much bytes for a symbol?

I ask for following reason. I am interested in translation a game to russian language. I downloaded 1213 russian version made by Sledgy, and found an interesting thing there. He added a TTF file named agsfnt1 in the game folder, and inside the font (opened it using FontForge) I saw that cyrillic letters there are actually copied over "extended" latin symbols like letters with slashes, dots etc. When I put one of the Windows fonts there, any of them, like Arial, TNR etc, game actually uses this new font, but mentioned extended latin letters appear instead of cyrillic. So this gave me an idea that in game russian text is stored as "cyrillic" ANSI (Windows-1251).

Is this text storing is natural for AGS in general? What about latest versions of AGS?
Can someone give me more information on this topic?
Title: Re: Translation related: what's tra text format?
Post by: Gilbert on Thu 10/12/2009 12:08:55
It's not because of how text are stored in the .tra file (actually it's just plain ASCII one-byte-for-each character). The reason it's done like this was because AGS itself does not actually support extended characters having codes beyond #255 (if the font is a TTF, if it's a SCI font you cannot display characters past #127), so normal fonts that contain characters with slots >#255 (such as Russian or CJK font) cannot have these characters displayed in game. The current workaround is to cramp the characters you need into the first 256 slots of a TTF (most of the time you replace symbols you don't need).