squash merge: partially did arbiter data

merge-requests/36/merge
James R Miller 2019-08-25 22:33:15 -05:00
parent 6b61fd6883
commit b3b0967cb3
8 changed files with 108 additions and 44 deletions

View File

@ -39,5 +39,8 @@ VALUES
(109, 2, 1, '65', 'Shadowtongue', 'Nidalese, Shadow Plane creatures'),
(110, 2, 1, '65', 'Terran', 'Earth elemental creatures'),
-- Secret languages
(200, 3, 1, '65', 'Druidic', 'Druids');
(200, 3, 1, '65', 'Druidic', 'Druids'),
-- Bestiary Languages not in CRB
(300, 1, 2, '8', 'Utopian', 'Aeons');

42
data/monsters.sql 100644
View File

@ -0,0 +1,42 @@
-- -*- mode:sql sql-product:sqlite -*-
PRAGMA foreign_keys = ON;
BEGIN TRANSACTION;
INSERT INTO monsterflavortexttypes VALUES(1, 'Monster Category');
INSERT INTO monsterflavortexttypes VALUES(2, 'Advice and Rules');
INSERT INTO monsterflavortexttypes VALUES(3, 'Related Creatures');
INSERT INTO monsterflavortexttypes VALUES(4, 'Additional Lore');
INSERT INTO monsterflavortexttypes VALUES(5, 'Treasure and Rewards');
INSERT INTO monsterflavortexttypes VALUES(6, 'Locations');
COMMIT;
BEGIN TRANSACTION;
INSERT INTO monsterflavortexts VALUES(1, 1, 'Aeon', 'Aeons have always been the caretakers of reality and defenders of the natural order of balance. Each type of aeon takes on some form of duality in its manifestation and works either to shape the multiverse within the aspects of this duality in some way, or to correct imbalances to the perfect order of existence. Aeons can bring weal or woe when they appear in a region, and their machinations can raise a nation, raze it, or restore it from ruin. Their reasons are their own, and they rarely share their motivations with others— they simply create the results they insist through their strange envisioning communication are necessary to maintain the balance of the multiverse.\n\nAs a result of recent shifts in reality, aeons have begun to reassert a presence in the perfect planar city of Axis. To the aeons, this is merely the latest in a recurring cycle, albeit one that mortals have not yet borne witness to. Once regarded as an independent faction, the living machines known as inevitables are now revealed as having been agents of the aeons all along, and while inevitables have their own shared themes and features, they are very much living but constructed manifestations of the aeons war against imbalance—particularly with regard to how this war is waged against the forces of chaos.\n\nAeons have a name for this cyclic return, in which they welcome the industrious axiomites back to their fold and bring the inevitables once again under their control: the “Convergence.” At the onset of the Convergence, a council of pleroma aeons appeared in the Eternal City of Axis, where they revealed that axiomites were wayward aeons, split off long ago to pursue the act of creation. With the latest cycle of change it was time for the axiomites and their creations, the inevitables, to rejoin the aeon cause. While most axiomites and inevitables fell in line, realizing perhaps on a fundamental level of reality that what the aeons said was the truth, some refused to heed the call and waited for the wrath of the aeons — but that wrath has yet to come. The dual-natured aeons have responded to those who have declined in confusing ways. With some they treat and even bargain, while a handful of others they have destroyed, and a few have been exterminated by the axiomites and allied inevitables. But most of these quiet insurgents they leave alone, allowing these axiomites to continue to create in peace and the inevitables to continue with their duties. How—or if—this Convergence will end is as little understood as the aeons themselves.');
INSERT INTO monsterflavortexts VALUES(2, 4, 'Aeon Divinities', 'Whether the aeons serve an actual divinity, a philosophical concept, or merely a "supreme oneness" is a topic hotly debated by planar scholars. The aeons themselves are silent, referring to the being or concept as the Monad, a "condition of all." Regardless of what the Monad actually is, there certainly exists another category of powerful aeons---the primal inevitables, each a unique demigod with its own powers and goals. Relatively few primal inevitables remain today, for nearly three-quarters of their irreplaceable kind have fallen in the endless battle with the inexorable forces of entropy.');
COMMIT;
BEGIN TRANSACTION;
-- ARBITER
-- TODO +1 status to all saves versus magic?
INSERT INTO monsters VALUES(1, 0, 1, 'Arbiter', 1, 4, 7, 1, 16, 5, 7, 7, 22, 20, NULL, NULL, 40, NULL, 1, 4, 2, 0, 2, 1, 'These spherical inevitables are scouts and diplomats. Found throughout the multiverse, they have traditionally kept watch over on chaos and its agents. With the announcement of the Convergence, many arbiters now serve as go-betweens among the aeon alliance and its mortal associates.');
INSERT INTO monsters_monsterflavortexts (monster_id, monsterflavortext_id) VALUES(1, 1);
INSERT INTO monsters_monsterflavortexts (monster_id, monsterflavortext_id) VALUES(1, 2);
INSERT INTO monsters_senses (monster_id, sense_id) VALUES(1, 1); -- dark vision
INSERT INTO monsters_senses (monster_id, sense_id) VALUES(1, 100); -- detect alignment chaotic
INSERT INTO monsters_senses (monster_id, sense_id) VALUES(1, 101); -- locate inevitable
INSERT INTO monsters_langs (monster_id, lang_id) VALUES(1, 1); -- Common
INSERT INTO monsters_langs (monster_id, lang_id) VALUES(1, 104); -- Celestial
INSERT INTO monsters_langs (monster_id, lang_id) VALUES(1, 107); -- Infernal
INSERT INTO monsters_langs (monster_id, lang_id) VALUES(1, 300); -- Utopian
-- TODO immunities
-- TODO weaknesses
-- TODO resistances
-- TODO skills
-- TODO actions
-- TODO items?
COMMIT;

View File

@ -41,6 +41,13 @@ VALUES
(26, 1, 'TODO', 'Entropysense','A voidworm can anticipate the most likely presence of a creature through a supernatural insight into chaotic probabilities and chance. This grants it the ability to sense creatures within the listed range. A creature under the effects of nondetection or that is otherwise shielded from divinations and predictions cannot be noticed via entropy sense.'),
(27, 1, 'TODO', 'Websense','TODO'),
(28, 1, 'TODO', 'Heatsight','Heatsight is a precise sense that sees heat signatures.'),
(29, 1, 'TODO', 'Sinscent','This creature has scent against creatures whose nature reflects it''s sin. For example, wrathful sinspawn can scent creatures using rage effects. The GM should adjudicate what creatures a particular sinspawn can scent.');
(29, 1, 'TODO', 'Sinscent','This creature has scent against creatures whose nature reflects it''s sin. For example, wrathful sinspawn can scent creatures using rage effects. The GM should adjudicate what creatures a particular sinspawn can scent.'),
-- Minor senses from Bestiary; start at ID 100
(100, 2, '8', 'Detect Alignment (chaotic only)', NULL),
(101, 2, '8', 'Locate Inevitable', NULL);
;

View File

@ -61,3 +61,8 @@ NULL,
'2019',
1,
'Age of Ashes Player''s Guide © 2019, Paizo Inc.; Authors: James Jacobs with Amanda Hamon.');
BEGIN TRANSACTION;
INSERT INTO sourceentries VALUES(1, 1, 8, 9);
COMMIT;

View File

@ -25,6 +25,7 @@ sqlite3 pf2.db < schema/armor.sql
sqlite3 pf2.db < schema/gear.sql
sqlite3 pf2.db < schema/weapons.sql
sqlite3 pf2.db < schema/ammunition.sql
sqlite3 pf2.db < schema/monsters.sql
echo 'loading data'
sqlite3 pf2.db < data/sources.sql
sqlite3 pf2.db < data/alignments.sql
@ -51,6 +52,7 @@ sqlite3 pf2.db < data/gear.sql
sqlite3 pf2.db < data/heritages.sql
sqlite3 pf2.db < data/weapons.sql
sqlite3 pf2.db < data/ammunition.sql
sqlite3 pf2.db < data/monsters.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

View File

@ -13,17 +13,15 @@ PRAGMA foreign_keys = ON;
-- all with traits. Thoughts?
CREATE TABLE monsters (
monsters_id INTEGER PRIMARY KEY,
monster_id INTEGER PRIMARY KEY,
is_comty_use BOOLEAN NOT NULL, -- false = no community use policy req
sources_id INTEGER, -- old style source entries
sources_pages TEXT, -- old style source entries
sourceentries_id INTEGER, -- new style source entries
sourceentry_id INTEGER, -- new style source entries
-- monstercategories_id INTEGER, -- Humanoid etc..
"name" TEXT NOT NULL UNIQUE,
"level" INTEGER,
alignment_id INTEGER, -- i.e. NG, LE etc..
perception INTEGER,
sizes_id INTEGER, -- i.e. large medium small etc..
size_id INTEGER, -- i.e. large medium small etc..
ac INTEGER,
fortitude INTEGER,
reflex INTEGER,
@ -41,24 +39,18 @@ CREATE TABLE monsters (
int_mod INTEGER,
wis_mod INTEGER,
cha_mod INTEGER,
descr TEXT, -- The idea with this is for this to hold the entire stat block
-- text in it for those that want to do a simple query. I DO
-- intend to break out all the actions etc. into a separate table
-- and do many-to-many joins. Yes, this duplicates some data but
-- this is more for getting markdown formatting of the stat block
-- in one nice column.
FOREIGN KEY (alignments_id) REFERENCES alignments(alignments_id),
FOREIGN KEY (sizes_id) REFERENCES sizes(sizes_id),
FOREIGN KEY (sources_id) REFERENCES sources(sources_id),
FOREIGN KEY (sourceentries_id) REFERENCES sourceentries(sourceentries_id)
specific_monster_flavortext TEXT,
FOREIGN KEY (alignment_id) REFERENCES alignments(alignments_id),
FOREIGN KEY (size_id) REFERENCES sizes(size_id),
FOREIGN KEY (sourceentry_id) REFERENCES sourceentries(sourceentry_id)
);
CREATE TABLE monsterflavortexttypes (
monsterflavortexttypes_id INTEGER PRIMARY KEY,
monsterflavortexttype_id INTEGER PRIMARY KEY,
"name" TEXT NOT NULL UNIQUE
-- page 7 Bestiary
-- 'Monster Category' -- i.e. "Bear"
-- 'Specific Monster' -- i.e. "Grizzly Bear"
-- THE FOLLOWING ARE THE SIDEBAR CONTENT FROM BESTIARY
-- 'Advice and Rules'
-- 'Related Creatures'
-- 'Additional Lore'
@ -67,19 +59,27 @@ CREATE TABLE monsterflavortexttypes (
);
CREATE TABLE monsterflavortexts (
monsterflavortexts_id INTEGER PRIMARY KEY,
monsterflavortexttypes_id INTEGER,
monsterflavortext_id INTEGER PRIMARY KEY,
monsterflavortexttype_id INTEGER,
heading TEXT NOT NULL,
mft_text TEXT NOT NULL,
FOREIGN KEY (monsterflavortexttypes_id) REFERENCES monsterflavortexttypes(monsterflavortexttype_id)
FOREIGN KEY (monsterflavortexttype_id) REFERENCES monsterflavortexttypes(monsterflavortexttype_id)
);
CREATE TABLE monsters_monsterflavortexts (
id INTEGER PRIMARY KEY,
monster_id,
monsterflavortext_id,
FOREIGN KEY (monster_id) REFERENCES monsters(monster_id),
FOREIGN KEY (monsterflavortext_id) REFERENCES monsterflavortexts(monsterflavortext_id)
);
CREATE TABLE monsters_senses (
id INTEGER PRIMARY KEY,
monsters_id INTEGER NOT NULL,
immunities_id INTEGER NOT NULL,
FOREIGN KEY (monsters_id) REFERENCES monsters(monsters_id),
FOREIGN KEY (senses_id) REFERENCES senses(senses_id)
monster_id INTEGER NOT NULL,
sense_id INTEGER NOT NULL,
FOREIGN KEY (monster_id) REFERENCES monsters(monster_id),
FOREIGN KEY (sense_id) REFERENCES senses(senses_id)
);
CREATE TABLE monsters_immunities (
@ -92,33 +92,38 @@ CREATE TABLE monsters_immunities (
CREATE TABLE monsters_skills (
id INTEGER PRIMARY KEY,
monsters_id INTEGER NOT NULL,
monster_id INTEGER NOT NULL,
skills_id INTEGER NOT NULL, -- will ID the specific skill
skill_mod INTEGER NOT NULL, -- will hold the modifier value
UNIQUE(monsters_id, skills_id), -- so we don't get duplicate rows for a specific monster
FOREIGN KEY (monsters_id) REFERENCES monsters(monsters_id),
UNIQUE(monster_id, skills_id), -- so we don't get duplicate rows for a specific monster
FOREIGN KEY (monster_id) REFERENCES monsters(monster_id),
FOREIGN KEY (skills_id) REFERENCES skills(skills_id)
);
CREATE TABLE monsters_traits (
id INTEGER PRIMARY KEY,
monsters_id INTEGER NOT NULL,
monster_id INTEGER NOT NULL,
trait_id INTEGER NOT NULL,
FOREIGN KEY (monsters_id) REFERENCES monsters(monsters_id),
FOREIGN KEY (traits_id) REFERENCES traits(trait_id)
FOREIGN KEY (monster_id) REFERENCES monsters(monster_id),
FOREIGN KEY (trait_id) REFERENCES traits(trait_id)
);
CREATE TABLE monsters_langs (
id INTEGER PRIMARY KEY,
monster_id INTEGER NOT NULL,
lang_id INTEGER NOT NULL,
FOREIGN KEY (monster_id) REFERENCES monsters(monster_id),
FOREIGN KEY (lang_id) REFERENCES langs(lang_id)
);
-- TODO does this need to be separate table for monsters only or share the main
-- actions table
CREATE TABLE monsteractions (
monsteractions_id INTEGER PRIMARY KEY,
"name" TEXT,
monsteraction_id INTEGER PRIMARY KEY,
"name" TEXT
-- TODO
);
CREATE TABLE monsters_actions (
id INTEGER PRIMARY KEY,
monsters_id INTEGER NOT NULL,
actions_id INTEGER NOT NULL, -- TODO actions table? or monsteractions table?
monster_id INTEGER NOT NULL,
monsteraction_id INTEGER NOT NULL
);

View File

@ -7,6 +7,6 @@ CREATE TABLE senses (
sources_id INTEGER,
sources_pages TEXT,
short_name TEXT NOT NULL UNIQUE,
description TEXT NOT NULL,
description TEXT,
FOREIGN KEY (sources_id) REFERENCES sources(sources_id)
);

View File

@ -16,7 +16,7 @@ CREATE TABLE sources (
);
CREATE TABLE sourceentries (
sourceentries_id INTEGER PRIMARY KEY,
sourceentry_id INTEGER PRIMARY KEY,
sources_id INTEGER NOT NULL,
page_start INTEGER,
page_stop INTEGER,
@ -26,10 +26,10 @@ CREATE TABLE sourceentries (
CREATE TABLE monsters_sourceentries (
id INTEGER PRIMARY KEY,
monsters_id INTEGER NOT NULL,
sourceentries_id INTEGER NOT NULL,
FOREIGN KEY (monsters_id) REFERENCES monsters(monsters_id),
FOREIGN KEY (sourceentries_id) REFERENCES sourceentries(sourceentries_id)
monster_id INTEGER NOT NULL,
sourceentry_id INTEGER NOT NULL,
FOREIGN KEY (monster_id) REFERENCES monsters(monster_id),
FOREIGN KEY (sourceentry_id) REFERENCES sourceentries(sourceentry_id)
);
-- TODO add in new many-to-many tables for the various things we want to have sources be listed this way