Jump to content

2DA File Notes


Corradun

Recommended Posts

I posted this on the TBG IESDP Forums some months ago and have tried to locate my PnP notes that I made so I will write what I can remember. I think Avenger made a lot of extra comments on these that really shed a lot more light on what these files did. NiGHTMARE also had some additional comments.

 

donarumr- seems to control how much money needs to be spent or donated to generate a rumor at a tavern or temple.

 

lvlmodwm- controls the level variation for result of a wildmage spell. A wildmage actually casts with a level variation that varies actual damage, range, etc. parameters with level. This .2DA governs how widely this varies. It matches value for value with a table located in the Tome of Magic.

 

rndequip- controls the random equipment that a player gets when started in TOB.

 

rndmagic, rndscrol, rndtreas, rndweap- are all similar in that they control the random items from .2DA's that can appear on a creature or in a container. I believe NiGHTMARE said that he was able to edit these to achieve different results to the random items on different creatures and in different containers.

 

spawngrp- controls randomly spawned groups of creatures that appear in various areas. I remember someone commenting that there is a difficulty level associated with the spawngroups based on the encounter area.

 

spirsumm- controls the type of summoned spirit animal for the totemic druid kit

 

sprkclr- controls the spark color by an RGB index for various sparks. I'm uncertain if you can create new colored sparks like this.

 

strtgold- is a holdover from BG1 to determine starting gold for a character based on class. It could be used in TC's that start the character from level 1 to give them a starting gold allowance.

 

pplane- denotes where characters are positioned when they are transported to the pocket plane.

Link to comment
donarumr- seems to control how much money needs to be spent or donated to generate a rumor at a tavern or temple.

 

Works for both BG1 and BG2 (I think). This sets a rumor rate of 3 in both games. I take this to mean that, on the average, every third donation or drink purchased will get you a rumor. Based on experience, the games apparently randomize the rate a bit, but the setting in the 2DA specifies the average.

 

lvlmodwm

 

Present in BG2. Not present in BG1.

 

rndequip- controls the random equipment that a player gets when started in TOB.

 

25STWeap.2DA is what determines the starting equipment for new players created for ToB.

 

RndEquip doesn't appear to be used in either game. RndMagic (BG1) and RndWep (BG2) both contain duplicate information of what is inside RndEquip and are used instead of that file.

 

rndmagic, rndscrol, rndtreas, rndweap- are all similar in that they control the random items from .2DA's that can appear on a creature or in a container.  I believe NiGHTMARE said that he was able to edit these to achieve different results to the random items on different creatures and in different containers.

 

Each of these files are used in the games, though RndWeap is actually RndWep and is only present in BG2. When used, only the first six letters of the filename are kept, and a two-digit index is appended to provide a virtual filename. The index points to the row to be used in the target file so RndTre01 would tell the game to open file RndTreas and select from among the items in the first row. RndTre02 would use the second row in that file, and so on. (The row labels appear to be for the benefit of the human coder only.) Each row has 20 columns and I suppose that means a 20-sided die (or computer variation) is rolled to randomly select a column. These 2DA files can refer to themselves in order to create recursive drop calculations.

 

In BG1, RndTreas is usually specified in CRE inventories and containers to determine what random item drops. In addition to providing its own possible items to drop (gold, gems, jewelry, etc.), it also refers to various rows in RndMagic (a copy of RndEquip; RndEquip is not used) and RndScrol. RndMagic provides some possible, magical, items for a drop and it also recurses into RndScrol for additional item possibilities. RndScrol contains scrolls and does not recurse into other 2DAs.

 

In BG2, a similar system is used but is slightly more complex. RndTreas is still the primary file, providing generic items and links to RndMagic and RndScrol. RndMagic is different in that it provides some magical items and now links to RndWep along with RndScrol. RndScrol still provides scrolls only and has no links to other 2DAs. RndWep is a copy of RndEquip (which isn't used) and provides magical and nonmagical equipment, with no links to other 2DAs.

 

spawngrp- controls randomly spawned groups of creatures that appear in various areas.  I remember someone commenting that there is a difficulty level associated with the spawngroups based on the encounter area.

 

This exists in BG2, but not in BG1.

 

Each column has a label starting with RD (RanDom) and a meaningful label describing the type of monster(s) spawned. The Difficulty row contains values from 15 (Gibberlings) to 250 (Magi or Glabrezu, etc.) I'm not exactly sure how it factors into the game. The remaining rows allow for 1 to 8 CREature file specifications (without extension). When a spawn is triggered, all of the creatures specified will spawn, if the files exist, are not corrupted, and there is room on the map. To specify such a group in an AREa file's spawn structure, simply use the column label RDnnnn in place of the CREature file specification.

 

sprkclr- controls the spark color by an RGB index for various sparks.  I'm uncertain if you can create new colored sparks like this.

 

This is present in both BG1 and BG2. I agree that it appears to provide color information for graphic effects, most likely those of spells.

 

strtgold- is a holdover from BG1 to determine starting gold for a character based on class.  It could be used in TC's that start the character from level 1 to give them a starting gold allowance.

 

Yep. Used in BG1 to give new level 1 characters a starting gold allowance, based on the table in the 2E Player's Handbook. The Sides column specifies the number of sides the die has. The Rolls column specifies how often to roll that die. The Modifier column specifies the value to add to the sum of the rolls. Finally, the Multiplier column specifies the value to multiply the sum of the rolls (plus any modifier) by to get the final amount of gold.

 

Present but unused in BG2. (Even if creating a level 1 character would trigger this file's use, you'd have to update the list of available classes/kits to make it work right.)

 

pplane- denotes where characters are positioned when they are transported to the pocket plane.

 

Present in BG2, but not in BG1.

 

 

There is another 2DA file in both games called MastArea, which is listed but not described in IESDP. It seems to list all of the valid master areas in the game. That is, those areas which contain smaller sub-areas, but which aren't sub-areas themselves. Master areas include places like towns or town sections, sewers, caves and dungeon/tower levels. Sub-areas include things like houses within towns, small dwellings in caves, small temples in dungeons, and so on.

 

The Label column seems to allow for a strref, but by default just says "value" in both BG1 and BG2.

 

*Whew* that's it for now. I don't mind having BG1-only 2DAs blanked out in the BG2 area, though maybe a note that says "(Unused in <this game>)" would help a new viewer to understand why that particular file description is unavailable in that game's area.

Link to comment
Max said master area scripts get executed first while the other area scripts get executed later.

I do not know anything about the order but the master area's script continues in all the other areas within the master area.

 

-Echon

Link to comment
Ok master areas are the major areas, but what does the engine do with them?

Master areas are kept in the memory buffer when you enter a sub-area. Master areas are flushed from the memory buffer if you enter another master area. If you enter a sub-area, it's data is added to the existing memory buffer.

 

This mechanism is related to the one used for caching most recently accessed BIFFs in the disk buffer. Technically, sub-areas don't have to be in the same BIFF as a master area, so multiple BIFFs could be cached for one master area in this case.

 

Disclaimer: it's been a few weeks since I was able to play a game, so I'm relying on memory here. :D

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...