Merge branch 'begin-yaml-transition'
commit
eda0978261
|
@ -0,0 +1,609 @@
|
||||||
|
# NOTE: actioncategory assumes a single source entry
|
||||||
|
actioncategory:
|
||||||
|
- name: Basic
|
||||||
|
descr: Basic actions represent common tasks like moving around, attacking, and helping others. As such, every creature can use basic actions except in some extreme circumstances, and many of those actions are used very frequently. Most notably, you’ll use Interact, Step, Stride, and Strike a great deal. Many feats and other actions call upon you to use one of these basic actions or modify them to produce different effects. For example, a more complex action might let you Stride up to double your Speed instead of just up to your Speed, and a large number of activities include a Strike.
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 469
|
||||||
|
page_stop: 469
|
||||||
|
- name: Specialty Basic
|
||||||
|
descr: These actions are useful under specific circumstances. Some require you to have a special movement type.
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 472
|
||||||
|
page_stop: 472
|
||||||
|
# NOTE: action assumes a single source entry
|
||||||
|
action:
|
||||||
|
- actioncategory: Basic
|
||||||
|
actioncost_name: Free Action
|
||||||
|
descr: You try to help your ally with a task. To use this reaction, you must first
|
||||||
|
prepare to help, usually by using an action during your turn. You must explain
|
||||||
|
to the GM exactly how you’re trying to help, and they determine whether you can
|
||||||
|
Aid your ally.\n\nWhen you use your Aid reaction, attempt a skill check or attack
|
||||||
|
roll of a type decided by the GM. The typical DC is 20, but the GM might adjust
|
||||||
|
this DC for particularly hard or easy tasks. The GM can add any relevant traits
|
||||||
|
to your preparatory action or to your Aid reaction depending on the situation,
|
||||||
|
or even allow you to Aid checks other than skill checks and attack rolls.\n\n**Critical
|
||||||
|
Success** You grant your ally a +2 circumstance bonus to,the triggering check.
|
||||||
|
If you’re a master with the check you,attempted, the bonus is +3, and if you’re
|
||||||
|
legendary, it’s +4.\n**Success** You grant your ally a +1 circumstance bonus to
|
||||||
|
the triggering check.\n**Critical Failure** Your ally takes a 1 circumstance penalty
|
||||||
|
to the triggering check.
|
||||||
|
name: Aid
|
||||||
|
req: The ally is willing to accept your aid, and you have prepared to help (see
|
||||||
|
description).
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 470
|
||||||
|
page_stop: 470
|
||||||
|
trait: null
|
||||||
|
trigger: An ally is about to use an action that requires a skill check or attack
|
||||||
|
roll.
|
||||||
|
- actioncategory: Basic
|
||||||
|
actioncost_name: Single Action
|
||||||
|
descr: You move 5 feet by crawling and continue to stay prone.
|
||||||
|
name: Crawl
|
||||||
|
req: You are prone and your Speed is at least 10 feet.
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 470
|
||||||
|
page_stop: 470
|
||||||
|
trait:
|
||||||
|
- Move
|
||||||
|
trigger: null
|
||||||
|
- actioncategory: Basic
|
||||||
|
actioncost_name: Free Action
|
||||||
|
descr: You wait for the right moment to act. The rest of your turn doesn’t happen
|
||||||
|
yet. Instead, you’re removed from the initiative order. You can return to the
|
||||||
|
initiative order as a free action triggered by the end of any other creature’s
|
||||||
|
turn. This permanently changes your initiative to the new position. You can’t
|
||||||
|
use reactions until you return to the initiative order. If you Delay an entire
|
||||||
|
round without returning to the initiative order, the actions from the Delayed
|
||||||
|
turn are lost, your initiative doesn’t change, and your next turn occurs at your
|
||||||
|
original position in the initiative order.\n\nWhen you Delay, any persistent damage
|
||||||
|
or other negative effects that normally occur at the start or end of your turn
|
||||||
|
occur immediately when you use the Delay action. Any beneficial effects that would
|
||||||
|
end at any point during your turn also end. The GM might determine that other
|
||||||
|
effects end when you Delay as well. Essentially, you can’t Delay to avoid negative
|
||||||
|
consequences that would happen on your turn or to extend beneficial effects that
|
||||||
|
would end on your turn.
|
||||||
|
name: Delay
|
||||||
|
req: null
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 470
|
||||||
|
page_stop: 470
|
||||||
|
trait: null
|
||||||
|
trigger: Your turn begins.
|
||||||
|
- actioncategory: Basic
|
||||||
|
actioncost_name: Single Action
|
||||||
|
descr: You fall prone.
|
||||||
|
name: Drop Prone
|
||||||
|
req: null
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 470
|
||||||
|
page_stop: 470
|
||||||
|
trait:
|
||||||
|
- Move
|
||||||
|
trigger: null
|
||||||
|
- actioncategory: Basic
|
||||||
|
actioncost_name: Single Action
|
||||||
|
descr: You attempt to escape from being grabbed, immobilized, or restrained. Choose
|
||||||
|
one creature, object, spell effect, hazard, or other impediment imposing any of
|
||||||
|
those conditions on you. Attempt a check using your unarmed attack modifier against
|
||||||
|
the DC of the effect. This is typically the Athletics DC of a creature grabbing
|
||||||
|
you, the Thievery DC of a creature who tied you up, the spell DC for a spell effect,
|
||||||
|
or the listed Escape DC of an object, hazard, or other impediment. You can attempt
|
||||||
|
an Acrobatics or Athletics check instead of using your attack modifier if you
|
||||||
|
choose (but this action still has the attack trait).\n\n**Critical Success** You
|
||||||
|
get free and remove the grabbed, immobilized, and restrained conditions imposed
|
||||||
|
by your chosen target. You can then Stride up to 5 feet.\n**Success** You get
|
||||||
|
free and remove the grabbed, immobilized, and restrained conditions imposed by
|
||||||
|
your chosen target.\n**Critical Failure** You don’t get free, and you can’t attempt
|
||||||
|
to Escape again until your next turn.
|
||||||
|
name: Escape
|
||||||
|
req: null
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 470
|
||||||
|
page_stop: 470
|
||||||
|
trait:
|
||||||
|
- Attack
|
||||||
|
trigger: null
|
||||||
|
- actioncategory: Basic
|
||||||
|
actioncost_name: Single Action
|
||||||
|
descr: You use your hand or hands to manipulate an object or the terrain. You can
|
||||||
|
grab an unattended or stored object, open a door, or produce some similar effect.
|
||||||
|
You might have to attempt a skill check to determine if your Interact action was
|
||||||
|
successful.
|
||||||
|
name: Interact
|
||||||
|
req: null
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 470
|
||||||
|
page_stop: 470
|
||||||
|
trait:
|
||||||
|
- Manipulate
|
||||||
|
trigger: null
|
||||||
|
- actioncategory: Basic
|
||||||
|
actioncost_name: Varies
|
||||||
|
descr: 'You invest your energy in an item with the invested trait as you don it.
|
||||||
|
This process requires 1 or more Interact actions, usually taking the same amount
|
||||||
|
of time it takes to don the item. Once you’ve Invested the Item, you benefit from
|
||||||
|
its constant magical abilities as long as you meet its other requirements (for
|
||||||
|
most invested items, the only other requirement is that you must be wearing the
|
||||||
|
item). This investiture lasts until you remove the item.\n\n You can invest no
|
||||||
|
more than 10 items per day. If you remove an invested item, it loses its investiture.
|
||||||
|
The item still counts against your daily limit after it loses its investiture.
|
||||||
|
You reset the limit during your daily preparations, at which point you Invest
|
||||||
|
your Items anew. If you’re still wearing items you had invested the previous day,
|
||||||
|
you can typically keep them invested on the new day, but they still count against
|
||||||
|
your limit. '
|
||||||
|
name: Invest an Item
|
||||||
|
req: null
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 531
|
||||||
|
page_stop: 531
|
||||||
|
trait: null
|
||||||
|
trigger: null
|
||||||
|
- actioncategory: Basic
|
||||||
|
actioncost_name: Single Action
|
||||||
|
descr: You take a careful, short jump. You can Leap up to 10 feet horizontally if
|
||||||
|
your Speed is at least 15 feet, or up to 15 feet horizontally if your Speed is
|
||||||
|
at least 30 feet. You land in the space where your Leap ends (meaning you can
|
||||||
|
typically clear a 5-foot gap, or a 10-foot gap if your Speed is 30 feet or more).\n\nIf
|
||||||
|
you Leap vertically, you can move up to 3 feet vertically and 5 feet horizontally
|
||||||
|
onto an elevated surface.\n\nJumping a greater distance requires using the Athletics
|
||||||
|
skill.
|
||||||
|
name: Leap
|
||||||
|
req: null
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 470
|
||||||
|
page_stop: 470
|
||||||
|
trait:
|
||||||
|
- Move
|
||||||
|
trigger: null
|
||||||
|
- actioncategory: Basic
|
||||||
|
actioncost_name: Two Actions
|
||||||
|
descr: You prepare to use an action that will occur outside your turn. Choose a
|
||||||
|
single action or free action you can use, and designate a trigger. Your turn then
|
||||||
|
ends. If the trigger you designated occurs before the start of your next turn,
|
||||||
|
you can use the chosen action as a reaction (provided you still meet the requirements
|
||||||
|
to use it). You can’t Ready a free action that already has a trigger.\n\nIf you
|
||||||
|
have a multiple attack penalty and your readied action is an attack action, your
|
||||||
|
readied attack takes the multiple attack penalty you had at the time you used
|
||||||
|
Ready. This is one of the few times the multiple attack penalty applies when it’s
|
||||||
|
not your turn.
|
||||||
|
name: Ready
|
||||||
|
req: null
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 470
|
||||||
|
page_stop: 470
|
||||||
|
trait:
|
||||||
|
- Concentrate
|
||||||
|
trigger: null
|
||||||
|
- actioncategory: Basic
|
||||||
|
actioncost_name: Free Action
|
||||||
|
descr: You release something you’re holding in your hand or hands. This might mean
|
||||||
|
dropping an item, removing one hand from your weapon while continuing to hold
|
||||||
|
it in another hand, releasing a rope suspending a chandelier, or performing a
|
||||||
|
similar action. Unlike most manipulate actions, Release does not trigger reactions
|
||||||
|
that can be triggered by actions with the manipulate trait (such as Attack of
|
||||||
|
Opportunity).\n\nIf you want to prepare to Release something outside of your turn,
|
||||||
|
use the Ready activity.
|
||||||
|
name: Release
|
||||||
|
req: null
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 470
|
||||||
|
page_stop: 470
|
||||||
|
trait:
|
||||||
|
- Manipulate
|
||||||
|
trigger: null
|
||||||
|
- actioncategory: Basic
|
||||||
|
actioncost_name: Single Action
|
||||||
|
descr: You scan an area for signs of creatures or objects. If you’re looking for
|
||||||
|
creatures, choose an area you’re scanning. If precision is necessary, the GM can
|
||||||
|
have you select a 30-foot cone or a 15-foot burst within line of sight. You might
|
||||||
|
take a penalty if you choose an area that’s far away.\n\nIf you’re using Seek
|
||||||
|
to search for objects (including secret doors and hazards), you search up to a
|
||||||
|
10-foot square adjacent to you. The GM might determine you need to Seek as an
|
||||||
|
activity, taking more actions or even minutes or hours if you’re searching a particularly
|
||||||
|
cluttered area.\n\nThe GM attempts a single secret Perception check for you and
|
||||||
|
compares the result to the Stealth DCs of any undetected or hidden creatures in
|
||||||
|
the area or the DC to detect each object in the area (as determined by the GM
|
||||||
|
or by someone Concealing the Object). A creature you detect might remain hidden,
|
||||||
|
rather than becoming observed, if you’re using an imprecise sense or if an effect
|
||||||
|
(such as invisibility) prevents the subject from being observed.\n\n**Critical
|
||||||
|
Success** If you were searching for creatures, any undetected or hidden creature
|
||||||
|
you critically succeeded against becomes observed by you. If you were searching
|
||||||
|
for an object, you learn its location.\n**Success** If you were searching for
|
||||||
|
creatures, any undetected creature you succeeded against becomes hidden from you
|
||||||
|
instead of undetected, and any hidden creature you succeeded against becomes observed
|
||||||
|
by you. If you were searching for an object, you learn its location or get a clue
|
||||||
|
to its whereabouts, as determined by the GM.
|
||||||
|
name: Seek
|
||||||
|
req: null
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 471
|
||||||
|
page_stop: 471
|
||||||
|
trait:
|
||||||
|
- Concentrate
|
||||||
|
- Secret
|
||||||
|
trigger: null
|
||||||
|
- actioncategory: Basic
|
||||||
|
actioncost_name: Single Action
|
||||||
|
descr: You try to tell whether a creature’s behavior is abnormal. Choose one creature,
|
||||||
|
and assess it for odd body language, signs of nervousness, and other indicators
|
||||||
|
that it might be trying to deceive someone. The GM attempts a single secret Perception
|
||||||
|
check for you and compares the result to the Deception DC of the creature, the
|
||||||
|
DC of a spell af ecting the creature’s mental state, or another appropriate DC
|
||||||
|
determined by the GM. You typically can’t try to Sense the Motive of the same
|
||||||
|
creature again until the situation changes significantly.\n\n**Critical Success**
|
||||||
|
You determine the creature’s true intentions and get a solid idea of any mental
|
||||||
|
magic affecting it.\n**Success** You can tell whether the creature is behaving
|
||||||
|
normally, but you don’t know its exact intentions or what magic might be affecting
|
||||||
|
it.\n**Failure** You detect what a deceptive creature wants you to believe. If
|
||||||
|
they’re not being deceptive, you believe they’re behaving normally.\n**Critical
|
||||||
|
Failure** You get a false sense of the creature’s intentions.
|
||||||
|
name: Sense Motive
|
||||||
|
req: null
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 471
|
||||||
|
page_stop: 471
|
||||||
|
trait:
|
||||||
|
- Concentrate
|
||||||
|
- Secret
|
||||||
|
trigger: null
|
||||||
|
- actioncategory: Basic
|
||||||
|
actioncost_name: Single Action
|
||||||
|
descr: You stand up from prone.
|
||||||
|
name: Stand
|
||||||
|
req: null
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 471
|
||||||
|
page_stop: 471
|
||||||
|
trait:
|
||||||
|
- Move
|
||||||
|
trigger: null
|
||||||
|
- actioncategory: Basic
|
||||||
|
actioncost_name: Single Action
|
||||||
|
descr: You carefully move 5 feet. Unlike most types of movement, Stepping doesn’t
|
||||||
|
trigger reactions, such as Attacks of Opportunity, that can be triggered by move
|
||||||
|
actions or upon leaving or entering a square.\n\nYou can’t Step into difficult
|
||||||
|
terrain (page 475 CRB), and you can’t Step using a Speed other than your land
|
||||||
|
Speed.
|
||||||
|
name: Step
|
||||||
|
req: Your Speed is at least 10 feet.
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 471
|
||||||
|
page_stop: 471
|
||||||
|
trait:
|
||||||
|
- Move
|
||||||
|
trigger: null
|
||||||
|
- actioncategory: Basic
|
||||||
|
actioncost_name: Single Action
|
||||||
|
descr: You move up to your Speed (page 463 CRB)
|
||||||
|
name: Stride
|
||||||
|
req: null
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 471
|
||||||
|
page_stop: 471
|
||||||
|
trait:
|
||||||
|
- Move
|
||||||
|
trigger: null
|
||||||
|
- actioncategory: Basic
|
||||||
|
actioncost_name: Single Action
|
||||||
|
descr: You attack with a weapon you’re wielding or with an unarmed attack, targeting
|
||||||
|
one creature within your reach (for a melee attack) or within range (for a ranged
|
||||||
|
attack). Roll the attack roll for the weapon or unarmed attack you are using,
|
||||||
|
and compare the result to the target creature’s AC to determine the effect. See
|
||||||
|
Attack Rolls on page 446 CRB and Damage on page 450 CRB for details on calculating
|
||||||
|
your attack and damage rolls.
|
||||||
|
name: Strike
|
||||||
|
req: null
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 471
|
||||||
|
page_stop: 471
|
||||||
|
trait:
|
||||||
|
- Attack
|
||||||
|
trigger: null
|
||||||
|
- actioncategory: Basic
|
||||||
|
actioncost_name: Single Action
|
||||||
|
descr: You press yourself against a wall or duck behind an obstacle to take better
|
||||||
|
advantage of cover (page 477 CRB). If you would have standard cover, you instead
|
||||||
|
gain greater cover, which provides a +4 circumstance bonus to AC; to Reflex saves
|
||||||
|
against area effects; and to Stealth checks to Hide, Sneak, or otherwise avoid
|
||||||
|
detection. Otherwise, you gain the benefits of standard cover (a +2 circumstance
|
||||||
|
bonus instead). This lasts until you move from your current space, use an attack
|
||||||
|
action, become unconscious, or end this effect as a free action.
|
||||||
|
name: Take Cover
|
||||||
|
req: You are benfitting from cover, are near a feature that allows you to take cover,
|
||||||
|
or you are prone.
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 471
|
||||||
|
page_stop: 471
|
||||||
|
trait: null
|
||||||
|
trigger: null
|
||||||
|
- actioncategory: Specialty Basic
|
||||||
|
actioncost_name: Varies
|
||||||
|
descr: You call forth the effect of an item by properly activating it. This is a
|
||||||
|
special activity that takes a variable number of actions, as listed in the item’s
|
||||||
|
stat block.\n\nSome items can be activated as a reaction or free action. In this
|
||||||
|
case, you Activate the Item as a reaction or free action (as appropriate) instead
|
||||||
|
of as an activity. Such cases are noted in the item’s Activate entry in its stat
|
||||||
|
blockfor example, “Activate Reaction command.”\n\n**Long Activation Times** Some
|
||||||
|
items take minutes or hours to activate. The Activate an Item activity for these
|
||||||
|
items includes a mix of the listed activation components, but it’s not necessary
|
||||||
|
to break down which one you’re providing at a given time. You can’t use other
|
||||||
|
actions or reactions while activating such an item, though at the GM’s discretion,
|
||||||
|
you might be able to speak a few sentences. As with other activities that take
|
||||||
|
a long time, these activations have the exploration trait, and you can’t activate
|
||||||
|
them in an encounter. If combat breaks out while you’re activating one, your activation
|
||||||
|
is disrupted (see the Disrupting Activations sidebar).\n\n**Activation Components**
|
||||||
|
Each activation entry lists any components involved in the activation after the
|
||||||
|
action icons or text, such as “Single Action command.” The activation components,
|
||||||
|
described below, add traits (listed in parentheses) and requirements to the activation.
|
||||||
|
If you can’t provide the components, you fail to Activate the Item.\n\n- Command
|
||||||
|
(auditory, concentrate)\n- Envision (concentrate)\n- Interact (manipulate)\n-
|
||||||
|
Cast a Spell\n\n#### Activation Components\n\nAn item’s activate entry lists the
|
||||||
|
components required to activate its abilities. Each component adds certain traits
|
||||||
|
to the Activate an Item activity, and some components have special requirements.
|
||||||
|
The components that appear in this book are listed below.\n\n#####Command\n\nThis
|
||||||
|
component is a specific utterance you must make in a loud and strong voice. Activate
|
||||||
|
an Item gains the auditory and concentrate traits. You must be able to speak to
|
||||||
|
provide this component.\n\n##### Envision\n\nThis component is a specific image
|
||||||
|
or phenomenon you need to imagine. Activate an Item gains the concentrate trait.\n\n#####
|
||||||
|
Interact\n\nThis component works like the Interact basic action. Activate an Item
|
||||||
|
gains the manipulate trait and requires you to use your hands, just like with
|
||||||
|
any Interact action.\n\n##### Cast a Spell\n\nIf an item lists “Cast a Spell”
|
||||||
|
after “Activate,” the activation requires you to use the Cast a Spell activity
|
||||||
|
to Activate the Item. This happens when the item replicates a spell. You must
|
||||||
|
have a spellcasting class feature to Activate an Item with this activation component.
|
||||||
|
If the item can be used for a specific spell, the action icon for that spell is
|
||||||
|
provided. If it’s an item like a staff, which can be used for many spells, the
|
||||||
|
icon is omitted, and you must refer to each spell to determine which actions you
|
||||||
|
must spend to Activate the Item to cast it.\n\n In this case, Activate an Item
|
||||||
|
gains all the traits from the relevant components of the Cast a Spell activity.
|
||||||
|
name: Activate an Item
|
||||||
|
req: You can Activate an Item with the invested trait only if it’s invested by you.
|
||||||
|
If the item requires you to Interact with it, you must be wielding it (if it’s
|
||||||
|
a held item) or touching it with a free hand (if it’s another type of item).
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 532
|
||||||
|
page_stop: 532
|
||||||
|
trait: null
|
||||||
|
trigger: null
|
||||||
|
- actioncategory: Specialty Basic
|
||||||
|
actioncost_name: Free Action
|
||||||
|
descr: You attempt an Acrobatics check to slow your fall. The DC is typically 15,
|
||||||
|
but it might be higher due to air turbulence or other circumstances.\n\nSuccess
|
||||||
|
You fall gently, taking no damage from the fall.
|
||||||
|
name: Arrest a Fall
|
||||||
|
req: You have a fly Speed.
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 472
|
||||||
|
page_stop: 472
|
||||||
|
trait: null
|
||||||
|
trigger: You fall.
|
||||||
|
- actioncategory: Specialty Basic
|
||||||
|
actioncost_name: Single Action
|
||||||
|
descr: You avert your gaze from danger. You gain a +2 circumstance bonus to saves
|
||||||
|
against visual abilities that require you to look at a creature or object, such
|
||||||
|
as a medusa’s petrifying gaze. Your gaze remains averted until the start of your
|
||||||
|
next turn.
|
||||||
|
name: Avert Gaze
|
||||||
|
req: null
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 472
|
||||||
|
page_stop: 472
|
||||||
|
trait: null
|
||||||
|
trigger: null
|
||||||
|
- actioncategory: Specialty Basic
|
||||||
|
actioncost_name: Single Action
|
||||||
|
descr: You dig your way through dirt, sand, or a similar loose material at a rate
|
||||||
|
up to your burrow Speed. You can’t burrow through rock or other substances denser
|
||||||
|
than dirt unless you have an ability that allows you to do so.
|
||||||
|
name: Burrow
|
||||||
|
req: You have a burrow Speed.
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 472
|
||||||
|
page_stop: 472
|
||||||
|
trait:
|
||||||
|
- Move
|
||||||
|
trigger: null
|
||||||
|
- actioncategory: Specialty Basic
|
||||||
|
actioncost_name: Varies
|
||||||
|
descr: "You cast a spell you have prepared or in your repertoire. Casting a Spell
|
||||||
|
is a special activity that takes a variable number of actions depending on the
|
||||||
|
spell, as listed in each spell’s stat block. As soon as the spellcasting actions
|
||||||
|
are complete, the spell effect occurs.\n\nSome spells are cast as a reaction or
|
||||||
|
free action. In those cases, you Cast the Spell as a reaction or free action (as
|
||||||
|
appropriate) instead of as an activity. Such cases will be noted in the spell’s
|
||||||
|
stat blockfor example, \"[reaction] verbal.\"\n\n**Long Casting Times** Some spells
|
||||||
|
take minutes or hours to cast. The Cast a Spell activity for these spells includes
|
||||||
|
a mix of the listed spell components, but it’s not necessary to break down which
|
||||||
|
one you’re providing at a given time. You can’t use other actions or reactions
|
||||||
|
while casting such a spell, though at the GM’s discretion, you might be able to
|
||||||
|
speak a few sentences. As with other activities that take a long time, these spells
|
||||||
|
have the exploration trait, and you can’t cast them in an encounter. If combat
|
||||||
|
breaks out while you’re casting one, your spell is disrupted (see Disrupted and
|
||||||
|
Lost Spells on page 303 CRB).\n\n**Spell Components** Each spell lists the spell
|
||||||
|
components required to cast it after the action icons or text, such as \"[three-actions]
|
||||||
|
material, somatic, verbal.\" The spell components, described in detail below, add
|
||||||
|
traits and requirements to the Cast a Spell activity. If you can’t provide the
|
||||||
|
components, you fail to Cast the Spell.\n\n- Material (manipulate)\n- Somatic
|
||||||
|
(manipulate)\n- Verbal (concentrate)\n- Focus (manipulate)\n\n**Disrupted and
|
||||||
|
Lost Spells** Some abilities and spells can disrupt a spell, causing it to have
|
||||||
|
no effect and be lost. When you lose a spell, you’ve already expended the spell
|
||||||
|
slot, spent the spell’s costs and actions, and used the Cast a Spell activity.
|
||||||
|
If a spell is disrupted during a Sustain a Spell action, the spell immediately
|
||||||
|
ends. The full rules for disrupting actions appear on page 462 CRB."
|
||||||
|
name: Cast a Spell
|
||||||
|
req: null
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 302
|
||||||
|
page_stop: 302
|
||||||
|
trait: null
|
||||||
|
trigger: null
|
||||||
|
- actioncategory: Specialty Basic
|
||||||
|
actioncost_name: Single Action
|
||||||
|
descr: You end one spell effect or magic item effect. This must be an effect you
|
||||||
|
are allowed to dismiss, as defined by the spell or item. Dismissal might end the
|
||||||
|
effect entirely or might end it just for a certain target or targets, depending
|
||||||
|
on the spell or item.
|
||||||
|
name: Dismiss
|
||||||
|
req: null
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 305
|
||||||
|
page_stop: 305
|
||||||
|
trait:
|
||||||
|
- Concentrate
|
||||||
|
trigger: null
|
||||||
|
- actioncategory: Specialty Basic
|
||||||
|
actioncost_name: Single Action
|
||||||
|
descr: You move through the air up to your fly Speed. Moving upward (straight up
|
||||||
|
or diagonally) uses the rules for moving through difficult terrain. You can move
|
||||||
|
straight down 10 feet for every 5 feet of movement you spend. If you Fly to the
|
||||||
|
ground, you don’t take falling damage. You can use an action to Fly 0 feet to
|
||||||
|
hover in place. If you’re airborne at the end of your turn and didn’t use a Fly
|
||||||
|
action this round, you fall.
|
||||||
|
name: Fly
|
||||||
|
req: You have a fly Speed.
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 472
|
||||||
|
page_stop: 472
|
||||||
|
trait:
|
||||||
|
- Move
|
||||||
|
trigger: null
|
||||||
|
- actioncategory: Specialty Basic
|
||||||
|
actioncost_name: Free Action
|
||||||
|
descr: When you fall off or past an edge or other handhold, you can try to grab
|
||||||
|
it, potentially stopping your fall. You must succeed at a Reflex save, usually
|
||||||
|
at the Climb DC. If you grab the edge or handhold, you can then Climb up using
|
||||||
|
Athletics.\n\n**Critical Success** You grab the edge or handhold, whether or not
|
||||||
|
you have a hand free, typically by using a suitable held item to catch yourself
|
||||||
|
(catching a battle axe on a ledge, for example). You still take damage from the
|
||||||
|
distance fallen so far, but you treat the fall as though it were 30 feet shorter.\n**Success**
|
||||||
|
If you have at least one hand free, you grab the edge or handhold, stopping your
|
||||||
|
fall. You still take damage from the distance fallen so far, but you treat the
|
||||||
|
fall as though it were 20 feet shorter. If you have no hands free, you continue
|
||||||
|
to fall as if you had failed the check.\n**Critical Failure** You continue to
|
||||||
|
fall, and if you’ve fallen 20 feet or more before you use this reaction, you take
|
||||||
|
10 bludgeoning damage from the impact for every 20 feet fallen.
|
||||||
|
name: Grab an Edge
|
||||||
|
req: Your hands are not tied behind your back or otherwise restrained.
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 472
|
||||||
|
page_stop: 472
|
||||||
|
trait:
|
||||||
|
- Manipulate
|
||||||
|
trigger: You fall from or past an edge or handhold.
|
||||||
|
- actioncategory: Specialty Basic
|
||||||
|
actioncost_name: Single Action
|
||||||
|
descr: You move onto the creature and ride it. If you’re already mounted, you can
|
||||||
|
instead use this action to dismount, moving of the mount into a space adjacent
|
||||||
|
to it.
|
||||||
|
name: Mount
|
||||||
|
req: You are adjacent to a creature that is at least one size larger than you and
|
||||||
|
is willing to be your mount.
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 472
|
||||||
|
page_stop: 472
|
||||||
|
trait:
|
||||||
|
- Move
|
||||||
|
trigger: null
|
||||||
|
- actioncategory: Specialty Basic
|
||||||
|
actioncost_name: Single Action
|
||||||
|
descr: You indicate a creature that you can see to one or more allies, gesturing
|
||||||
|
in a direction and describing the distance verbally. That creature is hidden to
|
||||||
|
your allies, rather than undetected (page 466 CRB). This works only for allies
|
||||||
|
who can see you and are in a position where they could potentially detect the
|
||||||
|
target. If your allies can’t hear or understand you, they must succeed at a Perception
|
||||||
|
check against the creature’s Stealth DC or they misunderstand and believe the
|
||||||
|
target is in a different location.
|
||||||
|
name: Point Out
|
||||||
|
req: A creature is undetected by one or more of your allies but isn't undetected
|
||||||
|
by you.
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 472
|
||||||
|
page_stop: 472
|
||||||
|
trait:
|
||||||
|
- Auditory
|
||||||
|
- Manipulate
|
||||||
|
- Visual
|
||||||
|
trigger: null
|
||||||
|
- actioncategory: Specialty Basic
|
||||||
|
actioncost_name: Single Action
|
||||||
|
descr: You position your shield to protect yourself. When you have Raised a Shield,
|
||||||
|
you gain its listed circumstance bonus to AC. Your shield remains raised until
|
||||||
|
the start of your next turn.
|
||||||
|
name: Raise a Shield
|
||||||
|
req: You are wielding a shield.
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 472
|
||||||
|
page_stop: 472
|
||||||
|
trait: null
|
||||||
|
trigger: null
|
||||||
|
- actioncategory: Specialty Basic
|
||||||
|
actioncost_name: Single Action
|
||||||
|
descr: Choose one spell with a sustained duration you have in effect. The duration
|
||||||
|
of that spell continues until the end of your next turn. Some spells might have
|
||||||
|
slightly different or expanded effects if you sustain them. Sustaining a Spell
|
||||||
|
for more than 10 minutes (100 rounds) ends the spell and makes you fatigued unless
|
||||||
|
the spell lists a different maximum duration (such as “sustained up to 1 minute”
|
||||||
|
or “sustained up to 1 hour”).\n\nIf your Sustain a Spell action is disrupted,
|
||||||
|
the spell immediately ends.
|
||||||
|
name: Sustain a Spell
|
||||||
|
req: You have at least one spell active with a sustained duration, and you are not
|
||||||
|
fatigued.
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 304
|
||||||
|
page_stop: 304
|
||||||
|
trait:
|
||||||
|
- Concentrate
|
||||||
|
trigger: null
|
||||||
|
- actioncategory: Specialty Basic
|
||||||
|
actioncost_name: Single Action
|
||||||
|
descr: Choose one magic item activation with a sustained duration you have in effect.
|
||||||
|
The duration of that activation continues until the end of your next turn. Some
|
||||||
|
activations may have slightly different or expanded effects if you sustain them.
|
||||||
|
Sustaining an Activation for more than 10 minutes (100 rounds) ends the activation
|
||||||
|
and makes you fatigued unless the item’s description states a different maximum
|
||||||
|
duration (such as “up to 1 minute” or “up to 1 hour”).\n\nIf your Sustain an Activation
|
||||||
|
action is disrupted, the item’s effect immediately ends.
|
||||||
|
name: Sustain an Activation
|
||||||
|
req: You have at least one magic item activation that you can sustain and you are
|
||||||
|
not fatigued.
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 534
|
||||||
|
page_stop: 534
|
||||||
|
trait:
|
||||||
|
- Concentrate
|
||||||
|
trigger: null
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,6 @@ abilityscore:
|
||||||
short_name: Free2
|
short_name: Free2
|
||||||
long_name: Free 2
|
long_name: Free 2
|
||||||
actioncost:
|
actioncost:
|
||||||
- name: Varies
|
|
||||||
abbr: varies
|
|
||||||
- name: Single Action
|
- name: Single Action
|
||||||
abbr: 1
|
abbr: 1
|
||||||
- name: Two Actions
|
- name: Two Actions
|
||||||
|
@ -37,6 +35,8 @@ actioncost:
|
||||||
abbr: free
|
abbr: free
|
||||||
- name: Reaction
|
- name: Reaction
|
||||||
abbr: reaction
|
abbr: reaction
|
||||||
|
- name: Varies
|
||||||
|
abbr: varies
|
||||||
alignment:
|
alignment:
|
||||||
- name: Lawful Good
|
- name: Lawful Good
|
||||||
abbr: LG
|
abbr: LG
|
||||||
|
|
|
@ -0,0 +1,51 @@
|
||||||
|
# NOTE: python script assumes that each bulk item only has a single source entry
|
||||||
|
bulk:
|
||||||
|
- abbr: '-'
|
||||||
|
name: Negligible
|
||||||
|
numerical: 0.0
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 271
|
||||||
|
page_stop: 272
|
||||||
|
- abbr: L
|
||||||
|
name: Light
|
||||||
|
numerical: 0.1
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 271
|
||||||
|
page_stop: 272
|
||||||
|
- abbr: 1
|
||||||
|
name: One
|
||||||
|
numerical: 1.0
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 271
|
||||||
|
page_stop: 272
|
||||||
|
- abbr: 2
|
||||||
|
name: Two
|
||||||
|
numerical: 2.0
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 271
|
||||||
|
page_stop: 272
|
||||||
|
- abbr: 3
|
||||||
|
name: Three
|
||||||
|
numerical: 3.0
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 271
|
||||||
|
page_stop: 272
|
||||||
|
- abbr: 4
|
||||||
|
name: Four
|
||||||
|
numerical: 4.0
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 271
|
||||||
|
page_stop: 272
|
||||||
|
- abbr: 5
|
||||||
|
name: Five
|
||||||
|
numerical: 5.0
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 271
|
||||||
|
page_stop: 272
|
|
@ -0,0 +1,57 @@
|
||||||
|
import sqlite3
|
||||||
|
import yaml
|
||||||
|
|
||||||
|
def main():
|
||||||
|
q = """
|
||||||
|
SELECT * FROM actions;
|
||||||
|
"""
|
||||||
|
|
||||||
|
conn = sqlite3.connect('../../pf2.db')
|
||||||
|
|
||||||
|
# so we get a dict out of our query
|
||||||
|
conn.row_factory = sqlite3.Row
|
||||||
|
c = conn.cursor()
|
||||||
|
|
||||||
|
c.execute(q)
|
||||||
|
# data = c.fetchall()
|
||||||
|
data = [dict(row) for row in c.fetchall()]
|
||||||
|
# print(data)
|
||||||
|
|
||||||
|
for i in data:
|
||||||
|
del i['actions_id']
|
||||||
|
page = int(i['sources_pages'])
|
||||||
|
del i['sources_pages']
|
||||||
|
i['source'] = [{'abbr': 'CRB', 'page_start': page, 'page_stop': page }]
|
||||||
|
x = i['actioncategories_id']
|
||||||
|
if x == 1:
|
||||||
|
i['actioncategory'] = "Basic"
|
||||||
|
elif x ==2:
|
||||||
|
i['actioncategory'] = "Specialty Basic"
|
||||||
|
del i['actioncategories_id']
|
||||||
|
y = i['actioncosts_id']
|
||||||
|
if y == 0:
|
||||||
|
i['actioncost_name'] = "Varies"
|
||||||
|
elif y == 1:
|
||||||
|
i['actioncost_name'] = "Single Action"
|
||||||
|
elif y == 2:
|
||||||
|
i['actioncost_name'] = "Two Actions"
|
||||||
|
elif y == 3:
|
||||||
|
i['actioncost_name'] = "Three Actions"
|
||||||
|
elif y == 5:
|
||||||
|
i['actioncost_name'] = "Free Action"
|
||||||
|
elif y == 5:
|
||||||
|
i['actioncost_name'] = "Reaction"
|
||||||
|
del i['actioncosts_id']
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
data = {"action": data}
|
||||||
|
|
||||||
|
final = yaml.safe_dump(data, allow_unicode=True)
|
||||||
|
with open('tmp-actions.yaml', 'w') as f:
|
||||||
|
f.write(final)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
|
@ -56,6 +56,299 @@ def main():
|
||||||
data = yaml.full_load(yl)
|
data = yaml.full_load(yl)
|
||||||
do_backgrounds(data, conn)
|
do_backgrounds(data, conn)
|
||||||
|
|
||||||
|
# move on to bulks
|
||||||
|
with open('bulks.yaml') as yl:
|
||||||
|
data = yaml.full_load(yl)
|
||||||
|
do_bulks(data, conn)
|
||||||
|
|
||||||
|
# move on to langs
|
||||||
|
with open('langs.yaml') as yl:
|
||||||
|
data = yaml.full_load(yl)
|
||||||
|
do_langs(data, conn)
|
||||||
|
|
||||||
|
# move on to actions
|
||||||
|
with open('actions.yaml') as yl:
|
||||||
|
data = yaml.full_load(yl)
|
||||||
|
do_actions(data, conn)
|
||||||
|
|
||||||
|
|
||||||
|
def do_actions(data, conn):
|
||||||
|
do_action_categories(data, conn)
|
||||||
|
do_action_main(data, conn)
|
||||||
|
do_action_traits(data, conn)
|
||||||
|
|
||||||
|
|
||||||
|
def do_action_traits(data, conn):
|
||||||
|
table = """
|
||||||
|
CREATE TABLE trait_action (
|
||||||
|
id INTEGER PRIMARY KEY,
|
||||||
|
trait_id INTEGER NOT NULL,
|
||||||
|
action_id INTEGER NOT NULL,
|
||||||
|
FOREIGN KEY (trait_id) REFERENCES trait(trait_id),
|
||||||
|
FOREIGN KEY (action_id) REFERENCES action(action_id)
|
||||||
|
);
|
||||||
|
"""
|
||||||
|
c = conn.cursor()
|
||||||
|
c.execute(table)
|
||||||
|
|
||||||
|
# print(data)
|
||||||
|
for i in data['action']:
|
||||||
|
if i['trait'] != None:
|
||||||
|
for j in i['trait']:
|
||||||
|
|
||||||
|
stmt = """
|
||||||
|
INSERT INTO trait_action(action_id, trait_id)
|
||||||
|
VALUES (
|
||||||
|
(SELECT action_id FROM action WHERE name=?),
|
||||||
|
(SELECT trait_id FROM trait WHERE short_name=?)
|
||||||
|
);
|
||||||
|
"""
|
||||||
|
# print('executing on trait_action:{}'.format(i['name']))
|
||||||
|
try:
|
||||||
|
conn.execute(stmt, (i['name'], j))
|
||||||
|
except Exception as e:
|
||||||
|
print("Error creating trait_action: {}".format(e))
|
||||||
|
else:
|
||||||
|
conn.commit()
|
||||||
|
|
||||||
|
|
||||||
|
def do_action_main(data, conn):
|
||||||
|
table = """
|
||||||
|
CREATE TABLE action (
|
||||||
|
action_id INTEGER PRIMARY KEY,
|
||||||
|
sourceentry_id INTEGER,
|
||||||
|
actioncategory_id INTEGER NOT NULL,
|
||||||
|
actioncost_id INTEGER,
|
||||||
|
name TEXT NOT NULL UNIQUE,
|
||||||
|
req TEXT,
|
||||||
|
trigger TEXT,
|
||||||
|
descr TEXT NOT NULL,
|
||||||
|
FOREIGN KEY (actioncategory_id) REFERENCES actioncategory(actioncategory_id),
|
||||||
|
FOREIGN KEY (actioncost_id) REFERENCES actioncost(actioncost_id),
|
||||||
|
FOREIGN KEY (sourceentry_id) REFERENCES sourceentry(sourceentry_id)
|
||||||
|
);
|
||||||
|
"""
|
||||||
|
c = conn.cursor()
|
||||||
|
c.execute(table)
|
||||||
|
|
||||||
|
# print(data)
|
||||||
|
for i in data['action']:
|
||||||
|
# print(i)
|
||||||
|
srcentrydata = []
|
||||||
|
for j in i['source']:
|
||||||
|
abbr = j['abbr']
|
||||||
|
page_start = j['page_start']
|
||||||
|
# Not all YAML entries have page_stop data
|
||||||
|
if 'page_stop' in j:
|
||||||
|
page_stop = j['page_stop']
|
||||||
|
else:
|
||||||
|
page_stop = page_start
|
||||||
|
srcentrydata.append((abbr, page_start, page_stop))
|
||||||
|
# need to insert sourceentry data first but check and make sure the
|
||||||
|
# length is only one
|
||||||
|
if len(srcentrydata) != 1:
|
||||||
|
raise AssertionError(
|
||||||
|
'length of srcentrydata should only be 1, no more no less, on action'
|
||||||
|
)
|
||||||
|
# print("length of srcentrydata:{}\tsrcentrydata:{}".format(len(srcentrydata),srcentrydata))
|
||||||
|
util_insert_into_sourceentry(srcentrydata, conn)
|
||||||
|
|
||||||
|
stmt = """
|
||||||
|
INSERT INTO action(name, descr, req, trigger, actioncategory_id, actioncost_id, sourceentry_id)
|
||||||
|
VALUES (?,?,?,?,
|
||||||
|
(SELECT actioncategory_id FROM actioncategory WHERE name=?),
|
||||||
|
(SELECT actioncost_id from actioncost WHERE name=?),
|
||||||
|
(SELECT sourceentry_id FROM sourceentry
|
||||||
|
WHERE source_id=(SELECT source_id FROM source WHERE abbr=?)
|
||||||
|
AND page_start=?
|
||||||
|
AND page_stop=?
|
||||||
|
)
|
||||||
|
);
|
||||||
|
"""
|
||||||
|
# print('executing on name:{}'.format(i['name']))
|
||||||
|
try:
|
||||||
|
conn.execute(
|
||||||
|
stmt,
|
||||||
|
(i['name'], i['descr'], i['req'], i['trigger'],
|
||||||
|
i['actioncategory'], i['actioncost_name'], srcentrydata[0][0],
|
||||||
|
srcentrydata[0][1], srcentrydata[0][2]))
|
||||||
|
except Exception as e:
|
||||||
|
print("Error creating action: {}".format(e))
|
||||||
|
else:
|
||||||
|
conn.commit()
|
||||||
|
|
||||||
|
|
||||||
|
def do_action_categories(data, conn):
|
||||||
|
table = """
|
||||||
|
CREATE TABLE actioncategory (
|
||||||
|
actioncategory_id INTEGER PRIMARY KEY,
|
||||||
|
sourceentry_id INTEGER,
|
||||||
|
name TEXT NOT NULL UNIQUE,
|
||||||
|
descr TEXT NOT NULL UNIQUE,
|
||||||
|
FOREIGN KEY (sourceentry_id) REFERENCES sourceentry(sourceentry_id)
|
||||||
|
);
|
||||||
|
"""
|
||||||
|
c = conn.cursor()
|
||||||
|
c.execute(table)
|
||||||
|
|
||||||
|
# print(data)
|
||||||
|
for i in data['actioncategory']:
|
||||||
|
# print(i)
|
||||||
|
srcentrydata = []
|
||||||
|
for j in i['source']:
|
||||||
|
abbr = j['abbr']
|
||||||
|
page_start = j['page_start']
|
||||||
|
# Not all YAML entries have page_stop data
|
||||||
|
if 'page_stop' in j:
|
||||||
|
page_stop = j['page_stop']
|
||||||
|
else:
|
||||||
|
page_stop = page_start
|
||||||
|
srcentrydata.append((abbr, page_start, page_stop))
|
||||||
|
# need to insert sourceentry data first but check and make sure the
|
||||||
|
# length is only one
|
||||||
|
if len(srcentrydata) != 1:
|
||||||
|
raise AssertionError(
|
||||||
|
'length of srcentrydata should only be 1, no more no less, on actioncategory'
|
||||||
|
)
|
||||||
|
# print("length of srcentrydata:{}\tsrcentrydata:{}".format(len(srcentrydata),srcentrydata))
|
||||||
|
util_insert_into_sourceentry(srcentrydata, conn)
|
||||||
|
|
||||||
|
stmt = """
|
||||||
|
INSERT INTO actioncategory(name, descr, sourceentry_id)
|
||||||
|
VALUES (?,?,
|
||||||
|
(SELECT sourceentry_id FROM sourceentry
|
||||||
|
WHERE source_id=(SELECT source_id FROM source WHERE abbr=?)
|
||||||
|
AND page_start=?
|
||||||
|
AND page_stop=?
|
||||||
|
)
|
||||||
|
);
|
||||||
|
"""
|
||||||
|
# print('executing on name:{}'.format(i['name']))
|
||||||
|
try:
|
||||||
|
conn.execute(stmt, (i['name'], i['descr'], srcentrydata[0][0],
|
||||||
|
srcentrydata[0][1], srcentrydata[0][2]))
|
||||||
|
except Exception as e:
|
||||||
|
print("Error creating actioncategory: {}".format(e))
|
||||||
|
else:
|
||||||
|
conn.commit()
|
||||||
|
|
||||||
|
|
||||||
|
def do_langs(data, conn):
|
||||||
|
table = """
|
||||||
|
CREATE TABLE lang (
|
||||||
|
lang_id INTEGER PRIMARY KEY,
|
||||||
|
name TEXT NOT NULL UNIQUE,
|
||||||
|
speakers TEXT NOT NULL,
|
||||||
|
rarity_id INTEGER NOT NULL,
|
||||||
|
sourceentry_id INTEGER,
|
||||||
|
FOREIGN KEY (rarity_id) REFERENCES langrarity(rarity_id),
|
||||||
|
FOREIGN KEY (sourceentry_id) REFERENCES sourceentry(sourceentry_id)
|
||||||
|
);
|
||||||
|
"""
|
||||||
|
c = conn.cursor()
|
||||||
|
c.execute(table)
|
||||||
|
|
||||||
|
# print(data)
|
||||||
|
for i in data['language']:
|
||||||
|
# print(i)
|
||||||
|
srcentrydata = []
|
||||||
|
for j in i['source']:
|
||||||
|
abbr = j['abbr']
|
||||||
|
page_start = j['page_start']
|
||||||
|
# Not all YAML entries have page_stop data
|
||||||
|
if 'page_stop' in j:
|
||||||
|
page_stop = j['page_stop']
|
||||||
|
else:
|
||||||
|
page_stop = page_start
|
||||||
|
srcentrydata.append((abbr, page_start, page_stop))
|
||||||
|
# need to insert sourceentry data first but check and make sure the
|
||||||
|
# length is only one
|
||||||
|
if len(srcentrydata) != 1:
|
||||||
|
raise AssertionError(
|
||||||
|
'length of srcentrydata should only be 1, no more no less, on langs'
|
||||||
|
)
|
||||||
|
# print("length of srcentrydata:{}\tsrcentrydata:{}".format(len(srcentrydata),srcentrydata))
|
||||||
|
util_insert_into_sourceentry(srcentrydata, conn)
|
||||||
|
|
||||||
|
stmt = """
|
||||||
|
INSERT INTO lang(name, speakers, rarity_id, sourceentry_id)
|
||||||
|
VALUES (?,?,
|
||||||
|
(SELECT rarity_id FROM langrarity WHERE rarity_name=?),
|
||||||
|
(SELECT sourceentry_id FROM sourceentry
|
||||||
|
WHERE source_id=(SELECT source_id FROM source WHERE abbr=?)
|
||||||
|
AND page_start=?
|
||||||
|
AND page_stop=?
|
||||||
|
)
|
||||||
|
);
|
||||||
|
"""
|
||||||
|
# print('executing on name:{}'.format(i['name']))
|
||||||
|
try:
|
||||||
|
conn.execute(
|
||||||
|
stmt,
|
||||||
|
(i['name'], i['speakers'], i['rarity'], srcentrydata[0][0],
|
||||||
|
srcentrydata[0][1], srcentrydata[0][2]))
|
||||||
|
except Exception as e:
|
||||||
|
print("Error creating lang: {}".format(e))
|
||||||
|
else:
|
||||||
|
conn.commit()
|
||||||
|
|
||||||
|
|
||||||
|
def do_bulks(data, conn):
|
||||||
|
table = """
|
||||||
|
CREATE TABLE bulk (
|
||||||
|
bulk_id INTEGER PRIMARY KEY,
|
||||||
|
sourceentry_id INTEGER,
|
||||||
|
short_name TEXT NOT NULL,
|
||||||
|
long_name TEXT NOT NULL,
|
||||||
|
numerical FLOAT NOT NULL,
|
||||||
|
FOREIGN KEY (sourceentry_id) REFERENCES sourceentry(sourceentry_id)
|
||||||
|
);
|
||||||
|
"""
|
||||||
|
c = conn.cursor()
|
||||||
|
c.execute(table)
|
||||||
|
|
||||||
|
# print(data)
|
||||||
|
for i in data['bulk']:
|
||||||
|
# print(i)
|
||||||
|
srcentrydata = []
|
||||||
|
for j in i['source']:
|
||||||
|
abbr = j['abbr']
|
||||||
|
page_start = j['page_start']
|
||||||
|
# Not all YAML entries have page_stop data
|
||||||
|
if 'page_stop' in j:
|
||||||
|
page_stop = j['page_stop']
|
||||||
|
else:
|
||||||
|
page_stop = page_start
|
||||||
|
srcentrydata.append((abbr, page_start, page_stop))
|
||||||
|
# need to insert sourceentry data first but check and make sure the
|
||||||
|
# length is only one on bulks
|
||||||
|
if len(srcentrydata) != 1:
|
||||||
|
raise AssertionError(
|
||||||
|
'length of srcentrydata should only be 1, no more no less, on bulks'
|
||||||
|
)
|
||||||
|
# print("length of srcentrydata:{}\tsrcentrydata:{}".format(len(srcentrydata),srcentrydata))
|
||||||
|
util_insert_into_sourceentry(srcentrydata, conn)
|
||||||
|
|
||||||
|
stmt = """
|
||||||
|
INSERT INTO bulk(short_name, long_name, numerical, sourceentry_id)
|
||||||
|
VALUES (?,?,?,
|
||||||
|
(SELECT sourceentry_id FROM sourceentry
|
||||||
|
WHERE source_id=(SELECT source_id FROM source WHERE abbr=?)
|
||||||
|
AND page_start=?
|
||||||
|
AND page_stop=?
|
||||||
|
)
|
||||||
|
);
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
conn.execute(
|
||||||
|
stmt,
|
||||||
|
(i['abbr'], i['name'], i['numerical'], srcentrydata[0][0],
|
||||||
|
srcentrydata[0][1], srcentrydata[0][2]))
|
||||||
|
except Exception as e:
|
||||||
|
print("Error creating bulk: {}".format(e))
|
||||||
|
else:
|
||||||
|
conn.commit()
|
||||||
|
|
||||||
|
|
||||||
def do_backgrounds(data, conn):
|
def do_backgrounds(data, conn):
|
||||||
# MAKE THE 2 TABLES
|
# MAKE THE 2 TABLES
|
||||||
|
@ -82,7 +375,7 @@ CREATE TABLE sourceentry_background (
|
||||||
"""
|
"""
|
||||||
c.execute(table)
|
c.execute(table)
|
||||||
|
|
||||||
print(data)
|
# print(data)
|
||||||
for i in data['background']:
|
for i in data['background']:
|
||||||
srcentrydata = []
|
srcentrydata = []
|
||||||
for j in i['source']:
|
for j in i['source']:
|
||||||
|
|
|
@ -0,0 +1,175 @@
|
||||||
|
# NOTE: This assumes only a single source entry in gendb.py; if adding in more
|
||||||
|
# than once source, we'll need to modify the SQL scheme and gendb.py
|
||||||
|
language:
|
||||||
|
# COMMON LANGUAGES
|
||||||
|
- name: Common
|
||||||
|
speakers: Humans, dwarves, elves, halflings, and other common ancestries
|
||||||
|
rarity: Common
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 65
|
||||||
|
page_stop: 65
|
||||||
|
- name: Draconic
|
||||||
|
speakers: Dragons, reptilian humanoids
|
||||||
|
rarity: Common
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 65
|
||||||
|
page_stop: 65
|
||||||
|
- name: Dwarven
|
||||||
|
speakers: Dwarves
|
||||||
|
rarity: Common
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 65
|
||||||
|
page_stop: 65
|
||||||
|
- name: Elven
|
||||||
|
speakers: Elves, half-elves
|
||||||
|
rarity: Common
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 65
|
||||||
|
page_stop: 65
|
||||||
|
- name: Gnomish
|
||||||
|
speakers: Gnomes
|
||||||
|
rarity: Common
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 65
|
||||||
|
page_stop: 65
|
||||||
|
- name: Goblin
|
||||||
|
speakers: Goblins, hobgoblins, bugbears
|
||||||
|
rarity: Common
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 65
|
||||||
|
page_stop: 65
|
||||||
|
- name: Halfling
|
||||||
|
speakers: Halflings
|
||||||
|
rarity: Common
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 65
|
||||||
|
page_stop: 65
|
||||||
|
- name: Jotun
|
||||||
|
speakers: Giants, ogres, trolls, ettins, cyclopes
|
||||||
|
rarity: Common
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 65
|
||||||
|
page_stop: 65
|
||||||
|
- name: Orcish
|
||||||
|
speakers: Orcs, half-orcs
|
||||||
|
rarity: Common
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 65
|
||||||
|
page_stop: 65
|
||||||
|
- name: Sylvan
|
||||||
|
speakers: Fey, centaurs, plant creatures
|
||||||
|
rarity: Common
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 65
|
||||||
|
page_stop: 65
|
||||||
|
- name: Undercommon
|
||||||
|
speakers: Drow, duergars, xulgaths
|
||||||
|
rarity: Common
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 65
|
||||||
|
page_stop: 65
|
||||||
|
- name: Utopian
|
||||||
|
speakers: Aeons
|
||||||
|
rarity: Common
|
||||||
|
source:
|
||||||
|
- abbr: BST1
|
||||||
|
page_start: 8
|
||||||
|
page_stop: 8
|
||||||
|
# UNCOMMON LANGUAGES
|
||||||
|
- name: Abyssal
|
||||||
|
speakers: Demons
|
||||||
|
rarity: Uncommon
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 65
|
||||||
|
page_stop: 65
|
||||||
|
- name: Aklo
|
||||||
|
speakers: Deros, evil fey, otherworldly monsters
|
||||||
|
rarity: Uncommon
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 65
|
||||||
|
page_stop: 65
|
||||||
|
- name: Aquan
|
||||||
|
speakers: Aquatic creatures, water elemental creatures
|
||||||
|
rarity: Uncommon
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 65
|
||||||
|
page_stop: 65
|
||||||
|
- name: Auran
|
||||||
|
speakers: Air elemental creatures, flying creatures
|
||||||
|
rarity: Uncommon
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 65
|
||||||
|
page_stop: 65
|
||||||
|
- name: Celestial
|
||||||
|
speakers: Angels
|
||||||
|
rarity: Uncommon
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 65
|
||||||
|
page_stop: 65
|
||||||
|
- name: Gnoll
|
||||||
|
speakers: Gnolls
|
||||||
|
rarity: Uncommon
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 65
|
||||||
|
page_stop: 65
|
||||||
|
- name: Ignan
|
||||||
|
speakers: Fire elemental creatures
|
||||||
|
rarity: Uncommon
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 65
|
||||||
|
page_stop: 65
|
||||||
|
- name: Infernal
|
||||||
|
speakers: Devils
|
||||||
|
rarity: Uncommon
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 65
|
||||||
|
page_stop: 65
|
||||||
|
- name: Necril
|
||||||
|
speakers: Ghouls, intelligent undead
|
||||||
|
rarity: Uncommon
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 65
|
||||||
|
page_stop: 65
|
||||||
|
- name: Shadowtongue
|
||||||
|
speakers: Nidalese, Shadow Plane creatures
|
||||||
|
rarity: Uncommon
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 65
|
||||||
|
page_stop: 65
|
||||||
|
- name: Terran
|
||||||
|
speakers: Earth elemental creatures
|
||||||
|
rarity: Uncommon
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 65
|
||||||
|
page_stop: 65
|
||||||
|
# SECRET LANGUAGES
|
||||||
|
- name: Druidic
|
||||||
|
speakers: Druids
|
||||||
|
rarity: Secret
|
||||||
|
source:
|
||||||
|
- abbr: CRB
|
||||||
|
page_start: 65
|
||||||
|
page_stop: 65
|
||||||
|
|
Loading…
Reference in New Issue