Proto files Arcanum
General advice before using this: READ THE ORIGINAL PROTO DOCUMENTS. Specifically, know about Otto Krupp’s discussion on Reverse Byte Order (RBO), typically 2 byte variable or LARGER is in the little endian format, while the whole proto file itself is in big endian format.. Also, in parts, the “Lengths” columns seem to be inaccurate and take into account dead space/null variables between the actual variable and the next listed address. That is to say, the “length” may be one or two bytes of the whole length listed for specific variables. Also, the sections I’ve discovered for NPC’s / Monsters that are “optional” are NOT included here. They include hard coding of stats, alignment, skills, tech skills, spells, inventory source, ISMECHANICAL flag, death/crit/critfail screams, etc. It is a long list and the exact structure is still being nailed down. -- Tekkus McDwarf
Table of Contents:
sources
optional sections
Mob files
title pro- file
General part for the objects with types 1, 2, 3, 17
General part for the objects with types 5-14
Specific part for the objects of the type 5 (Weapon)
Specific part for the objects of the type 7 (Armor)
Specific part for the objects of the type 13 (Schematic)
Appendix 1. Types of the objects
Appendix 2. Types of damages and resistances
Appendix 3. Description of the scripts
Sources
1. iskhodniki of program David Green arcanumedit
2. documentation Otto Krupp and Dkoepp
3.description on the distribution of swords Da real Asrudin
also the thanks to site arcanum.dp.ua and to participants in the forum on arkanumu on this site.
Optional sections
In size pro- file the optional sections of the following structure are provided.
Here and throughout:
1. For the indication of hexaddecimal system is used 0x (for example, 0x048).
2. If is long element there is a value variable, then the most frequently meeting value in the brackets is indicated. In connection with this the addresses give only the approximate apportionment, which must be corrected taking into account the real size of optional sections. ( What this means is some sections do NOT have a fixed size, but their size depends on the amount of “optional” variables (or sections where it applies) added. For example in Otto Krupp’s original proto documentation, a single resistance flag in the armor section tells us how many resistances it modifies. If the flag is = 1, then it will be followed only by one variable. If on the other hand the flag = 5, it will be followed by 5 variables, and add to the size of that structure accordingly.- Tekkus McDwarf)
|
Address |
Length |
Name |
Description |
|
0x000 |
1 |
Flag |
presence of the optional section y/n? (00 - no, 01 - there is) |
|
0x001 |
4 |
Size |
The size of element (as a rule it is equal to 4)* |
|
0x005 |
4 |
Count |
Quantity of the elements** |
|
0x009 |
4 |
||
|
0x00D |
??? [8] |
Items |
The elements of list, the size of section is equal to Size * Count*** |
|
0x015 |
4 |
||
|
0x019 |
8 |
Mask |
The bit mask: bits correspond to elements, if element is indicated that 1, otherwise 0**** |
Let us examine for example the data about the maximum damage applied by the weapon:
01 04 00 00 00 02 00 00 00 04 00 00 00 0C 00 00
00 09 00 00 00 02 00 00 00 11 00 00 00 00 00 00
00
Here the first byte - flag, then the size of element (4 bytes), then a quantity (2 pieces), 12 (0x0C) and 9 values, and bit mask 0x11 (if we write down in the bits, then this of 00010001), i.e., according to mask are indicated the types of damage DAMAGE_.NORMAL and DAMAGE_.FATIGUE (remaining three types they be absent from the mask by them they correspond to 0). For damages and resistances it is necessary only of 5 bits; however, 36 bits be required for the scripts; therefore mask is made sizes of 2 dword (8 bytes).
Mob files
how I understood, mob files are the descriptions of concrete objects, while files pro are prototypes for these objects. In one prototype there can be many descendants, the descendants can possess the most different properties. Judging by everything mob files they contain reference on prototype and description of the properties of different from the prototype. And although they are similar on the size, but if you decide to make your prototype, then in my opinion is better to look at the the analogous pro than to that repaired mob (as he recommends Otto Krupp).
As 4 already noted above in mob file they will be brought in difference from the prototype. Therefore in this file almost all data are optional - because of this their size more labor-consuming for the dissection. One should also note that if we difference introduce, and then to remove, then like as nevertheless will be be counted that descendant differs himself from the original (i.e. characteristic value it can it is stored in mob even if it coincides with the value in pro- file).
Size mob- file 4 did not be able to dismantle; therefore I will give only the description of title.
|
Address |
Length |
Name |
Description |
|
0x000 |
4 |
Sign77 |
Signature 0x77 |
|
0x004 |
2 |
Sign2 |
Subtype: for mob- it is file it is equal to 1 |
|
0x006 |
6 |
??? |
|
|
0x00C |
4 |
Proto |
Number of the prototype |
|
0x010 |
20 |
??? |
|
|
0x024 |
16 |
GUID |
GUID the prototype (it it is also the name of file) in the form DWORD, WORD, WORD, array[0..7 ] of byte. Form is here indicated, since the first 3 parts are recorded with the reverse order, and further bytes go on the turn. |
|
0x034 |
4 |
ItemType |
The type of the object (see appendix 1) |
|
0x036 |
2 |
UnkSz |
??? Possibly size some of optional section (size = UnkSz * of 4) |
|
0x03A |
4 |
ContFlags |
??? Possibly flags describing the fact that is stored in mob- file |
Further go data size of which it depends judging by everything on the type of object and ContFlags (by the way the flags most likely they are not limited to one dword they continue immediately after ContFlags, but here the quantity of flags themselves, probably it can depend on the type of object). Somewhere in the region of addresses 0x047-0x053 begin the coordinates of object. Coordinates are stored in the form of two dword.
Title Pro- file
|
Address |
Length |
Name |
Description |
|
0x000 |
4 |
Sign77 |
Signature 0x77 |
|
0x004 |
2 |
Sign2 |
Subtype: for pro- it is file it is equal to -1 (0xFFFF) |
|
0x006 |
32 |
??? |
|
|
0x024 |
4 |
Number |
Number of the prototype |
|
0x028 |
12 |
??? |
|
|
0x034 |
4 |
ItemType |
The type of the object (see appendix 1) |
General part for the objects with types 1, 2, 3, 17
|
Address |
Length |
Name |
Description |
|
0x038 |
16 |
??? |
|
|
0x048 |
2 |
ArtGI1 |
??? it is said in Otto Krupp, that this value is used together with ArtGI2 |
|
0x04A |
2 |
ArtGI2 |
Ground icon. Changing this alters the items appearance when laying on the ground. You more shortly look notes Otto Krupp and DrA (4 ikonkakh it did not examine). By the way the number of line into sootv. mes file is equal to (ArtGI2 - 24416) div 2 (to on- extreme measure with respect to weapon). |
|
0x04C |
9 |
??? there is suspicion, that here can be hidden the optional section, since size is not even |
|
|
0x055 |
[35] |
??? the optional section |
|
|
0x08A |
[35] |
??? the optional section |
|
|
0x0BF |
[29] |
??? the optional section |
|
|
0x0E8 |
29 |
??? there is suspicion, that here can be hidden the optional section, since size is not even |
|
|
0x12E |
1 |
??? |
|
|
0x12F |
1 |
Flag1 |
FLAG_Flat = $04; |
|
0x130 |
1 |
Flag2 |
FLAG_NoBlock = $04; |
|
0x131 |
1 |
Flag3 |
FLAG_DontLight = $10; |
|
0x132 |
2 |
??? |
|
|
0x134 |
1 |
Flag4 |
Flag_Illusion = $80 |
|
0x135 ; |
1 |
Flag5 |
Flag_Stoned = $01 |
|
0x136 |
5 |
??? |
|
|
0x13B |
4 |
Internal |
The number of description for the internal use (see onames.mes) |
|
0x13F |
4 |
Known |
The number of the description of the identified object (see description.mes) |
|
0x143 |
2 |
ArtUn1 |
??? it is said in Otto Krupp, that this value is used together with ArtUn2 |
|
0x145 |
2 |
ArtUn2 |
No clue. Couldn't tell any difference when I changed it. This may be the "small" image used in schematics. Need to check that.You more shortly look notes Otto Krupp and DrA (4 ikonkakh it did not examine). By the way the number of line into sootv. mes file is equal to (ArtGI2 - 24416) div 2 (to on- extreme measure with respect to weapon). |
|
0x147 |
8 |
??? |
|
|
0x15B |
4? |
Material |
2 - Wood, 4 - flesh 5 -.metal, 6 - leather, 9 - paper (they are encountered and other values). Otto Krupp Was assumed that Seems to relate to the default material-vs- material melee sound effects and possibly the other defaults like dropping an item |
|
0x15F |
???[33] |
Resistance |
Optional section with the description of resistances (see pril. 2) |
General part for the objects with types 5-14
|
Address |
Length |
Name |
Description |
|
0x038 |
16 |
??? |
|
|
0x048 |
2 |
ArtGI1 |
??? it is said in Otto Krupp, that this value is used together with ArtGI2 |
|
0x04A |
2 |
ArtGI2 |
Ground icon. Changing this alters the items appearance when laying on the ground. You more shortly look notes Otto Krupp and DrA (4 ikonkakh it did not examine). By the way the number of line into sootv. mes file is equal to (ArtGI2 - 24416) div 2 (to on- extreme measure with respect to weapon). |
|
0x04C |
13 |
??? there is suspicion, that here can be hidden the optional section, since size is not even |
|
|
0x059 |
[35] |
??? the optional section |
|
|
0x08E |
[35] |
??? the optional section |
|
|
0x0C3 |
[29] |
??? the optional section |
|
|
0x0EC |
29 |
??? there is suspicion, that here can be hidden the optional section, since size is not even |
|
|
0x109 |
[29] |
??? the optional section |
|
|
0x132 |
1 |
??? |
|
|
0x133 |
1 |
Flag1 |
FLAG_Flat = $04; |
|
0x134 |
1 |
Flag2 |
FLAG_NoBlock = $04; |
|
0x135 |
1 |
Flag3 |
FLAG_DontLight = $10; |
|
0x136 |
2 |
??? |
|
|
0x138 |
1 |
Flag4 |
Flag_Illusion = $80; |
|
0x139 |
1 |
Flag5 |
Flag_Stoned = $01; |
|
0x13A |
5 |
??? |
|
|
0x13F |
4 |
Internal |
The number of description for the internal use (see onames.mes) |
|
0x143 |
4 |
Known |
The number of the description of the identified object (see description.mes) |
|
0x147 |
2 |
ArtUn1 |
??? it is said in Otto Krupp, that this value is used together with ArtUn2 |
|
0x149 |
2 |
ArtUn2 |
No clue. Couldn't tell any difference when I changed it. This May be the "small" image used in schematics. Need to check that. You more shortly look notes Otto Krupp and DrA (4 ikonkakh it did not examine). By the way the number of line into sootv. mes file is equal to (ArtGI2 - 24416) div 2 (to on- extreme measure with respect to weapon). |
|
0x14B |
8 |
??? |
|
|
0x153 |
4 |
HitPoints |
|
|
0x157 |
8 |
??? |
|
|
0x15F |
4? |
Material |
2 - Wood, 4 - flesh 5 -.metal, 6 - leather, 9 - paper (they are encountered and other values). Otto Krupp Was assumed that Seems to relate to the default material-vs- material melee sound effects and possibly the other defaults like dropping an item |
|
0x163 |
???[1] |
Resistance |
Optional section with the description of resistances (see pril. 2) |
|
0x164 |
???[1] |
Scripts |
Optional section with the description of scripts (see pril. 3) |
|
0x165 |
4 |
Sound |
Sound table an item uses. Value matches the first line of a table in "snd_item.mes" (Otto Krupp) |
|
0x169 |
6 |
??? |
|
|
0x16F |
1 |
Flag6 |
FLAG_Identified = $01; |
|
0x170 |
1 |
Flag7 |
FLAG_NeedTarget = $01; |
|
0x171 |
1 |
Flag8 |
FLAG_NoDecay = $02; |
|
0x172 |
2 |
??? |
|
|
0x174 |
4 |
Weight |
|
|
0x178 |
4 |
MagWeight |
|
|
0x17C |
4 |
Worth |
|
|
0x180 |
4 |
ManaStore |
|
|
0x184 |
2 |
ArtInv1 |
??? it is said in Otto Krupp, that this value is used together with ArtInv2 |
|
0x186 |
2 |
ArtInv2 |
Inventory. Items appearance when in your inventory. You more shortly look notes Otto Krupp and DrA (4 ikonkakh it did not examine). By the way the number of line into sootv. mes file is equal to (ArtGI2 - 24416) div 2 (to on- extreme measure with respect to weapon). |
|
0x188 |
4 |
??? |
|
|
0x18C |
2 |
Skin |
the art which you see during fights (DrA). It is said in Otto Krupp, that this value is used together with ArtccM |
|
0x18E |
2 |
ArtCM |
Wielded by character model. Determines what type of weapon the character model will appear to be using during combat. You more shortly look notes Otto Krupp and DrA (4 ikonkakh it did not examine). By the way the number of line into sootv. mes file is equal to (ArtGI2 - 24416) div 2 (to on- extreme measure with respect to weapon). |
|
0x190 |
4 |
MC |
Tech/magic complicity |
|
0x194 |
4 |
??? |
|
|
0x198 |
4 |
Unknown |
The number of the description of the unidentified object (see description.mes) |
|
0x19C |
4 |
Effect |
The number of the description of the not identified object (see item_.effect.mes) |
|
0x1A0 |
20 |
Spells |
five spelov (or tekhov), which can be hung to the thing. Each is described by number (4 bytes), which there is reference on spell.mes |
|
0x1B4 |
4 |
SpellMS |
Spell Mana Store |
Specific part for the objects of the type 5 (Weapon)
|
Address |
Length |
Name |
Description |
|
0x1B8 |
10 |
??? |
|
|
0x1C2 |
1 |
FlagW |
FLAG_Loud = $01; |
|
0x1C3 |
3 |
??? |
|
|
0x1C6 |
2 |
ArtE1 |
??? it is said in Otto Krupp, that this value is used together with ArtE2 |
|
0x1C8 |
2 |
ArtE2 |
Equipped. The art that shows up on the "paper doll". You more shortly look notes Otto Krupp and DrA (4 ikonkakh it did not examine). By the way the number of line into sootv. mes file is equal to (ArtGI2 - 24416) div 2 (to on- extreme measure with respect to weapon). |
|
0x1CA |
4 |
BonusToHit |
bonus to the accuracy |
|
0x1CE |
4 |
MagHit |
magic bonus to the accuracy |
|
0x1D2 |
???[33] |
MinDamage |
Optional section with the values of minimum damages (see pril. 2) |
|
0x1F3 |
???[33] |
MaxDamage |
Optional section with the values of maximum damages (see pril. 2) |
|
0x214 |
???[1] |
MagDamage |
Optional section with the values of magic damages (see pril. 2) |
|
0x215 |
4 |
Speed |
|
|
0x219 |
4 |
MagSpeed |
|
|
0x21D |
4 |
Range |
|
|
0x221 |
4 |
MagRange |
|
|
0x225 |
4 |
MSR |
|
|
0x229 |
4 |
MagMSR |
|
|
0x22D |
4 |
ammo_type |
0 - Arrow, 1 - Bullet, 2 - Battery 3 - Fuel, 10000(0x2710) - None |
|
0x231 |
4 |
ammo_usage |
|
|
0x235 |
8 |
??? |
|
|
0x23D |
4 |
CHChart |
Critical Hit Chart (0-cutting, 1-crushing, 2-impaling, 3-Electrical, 4-Fire) |
|
0x241 |
4 |
MagCH |
Magic Critical Hit bonus |
|
0x245 |
4 |
MagCHEff |
Magic Critical Hit Bonus To the effectiveness |
|
0x249 |
4 |
CMChart |
Critical Miss Chart (0-Bladed, 1-Bludgeon, 2-Handled, 3-Guns, 4-Bows, 5-Hands, 6-Explosive, 7-Fire, 8-Electrical) |
|
0x24D |
4 |
MagCM |
Magic Critical Miss bonus |
Specific part for the objects of the type 7 (Armor)
|
Address |
Length |
Name |
Description |
|
0x1B8 |
14 |
??? |
|
|
0x1C6 |
2 |
ArtE1 |
??? it is said in Otto Krupp, that this value is used together with ArtE2 |
|
0x1C8 |
2 |
ArtE2 |
Equipped. The art that shows up on the "paper doll". You more shortly look notes Otto Krupp and DrA (4 ikonkakh it did not examine). By the way the number of line into sootv. mes file is equal to (ArtGI2 - 24416) div 2 (to on- extreme measure with respect to weapon). |
|
0x1CA |
4 |
ACAdj |
Armor Class Adj |
|
0x1CE |
4 |
MagACAdj |
Magic Armor Class Adj |
|
0x1D2 |
???[33] |
ResistAdj |
Resistance Adj |
|
0x1F3 |
???[1] |
MagResistAdj |
Magic Resistance Adj - optional section (see pril. 2) |
|
0x1F4 |
4 |
SM |
Silent Move |
|
0x1F8 |
4 |
MagSM |
Magic Silent Move |
Specific part for the objects of the type 13 (Schematic)
|
Address |
Length |
Name |
Description |
|
0x1B8 |
14 |
??? |
|
|
0x1CA |
4 |
Type |
Written Type (0-Book, 1-Note, 2-newspaper, 3-telegram, 4-image, 5-Schema) |
|
0x1CE |
4 |
StartLine |
|
|
0x1D2 |
4 |
EndLine |
Appendix 1. Types of the objects
TYPE_WALL = 0;
TYPE_PORTAL = 1;
TYPE_CONTAINER = 2;
TYPE_SCENERY = 3;
TYPE_PROJECTILE = 4;
//item
TYPE_WEAPON = 5;
TYPE_AMMO = 6;
TYPE_ARMOR = 7;
TYPE_GOLD = 8;
TYPE_FOOD = 9; // anything edible: potions, etc
TYPE_SCROLL = 10;
TYPE_KEY = 11;
TYPE_KEYRING = 12;
TYPE_SCHEMATIC = 13;
TYPE_GENERIC = 14; // any generic item
//players
TYPE_PC = 15; // Players (races?)
TYPE_NPC = 16;
//
TYPE_TRAP = 17;
Appendix 2. Types of damages and resistances
//Type of Damage
DAMAGE_NORMAL = 0;
DAMAGE_POISON = 1;
DAMAGE_ELECTRICAL = 2;
DAMAGE_FIRE = 3;
DAMAGE_FATIGUE = 4;
//Type of Resistance
RESIST_DAMAGE = 0;
RESIST_FIRE = 1;
RESIST_ELECTRICAL = 2;
RESIST_POISON = 3;
RESIST_MAGIC = 4;
Appendix 3. Description of the scripts
The description of script consists of 12 bytes, in contrast to the resistances and the damages, where value simply is indicated (4 bytes). The structure of element is the following
TScript = packed record
Flags: DWORD; //Flags of the script
Counter0: BYTE;
Counter1: BYTE;
Counter2: BYTE;
Counter3: BYTE;
scriptId: Integer; //Number of script
end;
In the mask for the scripts are used both DWORD diverted under Mask (specific bits see below)
//The first DWORD
SCRIPT_EXAMINE = $00000001;
SCRIPT_USE = $00000002;
SCRIPT_DESTROY = $00000004;
SCRIPT_UNLOCK = $00000008;
SCRIPT_GET = $00000010;
SCRIPT_DROP = $00000020;
SCRIPT_THROW = $00000040;
SCRIPT_HIT = $00000080;
SCRIPT_MISS = $00000100;
SCRIPT_DIALOG = $00000200;
SCRIPT_FIRST_HEARTBEAT= $00000400;
SCRIPT_CATCHING_THIEF_PC= $00000800;
SCRIPT_DYING = $00001000;
SCRIPT_ENTER_COMBAT = $00002000;
SCRIPT_EXIT_COMBAT = $00004000;
SCRIPT_START_COMBAT = $00008000;
SCRIPT_END_COMBAT = $00010000;
SCRIPT_BUY_OBJECT = $00020000;
SCRIPT_RESURRECT = $00040000;
SCRIPT_HEARTBEAT = $00080000;
SCRIPT_LEADER_KILLING = $00100000;
SCRIPT_INSERT_ITEM = $00200000;
SCRIPT_WILL_KOS = $00400000;
SCRIPT_TAKING_DAMAGE = $00800000;
SCRIPT_WIELD_ON = $01000000;
SCRIPT_WIELD_OFF = $02000000;
SCRIPT_CRITTER_HITS = $04000000;
SCRIPT_NEW_SECTOR = $08000000;
SCRIPT_REMOVE_ITEM = $10000000;
SCRIPT_LEADER_SLEEPING= $20000000;
SCRIPT_BUST = $40000000;
SCRIPT_DIALOG_OVERRIDE= $80000000;
//The second DWORD
SCRIPT_TRANSFER = $00000001;
SCRIPT_CAUGHT_THIEF = $00000002;
SCRIPT_CRITICAL_HIT = $00000004;
SCRIPT_CRITICAL_MISS = $00000008;