Ironworks Gaming Forum

Ironworks Gaming Forum (http://www.ironworksforum.com/forum/index.php)
-   Dungeon Craft - RPG Game Maker (http://www.ironworksforum.com/forum/forumdisplay.php?f=20)
-   -   Decrypting FRUA Save Game Files (http://www.ironworksforum.com/forum/showthread.php?t=100757)

Shadow Stranger 05-20-2009 02:48 AM

Decrypting FRUA Save Game Files
 
I am currently decrypting the FRUA save files. This may be useful in DC when start wholesale importing of FRUA designs along with save files provided by the authors.

I got a surprise when I looked in the folder: CSV files! (They are usually Microsoft Excel files, so you see the Excel icon in the save game folder. I don't know why SSI chose a "csv" extension for these files.)

Anyway, instead of 13 individual "dat", "sav" and "stf" files and up to 6 "sfx" files you have just one "csv" file. So where do the individual PC records start? This is hard to tell, fortunately the "cch" files are one per PC. When you create a PC the details are recorded in a "cch" file, which is never altered.

Quote:

Originally Posted by manikus (Post 1230210)
You need to go to the Rosedragon repository and look through the stuff there. As there are multiple PC editors for FRUA, including trainers, I am sure that you will be able to find the notes for decrypting the save file.

Let me find the address in case you don't have it...
http://frua.rosedragon.org/index.htm

In computing, "csv" usually refers to "comma separated values/variables". I don't know about MS Excel using this as a file extension, but this is one of the oldest type of data file formats going back to the first mail merge files on Unix machines. :) But, it might also provide a hint as to the sturcture of the file - what that means after it's been encrypted is beyond me to say, but it might help an expert like you. :)

Some of those editors look home grown to the point of dodgy.
As for the FRUA csv files they seem to have no connection living or dead to anything Excel, they seem to be pure "dat" files. In Excel the csv files are the most basic possible spreadsheet, they are to spreadsheets what plain text is to MS Word documents.

Edit:
The FAQ part of RoseDragon had a Hacking part that showed a decryption of the CCH files.
http://frua.rosedragon.org/faq/

Edit:
If you want a character of level N but have doubts about the PC Editor:
set the level to N-1
set the xp to what is needed for level N
alter hp if desired
make any other changes needed like altering a Mage spellbook.
Start the game or reload the relevant save game, go train the PC, game will handle all the stuff you don't know about.

Shadow Stranger 05-20-2009 09:28 PM

Re: Decrypting FRUA Save Game Files
 
Today's notes:
"198~338: Memorized Spells (one byte per spell; will decode later)"
The bytes used for each spell seem to come from those given in Hacking Questions 6d: Spell Codes.
"339~354 Spell Book (one bit per spell; will decode later. Spells are designated by integer value from 1 to 126 if memorized, or 129 to 254 if not memorized. For Cleric, Paladin, or Ranger, spell book is automatically updated to include all due spells.)"
Spell Book is the list of all spells that a PC can memorize and cast. It is recorded in bitwise format using the same list of spells as for Memorized Spells. Thus for the first byte: 1 = C: Bless, 2 = C: Curse, 4 = C: Cure Light Wounds, 8 = C: Cause Light Wounds, 16 = C: Detect Magic, 32 = C: Protection from Evil, 64 = C: Protection from Good, 128 = C: Resist Cold. Each byte can record the absence or presence of 8 spells, there are 16 bytes so 8*16 = 128 possible spells.
Currently I don't understand what the author meant by the second sentence, "Spells are designated by integer value from 1 to 126 if memorized, or 129 to 254 if not memorized."

Edit:
In the actual save game file, the records for each PC are of variable length, records vary according to the number of items or special abilities that each PC has. So how does the game know where each record starts? I don't know, that is what I will be researching.

Shadow Stranger 05-22-2009 10:04 AM

Re: Decrypting FRUA Save Game Files
 
Daily update:
It seems that the first two numbers in a PC record are a short number that is equal to (N*398), where N is the marching order of the PC. The next two numbers are 97,97. These numbers only occur in the csv file, when the pc has already been added to the party, and has a marching order. They don't seem to occur for the sixth PC. There seems to be no table listing offsets that I can find. So I can only guess that the program looks for the four number sequence "(N*398),97,97". What it does for the sixth PC I don't understand.

Edit:
Immediately after the PC and NPC records comes 255 item records. Then comes a repetition of the PC/NPC records, this is just pure filler. The file is 10,285 bytes in length, as the number of PC/NPC items increases the filler decreases in length.
Edit:
The 97,97 may actually be 79,79.

Shadow Stranger 05-23-2009 09:18 PM

Re: Decrypting FRUA Save Game Files
 
The item records found in the csv file seem to be the same as for Item.dat.


All times are GMT -4. The time now is 11:44 AM.

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
©2024 Ironworks Gaming & ©2024 The Great Escape Studios TM - All Rights Reserved