{
"cells": [
{
"cell_type": "markdown",
"id": "57ae6442-80ab-48f1-bbf0-14352610b8ca",
"metadata": {},
"source": [
"# Tables\n",
"\n",
"`pathfinder2e_stats.tables` reproduces a variety of tables from the Player Core and GM Core manuals.\n",
"All tables are either {class}`~xarray.DataArray` or {class}`~xarray.Dataset` objects with at least an integer ``level`` dimension, plus extra table-specific dimensions.\n",
"\n",
"## PC tables\n",
"\n",
"### PC\n",
"\n",
"These tables let us calculate a typical baseline of the various bonuses for most common Player Character (PC) builds for each level.\n",
"\n",
"For example, let's use them to calculate the attack bonus progression of a typical {prd_classes}`Rogue <37>` as they gain levels, not counting any temporary buffs/debuffs they may have:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2018b906-2673-48a3-b1cb-bc610976815a",
"metadata": {},
"outputs": [],
"source": [
"import pathfinder2e_stats as pf2\n",
"\n",
"rogue_atk_bonus = (\n",
" # Start with DEX+4 at level 1 and always increase it\n",
" pf2.tables.PC.ability_bonus.boosts.sel(initial=4, drop=True)\n",
" # Get an Apex item at level 17 for +1 DEX\n",
" + pf2.tables.PC.ability_bonus.apex\n",
" # Upgrade weapons as soon as possible: +1 at level 2, +2 at level 10, etc.\n",
" + pf2.tables.PC.attack_item_bonus.potency_rune\n",
" # Trained (+2) at level 1, Expert (+4) at level 5, Master (+6) at level 13\n",
" + pf2.tables.PC.weapon_proficiency.rogue\n",
" # Add level to proficiency\n",
" + pf2.tables.PC.level\n",
")\n",
"rogue_atk_bonus.display(\"attack bonus\", transpose=True)"
]
},
{
"cell_type": "markdown",
"id": "d71bbfb2-61e0-42ae-8888-a7e0bdd1d9e0",
"metadata": {},
"source": [
"The PC tables are Datasets in a container which can be accessed by attribute:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "5271f98a-d945-4c10-8bc4-2bac3175fa81",
"metadata": {},
"outputs": [],
"source": [
"pf2.tables.PC"
]
},
{
"cell_type": "markdown",
"id": "2b98e23c-423d-4732-b820-3a42895c6ac4",
"metadata": {},
"source": [
"### PC.ability_bonus\n",
"Ability bonus (strength, dexterity, etc.) of a typical optimized PC.\n",
"\n",
"**Coordinates:**\n",
"- **level** (int): PC level in the range [1, 20]\n",
"- **initial** (int): 4, 3, 2, 1. Number of boosts at level 1 for a given ability\n",
"\n",
"**Data variables:**\n",
"- **boosts** *(level, initial)* (int): Ability bonus from boosts at level 1, 5, 10, 15, 20\n",
"- **apex** *(level)* (int): [Apex item](https://2e.aonprd.com/Equipment.aspx?Category=42). A character can invest only one; typically it is chosen for the key ability (although it's not uncommon for Alchemists and Inventors to boost STR or DEX instead of INT).\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e1b67611-73d0-4dc5-bb3b-930450796caf",
"metadata": {},
"outputs": [],
"source": [
"pf2.tables.PC.ability_bonus.display()"
]
},
{
"cell_type": "markdown",
"id": "fa99c9a4-76a5-4d43-878a-826c699708c0",
"metadata": {},
"source": [
"### PC.attack_item_bonus\n",
"Item bonus to attack rolls.\n",
"\n",
"**Coordinates:**\n",
"- **level** (int): Item level in the range [1, 20]. It is assumed players will acquire this item as soon as their level allows.\n",
"\n",
"**Data variables:**\n",
"- **potency_rune** *(level)* (int): Item bonus obtained from a permanent {prd_equipment}`Weapon Potency <2830>` rune\n",
"- **bomb** *(level)* (int): Item bonus for Alchemist's bombs\n",
"- **bestial_mutagen** *(level)* (int): Item bonus gained from {prd_equipment}`Bestial Mutagen <3315>`\n",
"- **fury_cocktail** *(level)* (int): Item bonus gained from {prd_equipment}`Fury Cocktail <1917>`\n",
"- **runic_weapon** *(level)* (int): Item bonus gained from {prd_spells}`Runic Weapon <1658>`\n",
"- **gate_attenuator** *(level)* (int): Item bonus gained from {prd_equipment}`Gate Attenuator <2654>`. *Note:* does not increase impulse DC; only impulse attack modifier.\n",
"\n",
"**Notes:**\n",
"\n",
"See ``PC.weapon_dice`` for extra damage dice from items.\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "c87c9935-53db-43f1-b4db-3a4561e8892e",
"metadata": {},
"outputs": [],
"source": [
"pf2.tables.PC.attack_item_bonus.display()"
]
},
{
"cell_type": "markdown",
"id": "11dc3cb8-45ae-4747-8f83-b37bf1ba2974",
"metadata": {},
"source": [
"### PC.class_proficiency\n",
"Proficiency bonus to class DC, not including level.\n",
"\n",
"**Coordinates:**\n",
"- **level** (int): PC level in the range [1, 20]\n",
"- **doctrine** (str): Cleric doctrines\n",
"\n",
"**Data variables:**\n",
"- **cleric** *(level, doctrine)* (int): Cleric, depending on their doctrine\n",
"- **(class name)** *(level)* (int): All other classes"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2623a339-c805-4308-a791-3c4fde075a3b",
"metadata": {},
"outputs": [],
"source": [
"pf2.tables.PC.class_proficiency.display()"
]
},
{
"cell_type": "markdown",
"id": "25707fa2-85a4-4216-b71b-75c22f488992",
"metadata": {},
"source": [
"### PC.polymorph_attack\n",
"Fixed attack bonus of {prd_traits}`Polymorph <670>` spells, heightened to the top rank available to a full caster character.\n",
"Only used if higher than the character's own unarmed attack bonus.\n",
"\n",
"**Coordinates:**\n",
"- **level** (int): PC level in the range [1, 20]\n",
"\n",
"**Data variables:**\n",
"- **animal** *(level)* (int): {prd_spells}`Animal Form <1440>` / {prd_spells}`Untamed Form <1861>`\n",
"- **insect** *(level)* (int): {prd_spells}`Insect Form <1575>` / {prd_feats}`Insect Shape <4730>`1\n",
"- **dinosaur** *(level)* (int): {prd_spells}`Dinosaur Form <1489>` / {prd_feats}`Ferocious Shape <4734>`1\n",
"- **aerial** *(level)* (int): {prd_spells}`Aerial Form <1437>` / {prd_feats}`Soaring Shape <4739>`1\n",
"- **plant** *(level)* (int): {prd_spells}`Plant Form <1637>` / {prd_feats}`Plant Shape <4744>`1\n",
"- **elemental** *(level)* (int): {prd_spells}`Elemental Form <1510>` / {prd_feats}`Elemental Shape <4741>`1\n",
"- **dragon** *(level)* (int): {prd_spells}`Dragon Form <1502>` / {prd_feats}`Dragon Shape <4749>`1\n",
"- **monstrosity** *(level)* (int): {prd_spells}`Monstrosity Form <1608>` / {prd_feats}`Monstrosity Shape <4760>`1\n",
"- **ooze** *(level)* (int): {prd_spells}`Ooze Form <962>`\n",
"- **fey** *(level)* (int): {prd_spells}`Fey Form <910>`\n",
"- **aberrant** *(level)* (int): {prd_spells}`Aberrant Form <861>`\n",
"- **daemon** *(level)* (int): {prd_spells}`Daemon Form <890>`\n",
"- **demon** *(level)* (int): {prd_spells}`Demon Form <893>`\n",
"- **devil** *(level)* (int): {prd_spells}`Devil Form <894>`\n",
"- **sacred** *(level)* (int): {prd_spells}`Sacred Form <2020>`\n",
"- **angel** *(level)* (int): {prd_spells}`Angel Form <862>`\n",
"- **cosmic** *(level)* (int): {prd_spells}`Cosmic Form <889>`\n",
"- **avatar** *(level)* (int): {prd_spells}`Avatar <1446>`\n",
"- **element_embodied** *(level)* (int): {prd_spells}`Element Embodied <900>`\n",
"- **nature_incarnate** *(level)* (int): {prd_spells}`Nature Incarnate <1612>` / {prd_feats}`True Shapeshifter <4767>`1\n",
"\n",
"**Notes:**\n",
"\n",
"1 This form is available as a focus spell through a feat one level after the slot spell becomes available.\n",
"See ``PC.untamed_druid_attack`` below."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "7c40f0a8-9527-4dce-968c-8b7e7ca7d5e4",
"metadata": {},
"outputs": [],
"source": [
"pf2.tables.PC.polymorph_attack.display()"
]
},
{
"cell_type": "markdown",
"id": "74f0b424-f58c-47ee-8817-5e3ad37c252f",
"metadata": {},
"source": [
"### PC.rage\n",
"{prd_actions}`Rage <3>` damage bonus\n",
"\n",
"**Coordinates:**\n",
"- **level** (int): PC level in the range [1, 20]\n",
"- **drained** (int): {prd_conditions}`Drained <68>` condition, for Bloodrager instinct\n",
"- **vs** (str): [spellcasters, others]: target type for Superstition instinct\n",
"\n",
"**Data variables:**\n",
"- **bloodrager_weapon** *(level)* (int): {prd_archetypes}`Bloodrager <283>`'s bonus damage to weapon Strikes\n",
"- **bloodrager_bleed** *(level)* (int): {prd_archetypes}`Bloodrager <283>`'s bonus persistent bleed damage to weapon Strikes\n",
"- **bloodrager_spells** *(level, drained)* (int): {prd_archetypes}`Bloodrager <283>`'s bonus damage to attack spells\n",
"- **superstition** *(level, vs)* (int): {prd_instincts}`Superstition <13>` instinct's damage against different types of targets\n",
"- **(other instincts)** *(level)*: flat damage bonus for all other instincts"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2efd851d-56b6-40a6-94e5-25e6278edbff",
"metadata": {},
"outputs": [],
"source": [
"pf2.tables.PC.rage.display()"
]
},
{
"cell_type": "markdown",
"id": "1fae257f-321b-49ed-a602-4f2ba6e249a9",
"metadata": {},
"source": [
"### PC.skill_item_bonus\n",
"Permanent item bonus from items that give blanket +1/+2/+3 to all actions of that skill.\n",
"\n",
"**Coordinates:**\n",
"- **level** (int): Item level in the range [1, 20]. It is assumed players will acquire this item as soon as their level allows.\n",
"\n",
"**Data variables:**\n",
"- **(skill)** *(level)* (int): Item bonus applied to the skill\n",
"\n",
"**Notes:**\n",
"- For Disarm, Grapple, Trip, and Shove checks made through a weapon with the matching trait, use ``PC.attack_item_bonus`` instead.\n",
"- This table does not include items that only grant a bonus to one action or only in specific circumstances.\n",
"- This table does not include item bonuses from consumables, which are typically available when an Alchemist is in the party."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "6deca3e1-ee28-4ee3-92d4-8bf786ae5b3b",
"metadata": {},
"outputs": [],
"source": [
"pf2.tables.PC.skill_item_bonus.display()"
]
},
{
"cell_type": "markdown",
"id": "d8514710-0420-4acd-8d45-5afda913c399",
"metadata": {},
"source": [
"### PC.skill_proficiency\n",
"Skill Proficiency bonus, not including level.\n",
"This table assumes that important skills are Trained at level 1 and then they are increased at every possible occasion, in order of importance.\n",
"\n",
"**Coordinates:**\n",
"- **level** (int): PC level in the range [1, 20]\n",
"- **priority** (int): [1, 2, 3, 4, 5, 6]; smallest is highest.\n",
" E.g. Priority 1 is the one that will be increased first.\n",
"\n",
"**Data variables:**\n",
"- **rogue** *(level, priority)* (int): Skill progression for rogues.\n",
"- **others** *(level, priority)* (int): Skill progression for all other classes.\n",
"- **spellcaster_dedication** *(level, priority)* (int) Skill progression for a non-rogue with a Spellcaster dedication, who needs to make room to satisfy the Prerequisites for {prd_feats}`Expert Spellcasting <6231>` by level 12 and {prd_feats}`Master Spellcasting <6232>` by level 18, and the skill associated with the spellcasting dedication has the lowest possible priority (3).\n",
"\n",
"**Notes:**\n",
"- This table does not cover suboptimal choices, like sacrificing the increase of a skill to Expert in order to get an extra skill at Trained.\n",
"- As non-rogues can only maximize 3 skills, priority 4, 5, and 6 are padded with 0s for them due to the design constraints of {class}`xarray.Dataset`."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "da01a5e4-9c0c-4b8f-b71f-db6624c0e78f",
"metadata": {},
"outputs": [],
"source": [
"pf2.tables.PC.skill_proficiency.display()"
]
},
{
"cell_type": "markdown",
"id": "16ae7d39-8bb3-41d9-b487-fc10820ba3fa",
"metadata": {},
"source": [
"### PC.spell_proficiency\n",
"Proficiency bonus to Spell DC and attack, not including level.\n",
"\n",
"**Coordinates:**\n",
"- **level** (int): PC level in the range [1, 20]\n",
"- **doctrine** (str): Cleric doctrines\n",
"\n",
"**Data variables:**\n",
"- **cleric** *(level, doctrine)* (int): Progression for clerics, depending on their doctrine\n",
"- **(class name)** *(level)* (int): Progression for all other spellcasting classes\n",
"- **dedication** *(level)* (int): Progression for all spellcaster dedications"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "b5b72fe2-18fc-4283-8269-e0d7e225bc49",
"metadata": {},
"outputs": [],
"source": [
"pf2.tables.PC.spell_proficiency.display()"
]
},
{
"cell_type": "markdown",
"id": "9b0ce652-d55c-4b5c-ac39-52873ee7bdfc",
"metadata": {},
"source": [
"### PC.untamed_druid_attack\n",
"Fixed attack bonus of {prd_traits}`Polymorph <670>` spells as they are made available by the {prd_spells}`Untamed Form <1861>` focus spell and its upgrade feats. This table differs from ``PC.polymorph_attack_bonus`` as the levels where a form starts being available are those given by the Feat that unlocks it as a Focus spell, rather than the levels where they become available as slot spells (which is one level earlier).\n",
"\n",
"**Coordinates:**\n",
"- **level** (int): PC level in the range [1, 20]\n",
"\n",
"**Data variables:**\n",
"- **animal** *(level)* (int): {prd_spells}`Animal Form <1440>` / {prd_spells}`Untamed Form <1861>`\n",
"- **insect** *(level)* (int): {prd_spells}`Insect Form <1575>` / {prd_feats}`Insect Shape <4730>`\n",
"- **dinosaur** *(level)* (int): {prd_spells}`Dinosaur Form <1489>` / {prd_feats}`Ferocious Shape <4734>`\n",
"- **aerial** *(level)* (int): {prd_spells}`Aerial Form <1437>` / {prd_feats}`Soaring Shape <4739>`\n",
"- **plant** *(level)* (int): {prd_spells}`Plant Form <1637>` / {prd_feats}`Plant Shape <4744>`\n",
"- **elemental** *(level)* (int): {prd_spells}`Elemental Form <1510>` / {prd_feats}`Elemental Shape <4741>`\n",
"- **dragon** *(level)* (int): {prd_spells}`Dragon Form <1502>` / {prd_feats}`Dragon Shape <4749>`\n",
"- **monstrosity** *(level)* (int): {prd_spells}`Monstrosity Form <1608>` / {prd_feats}`Monstrosity Shape <4760>`\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "4fd57981-9b85-45e3-894a-af5b57d92836",
"metadata": {},
"outputs": [],
"source": [
"pf2.tables.PC.untamed_druid_attack.display()"
]
},
{
"cell_type": "markdown",
"id": "942abb23-4886-47d0-b842-e637428522ac",
"metadata": {},
"source": [
"### PC.weapon_dice\n",
"Weapon damage dice.\n",
"This table assumes that players will acquire the best items available as soon as their level allows.\n",
"\n",
"**Coordinates:**\n",
"- **level** (int): Item level in the range [1, 20]\n",
"\n",
"**Data variables:**\n",
"- **striking_rune** *(level)* (int): Number of weapon dice from {prd_equipment}`Striking <2829>` rune.\n",
" Before the rune becomes available at level 4, weapon dice of non-magical weapons.\n",
"- **bomb** *(level)* (int): Number of weapon dice for all alchemical bombs\n",
"- **bestial_mutagen_dice** *(level)* (int): Number of weapon dice for {prd_equipment}`Bestial Mutagen <3315>`.\n",
"- **bestial_mutagen_faces** *(level)* (int): Dice size for {prd_equipment}`Bestial Mutagen <3315>`\n",
"\n",
"**Notes:**\n",
"\n",
"See ``PC.attack_item_bonus`` for item attack bonuses."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "41f197cc-6f46-44ad-a5a4-300f1352aee7",
"metadata": {},
"outputs": [],
"source": [
"pf2.tables.PC.weapon_dice.display()"
]
},
{
"cell_type": "markdown",
"id": "50af05ae-41e5-45c1-bb67-18a4f38b4280",
"metadata": {},
"source": [
"### PC.weapon_proficiency\n",
"Proficiency in weapon Strikes, not including level.\n",
"\n",
"**Coordinates:**\n",
"- **level** (int): PC level in the range [1, 20]\n",
"- **doctrine** (str): Cleric doctrines\n",
"- **mastery** (bool) Superior proficiency of fighters and gunslingers in some weapons\n",
"\n",
"**Data variables:**\n",
"- **cleric** *(level, doctrine)* (int): Cleric, depending on their doctrine\n",
"- **fighter** *(level, mastery)* (int): Fighters in their mastery weapons vs. all other weapons\n",
"- **gunslinger** *(level, mastery)* (int): Gunslingers in firearms and crossbows vs. all other weapons\n",
"- **(class name)** *(level)* (int): All other classes\n",
"- **fighter_dedication** *(level)* (int): {prd_archetypes}`Fighter Archetype <214>`"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "d6c7241b-8bc1-496d-b347-c137fbe48e17",
"metadata": {},
"outputs": [],
"source": [
"pf2.tables.PC.weapon_proficiency.display()"
]
},
{
"cell_type": "markdown",
"id": "1f5453ce-6d3f-4fd8-9669-a0832c8cb0d6",
"metadata": {},
"source": [
"### PC.weapon_specialization\n",
"Bonus damage from Weapon Specialization.\n",
"\n",
"**Coordinates:**\n",
"- **level** (int): PC level in the range [1, 20]\n",
"- **doctrine** (str): Cleric doctrines\n",
"- **mastery** (bool): Superior proficiency of fighters and gunslingers in some weapons\n",
"\n",
"**Data variables:**\n",
"- **cleric** *(level, doctrine)* (int): Clerics, depending on their doctrines\n",
"- **fighter** *(level, mastery)* (int): Fighters in their mastery weapons and vs. all other martial weapons\n",
"- **gunslinger** *(level, mastery)* (int): Gunslingers in firearms, crossbows, and combination weapons vs. all other weapons\n",
"- **(class name)** *(level)* (int): All other classes"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "5fd7474e-fc59-4e4b-aa08-bae261824e3c",
"metadata": {},
"outputs": [],
"source": [
"pf2.tables.PC.weapon_specialization.display()"
]
},
{
"cell_type": "markdown",
"id": "97b1ae45-bba0-4f78-913a-382dcd978e29",
"metadata": {},
"source": [
"### PC.level\n",
"This is a DataArray that just contains the level, to be added to proficiency bonuses.\n",
"\n",
"**Coordinates:**\n",
"- **level** (int): PC level in the range [1, 20]"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "cbb54232-017c-4883-b56a-63a71269d350",
"metadata": {},
"outputs": [],
"source": [
"pf2.tables.PC.level.display(transpose=True)"
]
},
{
"cell_type": "markdown",
"id": "3ed1c75a-2fe6-4f06-8730-4fa2479a9d97",
"metadata": {},
"source": [
"### SIMPLE_PC\n",
"\n",
"Because adding up all the components of a PC's bonuses can be tedious and error-prone, the variant tables `SIMPLE_NPC` make a bunch of (opinable) choices for you, presenting you with just the total."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "dfc04637-ff93-41ce-b314-876370fb66a4",
"metadata": {},
"outputs": [],
"source": [
"pf2.tables.SIMPLE_PC"
]
},
{
"cell_type": "markdown",
"id": "895d23c1-6d35-4b8c-86a6-e839b46a4be3",
"metadata": {},
"source": [
"For example, we can rebuild our rogue's progression from before much quicker (but with less control):"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "bf846f6f-ab47-4646-beea-a062af331c8e",
"metadata": {},
"outputs": [],
"source": [
"pf2.tables.SIMPLE_PC.weapon_attack_bonus.rogue.sum(\"component\").display(transpose=True)"
]
},
{
"cell_type": "markdown",
"id": "9ea44b9e-759c-4214-b691-ac71c2194a60",
"metadata": {},
"source": [
"### SIMPLE_PC.weapon_attack_bonus\n",
"\n",
"Typical total bonus to weapon strikes, by class and level.\n",
"\n",
"**Coordinates:**\n",
"- **level** (int): PC level in the range [1, 20]\n",
"- **component** (str): Breakdown of each bonus, for debugging purposes. You typically want the total of all components: `pf2.tables.SIMPLE_PC.weapon_attack_bonus.sum(\"component\")`\n",
"- **research_field** (str): Alchemist subclass\n",
"- **doctrine** (str): Cleric subclass\n",
"- **mastery** (bool): Superior proficiency of fighters and gunslingers in some weapons\n",
"- **ability** (str): Ability used for the attack bonus (STR or DEX). Only used in classes where it makes sense to have both.\n",
"\n",
"**Data variables:**\n",
"- **alchemist** *(level, component, research_field)* (int): Attack bonus for the Alchemist, by subclass\n",
"- **cleric** *(level, component, doctrine)* (int): Attack bonus for the Cleric, by subclass\n",
"- **fighter** *(level, component, mastery)* (int): Attack bonus for the Fighter. On/off mastery is presented side by side; this can be useful e.g. to Double Slice with a sword and shield. It is assumed that the class ability, the apex item, and all weapons are either STR or DEX.\n",
"- **gunslinger** *(level, component, mastery, ability)* (int): Attack bonus for the Gunslinger:\n",
" - *mastery=True, ability=DEX*: firearms, crossbows, and finesse melee combination weapons. Uses apex item.\n",
" - *mastery=True, ability=STR*: other melee combination weapons (not finesse).\n",
" - *mastery=False, ability=DEX*: finesse melee weapons (not combination). Uses apex item.\n",
" - *mastery=False, ability=STR*: other melee weapons (not finesse, not combination)\n",
"- **(class name)** *(level, component)* (int): Attack bonus for all other classes\n",
"\n",
"**Assumptions:**\n",
"- Martial classes dedicate their best ability boosts (+4 at level 1 whenever possible) and their apex item to boost their STR or DEX\n",
"- Pure spellcasting classes use their second best ability boosts (+3 at level 1), but reserve the apex item to improve their spellcasting DC\n",
"- Alchemists, Maguses, Inventors, Investigators use their apex items to boost STR or DEX."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "5891e335-1656-446b-83d8-b1f18a98c8fc",
"metadata": {},
"outputs": [],
"source": [
"pf2.tables.SIMPLE_PC.weapon_attack_bonus"
]
},
{
"cell_type": "markdown",
"id": "01b81113-16a0-4cde-a12e-654626d5eb76",
"metadata": {},
"source": [
"For example, a typical barbarian's attack bonus is broken down as follows:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "99f895b4-14f8-4661-9905-8802bb5ad702",
"metadata": {},
"outputs": [],
"source": [
"pf2.tables.SIMPLE_PC.weapon_attack_bonus.barbarian.display()"
]
},
{
"cell_type": "markdown",
"id": "edd0b076-62ca-40c6-b34a-360fd7dd9ed6",
"metadata": {},
"source": [
"### SIMPLE_PC.spell_attack_bonus\n",
"\n",
"Typical total bonus to spell attacks, by class and level.\n",
"\n",
"**Coordinates:**\n",
"- **level** (int): PC level in the range [1, 20]\n",
"- **component** (str): Breakdown of each bonus, for debugging purposes. You typically want the total of all components: `pf2.tables.SIMPLE_PC.spell_attack_bonus.sum(\"component\")`\n",
"- **doctrine** (str): Cleric subclass\n",
"\n",
"**Data variables:**\n",
"- **cleric** *(level, component, doctrine)* (int): Attack bonus for the Cleric, by subclass\n",
"- **(class name)** *(level, component)* (int): Attack bonus for all other classes\n",
"\n",
"**Assumptions:**\n",
"- Pure spellcasting classes use their best ability boosts (+4 at level 1) and an apex item to improve their spellcasting DC.\n",
"- Martial classes take up all the feats of a spellcaster archetype and use their second best ability boosts (+3 at level 1) for the spellcasting ability.\n",
"- Alchemists, Inventors, and Investigators choose an INT-based spellcasting dedication, to benefit from 4 boosts at level 1.\n",
"- All but pure spellcasters reserve their apex item to boost STR or DEX. This choice is coherent with the `weapon_attack_bonus` table."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "9e547474-2637-4e68-84ad-bbba5fb8b312",
"metadata": {},
"outputs": [],
"source": [
"pf2.tables.SIMPLE_PC.spell_attack_bonus"
]
},
{
"cell_type": "markdown",
"id": "003d9bdd-119f-4f79-b59e-35851eb81a59",
"metadata": {},
"source": [
"For example, a wizard's bonus is broken down as follows:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "613e5acf-7e69-41e7-9cdf-f789100fb16d",
"metadata": {},
"outputs": [],
"source": [
"pf2.tables.SIMPLE_PC.spell_attack_bonus.wizard.display()"
]
},
{
"cell_type": "markdown",
"id": "1dda97c9-b7d0-479e-8c65-649229084292",
"metadata": {},
"source": [
"### SIMPLE_PC.spell_DC\n",
"\n",
"This table is the same as `spell_attack_bonus`, plus 10 for the base DC offset."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "41e03ea3-a75f-43e8-b1bf-497c1d000eeb",
"metadata": {},
"outputs": [],
"source": [
"pf2.tables.SIMPLE_PC.spell_DC.wizard.display()"
]
},
{
"cell_type": "markdown",
"id": "4fce73a3-d429-45e0-8164-7c7e22f8ffd8",
"metadata": {},
"source": [
"### SIMPLE_PC.impulse_attack_bonus\n",
"\n",
"Attack bonus with Kineticist impulses, by class and level. Includes gate attenuator.\n",
"\n",
"**Coordinates:**\n",
"- **level** (int): PC level in the range [1, 20]\n",
"- **component** (str): Breakdown of each bonus, for debugging purposes. You typically want the total of all components: `pf2.tables.SIMPLE_PC.impulse_attack_bonus.sum(\"component\")`\n",
"\n",
"**Data variables:**\n",
"- **kineticist** *(level, component)* (int): Attack bonus for the Kineticist\n",
"- **kineticist_dedication** *(level, component)* (int): All other classes through the Kineticist archetype"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "c51dd518-8cd5-478f-9219-3a598515b1c3",
"metadata": {},
"outputs": [],
"source": [
"pf2.tables.SIMPLE_PC.impulse_attack_bonus.sum(\"component\").display(transpose=True)"
]
},
{
"cell_type": "markdown",
"id": "819d1a42-e7db-44d6-9264-0b65b3b42431",
"metadata": {},
"source": [
"### SIMPLE_PC.impulse_DC\n",
"\n",
"DC for Kineticist impulses, by class and level.\n",
"The difference from `SIMPLE_PC.impulse_attack_bonus` is not a flat 10, because there is no gate attenuator available.\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "41a8c6bf-4c5a-411d-8859-9485c6440dde",
"metadata": {},
"outputs": [],
"source": [
"pf2.tables.SIMPLE_PC.impulse_DC.sum(\"component\").display(transpose=True)"
]
},
{
"cell_type": "markdown",
"id": "71b746d6-70f8-4b1a-823c-707a269e7a1e",
"metadata": {},
"source": [
"## NPC tables\n",
"\n",
"### NPC\n",
"\n",
"All tables from the {prd_rules}`Building Creatures <2874>` chapter of the GM Core.\n",
"\n",
"**Coordinates:**\n",
"- **level** (int): NPC level in the range [-1, 24]\n",
"- **challenge** (str): [Extreme, High, Moderate, Low, Terrible].\n",
" Several tables don't have all challenge levels; when missing the values are\n",
" padded with zeros due to design constraints of {class}`xarray.Dataset`.\n",
"- **limited** (bool): Limited or unlimited use\n",
"- **mm** (str): [max, min, mean] values bracket\n",
"- **rarity** (str): [Common, Uncommon, Rare, Unique] creature rarity\n",
"\n",
"**Data variables:**\n",
"- **abilities** *(level, challenge)* (int): {prd_rules}`Table 2-1 Ability Modifier Scales <2881>`\n",
"- **perception** *(level, challenge)* (int): {prd_rules}`Table 2-2 Perception <2882>`\n",
"- **skills** *(level, challenge)* (int): {prd_rules}`Table 2-3 Skills <2885>`\n",
"- **AC** *(level, challenge)* (int): {prd_rules}`Table 2-5 Armor Class <2889>`\n",
"- **saving_throws** *(level, challenge)* (int): {prd_rules}`Table 2-6 Saving Throws <2890>`\n",
"- **HP** *(level, challenge, mm)* (int): {prd_rules}`Table 2-7 Hit Points <2891>`\n",
"- **resistances** *(level, mm)* (int): {prd_rules}`Table 2-8 Resistances and Weaknesses <2893>`\n",
"- **strike_attack** *(level, challenge)* (int): {prd_rules}`Table 2-9 Strike Attack Bonus <2896>`\n",
"- **strike_damage_dice** *(level, challenge)* (str): {prd_rules}`Table 2-10 Strike Damage <2897>` typical dice\n",
"- **strike_damage_mean** *(level, challenge)* (int): {prd_rules}`Table 2-10 Strike Damage <2897>` mean roll\n",
"- **spell_attack** *(level, challenge)* (int): {prd_rules}`Table 2-11 Spell DC and Spell Attack Bonus <2899>`\n",
"- **spell_DC** *(level, challenge)* (int): {prd_rules}`Table 2-11 Spell DC and Spell Attack Bonus <2899>`;\n",
" note that here the DC equals attack +8 instead of the usual +10.\n",
"- **area_damage_dice** *(level, limited)* (str): {prd_rules}`Table 2-12 Area Damage <2908>`; typical dice\n",
"- **area_damage_mean** *(level, limited)* (int): {prd_rules}`Table 2-12 Area Damage <2908>`; mean roll\n",
"- **recall_knowledge** *(level, rarity)* (int): {prd_skills}`Recall Knowledge <24>` using {prd_rules}`Level-based DCs <2629>`\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "13f9a026-b5b1-4a6e-86ce-c8e2a0eac87d",
"metadata": {},
"outputs": [],
"source": [
"pf2.tables.NPC"
]
},
{
"cell_type": "markdown",
"id": "6b1fa023",
"metadata": {},
"source": [
"For example, these are the recommended stats for a level 5 NPC:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "5d9cfe40-9f6d-4e7f-9a16-31691d3874ce",
"metadata": {},
"outputs": [],
"source": [
"pf2.tables.NPC.sel(level=5).display(transpose=True)"
]
},
{
"cell_type": "markdown",
"id": "f7f3af8d-b067-4226-b6e4-404f9bc5ae4c",
"metadata": {},
"source": [
"### SIMPLE_NPC\n",
"\n",
"Very frequently, when simulating a PC's effectiveness in combat, one does not care about the full gamut of combinations offered by the NPC tables.\n",
"``pf2.tables.SIMPLE_NPC`` offers a simplified variant of it where a player is only offered three targets.\n",
"In this table, the **level** coordinate is the player's level instead of the creature's level.\n",
"\n",
"The three targets are ordered along the **challenge** coordinate:\n",
"\n",
"| ``SIMPLE_NPC`` challenge | ``NPC`` challenge | Creature level | mm | rarity |\n",
"| --- | --- | --- | --- | --- |\n",
"| Weak | Low | Player level - 2 | min | Common |\n",
"| Matched | Moderate | Player level | mean | Common |\n",
"| Boss | High | Player level + 2 | max | Uncommon |\n",
"\n",
"These are considered typical interesting targets. There are notable exceptions which are not covered by this table; for example:\n",
"- Oozes and zombies have notoriously extremely poor AC, so Deadly and Fatal weapons will display a peculiar damage distribution;\n",
"- You may be faced with an extreme boss (party level +4) and target their best defenses; this is a sadly frequent situation e.g. for martial characters who didn't invest in anything other than their attack bonus, or spellcasters that didn't differentiate their saving throws. In this situation, the target DCs will exceed the 'Boss' challenge of the `SIMPLE_NPC` table."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "6535b524-d647-4cca-8781-b75680bbe169",
"metadata": {},
"outputs": [],
"source": [
"pf2.tables.SIMPLE_NPC"
]
},
{
"cell_type": "markdown",
"id": "a8be4c49",
"metadata": {},
"source": [
"For example, here are three opponents appropriate to a level 5 PC:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "9b519bcf-b48b-408c-9950-e5f221321865",
"metadata": {},
"outputs": [],
"source": [
"pf2.tables.SIMPLE_NPC.sel(level=5).display(transpose=True)"
]
},
{
"cell_type": "markdown",
"id": "81d91e1b-1d72-468a-aced-11073819352a",
"metadata": {},
"source": [
"## Other tables\n",
"\n",
"### DC\n",
"{prd_rules}`Difficulty Classes <2627>` tables from the GM Core.\n",
"\n",
"**Coordinates:**\n",
"- **level** (int): target level in the range [0, 25]\n",
"- **rank** (int): spell or effect rank in the range [1, 10]\n",
"- **difficulty** (str): task difficulty\n",
"- **rarity** (str): creature or item rarity\n",
"- **proficiency** (str): target skill proficiency\n",
"\n",
"**Data variables:**\n",
"- **simple** *(proficiency)* (int): {prd_rules}`10-4 Simple DCs <2628>`\n",
"- **by_level** *(level)* (int): {prd_rules}`10-5 DCs by Level <2629>`, by level\n",
"- **by_rank** *(rank)* (int): {prd_rules}`10-5 DCs by Level <2629>`, by rank\n",
"- **difficulty_adjustment** *(level)* (int): {prd_rules}`10-6 DC adjustments <2630>`, by difficulty\n",
"- **rarity_adjustment** *(level)* (int): {prd_rules}`10-6 DC adjustments <2630>`, by rarity"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "8f8e5b54-deae-477c-b921-e2720c2970a1",
"metadata": {},
"outputs": [],
"source": [
"pf2.tables.DC"
]
},
{
"cell_type": "markdown",
"id": "8896c754-9ad6-49c4-a8e7-e9e4bd21b771",
"metadata": {},
"source": [
"### EARN_INCOME\n",
"\n",
"{prd_actions}`Table 4-2 Income Earned <2364>`.\n",
"This table is also used to {prd_actions}`Craft <2385>` and for a variety of similar Downtime activities.\n",
"\n",
"**Coordinates:**\n",
"- **level** (int): Task level in the range [0, 21]\n",
"- **proficiency** (str): Failed, Trained, Expert, Master, Legendary.\n",
"\n",
"**Data variables:**\n",
"- **DC** *(level)* (int): The DC for the task\n",
"- **income_earned** *(level, proficiency)* (float): The income earned per day of successful labour, in GP"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f788a097-15cf-496d-9105-bd71b7e2579b",
"metadata": {},
"outputs": [],
"source": [
"pf2.tables.EARN_INCOME"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "8f299821-69c9-4645-a001-b5fefc8c2ca1",
"metadata": {},
"outputs": [],
"source": [
"pf2.tables.EARN_INCOME.display()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.13.5"
}
},
"nbformat": 4,
"nbformat_minor": 5
}