* Resource Mapping:
- ITM that are the same in both games will be "mapped" instead of converted (this uses a "rules" file in IWG2).
- Some items are close enough to be mapped. Like "High Quality" weapons in IWD1 can be mapped to "Masterwork" ones in IWD2. Other mapping decisions can be more of a stretch (e.g. elemental damage resistance potions in IWD1 to "Potion of Minor Elemental Barrier" in IWD2).
- Some CRE's can also be mapped, unless a "death variable" is being used for something. IWD1 CRE structures have room for 3 death variables (see Scripting below).
- A large number of resources can't be mapped, and those will have to be converted automatically or edited by hand.
* Resource Conversion:
- Versions: IWG2 handles versioning between BG2 and IWD2, but IWD1 has some unique versions as well (see table below). I've already dealt with CRE's, but I'll have to be sure to deal with GAM files (and undo the STO conversion).
- From 2E to 3E: The conversion of CRE (and ITM) resources from the 2E rules in BG2 and IWD1 to the 3E rules in IWD2 is a hard problem and IWG2 deals with it valiantly. But the results are not ideal, and I'm considering taking a less algorithmic approach and instead applying 3E rules directly from a D20 source.
- Exceptions: there will be cases where resources can't be converted in any satisfactory way, and in those situations they'll have to be edited by hand (or I'll have to create a way of using auxillary files for specifying them).
* Specific Resource Consideration:
- Variety: IWD2 has a larger variety of weapon, armor and ammo types that can be found as treasure or in stores than IWD1 does. It will be important to make sure the variety is increased as part of this conversion since this can be a limiting factor in player character builds.
- Random Drops: These are determined by the RNDTRES.2DA file. The version of this file in each game has some desireable characteristics. The IWD1 version determines a few important random rewards, whereas the version in IWD2 has a larger variety of small rewards.
* Unknown Resources:
I'm not sure if I have to deal with these resources in any special way. The appear to be game engine specific:
- INI files in IWD1 and IWD2 (not in BG2)
- SRC files in IWD2 (I think these are just the Bioware "World Editor" info files)
- BCS Triggers/Actions: most of the triggers and actions map over directly from one game to the other. Some code fragments that work well in IWD1 may be a disaster in IWD2. The differences between coding styles in each game give some hint of this.
- Team scripting: Team scripting is very consistent in IWD2, but not so much in IWD1, I've been worried that Team scripting may be neccesary for things to run smoothly. The good news is that it may not be too hard to add this in.
- Death Variables: As mentioned above, CRE's in IWD1 can have up to 2 auxillary death variables, and in some cases both of these get used. I'm almost certain IWD2 only has room for 1 auxillary death variable (I spent some time verifying this).
* Resource type and version for BG2, IWD1 and IWD2:
BG2 IWD1 WD2 ARE V1.0 V1.0 V9.1 BAM(C) V1 V1 V1 CHU(I) V1 V1 V1 CRE V1.0 V9.0 V2.2 DLG V1.0 V1.0 V1.0 EFF V2.0 N/A N/A GAM V2.0 V1.1 V2.0 INI N/A UNK UNK ITM V1 V1 V2.0 MOS(C) V1 V1 V1 PLT V1 V1 N/A PRO V1.0 N/A N/A SCC N/A UNK N/A SPL V1 V1 V2.0 SRC N/A N/A UNK STO V1.0 V9.0 V9.0 VVC V1.0 N/A N/A WED V1.3 V1.3 V1.3 WFX V1.0 N/A N/A WM(A)P V1.0 V1.0 V1.0 I think these are not explicitly "versioned" but appear to be in all 3 games (and I think are the same): 2DA BMP BCS IDS TIS WAV
One note I made early on is that the two games (IWD1 and IWD2) are remarkably similar in a few specific ways. Both games use "bit field" type variables for BCS/BAF scripts (presumably so that could support a large number of boolean flags). Looking at the two games, it easy to see that a lot of what is in IWD1 was significantly cleaned up in IWD2. The scripting relies much less on "Death Variables" and uses explicit actor names instead (which is easier to track), and "team work" scripting uses new SetTeamBit/GetTeamBit action/triggers making the whole implementation much easier to follow. If would be wonderful to clean up IWD1 so that it can benefit from some of these new changes, but I don't know if that will be possible.
The games both have many items and monsters in common, many of which use the same icons or animation so that they look uncanily familar in the game. (IMO, there was a bit too much that was familiar in IWD2 which dampened my appreciation of the game a bit). While IWG2 took the philosophy of converting every resource in BG2 over to IWD2, I've decided to only convert things when it's absolutely neccesary, and to consider doing this by hand in some specific cases.
As an example, I've been able to map a large number of items from IWD1 over to IWD2, but this does leave some items left over that require a bit of thought. Some things are pretty easy mappings, like replacing the "high quality" weapons with their "masterwork" counter-parts, then there are slightly more arbitrary things like I was considering replacing the fire/cold resistance potions with potions of minor elemental barrier (there is no exact mapping, and it would be nice to use these new spell-like potions), then there are items like the mage daggers which grant extra spell slots that probably have to be replaced with something completely different (I didn't see any slot granting items in IWD2, so there may be an implementation issue). The items which will actually require work to recreate are the ones that will be missed by people who have played through IWD1 before like the "of the hand" items are the special axe you find near the entrance of Dorn's Deep. Ideally I'd like to preserve the flavor of IWD1 by keeping the items that help give the game it's character, and at the same time represent more fully the new types of items that allow the player to experience some of the new aspects of the IWD2 engine (I noticed that the weapon selection in the original IWD1 is pretty minimal, and spell scrolls need to be made more available at some point).
Another specific area which I struggled with a bit is the topic of random items. The random items in IWD2 represent a larger variety weapon types in the game, but in IWD2 all of the random items (with a few exceptions) are non-unique weapon or ammo or gems and non-magical jewelry. IWD1 on the other hand puts a few important (to the player) items in there random items table to mix things up a bit. I think I decided that it would be best to combine both approaches: allow the broader variety of weapon and ammo types in the IWD2 tables, but also include entries for random items that are special or unique.
The next topic is creatures. IWG2 has a very impressive creature conversion system, but it isn't really useable (the monsters it generates are way to powerful). The code appears to include all the conditions for assigning classes, feats and skill points and adjusting the various bonuses that result from these (as well as checking the prerequisites for them). I thought I'd try to take a different approach and see if it's possible to use the 3E rules explictly and assign stats/feats/skills based on Race and HD. This would be a very good initial cut that could be improved on by adapting some of the IWD creatures to use sub-races and multi-classes where it seems like it would be appropriate.
Script conversion is a bit of a mystery to me. I've only begun to identify the things I know will be a prolblem like death variables. IWD1 actually uses 3 death variables that are stored in each CRE. One is the Actor name from the area where the creature is instantiated, and two other exist in their own fields in the CRE structure. IWD2 appears to have only 2 death/scripting variables (the actor name and one field in the CRE structure). Leaving he Actor name variable aside, the other variables have the property that they're incremented every time a creature dies. IWD1 takes advantage of this to figure out if you've completed a quest (you've cleared all he monsters when the death variale is greater than some number). It appears as though IWD2 tries not to use the death variables but instead will create an if statement for each Actor in question to see if they are dead (I personally think this is easier to follow as you don't have to examine the CRE file to figure out what's going on).
I think the dialogs will convert over without a problem.
Magic user conversions are going to require some thought. Most spells can be mapped to counter parts, and I think I can fudge the rest. The important thing is to make sure the enemy AI will be sufficiently manacing with the resulting spell table.
Edited by FredSRichardson, 22 January 2006 - 10:14 PM.