<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://moddingwiki.shikadi.net/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Bag+of+Magic+Food</id>
	<title>ModdingWiki - User contributions [en-gb]</title>
	<link rel="self" type="application/atom+xml" href="https://moddingwiki.shikadi.net/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Bag+of+Magic+Food"/>
	<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/wiki/Special:Contributions/Bag_of_Magic_Food"/>
	<updated>2026-05-14T04:23:41Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.11</generator>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Dungeons_of_the_Unforgiven&amp;diff=9128</id>
		<title>Dungeons of the Unforgiven</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Dungeons_of_the_Unforgiven&amp;diff=9128"/>
		<updated>2020-08-08T18:35:50Z</updated>

		<summary type="html">&lt;p&gt;Bag of Magic Food: Noted the explored maps are subdivided&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
{{Game Infobox&lt;br /&gt;
 | Levels = Unknown&lt;br /&gt;
 | Tiles = Unknown&lt;br /&gt;
 | Sprites = Unknown&lt;br /&gt;
 | Fullscreen = Unknown&lt;br /&gt;
 | Sound = None&lt;br /&gt;
 | Music = None&lt;br /&gt;
 | Text = Some&lt;br /&gt;
 | Story = None&lt;br /&gt;
 | Interface = No&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
MoraffWare&#039;s &#039;&#039;Dungeons of the Unforgiven&#039;&#039; is a first-person dungeon crawler for MS-DOS, released as shareware in 1993 by MoraffWare. This is the third game in MoraffWare&#039;s series of role-playing games and is the direct successor to [[Moraff&#039;s World]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Dungeons of the Unforgiven&#039;&#039;, like &#039;&#039;Moraff&#039;s World&#039;&#039;, is notable for its wide range of display options. It is capable of displaying graphics on everything from CGA/Hercules to SuperVGA, supporting everything from 320x200 with 4 colors to 1024x768 with 256 colors.&lt;br /&gt;
&lt;br /&gt;
{{BeginGameFileList}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = 2?&lt;br /&gt;
 | Format = [[Dungeons of the Unforgiven Player Character|Player Character]]&lt;br /&gt;
 | KnownFormat = Partial&lt;br /&gt;
 | Desc = A saved player character. Up to 10 characters can be saved (with filenames ranging from 20 through 29, corresponding to the slot that the character is stored in).&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = ???.DUN&lt;br /&gt;
 | Format = [[Dungeons of the Unforgiven Map|Map]]&lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = The sections that have been explored on each dungeon level. Note that changing this file does not change the dungeon layout. The first character of the filename is the player identifier (D is slot 0, M is slot 9), the second character is a division of up to 32 floors within the module (0 is floors 0-31, 3 is floors 96-104), and the third character is the zero-indexed number of the module. The purpose of the 001.DUN/011.DUN/etc files is currently unknown.&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = ?MON.MAP&lt;br /&gt;
 | Format = [[Moraff Monster Map|Monster Map]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = A dump of the currently generated monsters in the dungeon. Each player character has a monster map, with filenames ranging from DMON.MAP through MMON.MAP.&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = MD.BIN&lt;br /&gt;
 | Format = [[Dungeons of the Unforgiven Monster Information|Monster Information]]&lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = This file contains the monster information directory that players can access by hitting the &#039;S&#039; key during play.&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = UNFDUNG.BIN&lt;br /&gt;
 | Format = &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = UH.BIN&amp;lt;br/&amp;gt;UH2.BIN&lt;br /&gt;
 | Format = [[Dungeons of the Unforgiven In-Game Text|In-Game Text]]&lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = These two plaintext files contain most of the in-game messages, aside from the UI messages. While some strings are compiled into the executable, the vast majority are included here.&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = UROLL.TXT&lt;br /&gt;
 | Format = [[Dungeons of the Unforgiven Character Creation Text|Character Creation Text]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = This file contains text blocks used during the character creation process. Each screen element reads a fixed number of lines from the text file.&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.FNT&lt;br /&gt;
 | Format = [[Moraff Font|Font]]&lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = A few fonts that are used by the game. These are most likely vector fonts.&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.PIC&lt;br /&gt;
 | Format = [[Dungeons of the Unforgiven Picture Format|Picture]]&lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = A set of files containing the game&#039;s sprites, textures, and full-screen images. Due to the game&#039;s wide ranging display support, it&#039;s likely that the images are vectorized.&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.UHP&lt;br /&gt;
 | Format = [[Moraff Help File|Help File]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Stores the colored text that&#039;s displayed in the in-game help screens.&lt;br /&gt;
}}&lt;br /&gt;
{{EndGameFileList}}&lt;br /&gt;
&lt;br /&gt;
* All bundled executables are compressed with [[PKLite compression]]. Despite UNFORGIV.EXE being used to launch the game, all of the game logic is stored in UNF.EXE.&lt;br /&gt;
&lt;br /&gt;
[[Category:MoraffWare]]&lt;br /&gt;
[[Category:Moraff&#039;s Dungeon Pack]]&lt;br /&gt;
[[Category:Dungeons of the Unforgiven]]&lt;/div&gt;</summary>
		<author><name>Bag of Magic Food</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Dungeons_of_the_Unforgiven_Player_Character&amp;diff=9127</id>
		<title>Dungeons of the Unforgiven Player Character</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Dungeons_of_the_Unforgiven_Player_Character&amp;diff=9127"/>
		<updated>2020-08-08T07:49:28Z</updated>

		<summary type="html">&lt;p&gt;Bag of Magic Food: That should be all the battle spells; although I don&amp;#039;t know what all causes Sleep to end early, it does seem to be a sudden zeroing rather than a faster drain.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Playerdata Infobox&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = ?&lt;br /&gt;
 | Elements = Player character data&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|Dungeons of the Unforgiven}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The saved game format for &#039;&#039;[[Dungeons of the Unforgiven]]&#039;&#039; appears to be a simple dump of the game&#039;s internal structures, with a couple of checksum bytes added on, presumably to slow cheaters down a bit. Some of the chunks of data are in a very peculiar order (such as some of the items being in radically different spots of the file), which makes it somewhat annoying to try to directly load into a C struct or similar data structure.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re parsing this format, be very mindful of the data types. Signed and unsigned data types, as well as differing field sizes, are used even with related fields. For example, Rings of Protection are stored in an unsigned byte while Potions of Healing are stored in a signed word.&lt;br /&gt;
&lt;br /&gt;
== File Layout ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset (hex) !! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000 || [[char]][18] || playerName || The name of the player character (including a null terminator).&lt;br /&gt;
|-&lt;br /&gt;
| 0x0012 || [[BYTE]][22] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0028 || [[INT8]] || playerRace || The race of the player character.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0029 || [[INT8]] || playerGender || The player character&#039;s gender (0x00 == male; 0x01 == female)&lt;br /&gt;
|-&lt;br /&gt;
| 0x002A || [[INT8]] || playerClass || The player character&#039;s class.&lt;br /&gt;
|-&lt;br /&gt;
| 0x002B || [[BYTE]][6] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0031 || [[INT16LE]] || playerCurrentHP || The player character&#039;s current hit points.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0033 || [[INT16LE]] || playerMaxHP || The player character&#039;s maximum hit points.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0035 || [[Single]] || playerCurrentSP || The player character&#039;s current spell points.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0039 || [[Single]] || playerMaxSP || The player character&#039;s maximum spell points.&lt;br /&gt;
|-&lt;br /&gt;
| 0x003D || [[INT16LE]] || playerHeight || The player character&#039;s height, divided by 4. (The game multiplies this value by 4 to give the stated number of inches.)&lt;br /&gt;
|-&lt;br /&gt;
| 0x003F || [[INT16LE]] || nakedWeight || The player&#039;s base weight.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0041 || [[INT16LE]] || loadedWeight || The player&#039;s loaded weight (note: this always gets updated by the game).&lt;br /&gt;
|-&lt;br /&gt;
| 0x0043 || [[BYTE]][62] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0081 || [[BYTE]] || weaponFists || Player character has their fists (normally these cannot be dropped).&lt;br /&gt;
|-&lt;br /&gt;
| 0x0082 || [[BYTE]] || weaponStick || Player character has the stick.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0083 || [[BYTE]] || weaponClub || Player character has the club.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0084 || [[BYTE]] || weaponMace || Player character has the mace.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0085 || [[BYTE]] || weaponKnife || Player character has the knife.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0086 || [[BYTE]] || weaponShortSword || Player character has the short sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0087 || [[BYTE]] || weaponLongSword || Player character has the long sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0088 || [[BYTE]] || weaponGreatSword || Player character has the great sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0089 || [[BYTE]][5] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x008E || [[INT8]] || levelFists || The permanent enchantment level of the fists.&lt;br /&gt;
|-&lt;br /&gt;
| 0x008F || [[INT8]] || levelStick || The permanent enchantment level of the stick.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0090 || [[INT8]] || levelClub || The permanent enchantment level of the club.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0091 || [[INT8]] || levelMace || The permanent enchantment level of the mace.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0092 || [[INT8]] || levelKnife || The permanent enchantment level of the knife.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0093 || [[INT8]] || levelShortSword || The permanent enchantment level of the short sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0094 || [[INT8]] || levelLongSword || The permanent enchantment level of the long sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0095 || [[INT8]] || levelGreatSword || The permanent enchantment level of the great sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0096 || [[BYTE]][5] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x009B || [[INT8]] || equippedWeapon || The weapon that the player character currently has equipped. See the [[#Weapon_IDs|Weapon IDs]] section for valid values.&lt;br /&gt;
|-&lt;br /&gt;
| 0x009C || [[BYTE]][20] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B0 || [[BYTE]] || armorSkin || Player character has their skin (normally this cannot be dropped).&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B1 || [[BYTE]] || armorLeather || Player character has leather armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B2 || [[BYTE]] || armorChain || Player character has chain armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B3 || [[BYTE]] || armorScale || Player character has scale armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B4 || [[BYTE]] || armorBreastPlate || Player character has the breast plate.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B5 || [[BYTE]] || armorFieldPlate || Player character has field plate.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B6 || [[BYTE]] || armorTitanium || Player character has the titanium armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B7 || [[BYTE]] || armorSlot8 || This &amp;quot;armor&amp;quot; is not implemented in the game and points to garbage data. See the notes below for a little bit more information. {{TODO|Figure out exactly what in the executable this is pointing to, as it is technically fully usable.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B8 || [[INT8]] || levelSkin || The permanent enchantment level of the skin.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B9 || [[INT8]] || levelLeather || The permanent enchantment level of the leather armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BA || [[INT8]] || levelChain || The permanent enchantment level of the chain armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BB || [[INT8]] || levelScale || The permanent enchantment level of the scale armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BC || [[INT8]] || levelBreastPlate || The permanent enchantment level of the breast plate.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BD || [[INT8]] || levelFieldPlate || The permanent enchantment level of the field plate.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BE || [[INT8]] || levelTitanium || The permanent enchantment level of the titanium armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BF || [[INT8]] || levelSlot8 || The permanent enchantment level of the glitchy armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00C0 || [[INT8]] || equippedArmor || The armor that the player character currently has equipped. See the [[#Armor_IDs|Armor IDs]] section for valid values.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00C1 || [[BYTE]][156] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x015D || [[INT8]] || orangePotions || The number of orange potions in the player&#039;s inventory (+6 Strength / -3 Luck)&lt;br /&gt;
|-&lt;br /&gt;
| 0x015E || [[INT8]] || greenPotions || The number of green potions in the player&#039;s inventory (+6 Intelligence / -3 Agility)&lt;br /&gt;
|-&lt;br /&gt;
| 0x015F || [[INT8]] || bluePotions || The number of blue potions in the player&#039;s inventory (+6 Wisdom / -3 Constitution)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0160 || [[INT8]] || redPotions || The number of red potions in the player&#039;s inventory (+6 Constitution / -3 Wisdom)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0161 || [[INT8]] || whitePotions || The number of white potions in the player&#039;s inventory (+6 Agility / -3 Intelligence)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0162 || [[INT8]] || yellowPotions || The number of yellow potions in the player&#039;s inventory (+6 Luck / -3 Strength)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0163 || [[BYTE]][20] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0177 || [[#Spells|SPELL_LIST]] || spellbook || The spells that the player has learned and can cast at any time at the cost of spell power.&lt;br /&gt;
|-&lt;br /&gt;
| 0x022B || [[#Spells|SPELL_LIST]] || scrolls || The spells that the player can cast from a scroll.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02DF || [[#Spells|SPELL_LIST]] || wands || The spell wands that the player possesses.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0393 || [[#Spells|SPELL_LIST]] || papers || The spell papers that the player owns.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0447 || [[BYTE]][13] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0454 || [[INT32LE]] || rublesInPocket || The number of rubles that the player has on hand.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0458 || [[INT32LE]] || rublesInBank || The number of rubles that the player has in the bank.&lt;br /&gt;
|-&lt;br /&gt;
| 0x045C || [[BYTE]][8] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0464 || [[INT32LE]] || cultureStock || The amount of culture stock that the player owns.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0468 || [[INT32LE]] || childrenHelped || The number of children that the player helped (at the temple).&lt;br /&gt;
|-&lt;br /&gt;
| 0x046C || [[INT32LE]] || magicCrystals || The number of magic crystals that the player owns.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0470 || [[INT32LE]] || americanDollars || The number of American Dollars that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0474 || [[BYTE]][816] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x07A4 || [[Double]] || experiencePoints || The number of experience points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07AC || [[INT16LE]] || playerLevel || The player character&#039;s current level.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07AE || [[INT16LE]] || playerDirection || The direction that the player character is facing (0x00 == north; 0x01 == south; 0x02 == west; 0x03 == east).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B0 || [[INT16LE]] || playerPositionX || The X coordinate of the player in the current dungeon floor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B2 || [[INT16LE]] || playerPositionY || The Y coordinate of the player in the current dungeon floor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B4 || [[INT16LE]] || playerFloor || The floor of the dungeon that the player is currently on (0 is the town).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B6 || [[INT16LE]] || playerModule || The module that the player is currently playing.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B8 || [[BYTE]][18] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CA || [[UINT8]] || ringsOfRegeneration || The number of rings of regeneration that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CB || [[BYTE]] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CC || [[UINT8]] || nuclearHandGrenade || The number of nuclear hand grenades that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CD || [[UINT8]] || stonesOfSeeing || The number of stones of seeing that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CE || [[INT16LE]] || diseaseTimer || The number of turns until disease damages constitution (0 or -1 disables the timer).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D0 || [[INT16LE]] || poisonTimer || The number of turns until poison damages strength (0 or -1 disables the timer).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D2 || [[UINT8]] || enchantWeaponLevel || The level of the current &amp;quot;Enchant Weapon&amp;quot; preparation spell in effect.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D3 || [[UINT8]] || enchantArmorLevel || The level of the current &amp;quot;Enchant Armor&amp;quot; preparation spell in effect.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D4 || [[UINT8]] || bodyArmor || The number of body armor items that the player has (not related to the gear, listed above).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D5 || [[UINT8]] || ringOfProtection || The number of rings of protection that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D6 || [[UINT8]] || antiMagicRing || The number of anti-magic rings that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D7 || [[BYTE]] || feather || Spell &amp;quot;Feather&amp;quot; is in effect. 0x01 == the preparation version; 0x64 == &amp;quot;Permanent Feather.&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D8 || [[BYTE]] || fastMove || Preparation spell &amp;quot;Fast Move&amp;quot; is in effect. Values greater than 0x01 make it permanent despite there being no such permanent spell!&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D9 || [[BYTE]] || invisibility || Spell &amp;quot;Invisibility&amp;quot; is in effect. 0x01 == the preparation version; 0x64 == &amp;quot;Permanent Invisibility.&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0x07DA || [[INT32LE]] || playerAge || The current age of the player character.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07DE || [[UINT8]] || preparationStrength || Preparation spell &amp;quot;Strength&amp;quot; is in effect. Normally set to 0x05 (yet changing it or any of the following strength/agility spell values to another nonzero value will not change the number of strength/agility points deducted by an inn stay).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07DF || [[UINT8]] || preparationAgility || Preparation spell &amp;quot;Agility&amp;quot; is in effect. Normally set to 0x05.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07E0 || [[UINT8]] || superStrength || Preparation spell &amp;quot;Super Strength&amp;quot; is in effect. Normally set to 0x0A.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07E1 || [[UINT8]] || superAgility || Preparation spell &amp;quot;Super Agility&amp;quot; is in effect. Normally set to 0x0A.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07E2 || [[INT16LE]] || battleStrengthTimer || The number of turns the battle spell &amp;quot;Strength&amp;quot; remains in effect.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07E4 || [[INT16LE]] || battleSpeedTimer || The number of turns the battle spell &amp;quot;Speed&amp;quot; remains in effect.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07E6 || [[INT16LE]] || slowMonsterTimer || The number of turns the battle spell &amp;quot;Slow Enemies&amp;quot; remains in effect.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07E8 || [[UINT8]] || powerWeaponLevel || The level of the current &amp;quot;Power Weapon&amp;quot; battle spell in effect.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07E9 || [[INT16LE]] || powerWeaponTimer || The number of turns the current &amp;quot;Power Weapon&amp;quot; battle spell remains in effect. If this is set to zero or negative while powerWeaponLevel is nonzero, the spell will never wear off until an inn stay!&lt;br /&gt;
|-&lt;br /&gt;
| 0x07EB || [[UINT8]] || protectLevel || The level of the current &amp;quot;Protection&amp;quot; battle spell in effect (0x01 == &amp;quot;Minor Protection;&amp;quot; 0x02 == &amp;quot;Protection;&amp;quot; 0x03 == &amp;quot;Major Protection;&amp;quot; 0x04 == &amp;quot;Ultra Protection&amp;quot;).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07EC || [[INT16LE]] || protectTimer || The number of turns the current &amp;quot;Protection&amp;quot; battle spell remains in effect. If this is set to zero or negative while protectLevel is nonzero, the spell will never wear off until an inn stay!&lt;br /&gt;
|-&lt;br /&gt;
| 0x07EE || [[INT16LE]] || resistPoisonTimer || The number of turns the battle spell &amp;quot;Resist Poison&amp;quot; remains in effect.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07F0 || [[INT16LE]] || resistDiseaseTimer || The number of turns the battle spell &amp;quot;Resist Disease&amp;quot; remains in effect.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07F2 || [[INT16LE]] || antiColdTimer || The number of turns the battle spell &amp;quot;Anti-Cold&amp;quot; remains in effect.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07F4 || [[INT16LE]] || antiFireTimer || The number of turns the battle spell &amp;quot;Anti-Fire&amp;quot; remains in effect.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07F6 || [[INT16LE]] || resistDrainTimer || The number of turns the battle spell &amp;quot;Resist Level Drain&amp;quot; remains in effect.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07F8 || [[INT16LE]] || stopMonsterTimer || The number of turns the battle spell &amp;quot;Sleep&amp;quot; could remain in effect (though it often wears off much earlier due to the vagaries of the spell).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07FA || [[INT16LE]] || holdMonsterTimer || The number of turns the battle spell &amp;quot;Hold Monster&amp;quot; remains in effect.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07FC || [[BYTE]][6] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0802 || [[INT8]] || floorSloshers || The number of floor sloshers that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0803 || [[BYTE]][15] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0812 || [[INT16LE]] || potionsOfHealing || The number of potions of healing that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0814 || [[INT16LE]] || stonesOfTeleportation || The number of stones of teleportation that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0816 || [[INT16LE]] || playerStrength || The number of strength points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0818 || [[INT16LE]] || playerIntelligence || The number of intelligence points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x081A || [[INT16LE]] || playerWisdom || The number of wisdom points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x081C || [[INT16LE]] || playerConstitution || The number of constitution points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x081E || [[INT16LE]] || playerAgility || The number of agility points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0820 || [[INT16LE]] || playerLuck || The number of luck points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0822 || [[BYTE]][21] || trapDoorKey || The trapdoor keys owned by the player. For each nonzero value in trapDoorKey[n], the player is able to use any trapdoors leading to floor (n * 5).&lt;br /&gt;
|-&lt;br /&gt;
| 0x0837 || [[BYTE]][28] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0853 || [[INT8]] || gauntlets || The number of gauntlets that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0854 || [[BYTE]][162] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x08F6 || [[BYTE]] || difficulty || The difficulty level that the player is playing on. (0x00 == normal; 0x01 == &amp;quot;I can handle anything!&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08F7 || [[BYTE]][122] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0971 || [[UINT32LE]] || gameTimer || This appears to be some sort of hidden in-game timer. {{TODO|Figure out when this is incremented and whether or not it actually does anything.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0975 || [[BYTE]][274] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A87 || [[UINT8]][2] || checksum || The checksum of the saved game file. See [[#Checksum|below]] for more information.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Races ===&lt;br /&gt;
&lt;br /&gt;
The following races can be chosen:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Race&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Humanoid&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Ape&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Childman&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Rodent&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Hobo&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Giant&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Midget&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Shrimp&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Classes ===&lt;br /&gt;
&lt;br /&gt;
The following classes can be chosen:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Class&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Fighter&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Worshipper&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Monk&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Wizard&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Priest&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Sage&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Mage&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Spells ===&lt;br /&gt;
&lt;br /&gt;
Spells are stored in the save file per the following table. In all cases, the spells are stored in order from left-to-right, top-to-bottom, with respect to the in-game spell browser. Each spell category has 15 unused bytes at the end; Monks have all these bytes filled with 0x01 in their spellbook section nonetheless.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]][45] || spellsPermanent || The permanent spells that the player has access to.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]][45] || spellsPreparation || The preparation spells that the player has access to.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]][45] || spellsWizard || The wizard battle spells that the player has access to.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]][45] || spellsPriest || The priest battle spells that the player has access to.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Weapon IDs ===&lt;br /&gt;
&lt;br /&gt;
The following weapon IDs can be used in the &#039;&#039;&#039;equippedWeapon&#039;&#039;&#039; field.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Weapon Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Fists&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Stick&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Club&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Mace&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Knife&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Short Sword&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Long Sword&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Great Sword&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Note: the player does not have to own the specified weapon type in order to have it equipped. The equipment check is only performed when the player switches their weapon in-game.&lt;br /&gt;
&lt;br /&gt;
=== Armor IDs ===&lt;br /&gt;
&lt;br /&gt;
The following weapon IDs can be used in the &#039;&#039;&#039;equippedArmor&#039;&#039;&#039; field.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Armor Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Skin&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Leather&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Chain&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Scale&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Breast Plate&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Field Plate&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Titanium&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Glitchy Armor*&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Note: the player does not have to own the specified armor type in order to have it equipped. The equipment check is only performed when the player switches their armor in-game.&lt;br /&gt;
* *The eighth armor slot always appears in the armor list of the game as a blank slot, but only seven armor types appear within the game world. If the set of armor is hacked into the game with a hex editor or memory editor, it appears as jumbled text and provides a currently-unknown amount of protection.&lt;br /&gt;
&lt;br /&gt;
=== Checksum ===&lt;br /&gt;
&lt;br /&gt;
The checksum is calculated as follows (example in C# and assuming saveBytes is the saved game data, sans checksum—that is, the first 2695 (0xA87) bytes in the file):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
checksum[0] = checksum[1] = 0;&lt;br /&gt;
foreach(var b in saveBytes) {&lt;br /&gt;
    checksum[0] += b;&lt;br /&gt;
    checksum[1] += checksum[0] - checksum[0] * checksum[0];&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the checksum is incorrect for the saved game file, the player will be immediately booted back to the DOS prompt with a &amp;quot;corrupted character&amp;quot; error.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This file format was reverse engineered and documented by [[User:Spectere|Spectere]] and [[User:Bag_of_Magic_Food|Bag of Magic Food]]. If you find this information helpful in a project you&#039;re working on, please give credit where credit is due. (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>Bag of Magic Food</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Dungeons_of_the_Unforgiven_Player_Character&amp;diff=9121</id>
		<title>Dungeons of the Unforgiven Player Character</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Dungeons_of_the_Unforgiven_Player_Character&amp;diff=9121"/>
		<updated>2020-08-05T19:55:54Z</updated>

		<summary type="html">&lt;p&gt;Bag of Magic Food: I remembered this explanation of height from Cagey Rabbit&amp;#039;s guide to in-game memory, and then I discovered that the game will accept the next byte of significance and make the graphics even glitchier!&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Playerdata Infobox&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = ?&lt;br /&gt;
 | Elements = Player character data&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|Dungeons of the Unforgiven}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The saved game format for &#039;&#039;[[Dungeons of the Unforgiven]]&#039;&#039; appears to be a simple dump of the game&#039;s internal structures, with a couple of checksum bytes added on, presumably to slow cheaters down a bit. Some of the chunks of data are in a very peculiar order (such as some of the items being in radically different spots of the file), which makes it somewhat annoying to try to directly load into a C struct or similar data structure.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re parsing this format, be very mindful of the data types. Signed and unsigned data types, as well as differing field sizes, are used even with related fields. For example, Rings of Protection are stored in an unsigned byte while Potions of Healing are stored in a signed word.&lt;br /&gt;
&lt;br /&gt;
== File Layout ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset (hex) !! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000 || [[char]][18] || playerName || The name of the player character (including a null terminator).&lt;br /&gt;
|-&lt;br /&gt;
| 0x0012 || [[BYTE]][22] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0028 || [[INT8]] || playerRace || The race of the player character.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0029 || [[INT8]] || playerGender || The player character&#039;s gender (0x00 == male; 0x01 == female)&lt;br /&gt;
|-&lt;br /&gt;
| 0x002A || [[INT8]] || playerClass || The player character&#039;s class.&lt;br /&gt;
|-&lt;br /&gt;
| 0x002B || [[BYTE]][6] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0031 || [[INT16LE]] || playerCurrentHP || The player character&#039;s current hit points.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0033 || [[INT16LE]] || playerMaxHP || The player character&#039;s maximum hit points.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0035 || [[Single]] || playerCurrentSP || The player character&#039;s current spell points.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0039 || [[Single]] || playerMaxSP || The player character&#039;s maximum spell points.&lt;br /&gt;
|-&lt;br /&gt;
| 0x003D || [[INT16LE]] || height || The player character&#039;s height, divided by 4. (The game multiplies this value by 4 to give the stated number of inches.)&lt;br /&gt;
|-&lt;br /&gt;
| 0x003F || [[INT16LE]] || nakedWeight || The player&#039;s base weight.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0041 || [[INT16LE]] || loadedWeight || The player&#039;s loaded weight (note: this always gets updated by the game).&lt;br /&gt;
|-&lt;br /&gt;
| 0x0043 || [[BYTE]][62] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0081 || [[BYTE]] || weaponFists || Player character has their fists (normally these cannot be dropped).&lt;br /&gt;
|-&lt;br /&gt;
| 0x0082 || [[BYTE]] || weaponStick || Player character has the stick.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0083 || [[BYTE]] || weaponClub || Player character has the club.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0084 || [[BYTE]] || weaponMace || Player character has the mace.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0085 || [[BYTE]] || weaponKnife || Player character has the knife.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0086 || [[BYTE]] || weaponShortSword || Player character has the short sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0087 || [[BYTE]] || weaponLongSword || Player character has the long sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0088 || [[BYTE]] || weaponGreatSword || Player character has the great sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0089 || [[BYTE]][5] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x008E || [[INT8]] || levelFists || The permanent enchantment level of the fists.&lt;br /&gt;
|-&lt;br /&gt;
| 0x008F || [[INT8]] || levelStick || The permanent enchantment level of the stick.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0090 || [[INT8]] || levelClub || The permanent enchantment level of the club.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0091 || [[INT8]] || levelMace || The permanent enchantment level of the mace.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0092 || [[INT8]] || levelKnife || The permanent enchantment level of the knife.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0093 || [[INT8]] || levelShortSword || The permanent enchantment level of the short sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0094 || [[INT8]] || levelLongSword || The permanent enchantment level of the long sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0095 || [[INT8]] || levelGreatSword || The permanent enchantment level of the great sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0096 || [[BYTE]][5] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x009B || [[INT8]] || equippedWeapon || The weapon that the player character currently has equipped. See the [[#Weapon_IDs|Weapon IDs]] section for valid values.&lt;br /&gt;
|-&lt;br /&gt;
| 0x009C || [[BYTE]][20] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B0 || [[BYTE]] || armorSkin || Player character has their skin (normally this cannot be dropped).&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B1 || [[BYTE]] || armorLeather || Player character has leather armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B2 || [[BYTE]] || armorChain || Player character has chain armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B3 || [[BYTE]] || armorScale || Player character has scale armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B4 || [[BYTE]] || armorBreastPlate || Player character has the breast plate.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B5 || [[BYTE]] || armorFieldPlate || Player character has field plate.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B6 || [[BYTE]] || armorTitanium || Player character has the titanium armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B7 || [[BYTE]] || armorSlot8 || This &amp;quot;armor&amp;quot; is not implemented in the game and points to garbage data. See the notes below for a little bit more information. {{TODO|Figure out exactly what in the executable this is pointing to, as it is technically fully usable.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B8 || [[INT8]] || levelSkin || The permanent enchantment level of the skin.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B9 || [[INT8]] || levelLeather || The permanent enchantment level of the leather armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BA || [[INT8]] || levelChain || The permanent enchantment level of the chain armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BB || [[INT8]] || levelScale || The permanent enchantment level of the scale armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BC || [[INT8]] || levelBreastPlate || The permanent enchantment level of the breast plate.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BD || [[INT8]] || levelFieldPlate || The permanent enchantment level of the field plate.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BE || [[INT8]] || levelTitanium || The permanent enchantment level of the titanium armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BF || [[INT8]] || levelSlot8 || The permanent enchantment level of the glitchy armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00C0 || [[INT8]] || equippedArmor || The armor that the player character currently has equipped. See the [[#Armor_IDs|Armor IDs]] section for valid values.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00C1 || [[BYTE]][156] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x015D || [[INT8]] || orangePotions || The number of orange potions in the player&#039;s inventory (+6 Strength / -3 Luck)&lt;br /&gt;
|-&lt;br /&gt;
| 0x015E || [[INT8]] || greenPotions || The number of green potions in the player&#039;s inventory (+6 Intelligence / -3 Agility)&lt;br /&gt;
|-&lt;br /&gt;
| 0x015F || [[INT8]] || bluePotions || The number of blue potions in the player&#039;s inventory (+6 Wisdom / -3 Constitution)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0160 || [[INT8]] || redPotions || The number of red potions in the player&#039;s inventory (+6 Constitution / -3 Wisdom)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0161 || [[INT8]] || whitePotions || The number of white potions in the player&#039;s inventory (+6 Agility / -3 Intelligence)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0162 || [[INT8]] || yellowPotions || The number of yellow potions in the player&#039;s inventory (+6 Luck / -3 Strength)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0163 || [[BYTE]][20] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0177 || [[#Spells|SPELL_LIST]] || spellbook || The spells that the player has learned and can cast at any time at the cost of spell power.&lt;br /&gt;
|-&lt;br /&gt;
| 0x022B || [[#Spells|SPELL_LIST]] || scrolls || The spells that the player can cast from a scroll.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02DF || [[#Spells|SPELL_LIST]] || wands || The spell wands that the player possesses.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0393 || [[#Spells|SPELL_LIST]] || papers || The spell papers that the player owns.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0447 || [[BYTE]][13] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0454 || [[INT32LE]] || rublesInPocket || The number of rubles that the player has on hand.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0458 || [[INT32LE]] || rublesInBank || The number of rubles that the player has in the bank.&lt;br /&gt;
|-&lt;br /&gt;
| 0x045C || [[BYTE]][8] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0464 || [[INT32LE]] || cultureStock || The amount of culture stock that the player owns.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0468 || [[INT32LE]] || childrenHelped || The number of children that the player helped (at the temple).&lt;br /&gt;
|-&lt;br /&gt;
| 0x046C || [[INT32LE]] || magicCrystals || The number of magic crystals that the player owns.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0470 || [[INT32LE]] || americanDollars || The number of American Dollars that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0474 || [[BYTE]][816] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x07A4 || [[Double]] || experiencePoints || The number of experience points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07AC || [[INT16LE]] || playerLevel || The player character&#039;s current level.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07AE || [[INT16LE]] || playerDirection || The direction that the player character is facing (0x00 == north; 0x01 == south; 0x02 == west; 0x03 == east).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B0 || [[INT16LE]] || playerPositionX || The X coordinate of the player in the current dungeon floor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B2 || [[INT16LE]] || playerPositionY || The Y coordinate of the player in the current dungeon floor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B4 || [[INT16LE]] || playerFloor || The floor of the dungeon that the player is currently on (0 is the town).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B6 || [[INT16LE]] || playerModule || The module that the player is currently playing.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B8 || [[BYTE]][18] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CA || [[UINT8]] || ringsOfRegeneration || The number of rings of regeneration that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CB || [[BYTE]] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CC || [[UINT8]] || nuclearHandGrenade || The number of nuclear hand grenades that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CD || [[UINT8]] || stonesOfSeeing || The number of stones of seeing that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CE || [[INT16LE]] || diseaseTimer || The number of turns until disease damages constitution (0 or -1 disables the timer).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D0 || [[INT16LE]] || poisonTimer || The number of turns until poison damages strength (0 or -1 disables the timer).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D2 || [[UINT8]] || enchantWeaponLevel || The level of the current &amp;quot;Enchant Weapon&amp;quot; preparation spell in effect.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D3 || [[UINT8]] || enchantArmorLevel || The level of the current &amp;quot;Enchant Armor&amp;quot; preparation spell in effect.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D4 || [[UINT8]] || bodyArmor || The number of body armor items that the player has (not related to the gear, listed above).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D5 || [[UINT8]] || ringOfProtection || The number of rings of protection that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D6 || [[UINT8]] || antiMagicRing || The number of anti-magic rings that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D7 || [[BYTE]] || feather || Spell &amp;quot;Feather&amp;quot; is in effect. 0x01 == the preparation version; 0x64 == &amp;quot;Permanent Feather.&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D8 || [[BYTE]] || fastMove || Preparation spell &amp;quot;Fast Move&amp;quot; is in effect. Values greater than 0x01 make it permanent despite there being no such permanent spell!&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D9 || [[BYTE]] || invisibility || Spell &amp;quot;Invisibility&amp;quot; is in effect. 0x01 == the preparation version; 0x64 == &amp;quot;Permanent Invisibility.&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0x07DA || [[INT32LE]] || playerAge || The current age of the player character.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07DE || [[UINT8]] || preparationStrength || Preparation spell &amp;quot;Strength&amp;quot; is in effect. Normally set to 0x05 (yet changing it or any of the following strength/agility spell values to another nonzero value will not change the number of strength/agility points deducted by an inn stay).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07DF || [[UINT8]] || preparationAgility || Preparation spell &amp;quot;Agility&amp;quot; is in effect. Normally set to 0x05.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07E0 || [[UINT8]] || superStrength || Preparation spell &amp;quot;Super Strength&amp;quot; is in effect. Normally set to 0x0A.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07E1 || [[UINT8]] || superAgility || Preparation spell &amp;quot;Super Agility&amp;quot; is in effect. Normally set to 0x0A.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07E2 || [[BYTE]][32] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0802 || [[INT8]] || floorSloshers || The number of floor sloshers that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0803 || [[BYTE]][15] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0812 || [[INT16LE]] || potionsOfHealing || The number of potions of healing that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0814 || [[INT16LE]] || stonesOfTeleportation || The number of stones of teleportation that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0816 || [[INT16LE]] || playerStrength || The number of strength points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0818 || [[INT16LE]] || playerIntelligence || The number of intelligence points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x081A || [[INT16LE]] || playerWisdom || The number of wisdom points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x081C || [[INT16LE]] || playerConstitution || The number of constitution points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x081E || [[INT16LE]] || playerAgility || The number of agility points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0820 || [[INT16LE]] || playerLuck || The number of luck points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0822 || [[BYTE]][21] || trapDoorKey || The trapdoor keys owned by the player. For each nonzero value in trapDoorKey[n], the player is able to use any trapdoors leading to floor (n * 5).&lt;br /&gt;
|-&lt;br /&gt;
| 0x0837 || [[BYTE]][28] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0853 || [[INT8]] || gauntlets || The number of gauntlets that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0854 || [[BYTE]][162] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x08F6 || [[BYTE]] || difficulty || The difficulty level that the player is playing on. (0x00 == normal; 0x01 == &amp;quot;I can handle anything!&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08F7 || [[BYTE]][122] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0971 || [[UINT32LE]] || gameTimer || This appears to be some sort of hidden in-game timer. {{TODO|Figure out when this is incremented and whether or not it actually does anything.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0975 || [[BYTE]][274] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A87 || [[UINT8]][2] || checksum || The checksum of the saved game file. See [[#Checksum|below]] for more information.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Races ===&lt;br /&gt;
&lt;br /&gt;
The following races can be chosen:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Race&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Humanoid&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Ape&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Childman&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Rodent&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Hobo&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Giant&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Midget&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Shrimp&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Classes ===&lt;br /&gt;
&lt;br /&gt;
The following classes can be chosen:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Class&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Fighter&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Worshipper&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Monk&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Wizard&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Priest&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Sage&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Mage&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Spells ===&lt;br /&gt;
&lt;br /&gt;
Spells are stored in the save file per the following table. In all cases, the spells are stored in order from left-to-right, top-to-bottom, with respect to the in-game spell browser. Each spell category has 15 unused bytes at the end; Monks have all these bytes filled with 0x01 in their spellbook section nonetheless.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]][45] || spellsPermanent || The permanent spells that the player has access to.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]][45] || spellsPreparation || The preparation spells that the player has access to.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]][45] || spellsWizard || The wizard battle spells that the player has access to.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]][45] || spellsPriest || The priest battle spells that the player has access to.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Weapon IDs ===&lt;br /&gt;
&lt;br /&gt;
The following weapon IDs can be used in the &#039;&#039;&#039;equippedWeapon&#039;&#039;&#039; field.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Weapon Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Fists&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Stick&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Club&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Mace&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Knife&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Short Sword&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Long Sword&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Great Sword&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Note: the player does not have to own the specified weapon type in order to have it equipped. The equipment check is only performed when the player switches their weapon in-game.&lt;br /&gt;
&lt;br /&gt;
=== Armor IDs ===&lt;br /&gt;
&lt;br /&gt;
The following weapon IDs can be used in the &#039;&#039;&#039;equippedArmor&#039;&#039;&#039; field.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Armor Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Skin&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Leather&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Chain&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Scale&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Breast Plate&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Field Plate&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Titanium&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Glitchy Armor*&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Note: the player does not have to own the specified armor type in order to have it equipped. The equipment check is only performed when the player switches their armor in-game.&lt;br /&gt;
* *The eighth armor slot always appears in the armor list of the game as a blank slot, but only seven armor types appear within the game world. If the set of armor is hacked into the game with a hex editor or memory editor, it appears as jumbled text and provides a currently-unknown amount of protection.&lt;br /&gt;
&lt;br /&gt;
=== Checksum ===&lt;br /&gt;
&lt;br /&gt;
The checksum is calculated as follows (example in C# and assuming saveBytes is the saved game data, sans checksum—that is, the first 2695 (0xA87) bytes in the file):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
checksum[0] = checksum[1] = 0;&lt;br /&gt;
foreach(var b in saveBytes) {&lt;br /&gt;
    checksum[0] += b;&lt;br /&gt;
    checksum[1] += checksum[0] - checksum[0] * checksum[0];&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the checksum is incorrect for the saved game file, the player will be immediately booted back to the DOS prompt with a &amp;quot;corrupted character&amp;quot; error.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This file format was reverse engineered and documented by [[User:Spectere|Spectere]] and [[User:Bag_of_Magic_Food|Bag of Magic Food]]. If you find this information helpful in a project you&#039;re working on, please give credit where credit is due. (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>Bag of Magic Food</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Dungeons_of_the_Unforgiven_Player_Character&amp;diff=9120</id>
		<title>Dungeons of the Unforgiven Player Character</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Dungeons_of_the_Unforgiven_Player_Character&amp;diff=9120"/>
		<updated>2020-08-05T06:08:25Z</updated>

		<summary type="html">&lt;p&gt;Bag of Magic Food: I&amp;#039;m tentatively changing spell data back to signed: Monsters kept giving me spellbooks I already owned when the books&amp;#039; numbers were set greater than 127, suggesting a &amp;quot;less than one&amp;quot; check being performed on signed values.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Playerdata Infobox&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = ?&lt;br /&gt;
 | Elements = Player character data&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|Dungeons of the Unforgiven}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The saved game format for &#039;&#039;[[Dungeons of the Unforgiven]]&#039;&#039; appears to be a simple dump of the game&#039;s internal structures, with a couple of checksum bytes added on, presumably to slow cheaters down a bit. Some of the chunks of data are in a very peculiar order (such as some of the items being in radically different spots of the file), which makes it somewhat annoying to try to directly load into a C struct or similar data structure.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re parsing this format, be very mindful of the data types. Signed and unsigned data types, as well as differing field sizes, are used even with related fields. For example, Rings of Protection are stored in an unsigned byte while Potions of Healing are stored in a signed word.&lt;br /&gt;
&lt;br /&gt;
== File Layout ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset (hex) !! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000 || [[char]][18] || playerName || The name of the player character (including a null terminator).&lt;br /&gt;
|-&lt;br /&gt;
| 0x0012 || [[BYTE]][22] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0028 || [[INT8]] || playerRace || The race of the player character.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0029 || [[INT8]] || playerGender || The player character&#039;s gender (0x00 == male; 0x01 == female)&lt;br /&gt;
|-&lt;br /&gt;
| 0x002A || [[INT8]] || playerClass || The player character&#039;s class.&lt;br /&gt;
|-&lt;br /&gt;
| 0x002B || [[BYTE]][6] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0031 || [[INT16LE]] || playerCurrentHP || The player character&#039;s current hit points.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0033 || [[INT16LE]] || playerMaxHP || The player character&#039;s maximum hit points.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0035 || [[Single]] || playerCurrentSP || The player character&#039;s current spell points.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0039 || [[Single]] || playerMaxSP || The player character&#039;s maximum spell points.&lt;br /&gt;
|-&lt;br /&gt;
| 0x003D || [[BYTE]][2] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x003F || [[INT16LE]] || nakedWeight || The player&#039;s base weight.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0041 || [[INT16LE]] || loadedWeight || The player&#039;s loaded weight (note: this always gets updated by the game).&lt;br /&gt;
|-&lt;br /&gt;
| 0x0043 || [[BYTE]][62] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0081 || [[BYTE]] || weaponFists || Player character has their fists (normally these cannot be dropped).&lt;br /&gt;
|-&lt;br /&gt;
| 0x0082 || [[BYTE]] || weaponStick || Player character has the stick.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0083 || [[BYTE]] || weaponClub || Player character has the club.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0084 || [[BYTE]] || weaponMace || Player character has the mace.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0085 || [[BYTE]] || weaponKnife || Player character has the knife.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0086 || [[BYTE]] || weaponShortSword || Player character has the short sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0087 || [[BYTE]] || weaponLongSword || Player character has the long sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0088 || [[BYTE]] || weaponGreatSword || Player character has the great sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0089 || [[BYTE]][5] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x008E || [[INT8]] || levelFists || The permanent enchantment level of the fists.&lt;br /&gt;
|-&lt;br /&gt;
| 0x008F || [[INT8]] || levelStick || The permanent enchantment level of the stick.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0090 || [[INT8]] || levelClub || The permanent enchantment level of the club.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0091 || [[INT8]] || levelMace || The permanent enchantment level of the mace.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0092 || [[INT8]] || levelKnife || The permanent enchantment level of the knife.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0093 || [[INT8]] || levelShortSword || The permanent enchantment level of the short sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0094 || [[INT8]] || levelLongSword || The permanent enchantment level of the long sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0095 || [[INT8]] || levelGreatSword || The permanent enchantment level of the great sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0096 || [[BYTE]][5] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x009B || [[INT8]] || equippedWeapon || The weapon that the player character currently has equipped. See the [[#Weapon_IDs|Weapon IDs]] section for valid values.&lt;br /&gt;
|-&lt;br /&gt;
| 0x009C || [[BYTE]][20] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B0 || [[BYTE]] || armorSkin || Player character has their skin (normally this cannot be dropped).&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B1 || [[BYTE]] || armorLeather || Player character has leather armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B2 || [[BYTE]] || armorChain || Player character has chain armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B3 || [[BYTE]] || armorScale || Player character has scale armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B4 || [[BYTE]] || armorBreastPlate || Player character has the breast plate.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B5 || [[BYTE]] || armorFieldPlate || Player character has field plate.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B6 || [[BYTE]] || armorTitanium || Player character has the titanium armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B7 || [[BYTE]] || armorSlot8 || This &amp;quot;armor&amp;quot; is not implemented in the game and points to garbage data. See the notes below for a little bit more information. {{TODO|Figure out exactly what in the executable this is pointing to, as it is technically fully usable.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B8 || [[INT8]] || levelSkin || The permanent enchantment level of the skin.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B9 || [[INT8]] || levelLeather || The permanent enchantment level of the leather armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BA || [[INT8]] || levelChain || The permanent enchantment level of the chain armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BB || [[INT8]] || levelScale || The permanent enchantment level of the scale armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BC || [[INT8]] || levelBreastPlate || The permanent enchantment level of the breast plate.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BD || [[INT8]] || levelFieldPlate || The permanent enchantment level of the field plate.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BE || [[INT8]] || levelTitanium || The permanent enchantment level of the titanium armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BF || [[INT8]] || levelSlot8 || The permanent enchantment level of the glitchy armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00C0 || [[INT8]] || equippedArmor || The armor that the player character currently has equipped. See the [[#Armor_IDs|Armor IDs]] section for valid values.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00C1 || [[BYTE]][156] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x015D || [[INT8]] || orangePotions || The number of orange potions in the player&#039;s inventory (+6 Strength / -3 Luck)&lt;br /&gt;
|-&lt;br /&gt;
| 0x015E || [[INT8]] || greenPotions || The number of green potions in the player&#039;s inventory (+6 Intelligence / -3 Agility)&lt;br /&gt;
|-&lt;br /&gt;
| 0x015F || [[INT8]] || bluePotions || The number of blue potions in the player&#039;s inventory (+6 Wisdom / -3 Constitution)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0160 || [[INT8]] || redPotions || The number of red potions in the player&#039;s inventory (+6 Constitution / -3 Wisdom)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0161 || [[INT8]] || whitePotions || The number of white potions in the player&#039;s inventory (+6 Agility / -3 Intelligence)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0162 || [[INT8]] || yellowPotions || The number of yellow potions in the player&#039;s inventory (+6 Luck / -3 Strength)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0163 || [[BYTE]][20] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0177 || [[#Spells|SPELL_LIST]] || spellbook || The spells that the player has learned and can cast at any time at the cost of spell power.&lt;br /&gt;
|-&lt;br /&gt;
| 0x022B || [[#Spells|SPELL_LIST]] || scrolls || The spells that the player can cast from a scroll.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02DF || [[#Spells|SPELL_LIST]] || wands || The spell wands that the player possesses.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0393 || [[#Spells|SPELL_LIST]] || papers || The spell papers that the player owns.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0447 || [[BYTE]][13] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0454 || [[INT32LE]] || rublesInPocket || The number of rubles that the player has on hand.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0458 || [[INT32LE]] || rublesInBank || The number of rubles that the player has in the bank.&lt;br /&gt;
|-&lt;br /&gt;
| 0x045C || [[BYTE]][8] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0464 || [[INT32LE]] || cultureStock || The amount of culture stock that the player owns.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0468 || [[INT32LE]] || childrenHelped || The number of children that the player helped (at the temple).&lt;br /&gt;
|-&lt;br /&gt;
| 0x046C || [[INT32LE]] || magicCrystals || The number of magic crystals that the player owns.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0470 || [[INT32LE]] || americanDollars || The number of American Dollars that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0474 || [[BYTE]][816] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x07A4 || [[Double]] || experiencePoints || The number of experience points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07AC || [[INT16LE]] || playerLevel || The player character&#039;s current level.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07AE || [[INT16LE]] || playerDirection || The direction that the player character is facing (0x00 == north; 0x01 == south; 0x02 == west; 0x03 == east).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B0 || [[INT16LE]] || playerPositionX || The X coordinate of the player in the current dungeon floor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B2 || [[INT16LE]] || playerPositionY || The Y coordinate of the player in the current dungeon floor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B4 || [[INT16LE]] || playerFloor || The floor of the dungeon that the player is currently on (0 is the town).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B6 || [[INT16LE]] || playerModule || The module that the player is currently playing.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B8 || [[BYTE]][18] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CA || [[UINT8]] || ringsOfRegeneration || The number of rings of regeneration that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CB || [[BYTE]] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CC || [[UINT8]] || nuclearHandGrenade || The number of nuclear hand grenades that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CD || [[UINT8]] || stonesOfSeeing || The number of stones of seeing that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CE || [[INT16LE]] || diseaseTimer || The number of turns until disease damages constitution (0 or -1 disables the timer).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D0 || [[INT16LE]] || poisonTimer || The number of turns until poison damages strength (0 or -1 disables the timer).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D2 || [[UINT8]] || enchantWeaponLevel || The level of the current &amp;quot;Enchant Weapon&amp;quot; preparation spell in effect.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D3 || [[UINT8]] || enchantArmorLevel || The level of the current &amp;quot;Enchant Armor&amp;quot; preparation spell in effect.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D4 || [[UINT8]] || bodyArmor || The number of body armor items that the player has (not related to the gear, listed above).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D5 || [[UINT8]] || ringOfProtection || The number of rings of protection that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D6 || [[UINT8]] || antiMagicRing || The number of anti-magic rings that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D7 || [[BYTE]] || feather || Spell &amp;quot;Feather&amp;quot; is in effect. 0x01 == the preparation version; 0x64 == &amp;quot;Permanent Feather.&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D8 || [[BYTE]] || fastMove || Preparation spell &amp;quot;Fast Move&amp;quot; is in effect. Values greater than 0x01 make it permanent despite there being no such permanent spell!&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D9 || [[BYTE]] || invisibility || Spell &amp;quot;Invisibility&amp;quot; is in effect. 0x01 == the preparation version; 0x64 == &amp;quot;Permanent Invisibility.&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0x07DA || [[INT32LE]] || playerAge || The current age of the player character.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07DE || [[UINT8]] || preparationStrength || Preparation spell &amp;quot;Strength&amp;quot; is in effect. Normally set to 0x05 (yet changing it or any of the following strength/agility spell values to another nonzero value will not change the number of strength/agility points deducted by an inn stay).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07DF || [[UINT8]] || preparationAgility || Preparation spell &amp;quot;Agility&amp;quot; is in effect. Normally set to 0x05.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07E0 || [[UINT8]] || superStrength || Preparation spell &amp;quot;Super Strength&amp;quot; is in effect. Normally set to 0x0A.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07E1 || [[UINT8]] || superAgility || Preparation spell &amp;quot;Super Agility&amp;quot; is in effect. Normally set to 0x0A.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07E2 || [[BYTE]][32] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0802 || [[INT8]] || floorSloshers || The number of floor sloshers that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0803 || [[BYTE]][15] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0812 || [[INT16LE]] || potionsOfHealing || The number of potions of healing that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0814 || [[INT16LE]] || stonesOfTeleportation || The number of stones of teleportation that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0816 || [[INT16LE]] || playerStrength || The number of strength points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0818 || [[INT16LE]] || playerIntelligence || The number of intelligence points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x081A || [[INT16LE]] || playerWisdom || The number of wisdom points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x081C || [[INT16LE]] || playerConstitution || The number of constitution points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x081E || [[INT16LE]] || playerAgility || The number of agility points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0820 || [[INT16LE]] || playerLuck || The number of luck points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0822 || [[BYTE]][21] || trapDoorKey || The trapdoor keys owned by the player. For each nonzero value in trapDoorKey[n], the player is able to use any trapdoors leading to floor (n * 5).&lt;br /&gt;
|-&lt;br /&gt;
| 0x0837 || [[BYTE]][28] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0853 || [[INT8]] || gauntlets || The number of gauntlets that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0854 || [[BYTE]][162] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x08F6 || [[BYTE]] || difficulty || The difficulty level that the player is playing on. (0x00 == normal; 0x01 == &amp;quot;I can handle anything!&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08F7 || [[BYTE]][122] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0971 || [[UINT32LE]] || gameTimer || This appears to be some sort of hidden in-game timer. {{TODO|Figure out when this is incremented and whether or not it actually does anything.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0975 || [[BYTE]][274] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A87 || [[UINT8]][2] || checksum || The checksum of the saved game file. See [[#Checksum|below]] for more information.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Races ===&lt;br /&gt;
&lt;br /&gt;
The following races can be chosen:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Race&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Humanoid&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Ape&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Childman&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Rodent&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Hobo&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Giant&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Midget&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Shrimp&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Classes ===&lt;br /&gt;
&lt;br /&gt;
The following classes can be chosen:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Class&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Fighter&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Worshipper&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Monk&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Wizard&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Priest&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Sage&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Mage&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Spells ===&lt;br /&gt;
&lt;br /&gt;
Spells are stored in the save file per the following table. In all cases, the spells are stored in order from left-to-right, top-to-bottom, with respect to the in-game spell browser. Each spell category has 15 unused bytes at the end; Monks have all these bytes filled with 0x01 in their spellbook section nonetheless.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]][45] || spellsPermanent || The permanent spells that the player has access to.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]][45] || spellsPreparation || The preparation spells that the player has access to.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]][45] || spellsWizard || The wizard battle spells that the player has access to.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]][45] || spellsPriest || The priest battle spells that the player has access to.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Weapon IDs ===&lt;br /&gt;
&lt;br /&gt;
The following weapon IDs can be used in the &#039;&#039;&#039;equippedWeapon&#039;&#039;&#039; field.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Weapon Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Fists&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Stick&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Club&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Mace&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Knife&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Short Sword&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Long Sword&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Great Sword&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Note: the player does not have to own the specified weapon type in order to have it equipped. The equipment check is only performed when the player switches their weapon in-game.&lt;br /&gt;
&lt;br /&gt;
=== Armor IDs ===&lt;br /&gt;
&lt;br /&gt;
The following weapon IDs can be used in the &#039;&#039;&#039;equippedArmor&#039;&#039;&#039; field.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Armor Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Skin&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Leather&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Chain&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Scale&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Breast Plate&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Field Plate&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Titanium&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Glitchy Armor*&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Note: the player does not have to own the specified armor type in order to have it equipped. The equipment check is only performed when the player switches their armor in-game.&lt;br /&gt;
* *The eighth armor slot always appears in the armor list of the game as a blank slot, but only seven armor types appear within the game world. If the set of armor is hacked into the game with a hex editor or memory editor, it appears as jumbled text and provides a currently-unknown amount of protection.&lt;br /&gt;
&lt;br /&gt;
=== Checksum ===&lt;br /&gt;
&lt;br /&gt;
The checksum is calculated as follows (example in C# and assuming saveBytes is the saved game data, sans checksum—that is, the first 2695 (0xA87) bytes in the file):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
checksum[0] = checksum[1] = 0;&lt;br /&gt;
foreach(var b in saveBytes) {&lt;br /&gt;
    checksum[0] += b;&lt;br /&gt;
    checksum[1] += checksum[0] - checksum[0] * checksum[0];&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the checksum is incorrect for the saved game file, the player will be immediately booted back to the DOS prompt with a &amp;quot;corrupted character&amp;quot; error.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This file format was reverse engineered and documented by [[User:Spectere|Spectere]] and [[User:Bag_of_Magic_Food|Bag of Magic Food]]. If you find this information helpful in a project you&#039;re working on, please give credit where credit is due. (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>Bag of Magic Food</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Dungeons_of_the_Unforgiven_Player_Character&amp;diff=9119</id>
		<title>Dungeons of the Unforgiven Player Character</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Dungeons_of_the_Unforgiven_Player_Character&amp;diff=9119"/>
		<updated>2020-08-05T04:15:51Z</updated>

		<summary type="html">&lt;p&gt;Bag of Magic Food: I got a handle on how to make Feather/Fast Move/Invisibility permanent, I caught some errors with the spell points data type and the spell possession ranges, and I confirmed that I could use 255 charges of a single wand in a row, which seems like unsigned&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Playerdata Infobox&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = ?&lt;br /&gt;
 | Elements = Player character data&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|Dungeons of the Unforgiven}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The saved game format for &#039;&#039;[[Dungeons of the Unforgiven]]&#039;&#039; appears to be a simple dump of the game&#039;s internal structures, with a couple of checksum bytes added on, presumably to slow cheaters down a bit. Some of the chunks of data are in a very peculiar order (such as some of the items being in radically different spots of the file), which makes it somewhat annoying to try to directly load into a C struct or similar data structure.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re parsing this format, be very mindful of the data types. Signed and unsigned data types, as well as differing field sizes, are used even with related fields. For example, Rings of Protection are stored in an unsigned byte while Potions of Healing are stored in a signed word.&lt;br /&gt;
&lt;br /&gt;
== File Layout ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset (hex) !! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000 || [[char]][18] || playerName || The name of the player character (including a null terminator).&lt;br /&gt;
|-&lt;br /&gt;
| 0x0012 || [[BYTE]][22] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0028 || [[INT8]] || playerRace || The race of the player character.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0029 || [[INT8]] || playerGender || The player character&#039;s gender (0x00 == male; 0x01 == female)&lt;br /&gt;
|-&lt;br /&gt;
| 0x002A || [[INT8]] || playerClass || The player character&#039;s class.&lt;br /&gt;
|-&lt;br /&gt;
| 0x002B || [[BYTE]][6] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0031 || [[INT16LE]] || playerCurrentHP || The player character&#039;s current hit points.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0033 || [[INT16LE]] || playerMaxHP || The player character&#039;s maximum hit points.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0035 || [[Single]] || playerCurrentSP || The player character&#039;s current spell points.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0039 || [[Single]] || playerMaxSP || The player character&#039;s maximum spell points.&lt;br /&gt;
|-&lt;br /&gt;
| 0x003D || [[BYTE]][2] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x003F || [[INT16LE]] || nakedWeight || The player&#039;s base weight.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0041 || [[INT16LE]] || loadedWeight || The player&#039;s loaded weight (note: this always gets updated by the game).&lt;br /&gt;
|-&lt;br /&gt;
| 0x0043 || [[BYTE]][62] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0081 || [[BYTE]] || weaponFists || Player character has their fists (normally these cannot be dropped).&lt;br /&gt;
|-&lt;br /&gt;
| 0x0082 || [[BYTE]] || weaponStick || Player character has the stick.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0083 || [[BYTE]] || weaponClub || Player character has the club.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0084 || [[BYTE]] || weaponMace || Player character has the mace.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0085 || [[BYTE]] || weaponKnife || Player character has the knife.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0086 || [[BYTE]] || weaponShortSword || Player character has the short sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0087 || [[BYTE]] || weaponLongSword || Player character has the long sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0088 || [[BYTE]] || weaponGreatSword || Player character has the great sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0089 || [[BYTE]][5] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x008E || [[INT8]] || levelFists || The permanent enchantment level of the fists.&lt;br /&gt;
|-&lt;br /&gt;
| 0x008F || [[INT8]] || levelStick || The permanent enchantment level of the stick.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0090 || [[INT8]] || levelClub || The permanent enchantment level of the club.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0091 || [[INT8]] || levelMace || The permanent enchantment level of the mace.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0092 || [[INT8]] || levelKnife || The permanent enchantment level of the knife.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0093 || [[INT8]] || levelShortSword || The permanent enchantment level of the short sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0094 || [[INT8]] || levelLongSword || The permanent enchantment level of the long sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0095 || [[INT8]] || levelGreatSword || The permanent enchantment level of the great sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0096 || [[BYTE]][5] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x009B || [[INT8]] || equippedWeapon || The weapon that the player character currently has equipped. See the [[#Weapon_IDs|Weapon IDs]] section for valid values.&lt;br /&gt;
|-&lt;br /&gt;
| 0x009C || [[BYTE]][20] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B0 || [[BYTE]] || armorSkin || Player character has their skin (normally this cannot be dropped).&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B1 || [[BYTE]] || armorLeather || Player character has leather armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B2 || [[BYTE]] || armorChain || Player character has chain armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B3 || [[BYTE]] || armorScale || Player character has scale armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B4 || [[BYTE]] || armorBreastPlate || Player character has the breast plate.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B5 || [[BYTE]] || armorFieldPlate || Player character has field plate.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B6 || [[BYTE]] || armorTitanium || Player character has the titanium armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B7 || [[BYTE]] || armorSlot8 || This &amp;quot;armor&amp;quot; is not implemented in the game and points to garbage data. See the notes below for a little bit more information. {{TODO|Figure out exactly what in the executable this is pointing to, as it is technically fully usable.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B8 || [[INT8]] || levelSkin || The permanent enchantment level of the skin.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B9 || [[INT8]] || levelLeather || The permanent enchantment level of the leather armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BA || [[INT8]] || levelChain || The permanent enchantment level of the chain armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BB || [[INT8]] || levelScale || The permanent enchantment level of the scale armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BC || [[INT8]] || levelBreastPlate || The permanent enchantment level of the breast plate.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BD || [[INT8]] || levelFieldPlate || The permanent enchantment level of the field plate.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BE || [[INT8]] || levelTitanium || The permanent enchantment level of the titanium armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BF || [[INT8]] || levelSlot8 || The permanent enchantment level of the glitchy armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00C0 || [[INT8]] || equippedArmor || The armor that the player character currently has equipped. See the [[#Armor_IDs|Armor IDs]] section for valid values.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00C1 || [[BYTE]][156] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x015D || [[INT8]] || orangePotions || The number of orange potions in the player&#039;s inventory (+6 Strength / -3 Luck)&lt;br /&gt;
|-&lt;br /&gt;
| 0x015E || [[INT8]] || greenPotions || The number of green potions in the player&#039;s inventory (+6 Intelligence / -3 Agility)&lt;br /&gt;
|-&lt;br /&gt;
| 0x015F || [[INT8]] || bluePotions || The number of blue potions in the player&#039;s inventory (+6 Wisdom / -3 Constitution)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0160 || [[INT8]] || redPotions || The number of red potions in the player&#039;s inventory (+6 Constitution / -3 Wisdom)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0161 || [[INT8]] || whitePotions || The number of white potions in the player&#039;s inventory (+6 Agility / -3 Intelligence)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0162 || [[INT8]] || yellowPotions || The number of yellow potions in the player&#039;s inventory (+6 Luck / -3 Strength)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0163 || [[BYTE]][20] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0177 || [[#Spells|SPELL_LIST]] || spellbook || The spells that the player has learned and can cast at any time at the cost of spell power.&lt;br /&gt;
|-&lt;br /&gt;
| 0x022B || [[#Spells|SPELL_LIST]] || scrolls || The spells that the player can cast from a scroll.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02DF || [[#Spells|SPELL_LIST]] || wands || The spell wands that the player possesses.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0393 || [[#Spells|SPELL_LIST]] || papers || The spell papers that the player owns.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0447 || [[BYTE]][13] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0454 || [[INT32LE]] || rublesInPocket || The number of rubles that the player has on hand.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0458 || [[INT32LE]] || rublesInBank || The number of rubles that the player has in the bank.&lt;br /&gt;
|-&lt;br /&gt;
| 0x045C || [[BYTE]][8] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0464 || [[INT32LE]] || cultureStock || The amount of culture stock that the player owns.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0468 || [[INT32LE]] || childrenHelped || The number of children that the player helped (at the temple).&lt;br /&gt;
|-&lt;br /&gt;
| 0x046C || [[INT32LE]] || magicCrystals || The number of magic crystals that the player owns.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0470 || [[INT32LE]] || americanDollars || The number of American Dollars that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0474 || [[BYTE]][816] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x07A4 || [[Double]] || experiencePoints || The number of experience points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07AC || [[INT16LE]] || playerLevel || The player character&#039;s current level.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07AE || [[INT16LE]] || playerDirection || The direction that the player character is facing (0x00 == north; 0x01 == south; 0x02 == west; 0x03 == east).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B0 || [[INT16LE]] || playerPositionX || The X coordinate of the player in the current dungeon floor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B2 || [[INT16LE]] || playerPositionY || The Y coordinate of the player in the current dungeon floor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B4 || [[INT16LE]] || playerFloor || The floor of the dungeon that the player is currently on (0 is the town).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B6 || [[INT16LE]] || playerModule || The module that the player is currently playing.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B8 || [[BYTE]][18] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CA || [[UINT8]] || ringsOfRegeneration || The number of rings of regeneration that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CB || [[BYTE]] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CC || [[UINT8]] || nuclearHandGrenade || The number of nuclear hand grenades that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CD || [[UINT8]] || stonesOfSeeing || The number of stones of seeing that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CE || [[INT16LE]] || diseaseTimer || The number of turns until disease damages constitution (0 or -1 disables the timer).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D0 || [[INT16LE]] || poisonTimer || The number of turns until poison damages strength (0 or -1 disables the timer).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D2 || [[UINT8]] || enchantWeaponLevel || The level of the current &amp;quot;Enchant Weapon&amp;quot; preparation spell in effect.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D3 || [[UINT8]] || enchantArmorLevel || The level of the current &amp;quot;Enchant Armor&amp;quot; preparation spell in effect.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D4 || [[UINT8]] || bodyArmor || The number of body armor items that the player has (not related to the gear, listed above).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D5 || [[UINT8]] || ringOfProtection || The number of rings of protection that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D6 || [[UINT8]] || antiMagicRing || The number of anti-magic rings that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D7 || [[BYTE]] || feather || Spell &amp;quot;Feather&amp;quot; is in effect. 0x01 == the preparation version; 0x64 == &amp;quot;Permanent Feather.&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D8 || [[BYTE]] || fastMove || Preparation spell &amp;quot;Fast Move&amp;quot; is in effect. Values greater than 0x01 make it permanent despite there being no such permanent spell!&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D9 || [[BYTE]] || invisibility || Spell &amp;quot;Invisibility&amp;quot; is in effect. 0x01 == the preparation version; 0x64 == &amp;quot;Permanent Invisibility.&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0x07DA || [[INT32LE]] || playerAge || The current age of the player character.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07DE || [[UINT8]] || preparationStrength || Preparation spell &amp;quot;Strength&amp;quot; is in effect. Normally set to 0x05 (yet changing it or any of the following strength/agility spell values to another nonzero value will not change the number of strength/agility points deducted by an inn stay).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07DF || [[UINT8]] || preparationAgility || Preparation spell &amp;quot;Agility&amp;quot; is in effect. Normally set to 0x05.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07E0 || [[UINT8]] || superStrength || Preparation spell &amp;quot;Super Strength&amp;quot; is in effect. Normally set to 0x0A.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07E1 || [[UINT8]] || superAgility || Preparation spell &amp;quot;Super Agility&amp;quot; is in effect. Normally set to 0x0A.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07E2 || [[BYTE]][32] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0802 || [[INT8]] || floorSloshers || The number of floor sloshers that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0803 || [[BYTE]][15] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0812 || [[INT16LE]] || potionsOfHealing || The number of potions of healing that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0814 || [[INT16LE]] || stonesOfTeleportation || The number of stones of teleportation that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0816 || [[INT16LE]] || playerStrength || The number of strength points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0818 || [[INT16LE]] || playerIntelligence || The number of intelligence points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x081A || [[INT16LE]] || playerWisdom || The number of wisdom points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x081C || [[INT16LE]] || playerConstitution || The number of constitution points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x081E || [[INT16LE]] || playerAgility || The number of agility points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0820 || [[INT16LE]] || playerLuck || The number of luck points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0822 || [[BYTE]][21] || trapDoorKey || The trapdoor keys owned by the player. For each nonzero value in trapDoorKey[n], the player is able to use any trapdoors leading to floor (n * 5).&lt;br /&gt;
|-&lt;br /&gt;
| 0x0837 || [[BYTE]][28] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0853 || [[INT8]] || gauntlets || The number of gauntlets that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0854 || [[BYTE]][162] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x08F6 || [[BYTE]] || difficulty || The difficulty level that the player is playing on. (0x00 == normal; 0x01 == &amp;quot;I can handle anything!&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08F7 || [[BYTE]][122] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0971 || [[UINT32LE]] || gameTimer || This appears to be some sort of hidden in-game timer. {{TODO|Figure out when this is incremented and whether or not it actually does anything.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0975 || [[BYTE]][274] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A87 || [[UINT8]][2] || checksum || The checksum of the saved game file. See [[#Checksum|below]] for more information.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Races ===&lt;br /&gt;
&lt;br /&gt;
The following races can be chosen:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Race&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Humanoid&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Ape&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Childman&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Rodent&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Hobo&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Giant&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Midget&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Shrimp&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Classes ===&lt;br /&gt;
&lt;br /&gt;
The following classes can be chosen:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Class&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Fighter&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Worshipper&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Monk&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Wizard&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Priest&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Sage&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Mage&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Spells ===&lt;br /&gt;
&lt;br /&gt;
Spells are stored in the save file per the following table. In all cases, the spells are stored in order from left-to-right, top-to-bottom, with respect to the in-game spell browser. Each spell category has 15 unused bytes at the end; Monks have all these bytes filled with 0x01 in their spellbook section nonetheless.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]][45] || spellsPermanent || The permanent spells that the player has access to.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]][45] || spellsPreparation || The preparation spells that the player has access to.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]][45] || spellsWizard || The wizard battle spells that the player has access to.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]][45] || spellsPriest || The priest battle spells that the player has access to.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Weapon IDs ===&lt;br /&gt;
&lt;br /&gt;
The following weapon IDs can be used in the &#039;&#039;&#039;equippedWeapon&#039;&#039;&#039; field.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Weapon Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Fists&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Stick&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Club&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Mace&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Knife&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Short Sword&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Long Sword&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Great Sword&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Note: the player does not have to own the specified weapon type in order to have it equipped. The equipment check is only performed when the player switches their weapon in-game.&lt;br /&gt;
&lt;br /&gt;
=== Armor IDs ===&lt;br /&gt;
&lt;br /&gt;
The following weapon IDs can be used in the &#039;&#039;&#039;equippedArmor&#039;&#039;&#039; field.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Armor Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Skin&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Leather&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Chain&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Scale&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Breast Plate&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Field Plate&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Titanium&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Glitchy Armor*&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Note: the player does not have to own the specified armor type in order to have it equipped. The equipment check is only performed when the player switches their armor in-game.&lt;br /&gt;
* *The eighth armor slot always appears in the armor list of the game as a blank slot, but only seven armor types appear within the game world. If the set of armor is hacked into the game with a hex editor or memory editor, it appears as jumbled text and provides a currently-unknown amount of protection.&lt;br /&gt;
&lt;br /&gt;
=== Checksum ===&lt;br /&gt;
&lt;br /&gt;
The checksum is calculated as follows (example in C# and assuming saveBytes is the saved game data, sans checksum—that is, the first 2695 (0xA87) bytes in the file):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
checksum[0] = checksum[1] = 0;&lt;br /&gt;
foreach(var b in saveBytes) {&lt;br /&gt;
    checksum[0] += b;&lt;br /&gt;
    checksum[1] += checksum[0] - checksum[0] * checksum[0];&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the checksum is incorrect for the saved game file, the player will be immediately booted back to the DOS prompt with a &amp;quot;corrupted character&amp;quot; error.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This file format was reverse engineered and documented by [[User:Spectere|Spectere]] and [[User:Bag_of_Magic_Food|Bag of Magic Food]]. If you find this information helpful in a project you&#039;re working on, please give credit where credit is due. (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>Bag of Magic Food</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Dungeons_of_the_Unforgiven_Player_Character&amp;diff=9118</id>
		<title>Dungeons of the Unforgiven Player Character</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Dungeons_of_the_Unforgiven_Player_Character&amp;diff=9118"/>
		<updated>2020-08-05T00:26:37Z</updated>

		<summary type="html">&lt;p&gt;Bag of Magic Food: I worked out the &amp;quot;reminder&amp;quot; values for preparatory Strength and Agility&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Playerdata Infobox&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = ?&lt;br /&gt;
 | Elements = Player character data&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|Dungeons of the Unforgiven}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The saved game format for &#039;&#039;[[Dungeons of the Unforgiven]]&#039;&#039; appears to be a simple dump of the game&#039;s internal structures, with a couple of checksum bytes added on, presumably to slow cheaters down a bit. Some of the chunks of data are in a very peculiar order (such as some of the items being in radically different spots of the file), which makes it somewhat annoying to try to directly load into a C struct or similar data structure.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re parsing this format, be very mindful of the data types. Signed and unsigned data types, as well as differing field sizes, are used even with related fields. For example, Rings of Protection are stored in an unsigned byte while Potions of Healing are stored in a signed word.&lt;br /&gt;
&lt;br /&gt;
== File Layout ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset (hex) !! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000 || [[char]][18] || playerName || The name of the player character (including a null terminator).&lt;br /&gt;
|-&lt;br /&gt;
| 0x0012 || [[BYTE]][22] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0028 || [[INT8]] || playerRace || The race of the player character.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0029 || [[INT8]] || playerGender || The player character&#039;s gender (0x00 == male; 0x01 == female)&lt;br /&gt;
|-&lt;br /&gt;
| 0x002A || [[INT8]] || playerClass || The player character&#039;s class.&lt;br /&gt;
|-&lt;br /&gt;
| 0x002B || [[BYTE]][6] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0031 || [[INT16LE]] || playerCurrentHP || The player character&#039;s current hit points.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0033 || [[INT16LE]] || playerMaxHP || The player character&#039;s maximum hit points.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0035 || [[INT32LE]] || playerCurrentSP || The player character&#039;s current spell points.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0039 || [[INT32LE]] || playerMaxSP || The player character&#039;s maximum spell points.&lt;br /&gt;
|-&lt;br /&gt;
| 0x003D || [[BYTE]][2] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x003F || [[INT16LE]] || nakedWeight || The player&#039;s base weight.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0041 || [[INT16LE]] || loadedWeight || The player&#039;s loaded weight (note: this always gets updated by the game).&lt;br /&gt;
|-&lt;br /&gt;
| 0x0043 || [[BYTE]][62] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0081 || [[BYTE]] || weaponFists || Player character has their fists (normally these cannot be dropped).&lt;br /&gt;
|-&lt;br /&gt;
| 0x0082 || [[BYTE]] || weaponStick || Player character has the stick.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0083 || [[BYTE]] || weaponClub || Player character has the club.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0084 || [[BYTE]] || weaponMace || Player character has the mace.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0085 || [[BYTE]] || weaponKnife || Player character has the knife.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0086 || [[BYTE]] || weaponShortSword || Player character has the short sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0087 || [[BYTE]] || weaponLongSword || Player character has the long sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0088 || [[BYTE]] || weaponGreatSword || Player character has the great sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0089 || [[BYTE]][5] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x008E || [[INT8]] || levelFists || The permanent enchantment level of the fists.&lt;br /&gt;
|-&lt;br /&gt;
| 0x008F || [[INT8]] || levelStick || The permanent enchantment level of the stick.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0090 || [[INT8]] || levelClub || The permanent enchantment level of the club.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0091 || [[INT8]] || levelMace || The permanent enchantment level of the mace.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0092 || [[INT8]] || levelKnife || The permanent enchantment level of the knife.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0093 || [[INT8]] || levelShortSword || The permanent enchantment level of the short sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0094 || [[INT8]] || levelLongSword || The permanent enchantment level of the long sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0095 || [[INT8]] || levelGreatSword || The permanent enchantment level of the great sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0096 || [[BYTE]][5] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x009B || [[INT8]] || equippedWeapon || The weapon that the player character currently has equipped. See the [[#Weapon_IDs|Weapon IDs]] section for valid values.&lt;br /&gt;
|-&lt;br /&gt;
| 0x009C || [[BYTE]][20] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B0 || [[BYTE]] || armorSkin || Player character has their skin (normally this cannot be dropped).&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B1 || [[BYTE]] || armorLeather || Player character has leather armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B2 || [[BYTE]] || armorChain || Player character has chain armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B3 || [[BYTE]] || armorScale || Player character has scale armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B4 || [[BYTE]] || armorBreastPlate || Player character has the breast plate.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B5 || [[BYTE]] || armorFieldPlate || Player character has field plate.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B6 || [[BYTE]] || armorTitanium || Player character has the titanium armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B7 || [[BYTE]] || armorSlot8 || This &amp;quot;armor&amp;quot; is not implemented in the game and points to garbage data. See the notes below for a little bit more information. {{TODO|Figure out exactly what in the executable this is pointing to, as it is technically fully usable.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B8 || [[INT8]] || levelSkin || The permanent enchantment level of the skin.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B9 || [[INT8]] || levelLeather || The permanent enchantment level of the leather armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BA || [[INT8]] || levelChain || The permanent enchantment level of the chain armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BB || [[INT8]] || levelScale || The permanent enchantment level of the scale armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BC || [[INT8]] || levelBreastPlate || The permanent enchantment level of the breast plate.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BD || [[INT8]] || levelFieldPlate || The permanent enchantment level of the field plate.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BE || [[INT8]] || levelTitanium || The permanent enchantment level of the titanium armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BF || [[INT8]] || levelSlot8 || The permanent enchantment level of the glitchy armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00C0 || [[INT8]] || equippedArmor || The armor that the player character currently has equipped. See the [[#Armor_IDs|Armor IDs]] section for valid values.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00C1 || [[BYTE]][156] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x015D || [[INT8]] || orangePotions || The number of orange potions in the player&#039;s inventory (+6 Strength / -3 Luck)&lt;br /&gt;
|-&lt;br /&gt;
| 0x015E || [[INT8]] || greenPotions || The number of green potions in the player&#039;s inventory (+6 Intelligence / -3 Agility)&lt;br /&gt;
|-&lt;br /&gt;
| 0x015F || [[INT8]] || bluePotions || The number of blue potions in the player&#039;s inventory (+6 Wisdom / -3 Constitution)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0160 || [[INT8]] || redPotions || The number of red potions in the player&#039;s inventory (+6 Constitution / -3 Wisdom)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0161 || [[INT8]] || whitePotions || The number of white potions in the player&#039;s inventory (+6 Agility / -3 Intelligence)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0162 || [[INT8]] || yellowPotions || The number of yellow potions in the player&#039;s inventory (+6 Luck / -3 Strength)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0163 || [[BYTE]][20] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0177 || [[#Spells|SPELL_LIST]] || spellbook || The spells that the player has learned and can cast at any time at the cost of spell power.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01A4 || [[#Spells|SPELL_LIST]] || scrolls || The spells that the player can cast from a scroll.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01D1 || [[#Spells|SPELL_LIST]] || wands || The spell wands that the player possesses.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01FE || [[#Spells|SPELL_LIST]] || papers || The spell papers that the player owns.&lt;br /&gt;
|-&lt;br /&gt;
| 0x022B || [[BYTE]][553] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0454 || [[INT32LE]] || rublesInPocket || The number of rubles that the player has on hand.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0458 || [[INT32LE]] || rublesInBank || The number of rubles that the player has in the bank.&lt;br /&gt;
|-&lt;br /&gt;
| 0x045C || [[BYTE]][8] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0464 || [[INT32LE]] || cultureStock || The amount of culture stock that the player owns.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0468 || [[INT32LE]] || childrenHelped || The number of children that the player helped (at the temple).&lt;br /&gt;
|-&lt;br /&gt;
| 0x046C || [[INT32LE]] || magicCrystals || The number of magic crystals that the player owns.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0470 || [[INT32LE]] || americanDollars || The number of American Dollars that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0474 || [[BYTE]][816] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x07A4 || [[Double]] || experiencePoints || The number of experience points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07AC || [[INT16LE]] || playerLevel || The player character&#039;s current level.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07AE || [[INT16LE]] || playerDirection || The direction that the player character is facing (0x00 == north; 0x01 == south; 0x02 == west; 0x03 == east).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B0 || [[INT16LE]] || playerPositionX || The X coordinate of the player in the current dungeon floor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B2 || [[INT16LE]] || playerPositionY || The Y coordinate of the player in the current dungeon floor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B4 || [[INT16LE]] || playerFloor || The floor of the dungeon that the player is currently on (0 is the town).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B6 || [[INT16LE]] || playerModule || The module that the player is currently playing.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B8 || [[BYTE]][18] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CA || [[UINT8]] || ringsOfRegeneration || The number of rings of regeneration that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CB || [[BYTE]] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CC || [[UINT8]] || nuclearHandGrenade || The number of nuclear hand grenades that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CD || [[UINT8]] || stonesOfSeeing || The number of stones of seeing that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CE || [[INT16LE]] || diseaseTimer || The number of turns until disease damages constitution (0 or -1 disables the timer).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D0 || [[INT16LE]] || poisonTimer || The number of turns until poison damages strength (0 or -1 disables the timer).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D2 || [[UINT8]] || enchantWeaponLevel || The level of the current &amp;quot;Enchant Weapon&amp;quot; preparation spell in effect.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D3 || [[UINT8]] || enchantArmorLevel || The level of the current &amp;quot;Enchant Armor&amp;quot; preparation spell in effect.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D4 || [[UINT8]] || bodyArmor || The number of body armor items that the player has (not related to the gear, listed above).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D5 || [[UINT8]] || ringOfProtection || The number of rings of protection that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D6 || [[UINT8]] || antiMagicRing || The number of anti-magic rings that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D7 || [[BYTE]] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D8 || [[BYTE]] || fastMove || Preparation spell &amp;quot;Fast Move&amp;quot; is in effect.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D9 || [[BYTE]] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x07DA || [[INT32LE]] || playerAge || The current age of the player character.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07DE || [[UINT8]] || preparationStrength || Preparation spell &amp;quot;Strength&amp;quot; is in effect. Normally set to 0x05 (yet changing it or any of the following strength/agility spell values to another nonzero value will not change the number of strength/agility points deducted by an inn stay).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07DF || [[UINT8]] || preparationAgility || Preparation spell &amp;quot;Agility&amp;quot; is in effect. Normally set to 0x05.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07E0 || [[UINT8]] || superStrength || Preparation spell &amp;quot;Super Strength&amp;quot; is in effect. Normally set to 0x0A.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07E1 || [[UINT8]] || superAgility || Preparation spell &amp;quot;Super Agility&amp;quot; is in effect. Normally set to 0x0A.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07E2 || [[BYTE]][32] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0802 || [[INT8]] || floorSloshers || The number of floor sloshers that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0803 || [[BYTE]][15] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0812 || [[INT16LE]] || potionsOfHealing || The number of potions of healing that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0814 || [[INT16LE]] || stonesOfTeleportation || The number of stones of teleportation that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0816 || [[INT16LE]] || playerStrength || The number of strength points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0818 || [[INT16LE]] || playerIntelligence || The number of intelligence points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x081A || [[INT16LE]] || playerWisdom || The number of wisdom points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x081C || [[INT16LE]] || playerConstitution || The number of constitution points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x081E || [[INT16LE]] || playerAgility || The number of agility points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0820 || [[INT16LE]] || playerLuck || The number of luck points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0822 || [[BYTE]][21] || trapDoorKey || The trapdoor keys owned by the player. For each nonzero value in trapDoorKey[n], the player is able to use any trapdoors leading to floor (n * 5).&lt;br /&gt;
|-&lt;br /&gt;
| 0x0837 || [[BYTE]][28] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0853 || [[INT8]] || gauntlets || The number of gauntlets that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0854 || [[BYTE]][162] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x08F6 || [[BYTE]] || difficulty || The difficulty level that the player is playing on. (0x00 == normal; 0x01 == &amp;quot;I can handle anything!&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08F7 || [[BYTE]][122] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0971 || [[UINT32LE]] || gameTimer || This appears to be some sort of hidden in-game timer. {{TODO|Figure out when this is incremented and whether or not it actually does anything.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0975 || [[BYTE]][274] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A87 || [[UINT8]][2] || checksum || The checksum of the saved game file. See [[#Checksum|below]] for more information.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Races ===&lt;br /&gt;
&lt;br /&gt;
The following races can be chosen:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Race&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Humanoid&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Ape&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Childman&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Rodent&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Hobo&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Giant&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Midget&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Shrimp&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Classes ===&lt;br /&gt;
&lt;br /&gt;
The following classes can be chosen:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Class&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Fighter&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Worshipper&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Monk&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Wizard&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Priest&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Sage&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Mage&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Spells ===&lt;br /&gt;
&lt;br /&gt;
Spells are stored in the save file per the following table. In all cases, the spells are stored in order from left-to-right, top-to-bottom, with respect to the in-game spell browser. Each spell category has 15 unused bytes at the end.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]][45] || spellsPermanent || The permanent spells that the player has access to.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]][45] || spellsPreparation || The preparation spells that the player has access to.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]][45] || spellsWizard || The wizard battle spells that the player has access to.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]][45] || spellsPriest || The priest battle spells that the player has access to.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* {{TODO|Do a bit more bounds checking on some of the fields to work out whether they&#039;re signed or unsigned.}}&lt;br /&gt;
&lt;br /&gt;
=== Weapon IDs ===&lt;br /&gt;
&lt;br /&gt;
The following weapon IDs can be used in the &#039;&#039;&#039;equippedWeapon&#039;&#039;&#039; field.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Weapon Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Fists&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Stick&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Club&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Mace&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Knife&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Short Sword&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Long Sword&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Great Sword&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Note: the player does not have to own the specified weapon type in order to have it equipped. The equipment check is only performed when the player switches their weapon in-game.&lt;br /&gt;
&lt;br /&gt;
=== Armor IDs ===&lt;br /&gt;
&lt;br /&gt;
The following weapon IDs can be used in the &#039;&#039;&#039;equippedArmor&#039;&#039;&#039; field.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Armor Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Skin&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Leather&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Chain&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Scale&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Breast Plate&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Field Plate&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Titanium&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Glitchy Armor*&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Note: the player does not have to own the specified armor type in order to have it equipped. The equipment check is only performed when the player switches their armor in-game.&lt;br /&gt;
* *The eighth armor slot always appears in the armor list of the game as a blank slot, but only seven armor types appear within the game world. If the set of armor is hacked into the game with a hex editor or memory editor, it appears as jumbled text and provides a currently-unknown amount of protection.&lt;br /&gt;
&lt;br /&gt;
=== Checksum ===&lt;br /&gt;
&lt;br /&gt;
The checksum is calculated as follows (example in C# and assuming saveBytes is the saved game data, sans checksum—that is, the first 2695 (0xA87) bytes in the file):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
checksum[0] = checksum[1] = 0;&lt;br /&gt;
foreach(var b in saveBytes) {&lt;br /&gt;
    checksum[0] += b;&lt;br /&gt;
    checksum[1] += checksum[0] - checksum[0] * checksum[0];&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the checksum is incorrect for the saved game file, the player will be immediately booted back to the DOS prompt with a &amp;quot;corrupted character&amp;quot; error.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This file format was reverse engineered and documented by [[User:Spectere|Spectere]] and [[User:Bag_of_Magic_Food|Bag of Magic Food]]. If you find this information helpful in a project you&#039;re working on, please give credit where credit is due. (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>Bag of Magic Food</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Dungeons_of_the_Unforgiven_Player_Character&amp;diff=9117</id>
		<title>Dungeons of the Unforgiven Player Character</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Dungeons_of_the_Unforgiven_Player_Character&amp;diff=9117"/>
		<updated>2020-08-04T03:05:29Z</updated>

		<summary type="html">&lt;p&gt;Bag of Magic Food: I do believe this one byte is Fast-Move! Now to look into the more stat-altering stuff...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Playerdata Infobox&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = ?&lt;br /&gt;
 | Elements = Player character data&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|Dungeons of the Unforgiven}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The saved game format for &#039;&#039;[[Dungeons of the Unforgiven]]&#039;&#039; appears to be a simple dump of the game&#039;s internal structures, with a couple of checksum bytes added on, presumably to slow cheaters down a bit. Some of the chunks of data are in a very peculiar order (such as some of the items being in radically different spots of the file), which makes it somewhat annoying to try to directly load into a C struct or similar data structure.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re parsing this format, be very mindful of the data types. Signed and unsigned data types, as well as differing field sizes, are used even with related fields. For example, Rings of Protection are stored in an unsigned byte while Potions of Healing are stored in a signed word.&lt;br /&gt;
&lt;br /&gt;
== File Layout ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset (hex) !! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000 || [[char]][18] || playerName || The name of the player character (including a null terminator).&lt;br /&gt;
|-&lt;br /&gt;
| 0x0012 || [[BYTE]][22] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0028 || [[INT8]] || playerRace || The race of the player character.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0029 || [[INT8]] || playerGender || The player character&#039;s gender (0x00 == male; 0x01 == female)&lt;br /&gt;
|-&lt;br /&gt;
| 0x002A || [[INT8]] || playerClass || The player character&#039;s class.&lt;br /&gt;
|-&lt;br /&gt;
| 0x002B || [[BYTE]][6] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0031 || [[INT16LE]] || playerCurrentHP || The player character&#039;s current hit points.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0033 || [[INT16LE]] || playerMaxHP || The player character&#039;s maximum hit points.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0035 || [[INT32LE]] || playerCurrentSP || The player character&#039;s current spell points.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0039 || [[INT32LE]] || playerMaxSP || The player character&#039;s maximum spell points.&lt;br /&gt;
|-&lt;br /&gt;
| 0x003D || [[BYTE]][2] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x003F || [[INT16LE]] || nakedWeight || The player&#039;s base weight.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0041 || [[INT16LE]] || loadedWeight || The player&#039;s loaded weight (note: this always gets updated by the game).&lt;br /&gt;
|-&lt;br /&gt;
| 0x0043 || [[BYTE]][62] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0081 || [[BYTE]] || weaponFists || Player character has their fists (normally these cannot be dropped).&lt;br /&gt;
|-&lt;br /&gt;
| 0x0082 || [[BYTE]] || weaponStick || Player character has the stick.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0083 || [[BYTE]] || weaponClub || Player character has the club.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0084 || [[BYTE]] || weaponMace || Player character has the mace.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0085 || [[BYTE]] || weaponKnife || Player character has the knife.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0086 || [[BYTE]] || weaponShortSword || Player character has the short sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0087 || [[BYTE]] || weaponLongSword || Player character has the long sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0088 || [[BYTE]] || weaponGreatSword || Player character has the great sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0089 || [[BYTE]][5] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x008E || [[INT8]] || levelFists || The permanent enchantment level of the fists.&lt;br /&gt;
|-&lt;br /&gt;
| 0x008F || [[INT8]] || levelStick || The permanent enchantment level of the stick.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0090 || [[INT8]] || levelClub || The permanent enchantment level of the club.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0091 || [[INT8]] || levelMace || The permanent enchantment level of the mace.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0092 || [[INT8]] || levelKnife || The permanent enchantment level of the knife.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0093 || [[INT8]] || levelShortSword || The permanent enchantment level of the short sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0094 || [[INT8]] || levelLongSword || The permanent enchantment level of the long sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0095 || [[INT8]] || levelGreatSword || The permanent enchantment level of the great sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0096 || [[BYTE]][5] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x009B || [[INT8]] || equippedWeapon || The weapon that the player character currently has equipped. See the [[#Weapon_IDs|Weapon IDs]] section for valid values.&lt;br /&gt;
|-&lt;br /&gt;
| 0x009C || [[BYTE]][20] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B0 || [[BYTE]] || armorSkin || Player character has their skin (normally this cannot be dropped).&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B1 || [[BYTE]] || armorLeather || Player character has leather armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B2 || [[BYTE]] || armorChain || Player character has chain armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B3 || [[BYTE]] || armorScale || Player character has scale armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B4 || [[BYTE]] || armorBreastPlate || Player character has the breast plate.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B5 || [[BYTE]] || armorFieldPlate || Player character has field plate.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B6 || [[BYTE]] || armorTitanium || Player character has the titanium armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B7 || [[BYTE]] || armorSlot8 || This &amp;quot;armor&amp;quot; is not implemented in the game and points to garbage data. See the notes below for a little bit more information. {{TODO|Figure out exactly what in the executable this is pointing to, as it is technically fully usable.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B8 || [[INT8]] || levelSkin || The permanent enchantment level of the skin.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B9 || [[INT8]] || levelLeather || The permanent enchantment level of the leather armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BA || [[INT8]] || levelChain || The permanent enchantment level of the chain armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BB || [[INT8]] || levelScale || The permanent enchantment level of the scale armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BC || [[INT8]] || levelBreastPlate || The permanent enchantment level of the breast plate.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BD || [[INT8]] || levelFieldPlate || The permanent enchantment level of the field plate.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BE || [[INT8]] || levelTitanium || The permanent enchantment level of the titanium armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BF || [[INT8]] || levelSlot8 || The permanent enchantment level of the glitchy armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00C0 || [[INT8]] || equippedArmor || The armor that the player character currently has equipped. See the [[#Armor_IDs|Armor IDs]] section for valid values.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00C1 || [[BYTE]][156] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x015D || [[INT8]] || orangePotions || The number of orange potions in the player&#039;s inventory (+6 Strength / -3 Luck)&lt;br /&gt;
|-&lt;br /&gt;
| 0x015E || [[INT8]] || greenPotions || The number of green potions in the player&#039;s inventory (+6 Intelligence / -3 Agility)&lt;br /&gt;
|-&lt;br /&gt;
| 0x015F || [[INT8]] || bluePotions || The number of blue potions in the player&#039;s inventory (+6 Wisdom / -3 Constitution)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0160 || [[INT8]] || redPotions || The number of red potions in the player&#039;s inventory (+6 Constitution / -3 Wisdom)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0161 || [[INT8]] || whitePotions || The number of white potions in the player&#039;s inventory (+6 Agility / -3 Intelligence)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0162 || [[INT8]] || yellowPotions || The number of yellow potions in the player&#039;s inventory (+6 Luck / -3 Strength)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0163 || [[BYTE]][20] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0177 || [[#Spells|SPELL_LIST]] || spellbook || The spells that the player has learned and can cast at any time at the cost of spell power.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01A4 || [[#Spells|SPELL_LIST]] || scrolls || The spells that the player can cast from a scroll.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01D1 || [[#Spells|SPELL_LIST]] || wands || The spell wands that the player possesses.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01FE || [[#Spells|SPELL_LIST]] || papers || The spell papers that the player owns.&lt;br /&gt;
|-&lt;br /&gt;
| 0x022B || [[BYTE]][553] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0454 || [[INT32LE]] || rublesInPocket || The number of rubles that the player has on hand.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0458 || [[INT32LE]] || rublesInBank || The number of rubles that the player has in the bank.&lt;br /&gt;
|-&lt;br /&gt;
| 0x045C || [[BYTE]][8] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0464 || [[INT32LE]] || cultureStock || The amount of culture stock that the player owns.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0468 || [[INT32LE]] || childrenHelped || The number of children that the player helped (at the temple).&lt;br /&gt;
|-&lt;br /&gt;
| 0x046C || [[INT32LE]] || magicCrystals || The number of magic crystals that the player owns.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0470 || [[INT32LE]] || americanDollars || The number of American Dollars that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0474 || [[BYTE]][816] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x07A4 || [[Double]] || experiencePoints || The number of experience points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07AC || [[INT16LE]] || playerLevel || The player character&#039;s current level.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07AE || [[INT16LE]] || playerDirection || The direction that the player character is facing (0x00 == north; 0x01 == south; 0x02 == west; 0x03 == east).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B0 || [[INT16LE]] || playerPositionX || The X coordinate of the player in the current dungeon floor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B2 || [[INT16LE]] || playerPositionY || The Y coordinate of the player in the current dungeon floor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B4 || [[INT16LE]] || playerFloor || The floor of the dungeon that the player is currently on (0 is the town).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B6 || [[INT16LE]] || playerModule || The module that the player is currently playing.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B8 || [[BYTE]][18] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CA || [[UINT8]] || ringsOfRegeneration || The number of rings of regeneration that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CB || [[BYTE]] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CC || [[UINT8]] || nuclearHandGrenade || The number of nuclear hand grenades that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CD || [[UINT8]] || stonesOfSeeing || The number of stones of seeing that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CE || [[INT16LE]] || diseaseTimer || The number of turns until disease damages constitution (0 or -1 disables the timer).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D0 || [[INT16LE]] || poisonTimer || The number of turns until poison damages strength (0 or -1 disables the timer).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D2 || [[UINT8]] || enchantWeaponLevel || The level of the current &amp;quot;Enchant Weapon&amp;quot; preparation spell in effect.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D3 || [[UINT8]] || enchantArmorLevel || The level of the current &amp;quot;Enchant Armor&amp;quot; preparation spell in effect.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D4 || [[UINT8]] || bodyArmor || The number of body armor items that the player has (not related to the gear, listed above).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D5 || [[UINT8]] || ringOfProtection || The number of rings of protection that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D6 || [[UINT8]] || antiMagicRing || The number of anti-magic rings that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D7 || [[BYTE]] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D8 || [[BYTE]] || fastMove || Preparation spell &amp;quot;Fast Move&amp;quot; is in effect.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D9 || [[BYTE]] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x07DA || [[INT32LE]] || playerAge || The current age of the player character.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07DE || [[BYTE]][36] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0802 || [[INT8]] || floorSloshers || The number of floor sloshers that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0803 || [[BYTE]][15] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0812 || [[INT16LE]] || potionsOfHealing || The number of potions of healing that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0814 || [[INT16LE]] || stonesOfTeleportation || The number of stones of teleportation that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0816 || [[INT16LE]] || playerStrength || The number of strength points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0818 || [[INT16LE]] || playerIntelligence || The number of intelligence points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x081A || [[INT16LE]] || playerWisdom || The number of wisdom points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x081C || [[INT16LE]] || playerConstitution || The number of constitution points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x081E || [[INT16LE]] || playerAgility || The number of agility points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0820 || [[INT16LE]] || playerLuck || The number of luck points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0822 || [[BYTE]][21] || trapDoorKey || The trapdoor keys owned by the player. For each nonzero value in trapDoorKey[n], the player is able to use any trapdoors leading to floor (n * 5).&lt;br /&gt;
|-&lt;br /&gt;
| 0x0837 || [[BYTE]][28] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0853 || [[INT8]] || gauntlets || The number of gauntlets that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0854 || [[BYTE]][162] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x08F6 || [[BYTE]] || difficulty || The difficulty level that the player is playing on. (0x00 == normal; 0x01 == &amp;quot;I can handle anything!&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08F7 || [[BYTE]][122] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0971 || [[UINT32LE]] || gameTimer || This appears to be some sort of hidden in-game timer. {{TODO|Figure out when this is incremented and whether or not it actually does anything.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0975 || [[BYTE]][274] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A87 || [[UINT8]][2] || checksum || The checksum of the saved game file. See [[#Checksum|below]] for more information.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Races ===&lt;br /&gt;
&lt;br /&gt;
The following races can be chosen:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Race&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Humanoid&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Ape&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Childman&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Rodent&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Hobo&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Giant&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Midget&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Shrimp&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Classes ===&lt;br /&gt;
&lt;br /&gt;
The following classes can be chosen:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Class&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Fighter&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Worshipper&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Monk&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Wizard&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Priest&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Sage&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Mage&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Spells ===&lt;br /&gt;
&lt;br /&gt;
Spells are stored in the save file per the following table. In all cases, the spells are stored in order from left-to-right, top-to-bottom, with respect to the in-game spell browser. Each spell category has 15 unused bytes at the end.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]][45] || spellsPermanent || The permanent spells that the player has access to.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]][45] || spellsPreparation || The preparation spells that the player has access to.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]][45] || spellsWizard || The wizard battle spells that the player has access to.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]][45] || spellsPriest || The priest battle spells that the player has access to.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* {{TODO|Do a bit more bounds checking on some of the fields to work out whether they&#039;re signed or unsigned.}}&lt;br /&gt;
&lt;br /&gt;
=== Weapon IDs ===&lt;br /&gt;
&lt;br /&gt;
The following weapon IDs can be used in the &#039;&#039;&#039;equippedWeapon&#039;&#039;&#039; field.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Weapon Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Fists&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Stick&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Club&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Mace&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Knife&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Short Sword&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Long Sword&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Great Sword&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Note: the player does not have to own the specified weapon type in order to have it equipped. The equipment check is only performed when the player switches their weapon in-game.&lt;br /&gt;
&lt;br /&gt;
=== Armor IDs ===&lt;br /&gt;
&lt;br /&gt;
The following weapon IDs can be used in the &#039;&#039;&#039;equippedArmor&#039;&#039;&#039; field.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Armor Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Skin&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Leather&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Chain&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Scale&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Breast Plate&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Field Plate&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Titanium&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Glitchy Armor*&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Note: the player does not have to own the specified armor type in order to have it equipped. The equipment check is only performed when the player switches their armor in-game.&lt;br /&gt;
* *The eighth armor slot always appears in the armor list of the game as a blank slot, but only seven armor types appear within the game world. If the set of armor is hacked into the game with a hex editor or memory editor, it appears as jumbled text and provides a currently-unknown amount of protection.&lt;br /&gt;
&lt;br /&gt;
=== Checksum ===&lt;br /&gt;
&lt;br /&gt;
The checksum is calculated as follows (example in C# and assuming saveBytes is the saved game data, sans checksum—that is, the first 2695 (0xA87) bytes in the file):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
checksum[0] = checksum[1] = 0;&lt;br /&gt;
foreach(var b in saveBytes) {&lt;br /&gt;
    checksum[0] += b;&lt;br /&gt;
    checksum[1] += checksum[0] - checksum[0] * checksum[0];&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the checksum is incorrect for the saved game file, the player will be immediately booted back to the DOS prompt with a &amp;quot;corrupted character&amp;quot; error.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This file format was reverse engineered and documented by [[User:Spectere|Spectere]] and [[User:Bag_of_Magic_Food|Bag of Magic Food]]. If you find this information helpful in a project you&#039;re working on, please give credit where credit is due. (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>Bag of Magic Food</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Dungeons_of_the_Unforgiven_Player_Character&amp;diff=9114</id>
		<title>Dungeons of the Unforgiven Player Character</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Dungeons_of_the_Unforgiven_Player_Character&amp;diff=9114"/>
		<updated>2020-08-03T20:45:17Z</updated>

		<summary type="html">&lt;p&gt;Bag of Magic Food: I found the addresses for preparatory Enchant Weapon/Armor spell levels. Other spell activation might be a little trickier to root out, so I&amp;#039;ll come back to this later.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Playerdata Infobox&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = ?&lt;br /&gt;
 | Elements = Player character data&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|Dungeons of the Unforgiven}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The saved game format for &#039;&#039;[[Dungeons of the Unforgiven]]&#039;&#039; appears to be a simple dump of the game&#039;s internal structures, with a couple of checksum bytes added on, presumably to slow cheaters down a bit. Some of the chunks of data are in a very peculiar order (such as some of the items being in radically different spots of the file), which makes it somewhat annoying to try to directly load into a C struct or similar data structure.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re parsing this format, be very mindful of the data types. Signed and unsigned data types, as well as differing field sizes, are used even with related fields. For example, Rings of Protection are stored in an unsigned byte while Potions of Healing are stored in a signed word.&lt;br /&gt;
&lt;br /&gt;
== File Layout ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset (hex) !! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000 || [[char]][18] || playerName || The name of the player character (including a null terminator).&lt;br /&gt;
|-&lt;br /&gt;
| 0x0012 || [[BYTE]][22] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0028 || [[INT8]] || playerRace || The race of the player character.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0029 || [[INT8]] || playerGender || The player character&#039;s gender (0x00 == male; 0x01 == female)&lt;br /&gt;
|-&lt;br /&gt;
| 0x002A || [[INT8]] || playerClass || The player character&#039;s class.&lt;br /&gt;
|-&lt;br /&gt;
| 0x002B || [[BYTE]][6] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0031 || [[INT16LE]] || playerCurrentHP || The player character&#039;s current hit points.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0033 || [[INT16LE]] || playerMaxHP || The player character&#039;s maximum hit points.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0035 || [[INT32LE]] || playerCurrentSP || The player character&#039;s current spell points.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0039 || [[INT32LE]] || playerMaxSP || The player character&#039;s maximum spell points.&lt;br /&gt;
|-&lt;br /&gt;
| 0x003D || [[BYTE]][2] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x003F || [[INT16LE]] || nakedWeight || The player&#039;s base weight.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0041 || [[INT16LE]] || loadedWeight || The player&#039;s loaded weight (note: this always gets updated by the game).&lt;br /&gt;
|-&lt;br /&gt;
| 0x0043 || [[BYTE]][62] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0081 || [[BYTE]] || weaponFists || Player character has their fists (normally these cannot be dropped).&lt;br /&gt;
|-&lt;br /&gt;
| 0x0082 || [[BYTE]] || weaponStick || Player character has the stick.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0083 || [[BYTE]] || weaponClub || Player character has the club.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0084 || [[BYTE]] || weaponMace || Player character has the mace.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0085 || [[BYTE]] || weaponKnife || Player character has the knife.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0086 || [[BYTE]] || weaponShortSword || Player character has the short sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0087 || [[BYTE]] || weaponLongSword || Player character has the long sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0088 || [[BYTE]] || weaponGreatSword || Player character has the great sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0089 || [[BYTE]][5] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x008E || [[INT8]] || levelFists || The permanent enchantment level of the fists.&lt;br /&gt;
|-&lt;br /&gt;
| 0x008F || [[INT8]] || levelStick || The permanent enchantment level of the stick.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0090 || [[INT8]] || levelClub || The permanent enchantment level of the club.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0091 || [[INT8]] || levelMace || The permanent enchantment level of the mace.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0092 || [[INT8]] || levelKnife || The permanent enchantment level of the knife.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0093 || [[INT8]] || levelShortSword || The permanent enchantment level of the short sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0094 || [[INT8]] || levelLongSword || The permanent enchantment level of the long sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0095 || [[INT8]] || levelGreatSword || The permanent enchantment level of the great sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0096 || [[BYTE]][5] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x009B || [[INT8]] || equippedWeapon || The weapon that the player character currently has equipped. See the [[#Weapon_IDs|Weapon IDs]] section for valid values.&lt;br /&gt;
|-&lt;br /&gt;
| 0x009C || [[BYTE]][20] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B0 || [[BYTE]] || armorSkin || Player character has their skin (normally this cannot be dropped).&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B1 || [[BYTE]] || armorLeather || Player character has leather armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B2 || [[BYTE]] || armorChain || Player character has chain armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B3 || [[BYTE]] || armorScale || Player character has scale armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B4 || [[BYTE]] || armorBreastPlate || Player character has the breast plate.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B5 || [[BYTE]] || armorFieldPlate || Player character has field plate.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B6 || [[BYTE]] || armorTitanium || Player character has the titanium armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B7 || [[BYTE]] || armorSlot8 || This &amp;quot;armor&amp;quot; is not implemented in the game and points to garbage data. See the notes below for a little bit more information. {{TODO|Figure out exactly what in the executable this is pointing to, as it is technically fully usable.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B8 || [[INT8]] || levelSkin || The permanent enchantment level of the skin.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B9 || [[INT8]] || levelLeather || The permanent enchantment level of the leather armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BA || [[INT8]] || levelChain || The permanent enchantment level of the chain armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BB || [[INT8]] || levelScale || The permanent enchantment level of the scale armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BC || [[INT8]] || levelBreastPlate || The permanent enchantment level of the breast plate.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BD || [[INT8]] || levelFieldPlate || The permanent enchantment level of the field plate.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BE || [[INT8]] || levelTitanium || The permanent enchantment level of the titanium armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BF || [[INT8]] || levelSlot8 || The permanent enchantment level of the glitchy armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00C0 || [[INT8]] || equippedArmor || The armor that the player character currently has equipped. See the [[#Armor_IDs|Armor IDs]] section for valid values.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00C1 || [[BYTE]][156] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x015D || [[INT8]] || orangePotions || The number of orange potions in the player&#039;s inventory (+6 Strength / -3 Luck)&lt;br /&gt;
|-&lt;br /&gt;
| 0x015E || [[INT8]] || greenPotions || The number of green potions in the player&#039;s inventory (+6 Intelligence / -3 Agility)&lt;br /&gt;
|-&lt;br /&gt;
| 0x015F || [[INT8]] || bluePotions || The number of blue potions in the player&#039;s inventory (+6 Wisdom / -3 Constitution)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0160 || [[INT8]] || redPotions || The number of red potions in the player&#039;s inventory (+6 Constitution / -3 Wisdom)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0161 || [[INT8]] || whitePotions || The number of white potions in the player&#039;s inventory (+6 Agility / -3 Intelligence)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0162 || [[INT8]] || yellowPotions || The number of yellow potions in the player&#039;s inventory (+6 Luck / -3 Strength)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0163 || [[BYTE]][20] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0177 || [[#Spells|SPELL_LIST]] || spellbook || The spells that the player has learned and can cast at any time at the cost of spell power.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01A4 || [[#Spells|SPELL_LIST]] || scrolls || The spells that the player can cast from a scroll.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01D1 || [[#Spells|SPELL_LIST]] || wands || The spell wands that the player possesses.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01FE || [[#Spells|SPELL_LIST]] || papers || The spell papers that the player owns.&lt;br /&gt;
|-&lt;br /&gt;
| 0x022B || [[BYTE]][553] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0454 || [[INT32LE]] || rublesInPocket || The number of rubles that the player has on hand.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0458 || [[INT32LE]] || rublesInBank || The number of rubles that the player has in the bank.&lt;br /&gt;
|-&lt;br /&gt;
| 0x045C || [[BYTE]][8] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0464 || [[INT32LE]] || cultureStock || The amount of culture stock that the player owns.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0468 || [[INT32LE]] || childrenHelped || The number of children that the player helped (at the temple).&lt;br /&gt;
|-&lt;br /&gt;
| 0x046C || [[INT32LE]] || magicCrystals || The number of magic crystals that the player owns.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0470 || [[INT32LE]] || americanDollars || The number of American Dollars that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0474 || [[BYTE]][816] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x07A4 || [[Double]] || experiencePoints || The number of experience points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07AC || [[INT16LE]] || playerLevel || The player character&#039;s current level.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07AE || [[INT16LE]] || playerDirection || The direction that the player character is facing (0x00 == north; 0x01 == south; 0x02 == west; 0x03 == east).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B0 || [[INT16LE]] || playerPositionX || The X coordinate of the player in the current dungeon floor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B2 || [[INT16LE]] || playerPositionY || The Y coordinate of the player in the current dungeon floor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B4 || [[INT16LE]] || playerFloor || The floor of the dungeon that the player is currently on (0 is the town).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B6 || [[INT16LE]] || playerModule || The module that the player is currently playing.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B8 || [[BYTE]][18] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CA || [[UINT8]] || ringsOfRegeneration || The number of rings of regeneration that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CB || [[BYTE]] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CC || [[UINT8]] || nuclearHandGrenade || The number of nuclear hand grenades that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CD || [[UINT8]] || stonesOfSeeing || The number of stones of seeing that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CE || [[INT16LE]] || diseaseTimer || The number of turns until disease damages constitution (0 or -1 disables the timer).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D0 || [[INT16LE]] || poisonTimer || The number of turns until poison damages strength (0 or -1 disables the timer).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D2 || [[UINT8]] || enchantWeaponLevel || The level of the current &amp;quot;Enchant Weapon&amp;quot; preparation spell in effect.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D3 || [[UINT8]] || enchantArmorLevel || The level of the current &amp;quot;Enchant Armor&amp;quot; preparation spell in effect.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D4 || [[UINT8]] || bodyArmor || The number of body armor items that the player has (not related to the gear, listed above).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D5 || [[UINT8]] || ringOfProtection || The number of rings of protection that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D6 || [[UINT8]] || antiMagicRing || The number of anti-magic rings that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D7 || [[BYTE]][3] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x07DA || [[INT32LE]] || playerAge || The current age of the player character.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07DE || [[BYTE]][36] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0802 || [[INT8]] || floorSloshers || The number of floor sloshers that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0803 || [[BYTE]][15] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0812 || [[INT16LE]] || potionsOfHealing || The number of potions of healing that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0814 || [[INT16LE]] || stonesOfTeleportation || The number of stones of teleportation that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0816 || [[INT16LE]] || playerStrength || The number of strength points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0818 || [[INT16LE]] || playerIntelligence || The number of intelligence points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x081A || [[INT16LE]] || playerWisdom || The number of wisdom points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x081C || [[INT16LE]] || playerConstitution || The number of constitution points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x081E || [[INT16LE]] || playerAgility || The number of agility points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0820 || [[INT16LE]] || playerLuck || The number of luck points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0822 || [[BYTE]][21] || trapDoorKey || The trapdoor keys owned by the player. For each nonzero value in trapDoorKey[n], the player is able to use any trapdoors leading to floor (n * 5).&lt;br /&gt;
|-&lt;br /&gt;
| 0x0837 || [[BYTE]][28] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0853 || [[INT8]] || gauntlets || The number of gauntlets that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0854 || [[BYTE]][162] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x08F6 || [[BYTE]] || difficulty || The difficulty level that the player is playing on. (0x00 == normal; 0x01 == &amp;quot;I can handle anything!&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08F7 || [[BYTE]][122] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0971 || [[UINT32LE]] || gameTimer || This appears to be some sort of hidden in-game timer. {{TODO|Figure out when this is incremented and whether or not it actually does anything.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0975 || [[BYTE]][274] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A87 || [[UINT8]][2] || checksum || The checksum of the saved game file. See [[#Checksum|below]] for more information.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Races ===&lt;br /&gt;
&lt;br /&gt;
The following races can be chosen:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Race&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Humanoid&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Ape&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Childman&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Rodent&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Hobo&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Giant&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Midget&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Shrimp&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Classes ===&lt;br /&gt;
&lt;br /&gt;
The following classes can be chosen:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Class&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Fighter&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Worshipper&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Monk&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Wizard&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Priest&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Sage&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Mage&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Spells ===&lt;br /&gt;
&lt;br /&gt;
Spells are stored in the save file per the following table. In all cases, the spells are stored in order from left-to-right, top-to-bottom, with respect to the in-game spell browser. Each spell category has 15 unused bytes at the end.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]][45] || spellsPermanent || The permanent spells that the player has access to.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]][45] || spellsPreparation || The preparation spells that the player has access to.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]][45] || spellsWizard || The wizard battle spells that the player has access to.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]][45] || spellsPriest || The priest battle spells that the player has access to.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* {{TODO|Do a bit more bounds checking on some of the fields to work out whether they&#039;re signed or unsigned.}}&lt;br /&gt;
&lt;br /&gt;
=== Weapon IDs ===&lt;br /&gt;
&lt;br /&gt;
The following weapon IDs can be used in the &#039;&#039;&#039;equippedWeapon&#039;&#039;&#039; field.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Weapon Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Fists&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Stick&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Club&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Mace&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Knife&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Short Sword&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Long Sword&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Great Sword&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Note: the player does not have to own the specified weapon type in order to have it equipped. The equipment check is only performed when the player switches their weapon in-game.&lt;br /&gt;
&lt;br /&gt;
=== Armor IDs ===&lt;br /&gt;
&lt;br /&gt;
The following weapon IDs can be used in the &#039;&#039;&#039;equippedArmor&#039;&#039;&#039; field.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Armor Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Skin&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Leather&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Chain&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Scale&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Breast Plate&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Field Plate&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Titanium&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Glitchy Armor*&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Note: the player does not have to own the specified armor type in order to have it equipped. The equipment check is only performed when the player switches their armor in-game.&lt;br /&gt;
* *The eighth armor slot always appears in the armor list of the game as a blank slot, but only seven armor types appear within the game world. If the set of armor is hacked into the game with a hex editor or memory editor, it appears as jumbled text and provides a currently-unknown amount of protection.&lt;br /&gt;
&lt;br /&gt;
=== Checksum ===&lt;br /&gt;
&lt;br /&gt;
The checksum is calculated as follows (example in C# and assuming saveBytes is the saved game data, sans checksum—that is, the first 2695 (0xA87) bytes in the file):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
checksum[0] = checksum[1] = 0;&lt;br /&gt;
foreach(var b in saveBytes) {&lt;br /&gt;
    checksum[0] += b;&lt;br /&gt;
    checksum[1] += checksum[0] - checksum[0] * checksum[0];&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the checksum is incorrect for the saved game file, the player will be immediately booted back to the DOS prompt with a &amp;quot;corrupted character&amp;quot; error.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This file format was reverse engineered and documented by [[User:Spectere|Spectere]]. If you find this information helpful in a project you&#039;re working on, please give credit where credit is due. (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>Bag of Magic Food</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Dungeons_of_the_Unforgiven_Player_Character&amp;diff=9113</id>
		<title>Dungeons of the Unforgiven Player Character</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Dungeons_of_the_Unforgiven_Player_Character&amp;diff=9113"/>
		<updated>2020-08-03T18:26:39Z</updated>

		<summary type="html">&lt;p&gt;Bag of Magic Food: I added the locations of trapdoor keys and &amp;quot;Plus&amp;quot; levels for weapons and armor (obtained from boss rewards or permanent spells)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Playerdata Infobox&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = ?&lt;br /&gt;
 | Elements = Player character data&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|Dungeons of the Unforgiven}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The saved game format for &#039;&#039;[[Dungeons of the Unforgiven]]&#039;&#039; appears to be a simple dump of the game&#039;s internal structures, with a couple of checksum bytes added on, presumably to slow cheaters down a bit. Some of the chunks of data are in a very peculiar order (such as some of the items being in radically different spots of the file), which makes it somewhat annoying to try to directly load into a C struct or similar data structure.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re parsing this format, be very mindful of the data types. Signed and unsigned data types, as well as differing field sizes, are used even with related fields. For example, Rings of Protection are stored in an unsigned byte while Potions of Healing are stored in a signed word.&lt;br /&gt;
&lt;br /&gt;
== File Layout ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset (hex) !! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000 || [[char]][18] || playerName || The name of the player character (including a null terminator).&lt;br /&gt;
|-&lt;br /&gt;
| 0x0012 || [[BYTE]][22] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0028 || [[INT8]] || playerRace || The race of the player character.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0029 || [[INT8]] || playerGender || The player character&#039;s gender (0x00 == male; 0x01 == female)&lt;br /&gt;
|-&lt;br /&gt;
| 0x002A || [[INT8]] || playerClass || The player character&#039;s class.&lt;br /&gt;
|-&lt;br /&gt;
| 0x002B || [[BYTE]][6] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0031 || [[INT16LE]] || playerCurrentHP || The player character&#039;s current hit points.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0033 || [[INT16LE]] || playerMaxHP || The player character&#039;s maximum hit points.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0035 || [[INT32LE]] || playerCurrentSP || The player character&#039;s current spell points.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0039 || [[INT32LE]] || playerMaxSP || The player character&#039;s maximum spell points.&lt;br /&gt;
|-&lt;br /&gt;
| 0x003D || [[BYTE]][2] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x003F || [[INT16LE]] || nakedWeight || The player&#039;s base weight.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0041 || [[INT16LE]] || loadedWeight || The player&#039;s loaded weight (note: this always gets updated by the game).&lt;br /&gt;
|-&lt;br /&gt;
| 0x0043 || [[BYTE]][62] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0081 || [[BYTE]] || weaponFists || Player character has their fists (normally these cannot be dropped).&lt;br /&gt;
|-&lt;br /&gt;
| 0x0082 || [[BYTE]] || weaponStick || Player character has the stick.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0083 || [[BYTE]] || weaponClub || Player character has the club.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0084 || [[BYTE]] || weaponMace || Player character has the mace.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0085 || [[BYTE]] || weaponKnife || Player character has the knife.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0086 || [[BYTE]] || weaponShortSword || Player character has the short sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0087 || [[BYTE]] || weaponLongSword || Player character has the long sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0088 || [[BYTE]] || weaponGreatSword || Player character has the great sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0089 || [[BYTE]][5] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x008E || [[INT8]] || levelFists || The permanent enchantment level of the fists.&lt;br /&gt;
|-&lt;br /&gt;
| 0x008F || [[INT8]] || levelStick || The permanent enchantment level of the stick.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0090 || [[INT8]] || levelClub || The permanent enchantment level of the club.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0091 || [[INT8]] || levelMace || The permanent enchantment level of the mace.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0092 || [[INT8]] || levelKnife || The permanent enchantment level of the knife.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0093 || [[INT8]] || levelShortSword || The permanent enchantment level of the short sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0094 || [[INT8]] || levelLongSword || The permanent enchantment level of the long sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0095 || [[INT8]] || levelGreatSword || The permanent enchantment level of the great sword.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0096 || [[BYTE]][5] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x009B || [[INT8]] || equippedWeapon || The weapon that the player character currently has equipped. See the [[#Weapon_IDs|Weapon IDs]] section for valid values.&lt;br /&gt;
|-&lt;br /&gt;
| 0x009C || [[BYTE]][20] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B0 || [[BYTE]] || armorSkin || Player character has their skin (normally this cannot be dropped).&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B1 || [[BYTE]] || armorLeather || Player character has leather armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B2 || [[BYTE]] || armorChain || Player character has chain armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B3 || [[BYTE]] || armorScale || Player character has scale armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B4 || [[BYTE]] || armorBreastPlate || Player character has the breast plate.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B5 || [[BYTE]] || armorFieldPlate || Player character has field plate.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B6 || [[BYTE]] || armorTitanium || Player character has the titanium armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B7 || [[BYTE]] || armorSlot8 || This &amp;quot;armor&amp;quot; is not implemented in the game and points to garbage data. See the notes below for a little bit more information. {{TODO|Figure out exactly what in the executable this is pointing to, as it is technically fully usable.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B8 || [[INT8]] || levelSkin || The permanent enchantment level of the skin.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00B9 || [[INT8]] || levelLeather || The permanent enchantment level of the leather armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BA || [[INT8]] || levelChain || The permanent enchantment level of the chain armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BB || [[INT8]] || levelScale || The permanent enchantment level of the scale armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BC || [[INT8]] || levelBreastPlate || The permanent enchantment level of the breast plate.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BD || [[INT8]] || levelFieldPlate || The permanent enchantment level of the field plate.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BE || [[INT8]] || levelTitanium || The permanent enchantment level of the titanium armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00BF || [[INT8]] || levelSlot8 || The permanent enchantment level of the glitchy armor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00C0 || [[INT8]] || equippedArmor || The armor that the player character currently has equipped. See the [[#Armor_IDs|Armor IDs]] section for valid values.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00C1 || [[BYTE]][156] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x015D || [[INT8]] || orangePotions || The number of orange potions in the player&#039;s inventory (+6 Strength / -3 Luck)&lt;br /&gt;
|-&lt;br /&gt;
| 0x015E || [[INT8]] || greenPotions || The number of green potions in the player&#039;s inventory (+6 Intelligence / -3 Agility)&lt;br /&gt;
|-&lt;br /&gt;
| 0x015F || [[INT8]] || bluePotions || The number of blue potions in the player&#039;s inventory (+6 Wisdom / -3 Constitution)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0160 || [[INT8]] || redPotions || The number of red potions in the player&#039;s inventory (+6 Constitution / -3 Wisdom)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0161 || [[INT8]] || whitePotions || The number of white potions in the player&#039;s inventory (+6 Agility / -3 Intelligence)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0162 || [[INT8]] || yellowPotions || The number of yellow potions in the player&#039;s inventory (+6 Luck / -3 Strength)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0163 || [[BYTE]][20] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0177 || [[#Spells|SPELL_LIST]] || spellbook || The spells that the player has learned and can cast at any time at the cost of spell power.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01A4 || [[#Spells|SPELL_LIST]] || scrolls || The spells that the player can cast from a scroll.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01D1 || [[#Spells|SPELL_LIST]] || wands || The spell wands that the player possesses.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01FE || [[#Spells|SPELL_LIST]] || papers || The spell papers that the player owns.&lt;br /&gt;
|-&lt;br /&gt;
| 0x022B || [[BYTE]][553] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0454 || [[INT32LE]] || rublesInPocket || The number of rubles that the player has on hand.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0458 || [[INT32LE]] || rublesInBank || The number of rubles that the player has in the bank.&lt;br /&gt;
|-&lt;br /&gt;
| 0x045C || [[BYTE]][8] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0464 || [[INT32LE]] || cultureStock || The amount of culture stock that the player owns.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0468 || [[INT32LE]] || childrenHelped || The number of children that the player helped (at the temple).&lt;br /&gt;
|-&lt;br /&gt;
| 0x046C || [[INT32LE]] || magicCrystals || The number of magic crystals that the player owns.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0470 || [[INT32LE]] || americanDollars || The number of American Dollars that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0474 || [[BYTE]][816] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x07A4 || [[Double]] || experiencePoints || The number of experience points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07AC || [[INT16LE]] || playerLevel || The player character&#039;s current level.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07AE || [[INT16LE]] || playerDirection || The direction that the player character is facing (0x00 == north; 0x01 == south; 0x02 == west; 0x03 == east).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B0 || [[INT16LE]] || playerPositionX || The X coordinate of the player in the current dungeon floor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B2 || [[INT16LE]] || playerPositionY || The Y coordinate of the player in the current dungeon floor.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B4 || [[INT16LE]] || playerFloor || The floor of the dungeon that the player is currently on (0 is the town).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B6 || [[INT16LE]] || playerModule || The module that the player is currently playing.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07B8 || [[BYTE]][18] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CA || [[UINT8]] || ringsOfRegeneration || The number of rings of regeneration that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CB || [[BYTE]] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CC || [[UINT8]] || nuclearHandGrenade || The number of nuclear hand grenades that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CD || [[UINT8]] || stonesOfSeeing || The number of stones of seeing that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07CE || [[INT16LE]] || diseaseTimer || The number of turns until disease damages constitution (0 or -1 disables the timer).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D0 || [[INT16LE]] || poisonTimer || The number of turns until poison damages strength (0 or -1 disables the timer).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D2 || [[BYTE]][2] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D4 || [[UINT8]] || bodyArmor || The number of body armor items that the player has (not related to the gear, listed above).&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D5 || [[UINT8]] || ringOfProtection || The number of rings of protection that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D6 || [[UINT8]] || antiMagicRing || The number of anti-magic rings that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07D7 || [[BYTE]][3] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x07DA || [[INT32LE]] || playerAge || The current age of the player character.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07DE || [[BYTE]][36] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0802 || [[INT8]] || floorSloshers || The number of floor sloshers that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0803 || [[BYTE]][15] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0812 || [[INT16LE]] || potionsOfHealing || The number of potions of healing that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0814 || [[INT16LE]] || stonesOfTeleportation || The number of stones of teleportation that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0816 || [[INT16LE]] || playerStrength || The number of strength points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0818 || [[INT16LE]] || playerIntelligence || The number of intelligence points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x081A || [[INT16LE]] || playerWisdom || The number of wisdom points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x081C || [[INT16LE]] || playerConstitution || The number of constitution points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x081E || [[INT16LE]] || playerAgility || The number of agility points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0820 || [[INT16LE]] || playerLuck || The number of luck points that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0822 || [[BYTE]][21] || trapDoorKey || The trapdoor keys owned by the player. For each nonzero value in trapDoorKey[n], the player is able to use any trapdoors leading to floor (n * 5).&lt;br /&gt;
|-&lt;br /&gt;
| 0x0837 || [[BYTE]][28] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0853 || [[INT8]] || gauntlets || The number of gauntlets that the player has.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0854 || [[BYTE]][162] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x08F6 || [[BYTE]] || difficulty || The difficulty level that the player is playing on. (0x00 == normal; 0x01 == &amp;quot;I can handle anything!&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08F7 || [[BYTE]][122] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0971 || [[UINT32LE]] || gameTimer || This appears to be some sort of hidden in-game timer. {{TODO|Figure out when this is incremented and whether or not it actually does anything.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0975 || [[BYTE]][274] || unknown || {{TODO|Unknown.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A87 || [[UINT8]][2] || checksum || The checksum of the saved game file. See [[#Checksum|below]] for more information.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Races ===&lt;br /&gt;
&lt;br /&gt;
The following races can be chosen:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Race&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Humanoid&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Ape&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Childman&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Rodent&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Hobo&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Giant&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Midget&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Shrimp&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Classes ===&lt;br /&gt;
&lt;br /&gt;
The following classes can be chosen:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Class&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Fighter&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Worshipper&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Monk&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Wizard&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Priest&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Sage&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Mage&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Spells ===&lt;br /&gt;
&lt;br /&gt;
Spells are stored in the save file per the following table. In all cases, the spells are stored in order from left-to-right, top-to-bottom, with respect to the in-game spell browser. Each spell category has 15 unused bytes at the end.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]][45] || spellsPermanent || The permanent spells that the player has access to.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]][45] || spellsPreparation || The preparation spells that the player has access to.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]][45] || spellsWizard || The wizard battle spells that the player has access to.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]][45] || spellsPriest || The priest battle spells that the player has access to.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* {{TODO|Do a bit more bounds checking on some of the fields to work out whether they&#039;re signed or unsigned.}}&lt;br /&gt;
&lt;br /&gt;
=== Weapon IDs ===&lt;br /&gt;
&lt;br /&gt;
The following weapon IDs can be used in the &#039;&#039;&#039;equippedWeapon&#039;&#039;&#039; field.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Weapon Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Fists&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Stick&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Club&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Mace&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Knife&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Short Sword&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Long Sword&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Great Sword&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Note: the player does not have to own the specified weapon type in order to have it equipped. The equipment check is only performed when the player switches their weapon in-game.&lt;br /&gt;
&lt;br /&gt;
=== Armor IDs ===&lt;br /&gt;
&lt;br /&gt;
The following weapon IDs can be used in the &#039;&#039;&#039;equippedArmor&#039;&#039;&#039; field.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Armor Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Skin&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Leather&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Chain&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Scale&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Breast Plate&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Field Plate&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Titanium&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Glitchy Armor*&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Note: the player does not have to own the specified armor type in order to have it equipped. The equipment check is only performed when the player switches their armor in-game.&lt;br /&gt;
* *The eighth armor slot always appears in the armor list of the game as a blank slot, but only seven armor types appear within the game world. If the set of armor is hacked into the game with a hex editor or memory editor, it appears as jumbled text and provides a currently-unknown amount of protection.&lt;br /&gt;
&lt;br /&gt;
=== Checksum ===&lt;br /&gt;
&lt;br /&gt;
The checksum is calculated as follows (example in C# and assuming saveBytes is the saved game data, sans checksum—that is, the first 2695 (0xA87) bytes in the file):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
checksum[0] = checksum[1] = 0;&lt;br /&gt;
foreach(var b in saveBytes) {&lt;br /&gt;
    checksum[0] += b;&lt;br /&gt;
    checksum[1] += checksum[0] - checksum[0] * checksum[0];&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the checksum is incorrect for the saved game file, the player will be immediately booted back to the DOS prompt with a &amp;quot;corrupted character&amp;quot; error.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This file format was reverse engineered and documented by [[User:Spectere|Spectere]]. If you find this information helpful in a project you&#039;re working on, please give credit where credit is due. (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>Bag of Magic Food</name></author>
	</entry>
</feed>