Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make PF2-specific sheet filling but eventually make it configurable #1

Open
10 tasks
Poikilos opened this issue Nov 15, 2024 · 0 comments
Open
10 tasks

Comments

@Poikilos
Copy link
Collaborator

Poikilos commented Nov 15, 2024

  • Make configurable.
  • combine values as CSV when there are multiple source xpaths with the name destination field

PF2-specific:

  • hp_per_level = class_hp_per_level[/build/class]; max_hp_ = /build/attributes/ancestryhp + /build/attributes/classhp + hp_per_level * /build/level
  • if name of stat starts with "rank_" is int-like, derive actual rank (letter) as: rank_of_base_value[(stat_value-/build/level)]
    • where rank_of_base_value = {1: "T", 2: "E", 3: "M", 4: "L"}
  • if name of stat starts with "attribute_", subtract 10 and divide by 2 (since Pathbuilder JSON stores the big values that were deprecated in PF2R)
classes_hp = {
    "alchemist": 8,
    "barbarian": 12,
    "bard": 8,
    "champion": 10,
    "cleric": 8,
    "druid": 8,
    "fighter": 10,
    "gunslinger": 8,
    "inventor": 8,
    "investigator": 8,
    "kineticist": 8,
    "magus": 8,
    "monk": 10,
    "oracle": 8,
    "psychic": 6,
    "ranger": 10,
    "rogue": 8,
    "sorcerer": 6,
    "summoner": 10,
    "swashbuckler": 10,
    "thaumaturge": 8,
    "witch": 6,
    "wizard": 6,
}

-https://2e.aonprd.com/Search.aspx?include-types=class&sort=name-asc&display=table&columns=icon_image+ability+hp+tradition+attack_proficiency+defense_proficiency+fortitude_proficiency+reflex_proficiency+will_proficiency+perception_proficiency+skill_proficiency+rarity+pfs

ancestries_hp = {
    "dwarf": 10,
    "elf": 6,
    "gnome": 8,
    "goblin": 6,
    "halfling": 6,
    "human": 8,
    "leshy": 8,
    "orc": 10,
    "athamaru": 8,
    "azarketi": 8,
    "catfolk": 8,
    "centaur": 8,
    "fetchling": 8,
    "hobgoblin": 8,
    "kholo": 8,
    "kitsune": 8,
    "kobold": 6,
    "lizardfolk": 8,
    "merfolk": 8,
    "minotaur": 10,
    "nagaji": 10,
    "ratfolk": 6,
    "tengu": 6,
    "tripkee": 6,
    "vanara": 6,
    "anadi": 8,
    "android": 8,
    "automaton": 8,
    "awakened animal": None,  # HP value not provided
    "conrasu": 10,
    "fleshwarp": 10,
    "ghoran": 8,
    "goloma": 8,
    "kashrishi": 8,
    "poppet": 6,
    "shisk": 8,
    "shoony": 6,
    "skeleton": 6,
    "sprite": 6,
    "strix": 8,
    "surki": 8,
    "vishkanya": 8,
}

-https://2e.aonprd.com/Search.aspx?include-types=ancestry&sort=rarity-asc+name-asc&display=table&columns=hp+size+speed+ability_boost+ability_flaw+language+vision+rarity+pfs

  • max_hp_ = ancestry_hp + (class_hp + attribute_constitution_) * level_ -https://2e.aonprd.com/Rules.aspx?ID=2076&Redirected=1

    • store max_hp_level (?), since attribute_constitution_ may change...but the lower value would have been used to increase max_hp_ on earlier levels in that case.
  • armor_name_ (and hence armor_dex_cap_) is difficult to derive (and is missing) from JSON exported from Pathbuilder 2e. Formula for armor_class_ is 10 + min(attribute_dexterity_, armors_dex_cap[armor_name]) + prof + /build/acTotal/acItemBonus # -penalties +bonuses really though # attribute_dexterity_ == /build/acTotal/acAbilityBonus but that is redundant

    • prof can be derived from /build/acTotal/acProfBonus--result should be stored in rank_armor_ as per an earlier bullet point above
    • attribute_dexterity_ must be calculated from /build/abilities/dex (larger #) as per a bullet point above
    • The JSON contains /build/acTotal/acTotal but that should not be printed, since it changes every level.
  • Change key_ability_caption_ from "Key Ability:" to "Spellcasting Ability:" in appropriate cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant