From 13754f280891e5959aaf514a4359e3141c2e2bd5 Mon Sep 17 00:00:00 2001 From: James Miller Date: Wed, 14 Aug 2019 23:00:46 -0500 Subject: [PATCH 01/10] change pragma to enforce foreign-keys --- data/abilityscores.sql | 3 +++ data/actions.sql | 3 +++ data/ancestries.sql | 3 +++ data/armor.sql | 2 ++ data/backgrounds.sql | 3 +++ data/bulk.sql | 3 +++ data/conditions.sql | 3 +++ data/feats.sql | 3 +++ data/heritages.sql | 3 +++ data/langs.sql | 3 +++ data/senses.sql | 3 +++ data/sizes.sql | 3 +++ data/sources.sql | 3 +++ data/spells.sql | 3 +++ data/traits.sql | 3 +++ 15 files changed, 44 insertions(+) diff --git a/data/abilityscores.sql b/data/abilityscores.sql index 5c278ff..ce4c252 100644 --- a/data/abilityscores.sql +++ b/data/abilityscores.sql @@ -1,5 +1,8 @@ -- -*- mode:sql sql-product:sqlite -*- +PRAGMA foreign_keys = ON; -- database requires foreign key checking to be turned + -- on PER CONNECTION + INSERT INTO abilityscores (abilityscores_id, flag_rep, short_name, long_name) VALUES (1, 1, 'STR', 'Strength'), diff --git a/data/actions.sql b/data/actions.sql index 764f425..4534d21 100644 --- a/data/actions.sql +++ b/data/actions.sql @@ -1,5 +1,8 @@ -- -*- mode:sql sql-product:sqlite -*- +PRAGMA foreign_keys = ON; -- database requires foreign key checking to be turned + -- on PER CONNECTION + INSERT INTO actioncosts ( actioncosts_id, name, diff --git a/data/ancestries.sql b/data/ancestries.sql index dae1215..f2f8cbc 100644 --- a/data/ancestries.sql +++ b/data/ancestries.sql @@ -4,6 +4,9 @@ one-paragraph at the top of the section, and we put in all the extra details as a field with markdown formatted text. Need to think on it. */ +PRAGMA foreign_keys = ON; -- database requires foreign key checking to be turned + -- on PER CONNECTION + INSERT INTO ancestries (ancestry_id, short_name, flavor_text, hp, size_id, speed, vision_id,sources_id,sources_pages) VALUES (1, 'Dwarf', 'TODO', 10, 3, 20, 1,1,"35"), diff --git a/data/armor.sql b/data/armor.sql index cfb3a94..ce85307 100644 --- a/data/armor.sql +++ b/data/armor.sql @@ -1,4 +1,6 @@ +PRAGMA foreign_keys = ON; -- database requires foreign key checking to be turned + -- on PER CONNECTION INSERT INTO armorgroup ( grp_id, diff --git a/data/backgrounds.sql b/data/backgrounds.sql index e223250..9e5132d 100644 --- a/data/backgrounds.sql +++ b/data/backgrounds.sql @@ -1,5 +1,8 @@ -- -*- mode:sql sql-product:sqlite -*- +PRAGMA foreign_keys = ON; -- database requires foreign key checking to be turned + -- on PER CONNECTION + INSERT INTO backgrounds ( bg_id, sources_id, diff --git a/data/bulk.sql b/data/bulk.sql index f2e03a7..0a6ea92 100644 --- a/data/bulk.sql +++ b/data/bulk.sql @@ -1,6 +1,9 @@ -- TODO update sizes table with a FK to bulk to get the data from the table on -- pg 272 CRB + +PRAGMA foreign_keys = ON; -- database requires foreign key checking to be turned + -- on PER CONNECTION INSERT INTO bulk ( bulk_id, sources_id, diff --git a/data/conditions.sql b/data/conditions.sql index fa08663..ea8864c 100644 --- a/data/conditions.sql +++ b/data/conditions.sql @@ -1,5 +1,8 @@ -- -*- mode:sql sql-product:sqlite -*- +PRAGMA foreign_keys = ON; -- database requires foreign key checking to be turned + -- on PER CONNECTION + -- TODO Fill in the remaining short descriptions from pag 454 CRB INSERT INTO conditions ( diff --git a/data/feats.sql b/data/feats.sql index 47396d0..0ea06e1 100644 --- a/data/feats.sql +++ b/data/feats.sql @@ -1,5 +1,8 @@ -- -*- mode:sql sql-product:sqlite -*- +PRAGMA foreign_keys = ON; -- database requires foreign key checking to be turned + -- on PER CONNECTION + INSERT INTO featprereqs (featprereqs_id, feat_id, descr) VALUES (1, NULL, 'Ancestry Level 1'), diff --git a/data/heritages.sql b/data/heritages.sql index 412af1c..8c9006d 100644 --- a/data/heritages.sql +++ b/data/heritages.sql @@ -1,5 +1,8 @@ -- -*- mode:sql sql-product:sqlite -*- +PRAGMA foreign_keys = ON; -- database requires foreign key checking to be turned + -- on PER CONNECTION + /* TODO figure out how to model the reaction with heritages */ /* TODO how to add in vision for Half-elf Heritage? */ diff --git a/data/langs.sql b/data/langs.sql index 592bf0d..420d482 100644 --- a/data/langs.sql +++ b/data/langs.sql @@ -1,5 +1,8 @@ -- -*- mode:sql sql-product:sqlite -*- +PRAGMA foreign_keys = ON; -- database requires foreign key checking to be turned + -- on PER CONNECTION + INSERT INTO langsrarity (rarity_id, rarity_name) VALUES (1, 'Common'), diff --git a/data/senses.sql b/data/senses.sql index eccafa4..809ccf0 100644 --- a/data/senses.sql +++ b/data/senses.sql @@ -1,5 +1,8 @@ -- -*- mode:sql sql-product:sqlite -*- +PRAGMA foreign_keys = ON; -- database requires foreign key checking to be turned + -- on PER CONNECTION + /* TODO add in any different vision types from Bestiary / Monsters */ /* TODO smoke vision is from young-red dragon */ diff --git a/data/sizes.sql b/data/sizes.sql index 7b55b45..4f13a68 100644 --- a/data/sizes.sql +++ b/data/sizes.sql @@ -1,5 +1,8 @@ -- -*- mode:sql sql-product:sqlite -*- +PRAGMA foreign_keys = ON; -- database requires foreign key checking to be turned + -- on PER CONNECTION + INSERT INTO sizes (size_id, short_name, space_in_ft, reach_tall_ft, reach_long_ft) VALUES (1,'Tiny',4,0,0), (2,'Small',5,5,5), diff --git a/data/sources.sql b/data/sources.sql index c07eec3..02dc3aa 100644 --- a/data/sources.sql +++ b/data/sources.sql @@ -1,5 +1,8 @@ -- -*- mode:sql sql-product:sqlite -*- +PRAGMA foreign_keys = ON; -- database requires foreign key checking to be turned + -- on PER CONNECTION + /* TODO Decide on how to format the copyright block text... perhaps with Markdown? */ diff --git a/data/spells.sql b/data/spells.sql index 1c50197..9a19b46 100644 --- a/data/spells.sql +++ b/data/spells.sql @@ -1,4 +1,7 @@ +PRAGMA foreign_keys = ON; -- database requires foreign key checking to be turned + -- on PER CONNECTION + INSERT INTO spelltypes ( spelltypes_id, name diff --git a/data/traits.sql b/data/traits.sql index b537c59..44a84e8 100644 --- a/data/traits.sql +++ b/data/traits.sql @@ -7,6 +7,9 @@ -- -- ######################################################### +PRAGMA foreign_keys = ON; -- database requires foreign key checking to be turned + -- on PER CONNECTION + INSERT INTO traittypes (traittype_id, name) VALUES (1, 'None'), From 696f9afd704cbbfb261535c3a9ece427410bce78 Mon Sep 17 00:00:00 2001 From: James Miller Date: Wed, 14 Aug 2019 23:01:30 -0500 Subject: [PATCH 02/10] turn on pragma foreign_keys in spells.py --- data/third_party_json/spells.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/data/third_party_json/spells.py b/data/third_party_json/spells.py index 957a890..90e33f9 100644 --- a/data/third_party_json/spells.py +++ b/data/third_party_json/spells.py @@ -34,10 +34,12 @@ def main(): pragma2 = "PRAGMA count_changes=OFF;" pragma3 = "PRAGMA journal_mode=MEMORY;" pragma4 = "PRAGMA temp_store=MEMORY;" + pragma5 = "PRAGMA foreign_keys=ON;" conn.execute(pragma1) conn.execute(pragma2) conn.execute(pragma3) conn.execute(pragma4) + conn.execute(pragma5) # load in ids for traits from traits table so we only call this once # instead of every spell From ad3fbe3714840553c11069e2f6bd7e0a234808cb Mon Sep 17 00:00:00 2001 From: James Miller Date: Wed, 14 Aug 2019 23:29:39 -0500 Subject: [PATCH 03/10] comment gendb for debugging --- gendb.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/gendb.sh b/gendb.sh index c2d2e0f..5db9c45 100755 --- a/gendb.sh +++ b/gendb.sh @@ -1,36 +1,65 @@ rm pf2.db echo 'loading schema' sqlite3 pf2.db < schema/sources.sql +echo '1' sqlite3 pf2.db < schema/conditions.sql +echo '2' sqlite3 pf2.db < schema/backgrounds.sql +echo '3' sqlite3 pf2.db < schema/abilityscores.sql +echo '4' sqlite3 pf2.db < schema/bulk.sql +echo '5' sqlite3 pf2.db < schema/sizes.sql +echo '6' sqlite3 pf2.db < schema/langs.sql +echo '7' sqlite3 pf2.db < schema/traits.sql +echo '8' sqlite3 pf2.db < schema/actions.sql +echo '9' sqlite3 pf2.db < schema/spells.sql +echo '10' sqlite3 pf2.db < schema/feats.sql +echo '11' sqlite3 pf2.db < schema/senses.sql +echo '12' sqlite3 pf2.db < schema/ancestries.sql +echo '13' sqlite3 pf2.db < schema/armor.sql +echo '14' sqlite3 pf2.db < schema/gear.sql echo 'loading data' sqlite3 pf2.db < data/sources.sql +echo '1' sqlite3 pf2.db < data/conditions.sql +echo '2' sqlite3 pf2.db < data/backgrounds.sql +echo '3' sqlite3 pf2.db < data/abilityscores.sql +echo '4' sqlite3 pf2.db < data/bulk.sql +echo '5' sqlite3 pf2.db < data/senses.sql +echo '6' sqlite3 pf2.db < data/sizes.sql +echo '7' sqlite3 pf2.db < data/langs.sql +echo '8' sqlite3 pf2.db < data/traits.sql +echo '9' sqlite3 pf2.db < data/actions.sql +echo '10' sqlite3 pf2.db < data/spells.sql +echo '11' sqlite3 pf2.db < data/feats.sql +echo '12' sqlite3 pf2.db < data/ancestries.sql +echo '13' sqlite3 pf2.db < data/armor.sql +echo '14' sqlite3 pf2.db < data/gear.sql +echo '15' sqlite3 pf2.db < data/heritages.sql # Comment out the following three lines if you don't want to generate the spell data. # cd data/third_party_json From 6559b31024f1c45961d2347c39027f48665be4f0 Mon Sep 17 00:00:00 2001 From: James Miller Date: Wed, 14 Aug 2019 23:30:31 -0500 Subject: [PATCH 04/10] fix some but not all bugs after turning on FK enforcement --- data/armor.sql | 2 +- data/traits.sql | 2 +- schema/ancestries.sql | 2 +- schema/armor.sql | 4 ++-- schema/spells.sql | 6 +++--- schema/traits.sql | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/data/armor.sql b/data/armor.sql index ce85307..94655a0 100644 --- a/data/armor.sql +++ b/data/armor.sql @@ -64,7 +64,7 @@ VALUES -- TODO INSERT into armor_traits table -INSERT INTO armor_traits (armor_id, traits_id) +INSERT INTO armor_traits (armor_id, trait_id) VALUES (2, 88), -- explorer's clothing and comfort (3, 88), -- padded and comfort diff --git a/data/traits.sql b/data/traits.sql index 44a84e8..d3ed494 100644 --- a/data/traits.sql +++ b/data/traits.sql @@ -28,7 +28,7 @@ VALUES (14, 'Tradition'), (15, 'Weapon'); -INSERT INTO traits (trait_id, traittype, short_name,description) +INSERT INTO traits (trait_id, traittype, short_name, description) VALUES -- CRB and Monster Manual diff --git a/schema/ancestries.sql b/schema/ancestries.sql index ef407bf..108cef8 100644 --- a/schema/ancestries.sql +++ b/schema/ancestries.sql @@ -66,7 +66,7 @@ CREATE TABLE heritages_traits ( id INTEGER PRIMARY KEY, heritage_id INTEGER NOT NULL, trait_id INTEGER NOT NULL, - UNIQUE(heritage_id, trait_id), + -- UNIQUE(heritage_id, trait_id), FOREIGN KEY (heritage_id) REFERENCES heritages(heritage_id), FOREIGN KEY (trait_id) REFERENCES traits(trait_id) ); diff --git a/schema/armor.sql b/schema/armor.sql index 6185163..4ad3ed1 100644 --- a/schema/armor.sql +++ b/schema/armor.sql @@ -38,9 +38,9 @@ CREATE TABLE armor ( CREATE TABLE armor_traits ( id INTEGER PRIMARY KEY, armor_id INTEGER NOT NULL, - traits_id INTEGER NOT NULL, + trait_id INTEGER NOT NULL, FOREIGN KEY (armor_id) REFERENCES armor(armor_id), - FOREIGN KEY (traits_id) REFERENCES traits(traits_id) + FOREIGN KEY (trait_id) REFERENCES traits(trait_id) ); diff --git a/schema/spells.sql b/schema/spells.sql index ebfc293..a2af84b 100644 --- a/schema/spells.sql +++ b/schema/spells.sql @@ -67,9 +67,9 @@ CREATE TABLE spells_spellcomponents( CREATE TABLE spells_traits ( id INTEGER PRIMARY KEY, spells_id INTEGER NOT NULL, - traits_id INTEGER NOT NULL, - UNIQUE(spells_id, traits_id), + trait_id INTEGER NOT NULL, + UNIQUE(spells_id, trait_id), FOREIGN KEY (spells_id) REFERENCES spells(spells_id), - FOREIGN KEY (traits_id) REFERENCES traits(traits_id) + FOREIGN KEY (trait_id) REFERENCES traits(trait_id) ); diff --git a/schema/traits.sql b/schema/traits.sql index d3c99ad..58ca539 100644 --- a/schema/traits.sql +++ b/schema/traits.sql @@ -12,6 +12,6 @@ CREATE TABLE traits ( traittype INTEGER, short_name TEXT NOT NULL, description TEXT NOT NULL, - FOREIGN KEY (traittype) REFERENCES traittypes(traittypes_id) + FOREIGN KEY (traittype) REFERENCES traittypes(traittype_id) ); From 4d9b604bf2b89ef0906fe4412ee53269cee0ea2d Mon Sep 17 00:00:00 2001 From: James Miller Date: Wed, 14 Aug 2019 23:38:37 -0500 Subject: [PATCH 05/10] fix FK issues which caught a data error in spells.py --- data/third_party_json/spells.py | 9 +++++---- gendb.sh | 6 +++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/data/third_party_json/spells.py b/data/third_party_json/spells.py index 90e33f9..895a430 100644 --- a/data/third_party_json/spells.py +++ b/data/third_party_json/spells.py @@ -155,14 +155,15 @@ def do_spell_components(i,id,conn,ctypes): if k.capitalize() == j[1]: res = j[0] - inp = (res, id) + inp = (id, res) stmt = "INSERT INTO spells_spellcomponents (spells_id, spellcomponents_id) VALUES (?,?)" try: conn.execute(stmt, inp) - except: - print("Error inserting spell components") + except sqlite3.Error as e: + print("Error inserting spell components: {}".format(e)) + print("\tinp: {}".format(inp)) else: conn.commit() @@ -224,7 +225,7 @@ def do_spell_traits(i, id, conn, traits): # print(inp) # insert into sql - stmt = "INSERT OR REPLACE INTO spells_traits (spells_id, traits_id) VALUES (?,?)" + stmt = "INSERT OR REPLACE INTO spells_traits (spells_id, trait_id) VALUES (?,?)" try: conn.executemany(stmt, inp) except: diff --git a/gendb.sh b/gendb.sh index 5db9c45..66c4854 100755 --- a/gendb.sh +++ b/gendb.sh @@ -62,9 +62,9 @@ sqlite3 pf2.db < data/gear.sql echo '15' sqlite3 pf2.db < data/heritages.sql # Comment out the following three lines if you don't want to generate the spell data. -# cd data/third_party_json -# python3 spells.py -# cd ../.. +cd data/third_party_json +python3 spells.py +cd ../.. # TODO Eventually we will stop relying on the spells.py script and I will have # the actual .sql files for the spell data; I am waiting to see if the From ea0f374d0811a66b1b8eb36dd5228c6ebec124fd Mon Sep 17 00:00:00 2001 From: James Miller Date: Wed, 14 Aug 2019 23:45:44 -0500 Subject: [PATCH 06/10] lessen output of spells.py --- data/third_party_json/spells.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/data/third_party_json/spells.py b/data/third_party_json/spells.py index 895a430..8d52b3d 100644 --- a/data/third_party_json/spells.py +++ b/data/third_party_json/spells.py @@ -8,7 +8,7 @@ def main(): with open('spells.json') as f: # raw_data = f.read() data = json.load(f) - print("Imported {} spells.".format(len(data))) + print("Importing {} spells.".format(len(data))) # alphabetize spells into a list sorted_names = [] for i in data: @@ -128,6 +128,8 @@ def main(): do_spell_targets(i,id,conn,ttypes) do_spell_actions(i,id,conn,acttypes) + print("Finished {} spells.".format(len(sorted_dicts))) + def do_spell_actions(i,id,conn,acttypes): if 'action' not in i: return @@ -289,7 +291,7 @@ def do_range_numbers(i, id, conn): def do_basic_sql(i, id, conn): - print("Doing spell id #{}: {}".format(id, i['name'])) + #print("Doing spell id #{}: {}".format(id, i['name'])) stmt = """INSERT INTO spells ( spells_id, sources_id, From 0c94a210d7e8bc40055550483745cf1087f93498 Mon Sep 17 00:00:00 2001 From: James Miller Date: Wed, 14 Aug 2019 23:46:14 -0500 Subject: [PATCH 07/10] removed heritages_traits table --- data/heritages.sql | 13 ++----------- schema/ancestries.sql | 10 ---------- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/data/heritages.sql b/data/heritages.sql index 8c9006d..d655952 100644 --- a/data/heritages.sql +++ b/data/heritages.sql @@ -81,8 +81,9 @@ VALUES (3, 200), (3, 201), (3, 202), - (3, 203), + -- (3, 203), TODO there was no #203 in Gnomes; need to see what's going on (3, 204), + (3, 205), -- Goblin (4, 300), (4, 301), @@ -105,13 +106,3 @@ VALUES -- but we link it up to ancestry ids too) (7, 500), (8, 501); - - - -/* TODO this table is likely not needed anymore; AND TODO the trait_ids likely don't match anymore. */ -INSERT INTO heritages_traits - (heritage_id, trait_id) -VALUES - (6, 7), - (6, 2), - (6, 6); diff --git a/schema/ancestries.sql b/schema/ancestries.sql index 108cef8..93ec7ed 100644 --- a/schema/ancestries.sql +++ b/schema/ancestries.sql @@ -60,16 +60,6 @@ CREATE TABLE ancestries_heritages ( FOREIGN KEY (heritage_id) REFERENCES heritages(heritage_id) ); -/* TODO THIS TABLE IS LIKELY NOT NEEDED. THANKS WES! */ - -CREATE TABLE heritages_traits ( - id INTEGER PRIMARY KEY, - heritage_id INTEGER NOT NULL, - trait_id INTEGER NOT NULL, - -- UNIQUE(heritage_id, trait_id), - FOREIGN KEY (heritage_id) REFERENCES heritages(heritage_id), - FOREIGN KEY (trait_id) REFERENCES traits(trait_id) -); /* has partial data */ CREATE TABLE ancestries_traits ( From 1e966c7cfa81c10f20cd8476f2bed7c345e7156e Mon Sep 17 00:00:00 2001 From: James Miller Date: Wed, 14 Aug 2019 23:48:43 -0500 Subject: [PATCH 08/10] fix FK bug (6,504) no 504 on data/heritages --- data/heritages.sql | 1 - 1 file changed, 1 deletion(-) diff --git a/data/heritages.sql b/data/heritages.sql index d655952..b039d23 100644 --- a/data/heritages.sql +++ b/data/heritages.sql @@ -101,7 +101,6 @@ VALUES (6, 501), (6, 502), (6, 503), - (6, 504), -- Half-elf and half orc (yes, we know they're technically only a heritage, -- but we link it up to ancestry ids too) (7, 500), From 0c9340abfa34acd93336f4173549130a6295565a Mon Sep 17 00:00:00 2001 From: James Miller Date: Wed, 14 Aug 2019 23:50:15 -0500 Subject: [PATCH 09/10] try moving featprereqs around to fix FK, did NOT work --- data/feats.sql | 781 +++++++++++++++++++++++++------------------------ 1 file changed, 391 insertions(+), 390 deletions(-) diff --git a/data/feats.sql b/data/feats.sql index 0ea06e1..6317511 100644 --- a/data/feats.sql +++ b/data/feats.sql @@ -3,396 +3,6 @@ PRAGMA foreign_keys = ON; -- database requires foreign key checking to be turned -- on PER CONNECTION -INSERT INTO featprereqs (featprereqs_id, feat_id, descr) -VALUES - (1, NULL, 'Ancestry Level 1'), - (2, NULL, 'Ancestry Level 5'), - (3, NULL, 'Ancestry Level 9'), - (4, NULL, 'Ancestry Level 13'), - (5, NULL, 'Class Level 1'), - (6, NULL, 'Class Level 2'), - (7, NULL, 'Class Level 4'), - (8, NULL, 'Class Level 6'), - (9, NULL, 'Class Level 8'), - (10, NULL, 'Class Level 10'), - (11, NULL, 'Class Level 12'), - (12, NULL, 'Class Level 14'), - (13, NULL, 'Class Level 16'), - (14, NULL, 'Class Level 18'), - (15, NULL, 'Class Level 20'), - -- Dwarf - (16, 3, 'Feat: Rock Runner'), - (17, 2, 'Feat: Dwarven Weapon Familiarity'), - -- Elf - (18, NULL, 'at least 100 years old'), - (19, 14, 'Feat: Elven Weapon Familiarity'), - (20, 12, 'Feat: Ancestral Longevity'), - (21, 22, 'Feat: Expert Longevity'), - -- Gnome - (22, 26, 'Feat: Burrow Elocutionist'), - (23, NULL, 'focus pool'), - (24, NULL, 'at least one Innate Spell from a Gnome heritage or ancestry feat that shares a tradition with at least one of your focus spells'), - (25, 30, 'Feat: Gnome Weapon Familiarity'), - (26, NULL, 'at least one primal innate spell'), - -- Goblin - (27, 43, 'Feat: Goblin Weapon Familiarity'), - (28, 41, 'Feat: Goblin Scuttle'), - (353, 46, 'Feat: Very Sneaky'), - -- Halfling - (29, 55, 'Feat: Halfling Weapon Familiarity'), - (30, 54, 'Feat: Halfling Luck'), - (31, 52, 'Feat: Distracting Shadows'), - --Human - (32, NULL, 'Spellcasting Class Feature'), - (33, 66, 'Feat: Adapted Cantrip'), - (34, NULL, 'can cast 3rd-level Spells'), - (35, 67, 'Feat: Cooperative Nature'), - (36, 74, 'Feat: Clever Improviser'), - (37, 72, 'Feat: Unconventional Weaponry'), - (38, NULL, 'trained in the weapon you chose for Unconventional Weaponry'), - (39, NULL, 'low-light vision'), - (40, 86, 'Feat: Orc Weapon Famailiarity'), - (41, 85, 'Feat: Orc Superstition'), - (94, 83, 'Feat: Orc Ferocity'), - -- Alchemist - (42, NULL, 'trained in Crafting'), - (43, 99, 'Feat: Calculated Splash'), - (44, 103, 'Feat: Debilitating Bomb'), - (45, 106, 'Feat: Powerful Alchemy'), - (46, 94, 'Feat: Far Lobber'), - (47, 111, 'Feat: Merciful Elixir'), - (48, 110, 'Feat: Greater Debilitating Bomb'), - (49, 113, 'Feat: Extend Elixir'), - (50, 109, 'Feat: Expanded Splash'), - -- Barbarian - (51, NULL, 'acute vision or darkvision'), --orCondition - (52, NULL, 'expert in Athletics'), - (53, NULL, 'Feature: animal instinct'), - (54, NULL, 'Feature: dragon instinct'), - (55, NULL, 'Feature: giant instinct'), - (56, NULL, 'Feature: spirit instinct'), - (57, NULL, 'master in Athletics'), - (58, 147, 'Feat: Cleave'), - (59, 796, 'Feat: Intimidating Glare'), --IS a skill feat - (60, 149, 'Feat: Giants Stature'), - (61, 160, 'Feat: Knockdown'), - (62, 157, 'Feat: Come And Get Me'), - (63, 156, 'Feat: Thrash'), - (64, 152, 'Feat: Dragons Rage Wings'), - (65, 154, 'Feat: Share Rage'), - -- Bard - (66, NULL, 'Feature: enigma muse'), - (67, NULL, 'Feature: maestro muse'), - (68, NULL, 'Feature: polymath muse'), - (69, NULL, 'master in Occultism'), - (70, 184, 'Feat: Esoteric Polymath'), - (71, NULL, 'legendary in Ocultism'), - (72, NULL,'trained in Arcana, Nature, or Religion'), - (73, NULL, 'Feature: magnus opus'), - (74, 193, 'Feat: Harmonize'), - -- Champion - (75, NULL, 'Feature: paladin cause'), - (76, NULL, 'Feature: liberator cause'), - (77, NULL, 'Feature: redeemer cause'), - (78, NULL, 'Feature: tenets of good'), - (79, NULL, 'Feature: devotion spell (lay on hands)'), - (80, NULL, 'Feature: divine ally (steed)'), - (81, NULL, 'Feature: devotion spells'), - (82, NULL, 'Feature: divine ally (shield)'), - (83, NULL, 'Feature: divine ally (blade)'), - (84, 214, 'Feat: Deitys Domain'), --Paren - (85, 225, 'Feat: Mercy'), - (86, NULL, 'Feature: divine ally'), - (87, 228, 'Feat: Loyal Warhouse'), - (88, 229, 'Feat: Shield Warden'), - (89, NULL, "Feature: Champion's Reaction"), --Paren - (90, 220, 'Feat: Fiendsbane Oath'), - (91, 221, 'Feat: Shining Oath'), - (92, NULL, 'Feature: exalt'), - (93, 222, 'Feat: Vengeful Oath'), - (95, 219, 'Feat: Dragonslayer Oath'), - (96, 238, 'Feat: Imposing Destrier'), - (97, 240, 'Feat: Radiant Blade Spirit'), - --Cleric - (98, NULL, 'diety with a simple favored weapon'), - (99, NULL, "trained with your deity's favored weapon"), --Paren - (100, NULL, 'Feature: harmful font'), - (101, NULL, 'Feature: healing font'), - (102, NULL, 'Feature: harmful font or healing font'), - (103, NULL, 'good alignment'), - (104, NULL, 'diety that allows Clerics to have both fonts'), - (105, NULL, 'evil alignment'), - (106, 271, 'Feat: Communal Healing'), - (107, 265, 'Feat: Domain Initiate'), - (108, NULL, 'chaotic, evil, good, or lawful deity'), - (109, 272, 'Feat: Emblazon Armament'), - (110, 268, 'Feat: Holy Castigation'), - (111, 277, 'Feat: Command Undead'), - (112, NULL, "expert in dietys favored weapon"), --Paren - (113, NULL, 'one or more domain spells'), - (114, 293, 'Feat: Replenishment Of War'), - (115, 285, 'Feat: Advanced Domain'), - (116, 286, 'Feat: Align Armament'), - (117, 295, 'Feat: Domain Focus'), - (118, 301, 'Feat: Swift Banishment'), - (119, NULL, 'Feature: miraculous spell'), - --Druid - (120, NULL, 'Feature: animal order'), - (121, NULL, 'Feature: leaf order'), - (122, NULL, 'Feature: storm order'), - (123, NULL, 'Feature: wild order'), - (124, NULL, 'a familiar'), - (125, NULL, 'Strength 14'), - (126, 316, 'Feat: Wild Shape'), - (127, 311, 'Feat: Animal Companion'), - (128, 319, 'Feat: Order Explorer'), - (129, NULL, 'tempest surge order spell'), - (130, 322, 'Feat: Mature Animal Companion'), - (131, NULL, 'leaf order or Wild Shape'), --orCondition - (132, 333, 'Feat: Soaring Shape'), - (133, 326, 'Feat: Green Empathy'), - (134, 317, 'Feat: Call Of The Wild'), - (135, 332, 'Feat: Incredible Companion'), - (136, 334, 'Feat: Wind Caller'), - (137, 321, 'Feat: Form Control'), - (138, NULL, 'Strength 18'), - (139, 342, 'Feat: Primal Focus'), --Note in book there is a typo that calls this Wild Focus in prerequisites for Primal WellSpring - (140, NULL, 'legendary in Nature'), - (141, 340, 'Feat: Dragon Shape'), - --Fighter - (142, NULL, 'trained in Athletics'), - (143, NULL, 'Aggressive Block or Brutish Shove'), --orCondition - (144, 359, 'Feat: Power Attack'), - (145, 370, 'Feat: Double Shot'), - (146, NULL, 'master in Perception'), - (147, 367, 'Feat: Dueling Parry'), - (148, 839, 'Feat: Shield Block'), --Note fighters get this as a class feature but it is also a feat - (149, 360, 'Feat: Reactive Shield'), - --(150, 372, 'Feat: Knockdown');different knockback already created - (151, 389, 'Feat: Dueling Riposte'), - (152, 391, 'Feat: Incredible Aim'), - (153, 145, 'Feat: Attack of Opportunity'), --Note fighters get this as a class feature but it is also a feat for barbarians - (154, 369, 'Feat: Lunge'), - (155, 405, 'Feat: Twin Riposte'), - (156, 356, 'Feat: Double Slice'), - (157, 383, 'Feat: Reflexive Shield'), - (158, 387, 'Feat: Triple Shot'), - (159, 377, 'Feat: Twin Parry'), - --Monk - (160, 433, 'Feat: Ki Strike'), - (161, NULL, 'Feature: flurry Of blows'), - (162, NULL, 'Feature: ki spells'), - (163, NULL, 'Feature: incredible movement'), - (164, 430, 'Feat: Crane Stance'), - (165, 431, 'Feat: Dragon Stance'), - (166, 435, 'Feat: Mountain Stance'), - (167, 436, 'Feat: Tiger Stance'), - (168, 437, 'Feat: Wolf Stance'), - (169, 443, 'Feat: Deflect Arrow'), - (170, 459, 'Feat: Ironblood Stance'), - (171, 453, 'Feat: Mountain Stronghold'), - (172, 461, 'Feat: Tangled Forest Stance'), - (173, 463, 'Feat: Wild Winds Initiate'), - (174, 472, 'Feat: Stance Savant'), - (175, 471, 'Feat: Meditative Focus'), - (176, NULL, 'at least two stances'), - --Ranger - (177, 493, 'Feat: Monster Hunter'), - (178, NULL, 'an animal companion'), - (179, NULL, 'expert in Crafting'), - (180, 843, 'Feat: Snare Crafting'), --In skill feats - (181, 506, 'Feat: Snare Specialist'), - (182, NULL, 'expert in Survival'), - (183, 780, 'Feat: Experienced Tracker'), --skill feat - (354, NULL, 'Feature: weapon specialization'),--354 currently, due to missing it before - (184, NULL, 'master in Crafting'), - (185, NULL, 'Feature: wild stride'), - (186, NULL, 'master in Survival'), - (187, 495, 'Feat: Favored Terrain'), - (188, NULL, 'master in Stealth'), - (189, 508, 'Feat: Mature Animal Compainion (Ranger)'), - (190, NULL, 'master in Nature'), - (191, 526, 'Feat: Double Prey'), - (192, 518, 'Feat: Wardens Boon'), - (193, 519, 'Feat: Camouflage'), - (194, 496, 'Feat: Hunters Aim'), - (195, 525, 'Feat: Distracting Shot'), - (196, 521, 'Feat: Master Monster Hunter'), - (197, 520, 'Feat: Incredible Companion(Ranger)'), - (198, NULL, 'Feature: hunters edge'), - (199, NULL, 'Feature: masterful hunter'), - (200, NULL, 'legendary in Perception'), - (201, 502, 'Feat: Far Shot'), - (202, NULL, 'legendary in Survival'), - (203, 531, 'Feat: Shared Prey'), - --Rogue - (204, NULL, 'trained in Intimidation'), - (205, NULL, 'Feature: ruffian racket'), - (206, NULL, 'Feature: scoundrel racket'), - (207, NULL, 'Feature: thief racket'), - (208, 563, 'Feat: Poison Weapon'), - (209, 550, 'Feat: Nimble Dodge'), - (210, NULL, 'Feature: sneak attack'), - (211, NULL, 'Feature: debilitating strike'), - (212, NULL, 'legendary in Acrobatics'), - (213, NULL, 'legendary in Deception'), - (214, 828, 'Feat: Quick Squeeze'), --Skill feat - (215, NULL, 'legendary in Stealth'), - (216, 577, 'Feat: Sly Striker'), - (217, 595, 'Feat: Perfect Distraction'), - --Sorcerer - (218, NULL, 'bloodline that grants arcane spells'), - (219, NULL, 'bloodline that grants divine spells'), - (220, NULL, 'bloodline that grants occult spells'), - (221, NULL, 'bloodline that grants primal spells'), - (222, NULL, 'bloodline spell'), - (223, NULL, 'dispel magic in your spell repetoire'), - (224, 602, 'Feat: CounterSpell'), - (225, NULL, 'Feat: Arcane Evolution or Feat: Occult Evolution'), - (226, NULL, 'Feat: Divine Evolution or Feat: Primal Evolution'), - (227, 621, 'Feat: Bloodline Focus'), - (228, 617, 'Feat: Crossblooded Evolution'), - (229, NULL, 'Feature: bloodline paragon'), - --Wizard - (230, NULL, 'Feature: arcane bond'), - (231, NULL, 'Feature: arcane school'), - (232, 640, 'Feat: Conceal Spell'), - (233, NULL, 'Feature: universalist wizard'), - (234, 636, 'Feat: Hand of the Apprentice'), - (235, 633, 'Feat: Counterspell'), - --(236, 826, 'Feat: Quick Recognize'),typo in book should be Quick Recognition - (237, NULL, 'Feature: archwizards spellcraft'), - --Alchemist Dedication - (238, NULL, 'Intelligence 14'), - (239, 665, 'Feat: Alchemist Dedication'), - (240, 666, 'Feat: Basic Concoction'), - (241, 669, 'Feat: Expert Alchemy'), - --Barbarian Dedication - (242, NULL, 'Constitution 14'), - (243, 672, 'Feat: Barbarian Dedication'), - (244, NULL, 'class granting no more Hit Points per level than 10 + your constituion modifier'), - (245, 673, 'Feat: Basic Fury'), - (246, NULL, 'expert in Fortitude saves'), - --Bard Dedication - (247, NULL, 'Charisma 14'), - (248, 677, 'Feat: Bard Dedication'), - (249, 679, "Feat: Basic Muse's Whispers"), - (250, 678, 'Feat: Basic Bard Spellcasting'), - (251, 684, 'Feat: Expert Bard Spellcasting'), - (252, NULL, 'legendary in Occultism'), - --Champion Dedication - (253, 868, 'Feat: Champion Dedication'), - (254, NULL, 'class granting no more Hit Points per level than 8 + your Constitution modifier'), - (255, 687, 'Feat: Basic Devotion'), - (256, NULL, 'expert in unarmored defense or one or more types of armor'), - --Cleric Dedication - (257, NULL, 'Wisdom 14'), - (258, 694, 'Feat: Cleric Dedication'), - (259, 696, 'Feat: Basic Dogma'), - (260, 695, 'Feat: Basic Cleric Spellcasting'), - (261, NULL, 'master in Religion'), - (262, 699, 'Feat: Expert Cleric Spellcasting'), - (263, NULL, 'legendary in Religion'), - --Druid Dedication - (264, NULL, 'Feat: Druid Dedication'), - (265, 703, 'Feat: Basic Wilding'), - (266, 702, 'Feat: Basic Druid Spellcasting'), - (267, 707, 'Feat: Expert Druid Spellcasting'), - --Fighter Dedication - (268, NULL, 'Dexterity 14'), - (269, 709, 'Feat: Fighter Dedication'), - (270, 710, 'Feat: Basic Maneuver'), - (271, NULL, 'expert in any kind of weapon or unarmed attack'), - --Monk Dedication - (272, 715, 'Feat: Monk Dedication'), - (273, 716, 'Feat: Basic Kata'), - (274, NULL, 'expert in at least one saving throw'), - --Ranger Dedication - (275, 722, 'Feat: Ranger Dedication'), - (276, 723, 'Feat: Basic Hunters Trick'), - (277, NULL, 'expert in Perception'), - --Rogue Dedication - (278, 727, 'Feat: Rogue Dedication'), - (279, 728, 'Feat: Basic Trickery'), - (280, NULL, 'trained in at least one skill and expert in at least one skill'), - (281, NULL, 'expert in Reflex saves'), - --Sorcerer Dedication - (282,734 , 'Feat: Sorcerer Dedication'), - (283, 736, 'Feat: Basic Blood Potency'), - (284, 735, 'Feat: Basic Sorcerer Spellcasting'), - (285, NULL, 'master in Arcana, Nature, Occultism, Religion, depending on bloodline'), - (286, 740, 'Feat: Expert Sorcerer Spellcasting'), - (287, NULL, 'legendary in Arcana, Nature, Occultism, Religion, depending on bloodline'), - -- Wizard Dedication - (288, 742, 'Feat: Wizard Dedication'), - (289, 744, 'Feat: Basic Arcana'), - (290, 745, 'Feat: Basic Wizard Spellcasting'), - (291, NULL, 'master in Arcana'), - (292, 748, 'Feat: Expert Wizard Spellcasting'), - (293, NULL, 'Feat: legendary in Arcana'), - --Feats Section - (294, NULL, 'Class Level 3 '), - (295, NULL, 'trained in Lore'), - (296, NULL, 'trained in Arcana'), - (297, NULL, 'trained in at least one skill'), - (298, NULL, 'expert in a skill with the Recall Knowledge action'), - (299, NULL, 'Assurance in that skill'), - (300, NULL, 'trained in Diplomacy'), - (301, NULL, 'Class Level 7'), - (302, NULL, 'Class Level 15'), - (303, NULL, 'master in Intimidation'), - (304, NULL, 'trained in Medicine'), - (305, NULL, 'trained in Acrobatics'), - (306, NULL, 'trained in Deception'), - (307, NULL, 'legendary in Athletics'), - (308, NULL, 'expert in Nature'), - (309, NULL, 'expert in Deception'), - (310, NULL, 'expert in Society'), - (311, 772, 'Feat: Courtly Graces'), - (312, NULL, 'expert in Medicine'), - (313, NULL, 'trained in Society'), - (314, NULL, 'legendary in Crafting'), - (315, NULL, 'trained in a skill with the Recall Knowledge action'), - (316, NULL, 'trained in Stealth'), - (317, NULL, 'trained in Survival'), - (318, NULL, 'Feat: trained in Performance'), - (319, 844, 'Feat: Specialty Crafting'), - (320, NULL, 'Class Level 11'), - (321, NULL, 'Charisma 16'), - (322, NULL, 'Strength 16'), - (323, NULL, 'expert in Intimidation'), - (324, NULL, 'master in Acrobatics'), - (325, NULL, 'legendary in Society'), - (326, 814, 'Feat: Multilingual'), - (327, NULL, 'legendary in Medicine'), - (328, NULL, 'legendary in Diplomacy'), - (329, NULL, 'legendary in Performance'), - (330, 862, 'Feat: Virtuosic Performer'), - (331, NULL, 'legendary in Lore'), - (332, NULL, 'legendary in Sneak'), - (333, 850, 'Feat: Swift Sneak'), - (334, NULL, 'legendary in Thievery'), - (335, 818, 'Feat: Pickpocket'), - (336, NULL, 'trained in Nature'), - (337, NULL, 'expert in Acrobatics'), - (338, NULL, 'trained in Occultism'), - (339, NULL, 'trained in Thievery'), - (340, NULL, 'trained in Arcana, Nature, Occultism, or Religion'), - (341, NULL, 'master in Arcana, Nature, Occultism, or Religion'), - (342, 834, 'Feat: Recognize Spell'), - (343, NULL, 'master in Thievery'), - (344, NULL, 'expert in Stealth'), - (345, NULL, 'legendary in Intimidation'), - (346, NULL, 'master in Diplomacy'), - (347, NULL, 'Intelligence 12'), - (348, NULL, 'master in Deception'), - (349, NULL, 'trained in Religion'), - (350, NULL, 'legendary in Arcana'), - (351, NULL, 'expert in Lore'), - (352, NULL, 'expert in Thievery'), - (236, 826, 'Feat: Quick Recognition'), - (355, NULL, 'expert in Arcana. Nature, Occultism, or Religion'), - (356, NULL, 'expert in Diplomacy'); INSERT INTO feats ( @@ -1259,6 +869,396 @@ VALUES (867,3,"57","Relentless Stalker","Your hunted prey cannot escape your relentless pursuit. Stride up to your Speed in tandem with the triggering creature, remaining adjacent to the foe throughout its movement until it stops moving or you run out of movement. You can ignore difficult terrain during this movement unless the difficult terrain is caused by a magical effect."), (868,3,"57","Wilderness Spotter","Select one type of terrain from the following list: aquatic, arctic, desert, forest, mountain, plains, sky, swamp, or underground. You can use Survival in place of Perception to roll initiative when in the selected terrain in a natural location (not a structure) even if you weren’t tracking or otherwise using"); +INSERT INTO featprereqs (featprereqs_id, feat_id, descr) +VALUES + (1, NULL, 'Ancestry Level 1'), + (2, NULL, 'Ancestry Level 5'), + (3, NULL, 'Ancestry Level 9'), + (4, NULL, 'Ancestry Level 13'), + (5, NULL, 'Class Level 1'), + (6, NULL, 'Class Level 2'), + (7, NULL, 'Class Level 4'), + (8, NULL, 'Class Level 6'), + (9, NULL, 'Class Level 8'), + (10, NULL, 'Class Level 10'), + (11, NULL, 'Class Level 12'), + (12, NULL, 'Class Level 14'), + (13, NULL, 'Class Level 16'), + (14, NULL, 'Class Level 18'), + (15, NULL, 'Class Level 20'), + -- Dwarf + (16, 3, 'Feat: Rock Runner'), + (17, 2, 'Feat: Dwarven Weapon Familiarity'), + -- Elf + (18, NULL, 'at least 100 years old'), + (19, 14, 'Feat: Elven Weapon Familiarity'), + (20, 12, 'Feat: Ancestral Longevity'), + (21, 22, 'Feat: Expert Longevity'), + -- Gnome + (22, 26, 'Feat: Burrow Elocutionist'), + (23, NULL, 'focus pool'), + (24, NULL, 'at least one Innate Spell from a Gnome heritage or ancestry feat that shares a tradition with at least one of your focus spells'), + (25, 30, 'Feat: Gnome Weapon Familiarity'), + (26, NULL, 'at least one primal innate spell'), + -- Goblin + (27, 43, 'Feat: Goblin Weapon Familiarity'), + (28, 41, 'Feat: Goblin Scuttle'), + (353, 46, 'Feat: Very Sneaky'), + -- Halfling + (29, 55, 'Feat: Halfling Weapon Familiarity'), + (30, 54, 'Feat: Halfling Luck'), + (31, 52, 'Feat: Distracting Shadows'), + --Human + (32, NULL, 'Spellcasting Class Feature'), + (33, 66, 'Feat: Adapted Cantrip'), + (34, NULL, 'can cast 3rd-level Spells'), + (35, 67, 'Feat: Cooperative Nature'), + (36, 74, 'Feat: Clever Improviser'), + (37, 72, 'Feat: Unconventional Weaponry'), + (38, NULL, 'trained in the weapon you chose for Unconventional Weaponry'), + (39, NULL, 'low-light vision'), + (40, 86, 'Feat: Orc Weapon Famailiarity'), + (41, 85, 'Feat: Orc Superstition'), + (94, 83, 'Feat: Orc Ferocity'), + -- Alchemist + (42, NULL, 'trained in Crafting'), + (43, 99, 'Feat: Calculated Splash'), + (44, 103, 'Feat: Debilitating Bomb'), + (45, 106, 'Feat: Powerful Alchemy'), + (46, 94, 'Feat: Far Lobber'), + (47, 111, 'Feat: Merciful Elixir'), + (48, 110, 'Feat: Greater Debilitating Bomb'), + (49, 113, 'Feat: Extend Elixir'), + (50, 109, 'Feat: Expanded Splash'), + -- Barbarian + (51, NULL, 'acute vision or darkvision'), --orCondition + (52, NULL, 'expert in Athletics'), + (53, NULL, 'Feature: animal instinct'), + (54, NULL, 'Feature: dragon instinct'), + (55, NULL, 'Feature: giant instinct'), + (56, NULL, 'Feature: spirit instinct'), + (57, NULL, 'master in Athletics'), + (58, 147, 'Feat: Cleave'), + (59, 796, 'Feat: Intimidating Glare'), --IS a skill feat + (60, 149, 'Feat: Giants Stature'), + (61, 160, 'Feat: Knockdown'), + (62, 157, 'Feat: Come And Get Me'), + (63, 156, 'Feat: Thrash'), + (64, 152, 'Feat: Dragons Rage Wings'), + (65, 154, 'Feat: Share Rage'), + -- Bard + (66, NULL, 'Feature: enigma muse'), + (67, NULL, 'Feature: maestro muse'), + (68, NULL, 'Feature: polymath muse'), + (69, NULL, 'master in Occultism'), + (70, 184, 'Feat: Esoteric Polymath'), + (71, NULL, 'legendary in Ocultism'), + (72, NULL,'trained in Arcana, Nature, or Religion'), + (73, NULL, 'Feature: magnus opus'), + (74, 193, 'Feat: Harmonize'), + -- Champion + (75, NULL, 'Feature: paladin cause'), + (76, NULL, 'Feature: liberator cause'), + (77, NULL, 'Feature: redeemer cause'), + (78, NULL, 'Feature: tenets of good'), + (79, NULL, 'Feature: devotion spell (lay on hands)'), + (80, NULL, 'Feature: divine ally (steed)'), + (81, NULL, 'Feature: devotion spells'), + (82, NULL, 'Feature: divine ally (shield)'), + (83, NULL, 'Feature: divine ally (blade)'), + (84, 214, 'Feat: Deitys Domain'), --Paren + (85, 225, 'Feat: Mercy'), + (86, NULL, 'Feature: divine ally'), + (87, 228, 'Feat: Loyal Warhouse'), + (88, 229, 'Feat: Shield Warden'), + (89, NULL, "Feature: Champion's Reaction"), --Paren + (90, 220, 'Feat: Fiendsbane Oath'), + (91, 221, 'Feat: Shining Oath'), + (92, NULL, 'Feature: exalt'), + (93, 222, 'Feat: Vengeful Oath'), + (95, 219, 'Feat: Dragonslayer Oath'), + (96, 238, 'Feat: Imposing Destrier'), + (97, 240, 'Feat: Radiant Blade Spirit'), + --Cleric + (98, NULL, 'diety with a simple favored weapon'), + (99, NULL, "trained with your deity's favored weapon"), --Paren + (100, NULL, 'Feature: harmful font'), + (101, NULL, 'Feature: healing font'), + (102, NULL, 'Feature: harmful font or healing font'), + (103, NULL, 'good alignment'), + (104, NULL, 'diety that allows Clerics to have both fonts'), + (105, NULL, 'evil alignment'), + (106, 271, 'Feat: Communal Healing'), + (107, 265, 'Feat: Domain Initiate'), + (108, NULL, 'chaotic, evil, good, or lawful deity'), + (109, 272, 'Feat: Emblazon Armament'), + (110, 268, 'Feat: Holy Castigation'), + (111, 277, 'Feat: Command Undead'), + (112, NULL, "expert in dietys favored weapon"), --Paren + (113, NULL, 'one or more domain spells'), + (114, 293, 'Feat: Replenishment Of War'), + (115, 285, 'Feat: Advanced Domain'), + (116, 286, 'Feat: Align Armament'), + (117, 295, 'Feat: Domain Focus'), + (118, 301, 'Feat: Swift Banishment'), + (119, NULL, 'Feature: miraculous spell'), + --Druid + (120, NULL, 'Feature: animal order'), + (121, NULL, 'Feature: leaf order'), + (122, NULL, 'Feature: storm order'), + (123, NULL, 'Feature: wild order'), + (124, NULL, 'a familiar'), + (125, NULL, 'Strength 14'), + (126, 316, 'Feat: Wild Shape'), + (127, 311, 'Feat: Animal Companion'), + (128, 319, 'Feat: Order Explorer'), + (129, NULL, 'tempest surge order spell'), + (130, 322, 'Feat: Mature Animal Companion'), + (131, NULL, 'leaf order or Wild Shape'), --orCondition + (132, 333, 'Feat: Soaring Shape'), + (133, 326, 'Feat: Green Empathy'), + (134, 317, 'Feat: Call Of The Wild'), + (135, 332, 'Feat: Incredible Companion'), + (136, 334, 'Feat: Wind Caller'), + (137, 321, 'Feat: Form Control'), + (138, NULL, 'Strength 18'), + (139, 342, 'Feat: Primal Focus'), --Note in book there is a typo that calls this Wild Focus in prerequisites for Primal WellSpring + (140, NULL, 'legendary in Nature'), + (141, 340, 'Feat: Dragon Shape'), + --Fighter + (142, NULL, 'trained in Athletics'), + (143, NULL, 'Aggressive Block or Brutish Shove'), --orCondition + (144, 359, 'Feat: Power Attack'), + (145, 370, 'Feat: Double Shot'), + (146, NULL, 'master in Perception'), + (147, 367, 'Feat: Dueling Parry'), + (148, 839, 'Feat: Shield Block'), --Note fighters get this as a class feature but it is also a feat + (149, 360, 'Feat: Reactive Shield'), + --(150, 372, 'Feat: Knockdown');different knockback already created + (151, 389, 'Feat: Dueling Riposte'), + (152, 391, 'Feat: Incredible Aim'), + (153, 145, 'Feat: Attack of Opportunity'), --Note fighters get this as a class feature but it is also a feat for barbarians + (154, 369, 'Feat: Lunge'), + (155, 405, 'Feat: Twin Riposte'), + (156, 356, 'Feat: Double Slice'), + (157, 383, 'Feat: Reflexive Shield'), + (158, 387, 'Feat: Triple Shot'), + (159, 377, 'Feat: Twin Parry'), + --Monk + (160, 433, 'Feat: Ki Strike'), + (161, NULL, 'Feature: flurry Of blows'), + (162, NULL, 'Feature: ki spells'), + (163, NULL, 'Feature: incredible movement'), + (164, 430, 'Feat: Crane Stance'), + (165, 431, 'Feat: Dragon Stance'), + (166, 435, 'Feat: Mountain Stance'), + (167, 436, 'Feat: Tiger Stance'), + (168, 437, 'Feat: Wolf Stance'), + (169, 443, 'Feat: Deflect Arrow'), + (170, 459, 'Feat: Ironblood Stance'), + (171, 453, 'Feat: Mountain Stronghold'), + (172, 461, 'Feat: Tangled Forest Stance'), + (173, 463, 'Feat: Wild Winds Initiate'), + (174, 472, 'Feat: Stance Savant'), + (175, 471, 'Feat: Meditative Focus'), + (176, NULL, 'at least two stances'), + --Ranger + (177, 493, 'Feat: Monster Hunter'), + (178, NULL, 'an animal companion'), + (179, NULL, 'expert in Crafting'), + (180, 843, 'Feat: Snare Crafting'), --In skill feats + (181, 506, 'Feat: Snare Specialist'), + (182, NULL, 'expert in Survival'), + (183, 780, 'Feat: Experienced Tracker'), --skill feat + (354, NULL, 'Feature: weapon specialization'),--354 currently, due to missing it before + (184, NULL, 'master in Crafting'), + (185, NULL, 'Feature: wild stride'), + (186, NULL, 'master in Survival'), + (187, 495, 'Feat: Favored Terrain'), + (188, NULL, 'master in Stealth'), + (189, 508, 'Feat: Mature Animal Compainion (Ranger)'), + (190, NULL, 'master in Nature'), + (191, 526, 'Feat: Double Prey'), + (192, 518, 'Feat: Wardens Boon'), + (193, 519, 'Feat: Camouflage'), + (194, 496, 'Feat: Hunters Aim'), + (195, 525, 'Feat: Distracting Shot'), + (196, 521, 'Feat: Master Monster Hunter'), + (197, 520, 'Feat: Incredible Companion(Ranger)'), + (198, NULL, 'Feature: hunters edge'), + (199, NULL, 'Feature: masterful hunter'), + (200, NULL, 'legendary in Perception'), + (201, 502, 'Feat: Far Shot'), + (202, NULL, 'legendary in Survival'), + (203, 531, 'Feat: Shared Prey'), + --Rogue + (204, NULL, 'trained in Intimidation'), + (205, NULL, 'Feature: ruffian racket'), + (206, NULL, 'Feature: scoundrel racket'), + (207, NULL, 'Feature: thief racket'), + (208, 563, 'Feat: Poison Weapon'), + (209, 550, 'Feat: Nimble Dodge'), + (210, NULL, 'Feature: sneak attack'), + (211, NULL, 'Feature: debilitating strike'), + (212, NULL, 'legendary in Acrobatics'), + (213, NULL, 'legendary in Deception'), + (214, 828, 'Feat: Quick Squeeze'), --Skill feat + (215, NULL, 'legendary in Stealth'), + (216, 577, 'Feat: Sly Striker'), + (217, 595, 'Feat: Perfect Distraction'), + --Sorcerer + (218, NULL, 'bloodline that grants arcane spells'), + (219, NULL, 'bloodline that grants divine spells'), + (220, NULL, 'bloodline that grants occult spells'), + (221, NULL, 'bloodline that grants primal spells'), + (222, NULL, 'bloodline spell'), + (223, NULL, 'dispel magic in your spell repetoire'), + (224, 602, 'Feat: CounterSpell'), + (225, NULL, 'Feat: Arcane Evolution or Feat: Occult Evolution'), + (226, NULL, 'Feat: Divine Evolution or Feat: Primal Evolution'), + (227, 621, 'Feat: Bloodline Focus'), + (228, 617, 'Feat: Crossblooded Evolution'), + (229, NULL, 'Feature: bloodline paragon'), + --Wizard + (230, NULL, 'Feature: arcane bond'), + (231, NULL, 'Feature: arcane school'), + (232, 640, 'Feat: Conceal Spell'), + (233, NULL, 'Feature: universalist wizard'), + (234, 636, 'Feat: Hand of the Apprentice'), + (235, 633, 'Feat: Counterspell'), + --(236, 826, 'Feat: Quick Recognize'),typo in book should be Quick Recognition + (237, NULL, 'Feature: archwizards spellcraft'), + --Alchemist Dedication + (238, NULL, 'Intelligence 14'), + (239, 665, 'Feat: Alchemist Dedication'), + (240, 666, 'Feat: Basic Concoction'), + (241, 669, 'Feat: Expert Alchemy'), + --Barbarian Dedication + (242, NULL, 'Constitution 14'), + (243, 672, 'Feat: Barbarian Dedication'), + (244, NULL, 'class granting no more Hit Points per level than 10 + your constituion modifier'), + (245, 673, 'Feat: Basic Fury'), + (246, NULL, 'expert in Fortitude saves'), + --Bard Dedication + (247, NULL, 'Charisma 14'), + (248, 677, 'Feat: Bard Dedication'), + (249, 679, "Feat: Basic Muse's Whispers"), + (250, 678, 'Feat: Basic Bard Spellcasting'), + (251, 684, 'Feat: Expert Bard Spellcasting'), + (252, NULL, 'legendary in Occultism'), + --Champion Dedication + (253, 868, 'Feat: Champion Dedication'), + (254, NULL, 'class granting no more Hit Points per level than 8 + your Constitution modifier'), + (255, 687, 'Feat: Basic Devotion'), + (256, NULL, 'expert in unarmored defense or one or more types of armor'), + --Cleric Dedication + (257, NULL, 'Wisdom 14'), + (258, 694, 'Feat: Cleric Dedication'), + (259, 696, 'Feat: Basic Dogma'), + (260, 695, 'Feat: Basic Cleric Spellcasting'), + (261, NULL, 'master in Religion'), + (262, 699, 'Feat: Expert Cleric Spellcasting'), + (263, NULL, 'legendary in Religion'), + --Druid Dedication + (264, NULL, 'Feat: Druid Dedication'), + (265, 703, 'Feat: Basic Wilding'), + (266, 702, 'Feat: Basic Druid Spellcasting'), + (267, 707, 'Feat: Expert Druid Spellcasting'), + --Fighter Dedication + (268, NULL, 'Dexterity 14'), + (269, 709, 'Feat: Fighter Dedication'), + (270, 710, 'Feat: Basic Maneuver'), + (271, NULL, 'expert in any kind of weapon or unarmed attack'), + --Monk Dedication + (272, 715, 'Feat: Monk Dedication'), + (273, 716, 'Feat: Basic Kata'), + (274, NULL, 'expert in at least one saving throw'), + --Ranger Dedication + (275, 722, 'Feat: Ranger Dedication'), + (276, 723, 'Feat: Basic Hunters Trick'), + (277, NULL, 'expert in Perception'), + --Rogue Dedication + (278, 727, 'Feat: Rogue Dedication'), + (279, 728, 'Feat: Basic Trickery'), + (280, NULL, 'trained in at least one skill and expert in at least one skill'), + (281, NULL, 'expert in Reflex saves'), + --Sorcerer Dedication + (282,734 , 'Feat: Sorcerer Dedication'), + (283, 736, 'Feat: Basic Blood Potency'), + (284, 735, 'Feat: Basic Sorcerer Spellcasting'), + (285, NULL, 'master in Arcana, Nature, Occultism, Religion, depending on bloodline'), + (286, 740, 'Feat: Expert Sorcerer Spellcasting'), + (287, NULL, 'legendary in Arcana, Nature, Occultism, Religion, depending on bloodline'), + -- Wizard Dedication + (288, 742, 'Feat: Wizard Dedication'), + (289, 744, 'Feat: Basic Arcana'), + (290, 745, 'Feat: Basic Wizard Spellcasting'), + (291, NULL, 'master in Arcana'), + (292, 748, 'Feat: Expert Wizard Spellcasting'), + (293, NULL, 'Feat: legendary in Arcana'), + --Feats Section + (294, NULL, 'Class Level 3 '), + (295, NULL, 'trained in Lore'), + (296, NULL, 'trained in Arcana'), + (297, NULL, 'trained in at least one skill'), + (298, NULL, 'expert in a skill with the Recall Knowledge action'), + (299, NULL, 'Assurance in that skill'), + (300, NULL, 'trained in Diplomacy'), + (301, NULL, 'Class Level 7'), + (302, NULL, 'Class Level 15'), + (303, NULL, 'master in Intimidation'), + (304, NULL, 'trained in Medicine'), + (305, NULL, 'trained in Acrobatics'), + (306, NULL, 'trained in Deception'), + (307, NULL, 'legendary in Athletics'), + (308, NULL, 'expert in Nature'), + (309, NULL, 'expert in Deception'), + (310, NULL, 'expert in Society'), + (311, 772, 'Feat: Courtly Graces'), + (312, NULL, 'expert in Medicine'), + (313, NULL, 'trained in Society'), + (314, NULL, 'legendary in Crafting'), + (315, NULL, 'trained in a skill with the Recall Knowledge action'), + (316, NULL, 'trained in Stealth'), + (317, NULL, 'trained in Survival'), + (318, NULL, 'Feat: trained in Performance'), + (319, 844, 'Feat: Specialty Crafting'), + (320, NULL, 'Class Level 11'), + (321, NULL, 'Charisma 16'), + (322, NULL, 'Strength 16'), + (323, NULL, 'expert in Intimidation'), + (324, NULL, 'master in Acrobatics'), + (325, NULL, 'legendary in Society'), + (326, 814, 'Feat: Multilingual'), + (327, NULL, 'legendary in Medicine'), + (328, NULL, 'legendary in Diplomacy'), + (329, NULL, 'legendary in Performance'), + (330, 862, 'Feat: Virtuosic Performer'), + (331, NULL, 'legendary in Lore'), + (332, NULL, 'legendary in Sneak'), + (333, 850, 'Feat: Swift Sneak'), + (334, NULL, 'legendary in Thievery'), + (335, 818, 'Feat: Pickpocket'), + (336, NULL, 'trained in Nature'), + (337, NULL, 'expert in Acrobatics'), + (338, NULL, 'trained in Occultism'), + (339, NULL, 'trained in Thievery'), + (340, NULL, 'trained in Arcana, Nature, Occultism, or Religion'), + (341, NULL, 'master in Arcana, Nature, Occultism, or Religion'), + (342, 834, 'Feat: Recognize Spell'), + (343, NULL, 'master in Thievery'), + (344, NULL, 'expert in Stealth'), + (345, NULL, 'legendary in Intimidation'), + (346, NULL, 'master in Diplomacy'), + (347, NULL, 'Intelligence 12'), + (348, NULL, 'master in Deception'), + (349, NULL, 'trained in Religion'), + (350, NULL, 'legendary in Arcana'), + (351, NULL, 'expert in Lore'), + (352, NULL, 'expert in Thievery'), + (236, 826, 'Feat: Quick Recognition'), + (355, NULL, 'expert in Arcana. Nature, Occultism, or Religion'), + (356, NULL, 'expert in Diplomacy'); INSERT INTO feats_featprereqs (feat_id, featprereqs_id) VALUES @@ -3968,3 +3968,4 @@ VALUES (867,99), (868,31), (868,65); + From ffe051674cd506a73279f724278a60a63bc68291 Mon Sep 17 00:00:00 2001 From: James Miller Date: Thu, 15 Aug 2019 00:01:18 -0500 Subject: [PATCH 10/10] tried fixing data/feats.sql, no dice, BUG!!!! --- data/feats.sql | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/data/feats.sql b/data/feats.sql index 6317511..52c0d33 100644 --- a/data/feats.sql +++ b/data/feats.sql @@ -869,6 +869,8 @@ VALUES (867,3,"57","Relentless Stalker","Your hunted prey cannot escape your relentless pursuit. Stride up to your Speed in tandem with the triggering creature, remaining adjacent to the foe throughout its movement until it stops moving or you run out of movement. You can ignore difficult terrain during this movement unless the difficult terrain is caused by a magical effect."), (868,3,"57","Wilderness Spotter","Select one type of terrain from the following list: aquatic, arctic, desert, forest, mountain, plains, sky, swamp, or underground. You can use Survival in place of Perception to roll initiative when in the selected terrain in a natural location (not a structure) even if you weren’t tracking or otherwise using"); + -- TODO This is failing foreign key constraint, meaning one of the second columns does NOT exist in feats most likely + INSERT INTO featprereqs (featprereqs_id, feat_id, descr) VALUES (1, NULL, 'Ancestry Level 1'), @@ -971,7 +973,7 @@ VALUES (86, NULL, 'Feature: divine ally'), (87, 228, 'Feat: Loyal Warhouse'), (88, 229, 'Feat: Shield Warden'), - (89, NULL, "Feature: Champion's Reaction"), --Paren + (89, NULL, 'Feature: Champion''s Reaction'), --Paren (90, 220, 'Feat: Fiendsbane Oath'), (91, 221, 'Feat: Shining Oath'), (92, NULL, 'Feature: exalt'), @@ -981,7 +983,7 @@ VALUES (97, 240, 'Feat: Radiant Blade Spirit'), --Cleric (98, NULL, 'diety with a simple favored weapon'), - (99, NULL, "trained with your deity's favored weapon"), --Paren + (99, NULL, 'trained with your deity''s favored weapon'), --Paren (100, NULL, 'Feature: harmful font'), (101, NULL, 'Feature: healing font'), (102, NULL, 'Feature: harmful font or healing font'), @@ -1126,7 +1128,7 @@ VALUES (233, NULL, 'Feature: universalist wizard'), (234, 636, 'Feat: Hand of the Apprentice'), (235, 633, 'Feat: Counterspell'), - --(236, 826, 'Feat: Quick Recognize'),typo in book should be Quick Recognition + -- TODO (236, 826, 'Feat: Quick Recognize'),typo in book should be Quick Recognition (237, NULL, 'Feature: archwizards spellcraft'), --Alchemist Dedication (238, NULL, 'Intelligence 14'),