Visit the Ironworks Gaming Website Email the Webmaster Graphics Library Rules and Regulations Help Support Ironworks Forum with a Donation to Keep us Online - We rely totally on Donations from members Donation goal Meter

Ironworks Gaming Radio

Ironworks Gaming Forum

Go Back   Ironworks Gaming Forum > Ironworks Gaming Classics > Wizards & Warriors Forum

Reply
 
Thread Tools Search this Thread
Old 12-28-2007, 06:15 AM   #1
Shadow Stranger
Avatar
 

Join Date: December 9, 2007
Posts: 594
Question Mark Decrypting Save Game Files

Initial Part of File
I have not been successful at all here.
Places 37-60: PC in party? Seems to be one "1000" for each PC in the party, dead or alive.
Place 229 seems to be the number of records or PCs in party.
There is obviously a roster of PC names and statuses from places 233 thru 424.

There follows a lot of apparently encrypted stuff. I think it starts at place 425 but I am not sure.

PC Records
The records that I examined were found at the very end of the save game file, they were all 10,766 characters in length, in at least one save game.

Place 01: PC now in party?
Place 05: marching order, 0 to 5
Places 09 thru 24: name
Place 25: gender, 0 = male, 1 = female
Place 27: race, 0 thru 9
Place 29: current class, 0 thru 14
Places 31 thru 46: stats

Places 47 thru 110: ???!!!
A whole lot of zeroes
Places 243?
Places 245?
Place 247: current hp
Place 249: maximum hp

Place 255: how much the PC weighs.

Places 265 thru 268: PC’s money
Place 269: age of PC
Places 273 thru 276: Current XP
Places 277 thru 280: XP for the Next Level
Place 281: level in current class

Place 307: PC 2D portrait

Place 323:386, start of the skills listings, they are "short", two places are used to record each skill. Now a skill of 1 translates to a listing of around 100. Now the exact formula is not clear to me, it is roughly: each skill is around 1.5 times the previous skill, plus 100. Thus if level 5 equates to a listing of around "1,318", level 6 equates to roughly "2,075".

Places 401 thru 409, the traits, in a binary sum character format: sums of 1 thru 128

Places 473 thru 496: mana available for each of the six spell spheres: Spirit, Sun, Moon, Vine, Stone, Fiend

Place 497 thru 664: start of the spells known listings, arranged by sphere and then by spell level, binary sum followed by three empty places?!

Place 665: start of the item listings: each of 86 characters
6,708 = 78 * 86, this means 56 backpack listings and 18 equipped

Place 7,373: start of what follows the item listings

place 10,117: number of kills
place 10,129: number of assists
Place 10,133: start of guild levels listings, then three places of unknown meaning
Place 10,140: start of previous classes listings
Place 10,177: start of bank account balance, seems to be the same for all three towns.

Perceived pattern for item records:
Total number of characters per entry is 86.
Places 01,02: Item number, 2 characters
Places 03,04: Item strength, expressed as an absolute number,
Places 05,06: invoking of a power?
Places 07-10: quantity: number of charges or items in bundle
Places 11-32: Identified name, 22 characters
Places 33,34: spell powers
Places 35-46: damage done
Places 47,48: column 189 from D6Item.dat?
Placed 49,50: column 191?
Places 51–63: Resistance listings, 13 characters. (May include places 64, 65 and 66).
Places 67,68: Enchant
Places 69,70: to hit
Places 71,72: Parry
Places 73,74: number of multiples of AC base?
Places 75,76: regeneration
Places 77,78: toughness?
Places 79: ??
Places 81: ??
Places 83: ??
Places 85: ??

*Damage done to an item is subtracted from the figure in column 3.
Last four places are usually empty.
My understanding is that all other qualities of an item are read from the main file, D6Item.dat

List of traits, numbers 0 thru 65:
War Cry, Giant Strike, Ironmight, Fury, Spellfire, Guardian Ward, Sneak, Hawk's Brow, Trickery, Ancestral Guide, Noble Cause, Berserk, Spirit Shield, Lethal Fist, Mana Seed, Backstab, Enlightenment, Soul Bane, Firebrand, Mindspeak, Snakeskin, Invincible Will, Divine Aura, DoubleStrike, Mercury's Heel, Stunning Blow, Dodge, Fletchery, Ancient Lore, Blacksmith, Occultist, Cabalist, Healer, Scroll Lore, Merchant, Quick Learner, Soul Drain, Iron Lung, Grave Bind, Nature's Keeper, Faery Wings, Arm Of Argus, Boogreism, Vampirism, Crusade, Oath Of Swords, Oath Of Scrolls, Arcane Void, Bloodscent, Blood Realm, Regeneration, Night Vision, Lucky Charm, Gold Digger, Tiger Strike, Quickspeak, Deadfall, Heroic Legacy, Guardian Angel, Chi Master, Dragon Fire, Cloak Of Night, Evil Eye, Vampire Breath, Natural Leader, Musician

List of Skills, numbers 1 thru 32:
Sword, Axe, Mace, Pole&Staff, Dagger, Bow, Throwing, 2nd Weapon, Shield, Kung Fu, Sorcery, Spiritcraft, Suncraft, Mooncraft, Vinecraft, Stonecraft, Fiendcraft, Leadership, Athletics, Scout, Traps&Locks, Pickpocket, Stealth, Forge, Artifacts, Enchants, Blessings, Gallantry, Prowess, Deathstrike, Incantation, Music

List of Books of Spells:
Spirit, Sun, Moon, Vine, Stone, Fiend

List of item icons, numbers 0 thru 245:
i_lsword, i_katan3, i_ssworp, i_katan2, i_batax2, i_mace2, i_hammr2, i_mace1, i_bastrd, i_2hand, i_katan4, i_mavin, i_longax, i_pikewp, i_lance, i_dagger, i_throw, i_dart, i_star, i_stave, i_lngbow, i_shbow, i_sling, i_arow1, i_cbbolt, i_bullet, i_bucklr, i_smshld, i_mdshld, i_lgshld, i_wdshld, i_cvshld, i_rod01, i_wand01, i_potn01, i_potn02, i_potn03, i_amul01, i_amul02, i_scroll, i_powd01, i_powd02, i_powd03, i_bomb, i_ring, i_braclt, i_necklc, i_torch, i_torch2, i_lantrn, i_key01, i_key02, i_key03, i_crsbow, i_chnbts, i_chnglv, i_chnhlm, i_chnleg, i_chntop, i_dbtbts, i_dbtleg, i_dbttop, i_karleg, i_kartop, i_lthbts, i_lthleg, i_lthtop, i_lthglv, i_nnbbts, i_nnbhlm, i_nnbleg, i_nnbtop, i_nnrbts, i_nnrhlm, i_nnrleg, i_nnrtop, i_pltbts, i_pltglv, i_pltleg, i_plttop, i_pstrob, i_katan1, i_swdrap, i_barhlm, i_conhlm, i_fulhlm, i_grthlm, i_salhlm, i_plnrob, i_magrob, i_rod02, i_wand02, i_wand03, i_staf01, i_staf02, i_book01, i_book02, i_openpk, i_basich, i_dblax, i_genie, i_gldsck, i_gndlfh, i_axeogr, i_skull, i_jewelk, i_kerahs, i_koolie, i_lizskl, i_magich, i_priest, i_ratskl, i_robinh, i_samrih, i_sdeath, i_shellh, i_shellp, i_shovel, i_trtlsh, i_tridnt, i_lhrhlm, i_lktgld, i_wlfbne, i_ssword, i_box, i_openbx, i_pouch, i_openpo, i_bnbag1, i_bnbag2, i_wndskt, i_barbra, i_token, i_incnse, i_potmty, i_potblu, i_potred, i_potyel, i_cpoker, i_hpoker, i_monkey, i_csnake, i_spdreg, i_helmsk, i_sledge, i_pckaxe, i_metblb, i_cyngem, i_grngem, i_prpgem, i_redgem, i_vltgem, i_ylwgem, i_keymin, i_trylvr, i_evleye, i_ogrcsk, i_wddowl, i_ivybnd, i_jwlbnd, i_bigjwl, i_drgpc1, i_drgpc2, i_drgpc3, i_hndcrk, i_elbrim, i_elskcn, i_blkidl, i_mkypaw, i_tusk, i_throck, i_keyshr, i_ringva, i_ankh, i_keylch, i_sunkey, i_anakey, i_glyph1, i_glyph2, i_glyph3, i_angel1, i_angel2, i_anaurn, i_lghtob, i_push, i_lyhart, i_pierat, i_keyher, i_lokpih, i_necalg, i_scrol3, i_hide, i_arow2, i_arow3, i_arow4, i_axmagi, i_barbts, i_sprmag, i_batax3, i_hammer, i_book05, i_bowmag, i_club, i_dagmag, i_dart2, i_gauche, i_karbts, i_katan5, i_lsworm, i_batax, i_macema, i_maghm2, i_plthlm, i_potgre, i_potorg, i_potpur, i_sambts, i_samglv, i_samleg, i_samtop, i_samrob, i_shroud, i_swdbrd, i_swdflc, i_swdflm, i_rapegg, i_trseed, i_hatelf, i_hatinv, I_bbband, I_bigorn, I_bigred, I_grnbnd, I_ingot, I_hook, I_amul03, I_amul04, I_amul05, I_amul06, I_bracbr, I_bracebl, I_bracst, I_flute, I_lute, I_lyre, I_pipes.

Icons for terrain features that can be dragged, number 0 thru 37:
I_anablk, I_anaobl, I_anasta, I_anatal, I_anawid, I_barbrk, I_barl1, I_barl2, I_bucket, I_chest, I_chrcrb, I_chrcry, I_chregy, I_chror1, I_chror2, I_chrwod, I_chsteg, I_chstpi, I_coffin, I_cratbr, I_cratdw, I_crate, I_craten, I_crateo, I_cratet, I_drblok, I_foodca, I_logrud, I_ogrbar, I_pot1, I_sarcop, I_swheel, I_urnanb, I_urnans, I_urnceb, I_urnces, I_vasmar, I_vaswhi

0 = Human, 1 = Elf, 2 = Dwarf, 3 = Gnome, 4 = Pixie, 5 = Omphaaz, 6 = Whiskah, 7 = Gourk, 8 = Ratling, 9 = Lizzord

List of Classes, numbers 0 thru 14:
Warrior, Wizard, Priest, Rogue, Ranger, Bard, Samurai, Paladin, Barbarian, Monk, Ninja, Warlock, Assassin, Zenmaster, Valkyrie

List of the eight stats, numbers 0 thru 7:
Strength, Intellect, Spirituality, Dexterity, Agility, Fortitude, Will, Presence

Last edited by Shadow Stranger; 02-16-2008 at 06:43 PM. Reason: Grappling with initial part of file.
Shadow Stranger is offline   Reply With Quote
Old 12-28-2007, 06:59 AM   #2
Radek
Red Dragon
 

Join Date: April 3, 2001
Location: Prague, Czech Republic
Posts: 1,586
Default Re: Decrypting Save Game Files

Very good work, copying into my hintfiles Is there someone who can turn this into a nice savegame editor? The current one is incomplete and buggy. (I am a fanatic/2 who refuses to have anything common with winblows Well, I have to use this trash for playing games.)
__________________
My name is Demon\'s Last Day. Yes, the last one.
Radek is offline   Reply With Quote
Old 12-28-2007, 10:43 AM   #3
Wyvern
Ironworks Moderator
 

Join Date: January 7, 2001
Location: Rural Paradise, MI
Posts: 5,701
Default Re: Decrypting Save Game Files

As I recall when I was trying to figure out how to hack items and also learned to hack the characters to a certain degree - character information appears in three areas within the saved game file. To change items you only needed to work with the last bit of information at the end of the file - to change characters you had to do identical changes to all three areas.

(it's been years since I've done this but I'm fairly certain that is the way it was - or at least the only way that I could make character changes stick).
Wyvern is offline   Reply With Quote
Old 12-28-2007, 06:32 PM   #4
Shadow Stranger
Avatar
 

Join Date: December 9, 2007
Posts: 594
Default Re: Decrypting Save Game Files

The only W&W Editor was the work of Frederic. He may not have been able to decrypt the Trait area. You could try contacting him at the address given in the Editor readme file: frederic@iname.com

I personally can't program or compile that well. If he still has his source code handy from 2001&&

Edit: explanation of the term "binary sum", this example is taken from folder: “save-ww”, file: “game00.sav” as downloaded from this web page: http://www.tk421.net/wizardry/files.shtml.

Opening the file in Hexplorer we find that character 4,947,276 seems to be the start of the entry for the PC Johne. Hence place 401 is at 4,947,676: it has a decimal value of 76. In binary 76 = 1001100
The first group of eight traits is numbered as follows:
1: War Cry, 2: Giant Strike, 4: Ironmight, 8: Fury, 16: Spellfire, 32: Guardian Ward, 64: Sneak, 128: Hawk's Brow
Thus 76 = 64 + 8 + 4, hence this PC has traits Ironmight, Fury and Sneak.

Last edited by Shadow Stranger; 12-28-2007 at 07:17 PM.
Shadow Stranger is offline   Reply With Quote
Old 01-07-2008, 02:18 AM   #5
Shadow Stranger
Avatar
 

Join Date: December 9, 2007
Posts: 594
Default Re: Decrypting Save Game Files

If anyone wants to have a stab at decrypting the item entries in the save game files, here is my understanding of how they work:

The records for the 56 backpack squares are listed (implicitly) in natural order, first left to right, then top to bottom. The details of any item are listed in the entry for only one square. The details of a multi – square item are listed in the entry for the top left square of the space it occupies. If the item has a width of 1, the top square holds the records.

My understanding for what it is worth: whenever the entry for a square contains the details for an item, the entry remains until it is overwritten. Even when the item is dropped or sold, the entry still remains. It is only overwritten by the details for a new item being listed for the entry in that square.

The first two numbers are the components of the item’s decimal number, thus “3B 01” = 59 + 1*256 = 315, the number of the Sword of Kerah. It seems to be the case that they also act as an “item still exists” tag. If both numbers are zero then the item is no longer in that square, this seems to be the only change that happens when an item is removed from a square.

This will possibly speed up the decryption because there will be a much larger number of specimen entries.

Wizards & Warriors seems to be “little – end first”, the base – 256 digit is on the left then the base – 256 powers increase as one goes right.

My hunch is that item size (the number of squares the item occupies in the inventory screen) is a function of the graphic number. I changed the graphic of the custom item the Lute of Ishad Nha, from 243 to 230, that changed the actual size of the Lute from 2x3 to 1x1. Here that was the only change that I made.

Last edited by Shadow Stranger; 01-07-2008 at 02:43 AM.
Shadow Stranger is offline   Reply With Quote
Old 02-11-2008, 07:25 AM   #6
Shadow Stranger
Avatar
 

Join Date: December 9, 2007
Posts: 594
Default Re: Decrypting Save Game Files

The following numbers, starting at place 441, indicate poisoning:
05 00 00 00 60 EA 00 00 93 44 00
the only thing I know is that the "05" indicates the damage done. This is known for a fact because it was originally "04" and it then did 4 points of damage.

This sequence is repeated at place 10,433.

Spell effects, good and bad start at place 10,479.
The numbers are the enchic##.bmp numbers from the “staticon” folder.
1 = Bless, 2 = Weaken, 3 = Shadow, 4 = Invisible, 5 = Toughen, 6 = Hasten, 7 = Slow, 8 = Armor, 9 = Soften, 10 = Bloodlust, 11 = Heroic Might, 12 = Nimble, 13 = Lure, 14 = Repel, 15 = VineOfLife, 16 = Lavawalk, 17 = Reflect Damage, 18 = Berserk, 19 = Merlin's Shield, 20 = ???,
(As for number 20, I can’t see anything that matches it. Looks like a shadow. Files frequently mentioning a flying status, perhaps like Lavawalk, but it seems unsupported by the game.)
They are accompanied by numbers that I can’t currently understand.

Spell Numbers
Here are the numbers used to record knowledge of spells. These are "binary sums" as explained above.

Spirit Spells
Level 1, place 497, number 1 = Bless, 2 = Heal, 4 = Awaken
Level 2, place 501, number 1 = Charm, 2 = Spirit Eye
Level 3, place 505, number 1 = Great Heal, 2 = Mind Leech, 4 = Dispel Undead
Level 4, place 509, number 1 = Heroic Might, 2 = Force of Mind
Level 5, place 513, number 1 = Resurrect, 2 = Healing Realm
Level 6, place 517, number 1 = Restore Health, 2 = Dust To Dust
Level 7, place 521, number 1 = Rebirth, 2 = Exorcism, 4 = Artifact of Spirit

Sun Spells
Level 1, place 525, number 1 = Burn, 2 = Torchlight
Level 2, place 529, number 1 = Blinding Flash, 2 = Flamedrop
Level 3, place 533, number 1 = Illuminate, 2 = Flamestrike
Level 4, place 537, number 1 = Dazzle, 2 = Reveal
Level 5, place 541, number 1 = Dragon Breath, 2 = Artifact of Fire, 4 = Burning Haze
Level 6, place 545, number 1 = Incinerate, 2 = Magma Bomb
Level 7, place 549, number 1 = Firestorm, 2 = Circle of Fire

Moon Spells
Level 1, place 553, number 1 = Frighten, 2 = Nimble
Level 2, place 557, number 1 = Sleep, 2 = Shadow
Level 3, place 561, number 1 = Silence, 2 = Spectral Raven
Level 4, place 565, number 1 = Freeze, 2 = Iceball, 4 = Unsilence
Level 5, place 569, number 1 = Frost Breath, 2 = Artifact of Ice, 4 = Invisibility
Level 6, place 573, number 1 = Vanish, 2 = Create Portal, 4 = Teleport
Level 7, place 577, number 1 = Icestorm, 2 = Hands of Time, 4 = Call of Home

Vine Spells
Level 1, place 581, number 1 = Slow, 2 = Repel , 4 = Stink Bomb
Level 2, place 585, number 1 = Haste, 2 = Venom Bite, 4 = Lure
Level 3, place 589, number 1 = Binding Force, 2 = Artifact of Vines, 4 = Pry
Level 4, place 593, number 1 = Toughen, 2 = Cure Poison, 4 = Unbind
Level 5, place 597, number 1 = Locust Swarm, 2 = Disarm Trap, 4 = Poison Breath
Level 6, place 601, number 1 = Cure, 2 = Deadly Vapors, 4 = Breath of Air
Level 7, place 605, number 1 = Whirling Dervish, 2 = Vine of Life

Stone Spells
Level 1, place 609, number 1 = Shock, 2 = Armorplate
Level 2, place 613, number 1 = Melt, 2 = Zap
Level 3, place 617, number 1 = Elemental Blast, 2 = Armored Realm
Level 4, place 621, number 1 = Meteor, 2 = Artifact of Stone, 4 = Negate Magic
Level 5, place 625, number 1 = Merlin's Shield, 2 = Lightning
Level 6, place 629, number 1 = Petrification, 2 = Stone To Flesh, 4 = Lavawalk
Level 7, place 633, number 1 = Meteorstorm, 2 = Reflect Damage

Fiend Spells
Level 1, place 637, number 1 = Bloodlust, 2 = Enfeeble
Level 2, place 641, number 1 = Pain, 2 = Blood To Gold
Level 3, place 645, number 1 = Voice of Terror, 2 = Summon Creature
Level 4, place 649, number 1 = Dementia, 2 = Frenzy, 4 = Demonic Fist
Level 5, place 653, number 1 = (No spell!), 2 = Summon Undead, 4 = Face of Death
Level 6, place 657, number 1 = Twisted Master, 2 = Lifesteal, 4 = Artifact of Pain
Level 7, place 661, number 1 = Blood Bath, 2 = Summon Fiend, 4 = Word of Death

Last edited by Shadow Stranger; 02-15-2008 at 04:20 AM. Reason: Add Spell Numbers
Shadow Stranger is offline   Reply With Quote
Old 02-19-2008, 05:09 PM   #7
Shadow Stranger
Avatar
 

Join Date: December 9, 2007
Posts: 594
Default Re: Decrypting Save Game Files

Quote:
Originally Posted by Wyvern View Post
As I recall when I was trying to figure out how to hack items and also learned to hack the characters to a certain degree - character information appears in three areas within the saved game file. To change items you only needed to work with the last bit of information at the end of the file - to change characters you had to do identical changes to all three areas.

(it's been years since I've done this but I'm fairly certain that is the way it was - or at least the only way that I could make character changes stick).
I will have to look into this more. From what I can see, the first two sets of character information are just re - hashes of the Roster.dat file. The third one is the set of records that I have been describing in this forum. I am not sure if it is all changes to PCs or only some of them that will need to be done three times. Even in the latter case that is not hard.

One thing I will need to check is whether you need to alter all three entries when you only want temporary possession of an item. If you only need the item long enough to trigger a role ascension then altering the last record might be enough.

Last edited by Shadow Stranger; 01-29-2014 at 01:04 AM.
Shadow Stranger is offline   Reply With Quote
Old 02-20-2008, 09:02 AM   #8
Wyvern
Ironworks Moderator
 

Join Date: January 7, 2001
Location: Rural Paradise, MI
Posts: 5,701
Default Re: Decrypting Save Game Files

You're being so thorough!!

It certainly wasn't hard to do the changes in the three locations but I found the changes didn't "take" if I didn't do all of them.
Wyvern is offline   Reply With Quote
Old 02-20-2008, 05:54 PM   #9
Shadow Stranger
Avatar
 

Join Date: December 9, 2007
Posts: 594
Default Re: Decrypting Save Game Files

That is not so hard, any spreadsheet program can create a file that will show exactly where to make the changes. Simply input where the record starts and a formula will tell you exactly where the relevant change is to be made.

In the left column of an Excel spreadsheet I have the numbers from the entries found in the post I made on 28 December:
"Place 01: PC now in party?
Place 05: marching order, 0 to 5
Places 09 thru 24: name
.............
Place 10,140: start of previous classes listings
Place 10,177: start of bank account balance, seems to be the same for all three towns."

The next three columns turn the the absolute numbers: "1,5,9 ...... 10,140 10,177" into relative numbers as found in the individual save file.

An editor program would be useful, but first we would need to figure out where the records occur in the save file, what scheme determines where each record starts?

Edit:
As for a standard W&W editor that operates directly on a save game file: so far I have not found the formula that dictates where each of the first two sets of records start. The location of the start of the third set of records is known: (length of file) minus (number of PCs*10,766).

One solution is to find a string at the start of the first PC’s listing in the third set of records, hopefully this will only occur twice elsewhere in the save file, in the same place in the other two sets. If you find this string elsewhere in the save file, you will hopefully find where the first two sets of records start, thus you won’t need the formula after all. It is not enough to only use the PC’s name, this will occur all over the save file.

Last edited by Shadow Stranger; 02-22-2008 at 05:26 AM.
Shadow Stranger is offline   Reply With Quote
Old 01-24-2014, 06:47 PM   #10
Shadow Stranger
Avatar
 

Join Date: December 9, 2007
Posts: 594
Default Re: Decrypting Save Game Files

Quests probably have numbers. Role ascensions seem to be quests too. Here the No Dachi of the Stone quest has been assigned by the Brimloch Roon Dojo:
35 255 255 44 0 0 1 0 8
Here the quest has been completed:
35 255 255 44 0 0 2 0 53 8 0
It seems to be quest #44. I am not sure exactly where each code sequence starts and ends.
Shadow Stranger is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Decrypting Item.dat Shadow Stranger Wizards & Warriors Forum 4 02-24-2014 08:37 AM
Technical Problem - save files Granville Miscellaneous Games (RPG or not) 5 03-24-2002 07:47 PM
since im here, a ? about save game files Darc_Mind Baldurs Gate II: Shadows of Amn & Throne of Bhaal 3 03-08-2002 05:37 AM
Save files??? Forscythe Baldurs Gate & Tales of the Sword Coast 0 12-05-2001 02:15 AM
Restoring my save game files??? frostg1ant Wizards & Warriors Forum 3 10-27-2001 05:28 PM


All times are GMT -4. The time now is 11:14 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