proper reading of .cht files?

  • So, looking through old stuff, I noticed I had a bunch of these files with data in them even though I never enabled chat logging. Has an app ever been written that can look at these properly?


    The format is rather strange. Here's what a chunk of one as viewed in text editor. Particularly odd is the use of a space between each character.

    Code
    1. \ # 0 0 f f f f : \ # . C h e c k w i t h t h e 2 - 1 B d r o i d t o r e c e i v e y o u r m e d i c a l s t a t u s . W a l k t o t h e d r o i d u s i n g t h e W , A , S , a n d D k e y s .
    2. 1 2 : 3 2 : 1 0 < \ # f f f f 0 0 C o m m \ # . > \ # 0 0 f f f f : \ # . E x c e l l e n t ! N o w , t a l k t o t h e 2 - 1 B d r o i d b y s i n g l e - c l i c k i n g h i m a n d s e l e c t i n g a r e s p o n s e . T h i s w i l l p u t y o u i n c u r s o r m o d e - - y o u c a n u s e t h e ' A L T ' k e y t o r e s u m e n o r m a l a c t i o n s .
    3. 1 2 : 3 2 : 1 2 \ # 1 1 f f 4 4 2 - 1 B S u r g i c a l D r o i d s a y s t o M a l e - V o i c e , \ # . " \ # f f f f f f A r e y o u f e e l i n g b e t t e r ? \ # . "
    4. 1 2 : 3 2 : 1 3 < \ # f f f f 0 0 C o m m \ # . > \ # 0 0 f f f f : \ # . W o n d e r f u l ! I t s e e m s y o u a r e f u l l y r e c o v e r e d . W h y d o n ' t y o u c h e c k t h a t n e a r b y s u p p l y c a b i n e t f o r a n y u s e f u l i t e m s ? S e a r c h t h e c a b i n e t b y s i n g l e - c l i c k i n g i t .
    5. 1 2 : 3 2 : 1 3 \ # 1 1 f f 4 4 2 - 1 B S u r g i c a l D r o i d s a y s t o M a l e - V o i c e , \ # . " \ # f f f f f f E x c e l l e n t . \ # . "
    6. 1 2 : 3 2 : 1 6 < \ # f f f f 0 0 C o m m \ # . > \ # 0 0 f f f f : \ # . O h ! Y o u ' v e f o u n d a b l a s t e r . B e f o r e y o u c a n e q u i p i t , y o u m u s t o p e n y o u r i n v e n t o r y . D o t h i s n o w b y p r e s s i n g t h e " i " k e y .
    7. 1 2 : 3 2 : 2 0 < \ # f f f f 0 0 C o m m \ # . > \ # 0 0 f f f f : \ # . N o w e q u i p y o u r w e a p o n b y d o u b l e - c l i c k i n g o n t h e b l a s t e r i c o n i n y o u r i n v e n t o r y . P r e s s " i " a g a i n t o c l o s e y o u r i n v e n t o r y w i n d o w .
    8. 1 2 : 3 2 : 2 1 < \ # f f f f 0 0 C o m m \ # . > \ # 0 0 f f f f : \ # . P e r f e c t . N o w , t r y o u t y o u r b l a s t e r b y d e s t r o y i n g t w o o f t h o s e c r a t e s o v e r t h e r e . S i n g l e - c l i c k a c r a t e t o f i r e y o u r b l a s t e r a t i t . K e e p f i r i n g a t t h e c r a t e s u n t i l t h e y a r e d e s t r o y e d .
    9. 1 2 : 3 2 : 2 5
  • I don't think there's a tool for displaying these nicely yet. However, in UTF16, each character is two bytes. The most commonly used characters (A-Z, for instance) only take up a single byte and have a trailing 0-byte. Try viewing the file as UTF16 and not UTF8/ASCII.


    Edit: I've opened one of the files in a hex viewer.



    As you can see, it's full of UTF16 strings, but parts of it actually aren't. It looks like a classic IFF-style file format.

    xI45L74.png

    Edited once, last by Ziggy: Added a bit of research. ().

  • I don't think there's a tool for displaying these nicely yet. However, in UTF16, each character is two bytes. The most commonly used characters (A-Z, for instance) only take up a single byte and have a trailing 0-byte. Try viewing the file as UTF16 and not UTF8/ASCII.


    As you can see, it's full of UTF16 strings, but parts of it actually aren't. It looks like a classic IFF-style file format.

    Aha... right on. Just did that in Crimson Editor and it looks much nicer.


    Thanks!

    Code
    1. 14:37:16 \#FF0000"Greetings! Please be aware that items placed on Storyteller NPCs can not currently be looted. Please do not place loot items on these NPCs as CS will not be able to restore them."\#FFFFFF
    2. 14:37:17 <\#ffff00Comm\#.> \#00ffff:\#. Hello? Hello? Are you awake in there? I am C-3PO, human cyborg relations.
    3. 14:37:26 <\#ffff00Comm\#.> \#00ffff:\#. Oh good! You are alive! Help is on the way. I do hope Captain Solo gets there before your 'hosts' do...they won't like losing their latest asset.
    4. 14:37:34 <\#ffff00Comm\#.> \#00ffff:\#. To get your bearings, move your mouse to look around the room. The mouse wheel will zoom the camera in and out.
    5. 14:37:42 <\#ffff00Comm\#.> \#00ffff:\#. Notice the yellow bar stretched across the bottom of your screen. This is your experience bar. When it fills up, you will gain a new level and advance your skills.
    6. 14:37:50 <\#ffff00Comm\#.> \#00ffff:\#. Check with the 2-1B droid to receive your medical status. Walk to the droid using the W, A, S, and D keys.
    7. 14:38:11 <\#ffff00Comm\#.> \#00ffff:\#. Walk over to the 2-1B droid. Use the W, A, S, and D keys to move about the room.
    8. 14:38:21 <\#ffff00Comm\#.> \#00ffff:\#. Excellent! Now, talk to the 2-1B droid by single-clicking him and selecting a response. This will put you in cursor mode -- you can use the 'ALT' key to resume normal actions.