Adding an item to the pool of items to be randomised is generally not difficult. However, there are a few caveats:
- Item Randomiser has two kinds of items lists: a main list and an extension list. The latter is used exclusively by Mode 2, but the main list is used by both Mode 1 and Mode 2. When you add an item you can choose to have the item taken from somewhere else or to have the item simply be added. The main list can only take items from area, creature and store files (there are two exceptions, but that's just what they are: exceptions). If the items needs to be taken from somewhere else it needs to go in the extension list.
- Beware of "scripted" items. These items are the ones that are tied into the game in a more complex manner than usual, usually through one or more scripts. Examples include the Dragonslayer sword and the Dragon Scale Shield at Firkraag's or the Constitution tome in BG1. Randomising "scripted" items is outside the scope of this tutorial.
- Some tiers have "special" locations. These locations are handled by specialised tp2 code and behave differently depending on what item is randomised there. Examples include the Machine of Lum the Mad or Jermien at Umar Hills. Both these locations tailor the reward text after what item is given as the reward. There is always a fall-back option to cover unhandled items (that is, you don't have to do anything) but it is something to be aware of.
- Some items have interactions with other mods and that can result in complications. E.g., Jasper from Dungeon-Be-Gone will give you a Girdle of Bluntness regardless of whether the Girdle in the dungeon is actually there or if it's been randomised. Item Randomiser has systems for handling this, but using them is not altogether straight-forward and is outside the scope of this tutorial.
There are a few things to adding items. First, you obviously need to know what item you want to add. Second, you need to decide if the item should be taken from anywhere, or simply be added. If the item should be taken, you need to know where to take it from. Third, you need to decide what tier the item should be added to, and whether it should be added to the main list or the list for Mode 2.
You'll probably need
Near Infinity (NI).
The item
The best way to find out what the item is called is by using NI. Start NI and select Search->CRE/ITM/SPL/STO... and select Items. Enter the name of the item (or part of it) and hit Search. You'll get a list of all items matching the entered name. You want the "item code," which is actually part of the file name. E.g., if you searched for "Gauntlets of Fumbling" you want "brac08."
The source
NI also has the ability to find references to a particular file in other files. This can be used to find the "source" file, from which our item should be taken. We can also use it to assess if it is safe to randomise our item. Open the item in NI (e.g., by finding it through a search) and switch to the Edit tab. At the bottom there's a button called "Find..." Select Find...->references to this file. Select all of ARE, BCS, CRE, DLG, EFF, SPL and STO and deselect everything else and hit Search. You will most likely come across a couple of errors, two concerning XR2400.ARE and XR2600.ARE. These are
probably harmless; the two about AR2400.ARE and XR2600.ARE certainly are.
When the search has completed you'll be presented with a list of files that reference our item file. If there's just a single file it's all green. That file is our "source" and it means it is safe to randomise the item. If the search result includes more than one file it gets a bit more tricky. Some items are not unique, others may be "scripted" and yet others may have something else going on.
If you know where the item you are interested in is supposed to be that may be enough. E.g., if you want to randomise the Girdle of Bluntness from Irenicus' Dungeon, you can ignore the references in ppumb01.sto and temtalos.sto because those are both stores and refer to other instances of the girdle. Areas starting with "XR" is cruft left over from when Bioware was making and testing the game and are to be ignored. All real areas start with "AR" is BG2, BGT and BG1 (they start with "FW" in Tutu). Hence AR0603.ARE is our "source" file.
If the search result includes .BCS, .DLG, .EFF or .SPL files and the item itself is not awarded by a script or a dialogue, the item is most likely "scripted" and cannot be safely randomised without additional work (outside the scope of this tutorial). However, there are a few exceptions. E.g., the Helm of Balduran in BG1 is referenced by one area file and one dialogue file, but the dialogue file is unrelated to how the helm is found (the scene with Degrodel will play out the same regardless of how and where you acquired the helm). Consequently the helm can be safely randomised if you are so inclined. If you are in doubt about whether the item is safe or not you can always ask.
Adding the item
So you know what the item is called and you know where it should be taken from (if applicable). The next step is constructing the appropriate line and adding it to the right item list.
Open the item list in a text editor (e.g., Notepad but not MS Word). The line you want to add should follow the same format as the rest of them. You can find more details in the
appropriate section.
It does not matter much where you add your line. You can add at the end of the file, or somewhere in the middle or wherever you prefer. All lines of 6 or more columns are considered. The order of the lines does not matter.
When you are done, save the file and (re)install the mod.