------------------------------------------------- CHAR2: ------------------------------------------------- That file contains the data of the characters available from the adventurers guild. It have room for 40 records of 170 bytes each (so 6800 bytes). The file itself is loaded in memory at 0x2021/8225 while member of the party are located at 0x4001/16385 Detail of 1 record: 0: 1.b: Garbage (just there because indexes start at 1) 1: 1.b: Strength 2: 1.b: Intelligence 3: 1.b: Dexterity 4: 1.b: Constitution 5: 1.b: Charisma 6: 1.b: Luck 7: 1.b: Adroitness 8: 1.b: Score 9: 1.b: Max magic points for the character's class and level 10: 1.b: Current maximum possible magic points 11: 1.b: Current amount of magic points 12: 1.b: Maximum hit points 13: 1.b: Current amount of hit points 14: 1.w: Gold carried by the character 16: 1.w: Age 18: 1.b: Status (0 = DEAD / 1 = OKAY / 2 = SLEEP) 19: 1.b: Weapons skill 20: 1.b: Attack skill 21: 1.b: Default attack skill (calculated at creation) 22: 1.b: Parry skill 23: 1.b: Default parry skill (calculated at creation) 24: 1.b: Find item skill 25: 1.b: Default find item skill (calculated at creation) 26: 1.b: Spot trap skill 27: 1.b: Default spot trap skill (calculated at creation) 28: 1.b: Disarm skill 29: 1.b: Default disarm skill (calculated at creation) 30: 1.b: Listen skill 31: 1.b: Default listen skill (calculated at creation) 32: 1.b: Toss rock skill 33: 1.b: Default toss rock skill (calculated at creation) 34: 1.b: Pick lock skill 35: 1.b: Default pick lock skill (calculated at creation) 36: 1.b: Not used (1) 37: 1.b: Not used (0) 38: 1.b: Swim skill 39: 1.b: Default swim skill (calculated at creation) 40: 1.b: Origin (0 = GELNOR/1 = FERRONRAH/2 = NETHERWORLD) 41: 1.b: Bitfield of collected amulets from minions 42: 1.b: > 99 if the character possess the WAND OF NIKADEMUS 43: 1.b: Possess air runes 44: 1.b: Possess earth runes 45: 1.b: Possess fire runes 46: 1.b: Possess water runes 47: 1.b: Possess god runes 48: 1.b: Current shield type (among 180 items) 49: 1.b: Current armor type (among the 180 items) 50: 1.b: Current weapon type (among the 180 items) 51: 3.b: Experience 54: 1.b: Level 55: 1.b: Filled to 1 in towns & backup tool but remains unused 56: 1.b: Temporary storage for armor value 57: 1.b: Temporary storage for value 19 + weapon value 58: 1.b: Temporary storage for attack skill value 59: 1.b: 50 to 55 if character is in party, 0 otherwise 60: 1.b: Not 0 if magic can increase while resting at an inn 61: 1.b: HEALING_1 (0 = Not known / 1 = Learned / 2 = Learnable) 62: 1.b: HEALING_2 (same for all spells) 63: 1.b: HEALING_3 64: 1.b: HEALING_4 65: 1.b: FIREFLASH_1 66: 1.b: FIREFLASH_2 67: 1.b: FIREFLASH_3 68: 1.b: FIREFLASH_4 69: 1.b: QUICKNESS_1 70: 1.b: QUICKNESS_2 71: 1.b: QUICKNESS_3 72: 1.b: QUICKNESS_4 73: 1.b: STRENGTH_1 74: 1.b: STRENGTH_2 75: 1.b: STRENGTH_3 76: 1.b: STRENGTH_4 77: 1.b: PROTECTION_1 78: 1.b: PROTECTION_2 79: 1.b: PROTECTION_3 80: 1.b: PROTECTION_4 81: 1.b: CONFUSION_1 82: 1.b: CONFUSION_2 83: 1.b: CONFUSION_3 84: 1.b: CONFUSION_4 85: 1.b: WEAKNESS_1 86: 1.b: WEAKNESS_2 87: 1.b: WEAKNESS_3 88: 1.b: WEAKNESS_4 89: 1.b: BINDING_1 90: 1.b: BINDING_2 91: 1.b: BINDING_3 92: 1.b: BINDING_4 93: 1.b: MINDBLAST_1 94: 1.b: MINDBLAST_2 95: 1.b: MINDBLAST_3 96: 1.b: MINDBLAST_4 97: 1.b: FLAMEBOLT_1 98: 1.b: FLAMEBOLT_2 99: 1.b: FLAMEBOLT_3 100: 1.b: FLAMEBOLT_4 101: 1.b: CHARM 102: 1.b: SLEEP 103: 1.b: TELEPORTATION 104: 1.b: RESURRECTION 105: 1.b: NINJA_2 106: 1.b: FEAR 107: 1.b: DISSOLVE 108: 1.b: SUMMONS_ELEMENTAL 109: 1.b: DISPELL_UNDEAD 110: 1.b: NINJA_1 111: 1.b: AWAKEN 112: 1.b: MONSTER_EVALUATION 113: 1.b: VISION 114: 1.b: TRANSPORTATION 115: 1.b: SPELL 55 (Not used) 116: 1.b: SPELL 56 (Not used) 117: 1.b: DIVINE II 118: 1.b: DIVINE I (Only works in dungeons) 119: 1.b: DIVINE I 120: 1.b: DIVINE I 121: 10.b: (Unused) 131: 20.b: Name 151: 1.b: Class 152: 1.b: Item 1 153: 1.b: Item 2 154: 1.b: Item 3 155: 1.b: Item 4 156: 1.b: Item 5 157: 1.b: Item 6 158: 1.b: Item 7 159: 1.b: Item 8 160: 1.b: Item 9 161: 1.b: Race (Note: 15 = UNDEAD, 16 = ELEMENTAL) 162: 1.b: Current weapon points value 163: 1.b: Current shield points value 164: 1.b: Current armor points value 165: 1.b: Current town the character is located in 166: 1.b: Used to determine character's lifespan (directly related to character's luck) 167: 1.b: Used to determine if the character has already aged (it's stats are decreased by 20%) or not. 168: 1.b: Picture used to draw the character on screen 169: 1.b: Bitfield of beast runes When created characters are equipped with the following items: SM SHIELD CLUB ROBES MONKS & WIZARDS know FIREFLASH 1 spell. RANGERS & PRIESTS know HEALING 1 spell. This value is calculated before each encounter: Adroitness: Value = (DEXTERITY * 2 - 5 * ARMOR + SKILL_PARRY / 4) Value * (Value > 0) + SHIELD / 3 Values calculated at characters creation: Weapons skill: STRENGTH / 6 + LEVEL * (abs(3.5 - CLASS)) / 11) Luck: 8 + rnd(1) * 6 Max magic points: .75 * MAX_CLASS_MAGIC_POINTS Age: HUMAN, PIXIE, SPRITE: 260 + (LUCK) * 256 * (.1 + rnd(1) / 40) OGRE, GNOLL, TROLL, KOBOLD, ORC, GOBLIN, LIZARD MAN, MINOTAUR, UNDEAD: 260 + (LUCK / 2.5) * 256 * (.1 + rnd(1) / 40) DWARF, HALFLING & GNOME: 260 + (LUCK * 2.5) * 256 * (.1 + rnd(1) / 40) ELF: 260 + (LUCK * 19) * 256 * (.1 + rnd(1) / 40) Skills: ATTACK: 2 * STRENGTH + 30 PARRY: 2 * DEXTERITY + 30 FIND ITEM: 2 * INTELLIGENCE + 30 SPOT TRAP: 2 * INTELLIGENCE + 30 DISARM TRAP: 2 * DEXTERITY + 30 LISTEN: 2 * INTELLIGENCE + 30 SWIM: 2 * DEXTERITY + 30 TOSS ROCK: DWARF: LEVEL * 2 + 15 + DEXTERITY * 4 + STRENGTH + 10 GNOME: LEVEL * 2 + 30 + DEXTERITY * 4 + STRENGTH + 10 All others races: LEVEL * 2 + DEXTERITY * 4 + STRENGTH + 10 Items points values calculations: SHIELD: IDX ARMOR (from CLOTHING to PLATE ML): IDX - 20 ARMOR (from CLOTH +1 to GOD ARMOR): IDX - 29 WEAPON (from STICK to HALBERD): IDX / 2 - 20 WEAPON (from SM MACE+1 to GOD SWORD): .75 * IDX - 50 Spell casting cost calculation: SpellNumber - 4 * int((SpellNumber - 1) / 3.95) Sometimes SpellNumber - 4 * int((SpellNumber - 1) / 4) is used, i don't know if it's a bug yet. Where SpellNumber i >= 1 and <= 60 Then it's checked against character current magic points & substracted if there's enough points. Healing spells calculation: hitpoints += int(rnd(1) * (4 + 6 * SpellNumber * SpellNumber)) Healing potions calculation: Hit points hitpoints += (PotionNumber - 100) ^ 2 Magic points magicpoints += PotionNumber * 3 - 330 Damages calculation: Sinking: Amount = int(rnd(1) * 5 + 1) Amount = int(Amount - 1) * (Amount > 1) + 1 Walking on lava: Amount = int(1 + rnd(1) * 10 * LowerCellValue) Amount = int(Amount - 1) * (Amount > 1) + 1 The list of 180 items that characters can carry is: *** SHIELDS [1..20] *** GLOVE WOOD SHLD WOOD SH+1 SM SHIELD SM SHLD+1 SM SHLD+2 SM SHLD+3 MD SHIELD MD SHLD+1 MD SHLD+2 MD SHLD+3 LR SHIELD LR SHLD+1 LR SHLD+2 LR SHLD+3 GIANT SH GNT SH +1 GNT SH +2 GNT SH +3 GOD SHLD *** ARMORS [21..40] *** CLOTHING ROBES LEATHER H LEATHER RING MAIL SCALE ML CHAIN ML SPLINT ML BANDED ML PLATE ML CLOTH +1 ROBES +1 LEATHER+1 LEATHER+2 RING ML+1 RING ML+2 CHAIN +1 CHAIN +2 GOD ROBES GOD ARMOR *** WEAPONS [41..100] *** STICK KNIFE SM CLUB SM STAFF SM MACE DAGGER SM FLAIL CLUB MACE SM HAMMER SM AXE STAFF SM SWORD FLAIL HAMMER PTCH FORK SPEAR AXE SWORD HVY MACE MAUL TRIDENT LRG SPEAR LRG AXE MORN.STAR PIKE LNG SWORD SPETUM BARDICHE HALBERD SM MACE+1 DAGGER+1 SM MACE+2 DAGGER+2 DAGGER+3 STAFF +1 DAGGER+4 FLAIL +1 SPEAR +1 AXE +1 SWORD +1 SWORD +2 SWORD +3 LRG AXE+1 SWORD +4 SWORD +5 SWORD +6 HALBERD+1 SWORD +7 HALBERD+2 HALBERD+3 SWORD +10 HALBERD+4 HALBERD+5 HALBERD+6 HALBERD+7 GOD KNIFE GOD MACE GOD AXE GOD SWORD *** HEALING ITEMS [101..110] *** HEAL POT1 HEAL POT2 HEAL POT3 HEAL POT4 HEAL POT5 HEAL POT6 HEAL POT7 HEAL POT8 HEAL POT9 HEALING10 *** MAGIC ITEMS [111..120] *** MAGIC 1 MAGIC 2 MAGIC 3 MAGIC 4 MAGIC 5 MAGIC 6 MAGIC 7 MAGIC 8 MAGIC 9 MAGIC 10 *** MISC. ITEMS [121..180] *** SCROLL A SCROLL SCROLL SCROLL B SCROLL C SCROLL D SCROLL E SCROLL F SCROLL G SCROLL H SCROLL I SCROLL J SCROLL SCROLL K SCROLL SCROLL SCROLL SCROLL L SCROLL M SCROLL N AMULET 1 AMULET 2 AMULET 3 AMULET 4 AMULET 5 AMULET 6 AMULET 7 AMULET 8 FLMN WAND ---ORB--- QUARTZ CRYSTAL KEY BRONZE COPPER SAPPHIRE JADE SILVER EMERALD RING RUBY GOLD NECKLACE BRASS PAINTING GOLD CUP BRACELET STATUETTE CROWN EAR RINGS GOLD BALL GOLD KEY PLATINUM STATUE GOLD RING DIAMOND GOLD BOOK SILVER OX GOLD FORK GOD RING Towns: 0: NOWHERE 1: PIPPACOTT 2: HASLEMERE 3: SAXLINGHAM 4: LLITHFAEN 5: IPSWICH 6: FERRON 7: BLACK_MOOR 8: DEATHPORT 9: DEMONIAC 10: DARK_ABYSS