packages.2da defines packages for different classes used at chargen and levelup. Packages contain recommendations on how to configure a classes feats, skills, ability score increases and spell choices.
At level 1 it also configures some basic starting gear generated when they load into the world.
They are used to help new players but can be a helpful shortcut for long term players.
See also classes.2da for info on the "Package" column although it is heavily referenced below.
Hardcoded Notes
The line 255 is unusable since it is used as PACKAGE_INVALID in nwscript and parameters for GetCreatureStartingPackage and LevelUpHenchman.
Lines 0-254 are usable for base classes and LevelUpHenchmen since as noted below a BYTE is used to store this or used in the engine.
Lines 256+ should be usable by just prestige classes for PCs but isn't usable by LevelUpHenchman. This however needs testing.
Use Notes
Character Generation
Usually for base classes - ie those chosen at level 1 - you are given a choice of packages:
The buttons have these functions:
- Recommended - This simply resets the selection to the top choice (and acts as if it was clicked on changing the wording on the right)
- Configure Packages - This has different effects depending on the patch:
- In earlier versions this in fact takes the classes.2da line and maps it to packages.2da and then you configure the options from there. This works fine for the normal Bioware base classes (eg; Cleric is classes.2da line 2 and packages.2da line 2 is for the default cleric) but breaks other new additions which may clash with odd 2da lines.
- In 1.87.8193.35 this button now correctly takes the option chosen on screen, or failing that (if nothing is selected) it will use the classes.2da "Package" option as the one to use to configure it
- OK - This takes the given package selected and applies the package without any choices for the player.
- Cancel - Just reverts back out to class selection
The package used for the players first class is then saved to use later when that class in particular is levelled up.
Note: As noted below the stored packages.2da row must be 0 - 254 due to it being stored as a Byte value in the GFF format (255 is PACKAGE_INVALID in nwscript). Since the logic is prestige class packages (and NPC only options used for LevelUpHenchmen) don't need to be stored ever, they can be put beyond the 255 limit.
Levelup and New Classes
When you level up you don't get a choice of classes again, even for base classes. What happens instead is:
- If it is your first slot class it uses whatever choice was saved as per above to recommend or use for package information.
- If it is a new class then the classes.2da "Package" setting maps to the 2da line in packages.2da that is used to populate information
Example:
- I choose Cleric at level 1, I use the Battle Priest package - this gets saved.
- Level 2 I go Cleric, it uses the Battle Priest package
- Level 3 I go Fighter, it uses classes.2da to look up the package ID which is 4, and uses that package "Default Fighter" for recommended feats
This means for prestige classes you only ever need to define one package as "Package" in classes.2da and nothing else is needed.
The checks at levelup for new classes does not check the ClassID or PlayerClass column setting, as noted below, however LevelUpHenchmen does, so for PCs it is fine to share packages (eg two very similar fighter prestige classes wanting the same kind of feats) but isn't good for NPC usage although the toolset may differ.
Recommend Button Removal
The recommend button can also be removed - this mostly forces the player to pick things by hand howerver the package is still saved. See ruleset.2da.
Hardcoded Notes
The hardcoding of what base class packages are used by default with Configure Package has been removed in 1.87.8193.35 as noted above.
The package stored for the first class chosen is in a Byte field as noted so only lines 0 - 255 are available to use for them (else it'll wrap around and cause it to choose the wrong one).
2da Columns
Column | Example Contents | Valid Values | Description and Notes |
---|---|---|---|
ID | 0 | Integer | This is the line ID referenced elsewhere by classes.2da or by functions LevelUpHenchman etc. Note as noted above the lines 0 - 255 may be saved on base classes (available at level 1) and so keep any base class packages in this ID range. |
Label | Cleric | Anything | Human readable description |
Name | 6900 | TLK reference | Shown at chargen for base classes where you get a choice of what package to choose. The name gets listed for players to read. |
Description | 6901 | TLK reference | Shown at chargen for base classes where you get a choice of what package to choose. It gets put in the right hand side. |
ClassID | 2 | classes.2da line | This is used in two instances:
The recommend and OK buttons in levelup on the PCs end otherwise don't check it so you can have a classes.2da "Package" reference to a shared package for non-base classes. Base classes can have theirs shown at level 1 and it is recommended to have 1 non-shared package for them in the 0-255 range. |
Attribute | WIS | STR, DEX, CON, INT, WIS, CHA | When a free ability score increase is available this one is recommended/used. It will default to STR if something invalid is used. |
Gold | 75 | Positive Integer or **** | The amount of starting gold. Not relevant for prestige classes. |
School | **** | spellschools.2da line reference or **** | Spell schools are only relevant for classes that can pick them (in the base game only Wizards). |
Domain1 | 9 | domains.2da line reference or **** | If this class can pick a domain this one is put in the first slot |
Domain2 | 17 | domains.2da line reference or **** | If this class can pick a domain this one is put in the second slot |
Associate | **** | hen_companion.2da and hen_familiar.2da line reference or **** | The 2da line reference depends on the classes choice of a familiar or animal companion |
SpellPref2DA | PackSPCleric1 | 2da resref or **** | 2da defining the priority of spells to pick at levelup (if using a Known Spell List like Sorcerer or Wizard) or priority to insert into the spellbook automatically (Clerics, Druids etc.) 2da has index, SpellIndex and Label columns. SpellIndex is the only one used by the game, which links to a spells.2da line. For priority the highest options get chosen first. So put the level 9 spells at the top, then 8 and so forth. You should be able to add in domain spells into this, eg Mage Armor on a clerics spell preference list with Mage Armor. Any spells not known by the class are basically ignored. This does mean you could technically create a generic spell preference 2da for use by many classes. Note: All cantrips are chosen automatically (in the order in spells.2da) and not restricted by spellschool or amount of spells available to learn/know and do not need to be in this 2da file. |
FeatPref2DA | PackFTCler1 | 2da resref or **** | 2da defining the priority of feats to pick at levelup. 2da has index, FeatIndex and Label columns. FeatIndex is the only one used by the game, which links to a feat.2da line. |
SkillPref2DA | PackSKCler1 | 2da resref or **** | |
Equip2DA | PackEQCler1 | 2da resref or **** | |
Soundset | 0 | soundset.2da reference | This selects which index in the sound set list to point to by default. Even if you know the list contents the problem is...soundsets are generally gender specific, so since Bioware didn't specify one per-gender you can't really use this very well! Worth just leaving as 0. |
PlayerClass | 1 | 1 or 0 | If 1 then it is shown at chargen |