Community
SCI Programming => SCI Development Tools => Topic started by: ZvikaZ on January 17, 2021, 04:56:08 PM
-
I'm trying to change something in a message file, and it fails.
It's QFG1VGA, with Game->Properties->"Manage resources as patch files" turned on.
I've opened Message.206, Noun 3, Verb 11 (food ration), and just changed it to "food ration1".
Clicked "Commit", and then saved with Ctrl+S.
Now, in the SCICompanion Explorer, under "Status", it says "Resource load failed", and the size of 206.msg file is only 6 bytes...
If it matters, those 6 bytes are:
8F 00 E4 0C 00 00
Have I done something wrong?
Thanks
-
It seems much like a reported bug: https://github.com/icefallgames/SCICompanion/issues/22
:-(
-
ZvikaZ
I think there are three possible solutions to the problem.
1. Use the Enrico Rolfi's utility to edit messages.
2. Change message.cpp
At least uncomment the line
//MessageWriteTo_3411(message, byteStream);
Add a function MessageWriteTo_3411() and recompile SCIcompanion.
3. Write your own message editor or export to a message file.
-
Version 3000 (number inside a specific message file >= 3000 < 4000).
Block 1 - file header, size = 10 bytes
Offset Size (in byte) Description
00 .......... 2 ....... Message file ID, equal to 0x8F or 0x0F
02 .......... 4 ....... Version of msg file (0x00000d53 = 3411, optionally, for example, in QfG1vga. I've noticed 3300, 3340, 3400)
06 .......... 2 ....... A pointer to the first byte AFTER the text data, the beginning of block 4 ("address" = "this value" + 8 bytes).
In fact, this is the size of the file WITHOUT comments
08 .......... 2 ....... Number (count) of messages in the file
Block 2 - message addresses, size = 10 bytes
Offset Size Description
00 .......... 1 ....... Noun (on which object the action is performed, the list is located in the corresponding one .hep file)
01 .......... 1 ....... Verb (what action, ie. what icon is selected in a menu or an item from inventory)
02 .......... 1 ....... Case (state, condition)
03 .......... 1 ....... Sequence (the order may be invoked multiple consecutive message boxes)
04 .......... 1 ....... Talker (Who is talking)
05 .......... 2 ....... Message address ("real adr." = " this adr." + 2)
07 .......... 3 ....... Unknown
Block 3 - the messages themselves
Offset Size Description
00 .......... variable ... Message in text format, ends with 0
Block 4 - Developer comments (most likely missing)
In theory, it should be, but I really did not meet the files of version 3000 with comments
Correction. File 815.msg from the official patch QFG1VGA has comments.
-
My SCI Companion supports all three versions now, unless I messed up.
-
Kawa
Thank you very much. It works correctly.
-
Thanks. I only tested in QFG1, assuming the three mystery bytes were just padding with random leftover data for contents, and I couldn't think of a game with the first format that only has nouns and verbs so I'm just hoping for the best.
-
Kawa
The version of messages 2000 is used in Ecoquest1 floppy.
These three unknown bytes in version 3000 can be anything. This can be reserved for future use. For example, for reference noun, verb, case. Or it can be a far link to audio resources. Or it's a timestamp to mark when a message was edited.
-
I find the reference idea unlikely. For version 4000+, every entry without a reference has the reference bytes set to zero, and all entries that do use a reference have blank text. But in QFG1, the mystery values are non-zero.
If it's an audio link, I suppose the values should be preserved. What game would you suggest I test that on?
And if it's timestamps (in three bytes?) that'd mean that's the only version of the Message resource that has those. And personally I think it'd make more sense to put that sort of metadata at the end, in the Comments section.