Author Topic: Automapper Utility for Eye of the Beholder 1 & 2  (Read 1086 times)

Offline jhirvonen

  • Jr. Member
  • **
  • Posts: 76
Re: Automapper Utility for Eye of the Beholder 1 & 2
« Reply #30 on: March 09, 2017, 05:37:10 PM »
Offset 6 (byte 7) + 8 is the length of one data entry.
The whole level file can be parsed this way. Just ignore the first byte of the file.

I made a tool that might help browsing the save folder's level files:
http://personal.inet.fi/koti/jhirvonen/ase3/EOB3_SDE.zip

Those items files might have the same format.



Code: [Select]
Keyboard shortcuts
==================

F5         Refresh results

Alt + F    Go to filter text box
Ctrl + K   Clear filter

Ctrl + D   Switch between hexadecimal / decimal

Ctrl + 0   Show null bytes as "-".

Ctrl + S   Export results to text file



Filters
=======

Filters are applied to each data row.
For hexadecimal numbers use the $-prefix.

Examples:

2: 9
- only show data rows where offset 2 is 9

$10: $a0-$c0
- only show data rows where offset $10 is between $a0-$c0

*: 20
- at least one byte of the data row has to be 20

*: 100-110
- at least one byte of the data row has to be 100-110

2: 160
10: 0-31
11: 0-31
- offset 2 needs to be 160, and offsets 10 and 11 between 0-31

Offline Ishad Nha

  • Hero Member
  • *****
  • Posts: 907
Re: Automapper Utility for Eye of the Beholder 1 & 2
« Reply #31 on: March 09, 2017, 07:18:10 PM »
"Offset 6 (byte 7) + 8 is the length of one data entry."
The 8 makes sense because the lines that have only 8 Bytes are functionally empty. Knowing this will make it easier to spot errors.

"Those items files might have the same format."
Yes, last address seems to be E7 03. Level files start at E8 03.

ASE3 drops out every so often, if you can record the name of PC1 you should be able to have the program restart immediately. Problem always seems to be with coordinates:
  1  X Square                    252  1 byte         0 thru 255   
   2  Y Square                    253  1 byte         0 thru 255   
   3  Facing                      254  1 byte         0 thru 255   
   4  Map Number                  255  1 byte         0 thru 255   
  37  Char 01 Name                832  10 letters        TEXT       
 
252 + 580 = 832 hence 252 = 832 - 580. Simply locate name of first PC and then use that as a reference point.

List of level 1 item numbers with coordinates:
15,11,#139
5,14: 101
4,2: 100
11,15: 114,115,116,117
18,8: 108,109,110,111
21,11: 140
23,7: ?? (It was destroyed. 113??)
21,8: 103
#,#: 104 (dropped by Undead Beast)
12,28: 107,106
3,18: 102
17,23: 112
30,17: 105

Offline jhirvonen

  • Jr. Member
  • **
  • Posts: 76
Re: Automapper Utility for Eye of the Beholder 1 & 2
« Reply #32 on: March 09, 2017, 10:41:52 PM »
ASE3 drops out every so often, if you can record the name of PC1 you should be able to have the program restart immediately. Problem always seems to be with coordinates:

252 + 580 = 832 hence 252 = 832 - 580. Simply locate name of first PC and then use that as a reference point.

No, EOB3 uses more modern memory management compared to the previous titles so you can't use reference points. Things are moved around in memory and not found in the same order as in the save / level files.

Offline Ishad Nha

  • Hero Member
  • *****
  • Posts: 907
Re: Automapper Utility for Eye of the Beholder 1 & 2
« Reply #33 on: March 11, 2017, 02:13:03 AM »
Progress was made in understanding ITEMS_##.BIN files.
Items_00.bin file has 1,000 slots, around half of which are emtpy.
Slots 32:41 are the PC/NPC record slots.

Proper item slots seem to start at #100.
Partial decryption of a filled item slot, numbering from 0:
Offsets 0,1 give the slot number, which is also the item number
Offset 6 is 8 less than the length of the line *
10,11 are the x,y coordinates
12 is the map/level number
20 is the magical plus, if any

* Normally this is true, but technically the length of a line is: 8 + offset 6 + (256 * offset 7). Only eleven slots have a length greater than 255: slot 0 and slots 32 - 41.

This was tested in the Burial Glen and found to hold true for all items there. Ditto, Warrior's Tomb level One.

Now we have a list of the items we can check for items that are not on the list currently used for ASE3...
I can do a spot-check, 14 items at a time, paste their numbers into the relevant parts of the save file.

List was basically good, I found a few errors and so on:

            Original list:                                          My list:
                                                                       
Removing non-existent items from list:                                 
252         Mage Scroll of 'Improved Invisibility'                  No Item
253         Mage Scroll of 'Remove Curse'                           No Item
Giving names for cursed items:                                         
106         No Item                                                 Short Sword -2 "Maggot"
227         No Item                                                 Plate Mail -2
231         No Item                                                 Mace -3
401         No Item                                                 Short Sword -4
408         No Item                                                 Plate Mail -4
452         No Item                                                 Robe -4
Correcting typos in names:                                             
328         Mage Scroll of 'Fist of Death'                          Mage Scroll of 'Finger of Death'
329         Mordenkainen's Sword                                    Mage Scroll of Mordenkainen's Sword
443         Magic Stuff +4                                          Magic Staff +4
Giving appropriate names for all four message scrolls:                 
280         Scroll                                                  Scroll: Acwellan and Evil
394         Scroll                                                  Scroll: Morning's Light Poem
464         Scroll                                                  Scroll: about the Evil
465         Scroll                                                  Scroll: Immortality
Correcting mix-up in item order:                                       
372         Mace +4                                                 Bag of incense
374         Bag of incense                                          Mace +4
Correcting Magical Bonuses for items:                                 
343         Dagger                                                  Dagger +3
395         Short Sword                                             Short Sword +4
404         Shield                                                  Shield +4
488         Dagger                                                  Dagger +3
490         Shield                                                  Shield +3
513         Arrow +2                                                Arrow +3
514         Arrow +2                                                Arrow +3
                                                                       
535         Robe (magisch, Wirkung :?)                              Robe (Non-Magical?)


Offsets 2,3 seem to determine what the item is, what general group it belongs to. This may enable the reading of the records for items with item numbers that are 900+.
« Last Edit: March 13, 2017, 08:23:33 AM by Ishad Nha »

Offline Ishad Nha

  • Hero Member
  • *****
  • Posts: 907
Re: Automapper Utility for Eye of the Beholder 1 & 2
« Reply #34 on: March 14, 2017, 07:22:12 AM »
Now I can reliably read the custom PC items and get their names. It is all due to offsets 2 and 3. I don't know what they do exactly but they denote what general type an item belongs to.
Column 20 gives the magical +/- of each item.
Offset 20 also separates Mage Scrolls (0) from Cleric Scrolls (1).
Offset 21 tells you what spell is being cast by a wand, necklace or scroll
22 is number of charges

Items coming from EoB2 usually seem to work alright. Most such items will be conventional items or will be left out of EoB3.

Spreadsheet below shows the offset 2,3 pairings:

Offline Ishad Nha

  • Hero Member
  • *****
  • Posts: 907
Re: Automapper Utility for Eye of the Beholder 1 & 2
« Reply #35 on: March 17, 2017, 03:42:29 AM »
Features like levers and buttons are recorded on the inside of an impassable wall. ASE3 can manually correct the map: a lever recorded as being on the north inside of a wall is actually shown as being on the south side of the square immediately to the north
 or it can follow the EoB3 conventions: a lever recorded as being on the north inside of a wall is actually shown as being there.
 
If door numbers change from level to level, this can be recorded in a 2D array, ditto numbers for monsters.
My current approach is to make a map of the feature numbers, this enables me to guess the meaning:

    0   1   2   3   4   5   6   7   8   9   10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31 
0   NN  NN  NN  NN  NN  NN  NN  NN  NN  NN  NN  NN  NN  NN  NN  NN  NN  NN  NN  112 NN  NN  NN  NN  NN  NN  NN  NN  NN  NN  NN  NN  0
1   NN  112 115             NN                                  205 226     160 115     112 NN              18                  NN  1
2   NN  160 NN              NN      NN  NN  NN  NN      NN      NN  NN      NN  NN  NN      220     NN  NN  NN  NN  NN  NN      NN  2
3   NN      112 NN  238 NN  NN              NN  112     NN          NN  NN  NN      NN      NN              18                  NN  3
4   NN              205 241 NN  NN  NN      NN          NN                  253     NN          NN  NN  NN  NN  NN  NN  NN      NN  4
5   NN  NN  NN      NN      220             NN          NN      NN  NN  NN  NN                      NN                  NN  220 NN  5
6   NN                  NN  NN      NN      NN  220 NN  NN                  253 220 NN  220 NN      NN                          NN  6
7   NN      NN              NN      NN      NN      115 112 NN      NN  NN          NN  112 NN      NN  220 NN  NN  NN  205 226 NN  7
8   NN      NN      115     NN      NN      NN              220     NN  115         NN      NN  NN  30  30  30  30  238 187 199 NN  8
9   NN      NN      NN  NN  NN      NN      NN  NN  NN  NN  NN      NN          112 NN  NN          NN  NN  NN  199 NN          NN  9
10  NN                              NN      220 238     238 220     NN  NN  NN  NN  NN              220             NN  NN      NN  10
11  NN  NN  NN  100 100 NN  NN      NN      205 NN  NN  NN  205     NN  112                 NN  NN  NN                          NN  11
12  100                     NN      NN      220 238     238 220     NN                  NN              NN  112 NN  NN          NN  12
13  NN      NN              NN      NN      NN  NN  NN  NN  NN  3   NN  3   NN  NN  NN  199     199         NN          NN      NN  13
14  100             199     NN      NN      NN      115 NN  NN  0   NN  0   NN  0   NN  238 238 238 NN                      NN  NN  14
15  NN  24              244 NN      NN      220     112 NN                  NN      199             199     NN  NN  NN          NN  15
16  NN  NN  100 NN  100 NN  NN  NN  NN  NN  NN  NN  NN  48  1               205     NN  238 205 238 NN                  NN  NN  NN  16
17  NN  115         NN                              NN  NN                  NN      199     112     199     NN          NN      NN  17
18  NN      115     NN          NN          NN  220 NN  NN  NN  0   NN  0   NN  0   NN  238 238 238 NN          NN  NN  NN  226 NN  18
19  NN  112     226 NN      NN  238 NN      NN      220     NN  3   NN  3   NN  NN  199             199 NN          NN          NN  19
20  NN  160 NN  205         238 190 238     NN  115 NN              NN      115             199 NN          NN  220 NN          NN  20
21  NN      112         NN  253 238 NN  NN  NN      NN  112         NN                      NN  115     112 NN          NN  220 NN  21
22  NN      NN          NN      NN          NN  220 NN  NN  NN  NN  NN  NN  NN  NN  220 NN              NN          NN          NN  22
23  NN      NN                                                      NN                  112 NN  220 NN              190         NN  23
24  NN      NN  NN  NN          NN          NN      NN              NN  NN  NN  NN  NN  NN  NN              NN      NN          NN  24
25  NN          NN  112 NN  NN  112 NN  NN  NN          NN          NN                                      NN          NN  220 NN  25
26  NN      115 NN                          NN  NN          NN  NN  NN                      NN  NN  NN  NN  NN      NN          NN  26
27  NN      NN  115     NN  NN  NN  NN      NN      NN                  NN  205 NN  NN                      NN      NN          NN  27
28  NN          NN                          226         NN  NN          NN  238         NN                  NN          253 NN  NN  28
29  NN          NN      NN  NN      NN      NN  NN  NN  NN  NN          NN      112 NN  112     NN                  NN  24      NN  29
30  NN          220                 100 190 187 187 187 187 187         NN  115     160         NN          24      NN      244 NN  30
31  NN  NN  NN  NN  NN  NN  NN  NN  NN  NN  NN  NN  NN  NN  NN  205 NN  NN  NN  NN  NN  NN  NN  NN  NN  NN  NN  NN  NN  NN  NN  NN  31
    0   1   2   3   4   5   6   7   8   9   10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31 


Here NN means a square of solid wall. In practice, the NN are solid blocks of color where the Fill is the same color as the Font. This is done by Conditional Formatting.
This is level 1, Warriors' Tomb Level 1.
« Last Edit: March 27, 2017, 08:26:07 PM by Ishad Nha »

Offline Ishad Nha

  • Hero Member
  • *****
  • Posts: 907
Re: Automapper Utility for Eye of the Beholder 1 & 2
« Reply #36 on: March 23, 2017, 03:49:49 AM »
I am now playing through the game, trying to decrypt everything I see. Currently up to the start of the Mages Guild, level 1.

If door numbers change from level to level, this can be recorded in a 2D array, ditto numbers for monsters:
Sometimes you will need offset 3 as well as offset 2 to identify an "Ecl".
You will need the ability to record the fact that a given level may have no doors, levers or whatever.
Then there is the editorial question of what features to record, signs for example.

Will need to learn how to decrypt save game files, understand how they differ from the default 00.bin variety. This will enables the use of ASE3 in the middle of a game, with all the features it now lacks.

Forest Trail, Detect Invisibility made it easier to fight Feyrs, they were always visible and thus vulnerable to attack.

Edit:
Now I am taking time out to prepare hint text files. I have a map of the dungeon level concerned and I add the numbers from the Cluebook. Then I run the thing through a spreadsheet to produce a hints text file, using formatting from ASE.
« Last Edit: March 27, 2017, 08:20:30 PM by Ishad Nha »

Offline Ishad Nha

  • Hero Member
  • *****
  • Posts: 907
Re: Automapper Utility for Eye of the Beholder 1 & 2
« Reply #37 on: April 01, 2017, 09:50:14 PM »
It has all been done up to level 8, I am now doing level 9.

In the Hints files I used a bit of editorial discretion in some areas, like the spiked traps in level 8.
Monsters are being shown sometimes as in the Cluebook and sometimes as in the displays of "Ecls". (Ecl is a term from Curse of the Azure Bonds, I don't know what SSI called the functions in EoB3.)

Edit:
I have now finished level 14.
Next item of business is to collate all the figures for each level, what number does a lever have on each leverl?...

I will write up my notes soon.
Hints for level 11 don't mention monsters, I checked out more recent versions of the level file. It seems that monsters have numbers like 148, 151 or 154. There are three types of monsters because there are two types of Shades: Fighters and Magic-Users.

It seems that some features of the game are not found in the level files, spinner traps on level 12 are one example. No functions could be found in the squares containing the traps. Nor were any functions found in the adjoining squares.
« Last Edit: April 10, 2017, 08:44:06 AM by Ishad Nha »

Offline Ishad Nha

  • Hero Member
  • *****
  • Posts: 907
Re: Automapper Utility for Eye of the Beholder 1 & 2
« Reply #38 on: April 10, 2017, 08:47:57 AM »
All done. Spreadsheets below list the features of each level.
Readme should mention this:
Hints for level 11 don't mention monsters, I checked out more recent versions of the level file. It seems that monsters have numbers like 148, 151 or 154. There are three types of monsters because there are two types of Shades: Fighters and Magic-Users.

EoB 3 Levels.xlsx: the Items page has the lists of possible numbers for ASE-style features that could be added to ASE3.