Opened 5 years ago

Closed 2 years ago

#11230 closed defect (wontfix)

SCI: QFG4 - exported character unable to import to QFG5

Reported by: tomasz89 Owned by: bluegr
Priority: normal Component: Engine: SCI
Version: Keywords: original
Cc: Game: Quest for Glory 4


The game version is the GOG edition of QFG4, ScummVM (98f8e05f4edc297cb106853ded1e8b01632dc966) on Linux/Ubuntu 19.10.

I've finished the game with the Paladin. However, when I attempt to import the character to QFG5, QFG5 refuses to import.

I've previously finished the game as a Thief (with earlier versions of ScummVM) and had no problems.

Attachments (4)

qfg4-cd-gog-pbest4.sav (329 bytes ) - added by tomasz89 5 years ago.
Corrupted (?) export
qfg4-cd-gog.012 (112.8 KB ) - added by tomasz89 5 years ago.
Save at game end
overflow_message.png (28.7 KB ) - added by sluicebox 5 years ago.
qfgimporter_stats.png (162.4 KB ) - added by sluicebox 5 years ago.

Download all attachments as: .zip

Change History (11)

by tomasz89, 5 years ago

Attachment: qfg4-cd-gog-pbest4.sav added

Corrupted (?) export

by tomasz89, 5 years ago

Attachment: qfg4-cd-gog.012 added

Save at game end

comment:1 by sluicebox, 5 years ago

Congratulations! (on completing the game, not the import trouble)

I'm afraid that your character stats are too good for QFG's file format. The same thing would have happened in the original.

You can verify this with QFGImporter: (screenshots attached)

It reports that the stats have overflowed the format. It attempts to figure them out anyway so that you can repair it, but it says that there's so much overflow it's still probably wrong on some of them. It's VB .NET source so you might have to be resourceful to get it running.

I looked into this before and came away pessimistic we can fix it. To quote the notes in QFGImporter, "It's big a mess." We were able to fix QFG3's export by capping all values at 9999. The problem is worse in QFG4 and that's not enough.

The problem is that the accumulation of the stats easily overflows the maximum that the file format can hold. It kind of adds them together as it encodes them. The more stats and the higher they can go, the worse it is. QFG4 has more stats than QFG3 and raises on many to 400. It's not any one stat that breaks this, I found legal combos that still caused overflow. I got the impression that there isn't a big number we can cap all stats at without tampering with exports that would have otherwise been fine.

I'll leave this open since we now have a legitimate export file that overflows. If you could upload a save game of your character near the end then we'll be able to reproduce how your stats get scrambled. If anyone wants to debug exporting, just warp to room 52 from anywhere. Hopefully someone can come up with something, but it's hard to work around a file format that can't capture the game. I would love for this to be fixed!

comment:2 by sluicebox, 5 years ago

Keywords: original added

by sluicebox, 5 years ago

Attachment: overflow_message.png added

by sluicebox, 5 years ago

Attachment: qfgimporter_stats.png added

comment:3 by tomasz89, 5 years ago

Thanks, I had a feeling this was difficult. I did manage to fix my export using the importer so that's a bit of good news. I already attached an endgame save; were there others at other time points you'd be interested in?

comment:4 by sluicebox, 5 years ago

Ah, so you did, thank you

comment:5 by m-kiewitz, 5 years ago

Hmm, I need to look at the export code.
Already managed to fix the overflows in QfG3.
Thanks for that saved game.

comment:6 by raziel-, 4 years ago

Summary: QFG4 exported character unable to import to QFG5SCI: QFG4 - exported character unable to import to QFG5

comment:7 by bluegr, 2 years ago

Owner: set to bluegr
Resolution: wontfix
Status: newclosed

After checking this again with @sluicebox, this is an overflow bug, and there's not much that can be done about it. The data is lost, as there just isn't enough space to store it. We can't restore lost data, and it's impossible to redesign this format, so there's nothing we can do about such exported characters.

Closing as wontfix

Note: See TracTickets for help on using tickets.