Contents

Technical Documentation - Dungeon Master Nexus ITEM.IBS file

This page describres the content and structure of the ITEM.IBS file.
Some parts are not yet understood (some values in the header, item declarations and the last section in the file).
The attached script (see below) can extract all images from this file (there are 332 images).

Filesize = 100352
Sections of data are aligned on 2 KB boundaries. 00h bytes are used as padding.

Offset  Size   Description
--------------------------
00000   2048   File Header
               69 31         word: File signature: 'i1'
               00 F3         word: Number of item declarations F3h = 243
               00 08         word: Number of color palettes for item images = 8
               01 00         word: Number of association entries for palette index / item index = 256 
               00 DF         word: Number of item images = 223
               00 00 
               00 00   
               00 6D         word: Number of item on floor declarations 6Dh = 109
               00 12 00 00 
               00 01 00 05 
               00 00 25 F8   Size of useful data in 'Item images declarations' section (243 x 40 bytes) (padded with 00 bytes until next 2KB boundary)
               00 06 00 0F 
               00 00 72 80   Size of useful data in 'Item images' section (padded with 00 bytes until next 2KB boundary)
               00 15 00 00 
               00 00 00 00 
               00 15 00 1B 
               00 00 D2 38   Size of useful data in 'Items on floor images' section (padded with 00 bytes until next 2KB boundary)
               00 30 00 01 
               00 00 02 78   Size of useful data in last section 278h = 632 (padded with 00 bytes until next 2KB boundary)
               00 00 00 00
00800  10240   Item declarations (243 entries)
                   Possible data stored: Carry locations, Item on floor graphics index, stat/skill bonuses, transparent color
                   item stats (damage, armor, etc.)
                   Recovery time after after item has been used. Seems identical for all actions.

                 40 bytes per item
                   Byte0: item index
                   Byte1: Object category: Only 6 possible values:   0: Weapon     1: Clothe    2: Food
                                                                     3: Potions    4: Scrolls   7: Misc
                   Byte2: Carry locations. Bit field, each bit represents one possible carry location
                          122 values between 1 and 65 (9 unique values), 121 values = 0
                          bit 7 6 5 4 3 2 1 0
                              | | | | | | | |
                              | | | | | | | +- Consumable
                              | | | | | | +--- Head
                              | | | | | +----- Neck
                              | | | | +------- Torso
                              | | | +--------- Legs
                              | | +----------- Feet
                              | +------------- Unknown ??   This bit is set only for all 'Misc' items except the rope and all necklaces
                              +--------------- This bit is not used
                   Byte3: 39 values = 0, 108 values = 2, 3 values = 128, 93 values = 130  Flags on bits 7 and 1 ?
                    Items without image on floor have value 0 or 2
                    Items with an image on floor have value 128 or 130
                      => Flag on bit 7 is:
                        0: Does not have a special image on floor
                        1: Has a special image on floor
s=similar        s Byte4: 243 values between 10 and 64 (22 unique values)
                 s Byte5: 243 values between 5 and 60 (22 unique values)
                s  Byte6: 86 values between 3 and 19 (14 unique values), 157 values = 0
                          May be a champion skill index
                s  Byte7: 89 values between 3 and 18 (15 unique values), 154 values = 0
                          May be a champion skill index
                   Byte8: Item weight. 243 values between 0 and 141 (52 unique values)
               s   Byte9: 46 values between 1 and 40 (20 unique values), 194 values = 0
               s   Byte10: 64 values between 1 and 45 (25 unique values), 179 values = 0
                   Byte11: 27 values between 15 and 75 (19 unique values), 216 values = 0
                   Byte12: 62 values between 1 and 60 (15 unique values), 181 values = 0
                   Byte13: 60 values between 4 and 252 (16 unique values), 183 values = 0
                            May be a signed value. range would be -20 to +29
              s    Byte14: 44 values between 1 and 135 (10 unique values), 199 values = 0
                            Bit 7 is probably a flag
              s    Byte15: 34 values between 1 and 134 (11 unique values), 209 values = 0
                            Only weapons have non 0 values. Some weapons have 0 value.
                            Bit 7 is probably a flag
                   Byte16: Action 1 ID:  0 if not action, other value: action ID   79 values between 1 and 41 (21 unique values), 164 values = 0
                   Byte17: Action 2 ID:  0 if not action, other value: action ID   47 values between 1 and 40 (17 unique values), 196 values = 0
                   Byte18: Action 3 ID:  0 if not action, other value: action ID   31 values between 4 and 42 (19 unique values), 212 values = 0
                   Byte19: 243 values between 0 and 83 (13 unique values)
                   Word20: Image index for item in inventory. Index in association table (palette/item image) found at offset 3100h.
                           224 Values between 1 and 237 (187 unique values), 19 values = FFFFh
                   Word22: Image index for item on floor. Indices include all images in the file, including the 223 item images
                           Value FFFFh means the item on floor image will be the same as the item in inventory image
                           96 Values between 266 and 331 (66 unique values, no value is missing), 147 values = FFFFh
                   Word24: String index for Item name?       -+
                   Word26: String index for Item description? |
                   Word28: String index for Item Action 1?    |- Increasing values from 0 to 448, or FFFFh
                   Word30: String index for Item Action 2?    |     The first TEXT item in RLOWFIX.BIN contains 449 strings !
                   Word32: String index for Item Action 3?   -+     FFFFh is used when no action is defined (see Byte16, byte17, Byte18)
                   Word34: Always 0000h
                   Word36: Attribute
                          0: Weapon:
                          1: Clothe:  Unknown. Only 4 values found: 177, 179, 181, 183. Wear locations ?
                          2: Food:    Food value
                          3: Potions, 4: Scrolls, 7: Misc:    Always 0
                   Byte38: 83 values between 1 and 192 (19 unique values) 160 values = 0
                   Byte39: 44 between 5 and 194 (7 unique values), 199 values = 0
03000  30720  Items images
              03000    256  Color palettes: 8 palettes of 16 colors
              03100    512  Associations palette / item image. 2 bytes per entry
                             Special value 'FF00' means the entry is not used
                             Byte0: Palette index (between 0 and 7)
                             Byte1: Item index (between 0 and 222)
              03300  28544  223 images of 128 bytes each (index 0 to 222). 16x16 pixels images 4bpp
              0A280   1408  Padding
0A800  55296  Items on floor images
              0A800   2200  Header 
                            109 image declarations for items on floor
                              20 bytes for each image declaration
                                word0: image ID
                                word1: ??? (always 0008h)
                                word2: palette ID. If dword1 <> 0, associates this ID with palette at offset dword1
                                                   If dword1 = 0, refers to a previously declared palette
                                word3: image width
                                word4: image height
                                word5: unused (always 0000h)
                                dword0: image offset (relative to A800h, the beginning of this declaration section)
                                dword1: palette offset. If 0, use palette of previous image
                             1 declaration marking the end of declarations 
                               Last image ID: FFFF, 
                               image offset is offset where 00h padding starts (D238)
                               all other fields are set to 0
              0B098  51616  16 colors palettes (32 bytes) and Images. All bytes are used by images or palettes (checked)
              17A38   1480  Padding
18000   2048  Animations. 632 meaningful bytes + padding

Sequence of images: animations. List of commands. Each command is 4 bytes large: 1 word command, 1 word parameter
1 word command. If first byte = FFh, then special command, otherwise the word contains an image index.
Possible special commands are:
    FF FF: End of animation. Always last entry in animation. Parameter is always 0000h, except in one case 4000h
    FF FE
    FF FD
    FF FC


Block 1
00 13     19 records
00 9C     Size of block 1 = 156 bytes = 4 (this header) + 8 * 19     =  Offset of first entry
00 00 00 01 00 E4 00 00          228 First ID in next block converted to decimal: image indices  
01 00 00 01 00 DF 00 08          223
02 00 00 01 00 EA 00 11          234
03 00 00 01 00 EB 00 14          235
04 00 00 01 00 EC 00 17          236
05 00 00 01 00 ED 00 1A          237
06 00 00 01 00 EE 00 1D          238
07 00 00 01 00 EF 00 20          239
08 00 00 01 00 F0 00 23          240
09 00 00 01 00 F2 00 2F          242
0A 00 00 01 00 F6 00 37          246
0B 00 00 01 00 FA 00 47          250
0C 00 00 01 00 FC 00 4A          252
0D 00 00 01 00 FE 00 4E          254
0E 00 00 01 01 02 00 5A          258
0F 00 00 01 01 04 00 63          260
10 00 00 01 01 08 00 6F          264
11 00 00 01 00 E8 00 73          232
FF 00 00 00 00 00 00 00          
            |---| |---|
              |      L  Offset of first dword in next section (number of dwords from beginning of next block)
              L First ID in next block

Other blocks

00 E4 80 06     228
00 E5 80 06     229
00 E6 80 06     230
00 E7 80 06     231
00 F4 80 06     244
00 F5 80 06     245
FF FE FF FA     
FF FF 00 00     
                
00 DF 80 04     223
00 E0 80 04     224
00 E1 80 06     225
00 E2 80 06     226
01 00 80 06     256
01 01 80 06     257
00 00 00 01     
FF FE FF FF     
FF FF 00 00     
                
00 EA 80 0A     234
FF FE FF FF     
FF FF 00 00     
                
00 EB 80 0A     235
FF FE FF FF     
FF FF 00 00     
                
00 EC 80 0A     236
FF FE FF FF     
FF FF 00 00     
                
00 ED 80 0A     237
FF FE FF FF     
FF FF 00 00     
                
00 EE 80 0A     238
FF FE FF FF     
FF FF 00 00     
                
00 EF 80 0A     239
FF FE FF FF     
FF FF 00 00     
                
00 F0 C0 04     240
00 F1 C0 04     241
00 F0 C0 00     240
FF FD 40 04     
00 F1 C0 00     241
FF FD 40 04     
00 F0 C0 00     240
FF FC 40 04     
00 F1 C0 00     241
FF FC 40 04     
FF FE FF F6     
FF FF 40 00     
                
00 F2 80 04     242
FF FD 00 00     
FF FC 00 04     
00 F3 80 04     243
FF FD 00 00     
FF FC 00 04     
FF FE FF FA     
FF FF 00 00     
                
00 F6 80 03     246
00 F7 80 03     247
00 F6 80 00     246
FF FD 00 03     
00 F7 80 03     247
00 F6 80 00     246
FF FD 00 03     
00 F7 80 03     247
00 F6 80 00     246
FF FD 00 03     
00 F7 80 03     247
00 F8 80 03     248
00 F9 80 03     249
00 FB 80 03     251
00 00 00 01     
FF FE FF FF     
                
00 FA 80 0A     250
FF FE FF FF     
FF FF 00 00     
                
00 FC 80 04     252
00 FD 80 04     253
FF FE FF FE     
FF FF 00 00     
                
00 FE 80 04     254
FF FD 00 04     
FF FC 00 04     
FF FD 00 04     
FF FC 00 00     
00 FF 80 04     255
FF FD 00 04     
FF FC 00 04     
FF FD 00 04     
FF FC 00 00     
FF FE FF F6     
FF FF 00 00     
                
01 02 80 05     258
01 03 80 05     259
FF FC 00 05     
01 02 80 05     258
01 03 80 00     259
FF FC 00 05     
FF FC 00 05     
FF FE FF F9     
FF FF 00 00     
                
01 04 80 04     260
01 05 80 03     261
01 06 80 03     262
01 07 80 03     263
FF FD 00 03     
FF FC 00 03     
01 05 80 03     261
01 04 80 03     260
FF FD 00 03     
FF FC 00 03     
FF FD 00 03     
FF FF 00 00     
                
01 08 80 04     264
01 09 80 04     265
FF FE FF FE     
FF FF 00 00     
                
00 E8 80 0E     232
00 E9 80 06     233
FF FE FF FF     
FF FF 00 00
AttachmentSize
ITEMIBSDecoder.vbs9.15 KB

Powered by Drupal   Valid XHTML 1.0 Strict