Jump to content

A2 Template


Ishad Nha
 Share

Recommended Posts

My interest in this was revived by starting A Visit to the Madhouse. It is possible to turn a one bit terrain number, as used by Avernum 2, into a two bit terrain number as used by Blades of Avernum. You simply import the numbers into a spreadsheet and add a column of zeroes for each column of numbers. Then you export it back to a word processor program and change the tabs to spaces.

 

This might also be useful if anyone wants to base a scenario in the Valorim continent.

 

I might add that the real problem is converting A2 terrain to BoA when the two games use radically different numbers for the same piece of terrain.

Link to comment
Share on other sites

  • 3 months later...

Finishing this A2 template would be fairly quick and simple. In Exile 2 I was able to use a spreadsheet to translate the zones from outdoor.dat into a Blades of Exile scenario.

 

This can be done for Exile 1,2,3 and Avernum 1,2,3.

 

First you need to decrypt the entries in the original file. Then you need a decrypt of the scenario file for BoE or BoA. Then you need a translation scheme for terrain, monsters and items, especially terrain.

 

The easiest step is to draw up a spreadsheet with the conversion formulas.

 

In practice, you copy an entry from the original file, run it through the spreadsheet, then paste it into the scenario file.

 

Edit: in BoE you would need to alter the entries at the start of the file that list town and outdoor size.

 

Link to comment
Share on other sites

My count is that Exile 2 used around 231 types only. I am fairly sure of this figure because I have largely decrypted the outdoor zones. I was actually able to make a BoE scenario based upon the outdoor sections of E2. With this I was able to draw up a map of the E2 outdoors. See my post in the E2 forum.

 

Now the outdoor zones had a fixed length: 3,088 bytes. As 48*48 =2,304 the terrain must be "char".

 

I am also working on decrypting the E2 towns. This is interesting because I am seeing new approaches to handling things, these could be put in a re-write of BoA.

 

Town items:

Unlike BoE these are given full entries, with all the relevant details. This enables the placing of custom items in towns.

 

Preset fields:

Every square can have a field on it, and to top that off: fields stack, you can have more than one field on a square. 1,2,4,8,16,32,64,128 means that there are eight different field types.

 

Link to comment
Share on other sites

Originally Posted By: Ishad Nha
My count is that Exile 2 used around 231 types only. I am fairly sure of this figure because I have largely decrypted the outdoor zones. I was actually able to make a BoE scenario based upon the outdoor sections of E2. With this I was able to draw up a map of the E2 outdoors. See my post in the E2 forum.
Oh? That's rather a surprise... but it didn't have the surface graphics, so I suppose it's possible. I'm sure Exile 3 must have used a lot more types.

Originally Posted By: Ishad Nha
I am also working on decrypting the E2 towns. This is interesting because I am seeing new approaches to handling things, these could be put in a re-write of BoA.
...Do you mean, a re-write of BoE?

Originally Posted By: Ishad Nha
Town items:
Unlike BoE these are given full entries, with all the relevant details. This enables the placing of custom items in towns.
What? You can place custom items in towns in BoE. Unless you and I mean something different by "custom item", which seems unlikely.

Originally Posted By: Ishad Nha
Preset fields:
Every square can have a field on it, and to top that off: fields stack, you can have more than one field on a square. 1,2,4,8,16,32,64,128 means that there are eight different field types.
Very logical way of doing it.
Link to comment
Share on other sites

Apparently Exile 3 has single-byte graphics, I just opened town.dat and outdoor.dat in the MS-Dos Edit command.

 

These approaches could be used for either BoE or BoA.

 

Exile 2 has provision for completely custom items, items created by Jeff of course. By "completely custom" I mean items that are not part of a set list of ~ 500 items, they are completely unique. No two items need be the same. In theory you could have 24*127 types of items.

Link to comment
Share on other sites

Originally Posted By: Ishad Nha
Exile 2 has provision for completely custom items, items created by Jeff of course. By "completely custom" I mean items that are not part of a set list of ~ 500 items, they are completely unique. No two items need be the same. In theory you could have 24*127 types of items.
This seems a rather inefficient way of doing it – which is probably why he changed it in Exile 3 and BoE.
Link to comment
Share on other sites

I don't really think there's any good reason to include the complete item stats in the town in every location where it appears. If you want a custom item, just create a new item type and only use it once.

 

Increasing the 500 (or whatever it is) limit on the number of item types that can be created would be nice though.

Link to comment
Share on other sites

This should be easy to do, BoA stores item type numbers using 2 byte short integers, and if BoE allows more than 256 item types it must as well (although I don't know its source code well enough to look this up quickly). The system used in BoA is that there are 500 types of items, and items brought into the scenario by the party have 1000 added to their type (if a cryptic comment in the 3D Editor source code is to be believed).

 

The obvious solution is to replace the static allocation of an array to hold item definitions with a dynamically allocated map of type numbers to definitions. At the same time, the allowed range of types would be expanded to be 0-32767, using all but the top bit of two bytes, and outside items would use the range 32768-65535, using the top most bit as a flag to indicate foreign origin. (This assumes changing the interpretation of the two byte type numbers to being unsigned, the equivalent usage with a signed interpretation should be clear from this, but unsigned makes more sense.) 32000 types of items should far exceed any imaginable need, I think.

Link to comment
Share on other sites

You could add custom items straight to the save file, the 3D Editor source file global.h lists the class "item record type". This would require hex editing or a custom program.

 

Edit:

As for the template itself, I have finally decrypted enough of the structure of the outdoor sections found in outdoor.dat. I have just run one section through the spreadsheet.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...