Обновление структуры

This commit is contained in:
2025-04-08 18:07:39 +04:00
parent 8b38152ff1
commit c531ad448b
+272 -17
View File
@@ -5,9 +5,14 @@ Table entity {
id int [pk] id int [pk]
name varchar [not null, note: "{*}.name"] name varchar [not null, note: "{*}.name"]
img varchar(100) [note: "{*}.img"] img varchar(100) [note: "{*}.img"]
description text [not null, note: "{*}.system.description(.value)"]
description_gm text [null, note: "{*}.system.description.gm"]
type entity_type [not null] type entity_type [not null]
slug varchar slug varchar
rarity entity_rarity [not null, default: "common", note: "{*}.system.rarity"] rarity entity_rarity [not null, default: "common", note: "{*}.system.rarity"]
is_translated bool [default: false, note: "Первичный импорт идёт из англоязычного источника, перевод приходит вторым"]
is_checked bool [default: false, note: "Флаг, указывающий, что перевод был проверен вручную и не требует обновления парсером"]
} }
Enum entity_type { Enum entity_type {
feat feat
@@ -94,8 +99,6 @@ Table entity_traits {
Table action { Table action {
id int [pk, ref: - entity.id] id int [pk, ref: - entity.id]
description text [not null, note: "{}.system.description"]
type action_type [not null, note: "{}.system.actionType.value"] type action_type [not null, note: "{}.system.actionType.value"]
actions int [null, note: "{}.system.actions?.value"] actions int [null, note: "{}.system.actions?.value"]
category action_category [null, note: "{}.system.category"] // Нет у 81 объекта category action_category [null, note: "{}.system.category"] // Нет у 81 объекта
@@ -137,8 +140,6 @@ Enum action_category {
Table ancestry { Table ancestry {
id int [pk, ref: - entity.id] id int [pk, ref: - entity.id]
description text [not null, note: "{}.system.description"]
hp int [not null, note: "{}.system.hp"] hp int [not null, note: "{}.system.hp"]
reach int [not null, note: "{}.system.reach"] reach int [not null, note: "{}.system.reach"]
size ancestry_size [not null, note: "{}.system.size"] size ancestry_size [not null, note: "{}.system.size"]
@@ -169,7 +170,7 @@ Enum ancestry_size {
} }
Enum ancestry_vision { Enum ancestry_vision {
normal normal
low-light-vision low_light_vision // low-light-vision
darkvision darkvision
} }
@@ -177,8 +178,6 @@ Enum ancestry_vision {
Table armor { Table armor {
id int [pk, ref: - entity.id] id int [pk, ref: - entity.id]
description text [not null, note: "{}.system.description"]
ac_bonus int [not null, note: "{}.system.acBonus"] ac_bonus int [not null, note: "{}.system.acBonus"]
strength int [null, note: "{}.system.strength"] strength int [null, note: "{}.system.strength"]
check_penalty int [not null, note: "{}.system.checkPenalty"] check_penalty int [not null, note: "{}.system.checkPenalty"]
@@ -216,8 +215,8 @@ Enum armor_category {
light light
heavy heavy
medium medium
light-barding light_barding // light-barding
heavy-barding heavy_barding // heavy-barding
unarmored unarmored
} }
Enum armor_group { Enum armor_group {
@@ -238,13 +237,13 @@ Enum armor_size {
Table background { Table background {
id int [pk, ref: - entity.id] id int [pk, ref: - entity.id]
description text [not null, note: "{}.system.description"]
Note: '''{} = Item.background Note: '''{} = Item.background
Перенаправление: Перенаправление:
{}.system.publication -> entity_sources {}.system.publication -> entity_sources
{}.system.traits -> entity_traits {}.system.traits -> entity_traits
{}.system.items -> background_items
{}.system.trainedSkills -> background_skills
Рассмотреть: Рассмотреть:
{}.system.boosts {}.system.boosts
@@ -252,21 +251,240 @@ Table background {
Не использованы поля: Не использованы поля:
''' '''
} }
Table background_items {
id int [pk]
background_id int [ref: > background.id]
entity_id int [ref: > entity.id, note: "{}.name"]
level int [note: "{}.level"]
name string [note: "{}.name (?)"]
Note: "{} = Item.background.system.items"
}
Table background_skills {
id int [pk]
background_id int [ref: > background.id]
name varchar [note: "{}.[]"]
is_skill bool [note: "true = [value] false = [lore]"]
Note: "{} = Item.background.system.items.[lore|value]"
}
// Backpack
Table backpack {
id int [pk, ref: - entity.id]
level int [note: "{}.system.bulk.level.value"]
capacity int [note: "{}.system.bulk.heldOrStowed"]
heldOrStowed float [note: "{}.system.bulk.heldOrStowed"]
ignored int [note: "{}.system.bulk.ignored"]
value float [note: "{}.system.bulk.value"]
hardness int [note: "{}.system.bulk.hardness"]
quantity int [note: "{}.system.bulk.quantity"]
price int [note: "price({}.system.price.value)"]
size varchar [note: "{}.system.bulk.size (always med)"]
stowing bool [note: "{}.system.stowing"]
usage
Note: '''{} = Item.backpack
Перенаправление:
{}.system.publication -> entity_sources
{}.system.traits -> entity_traits
Рассмотреть:
{}.system.material
Не использованы поля:
{}.system.collapsed - всегда false
'''
}
Enum backpack_usage {
wornbackpack
held_in_two_hands // held-in-two-hands
worn
held_in_one_hand // held-in-one-hand
worngarment
}
// Campaign Feature
Table campaign_feature {
id int [pk, ref: - entity.id]
level int [note: "{}.system.level"]
type action_type [note: "{}.system.actionType"]
action int [note: "{}.system.actions"]
category campaign_feature_category [note: "{}.system.category"]
Note: '''{} = Item.campaignFeature
Перенаправление:
{}.system.publication -> entity_sources
{}.system.traits -> entity_traits
Рассмотреть:
{}.system.prerequisites - очень странная структура,
но, похоже, просто одиночное value
Не использованы поля:
{}.system.requirements - всегда пустое
{}.system.trigger - всегда пустое
'''
}
Enum campaign_feature_category {
army_tactic // army-tactic
army_war_action // army-war-action
kingdom_activity // kingdom-activity
kingdom_feat // kingdom-feat
kingdom_feature // kingdom-feature
}
// Class
Table class {
id int [pk, ref: - entity.id]
hp int [note: "{}.system.hp"]
perception int [note: "{}.system.perception"]
spellcasting bool [note: "{}.system.spellcasting"]
Note: '''{} = Item.class
Перенаправление:
{}.system.publication -> entity_sources
{}.system.traits -> entity_traits
{}.system.ancestryFeatLevels -> class_progression
{}.system.classFeatLevels -> class_progression
{}.system.generalFeatLevels -> class_progression
{}.system.items -> class_progression
{}.system.skillFeatLevels -> class_progression
{}.system.skillIncreaseLevels -> class_progression
{}.system.attacks.[!other] -> class_trainings
{}.system.defenses -> class_trainings
{}.system.savingThrows -> class_trainings
Рассмотреть:
{}.system.keyAbility
{}.system.attacks.other
Не использованы поля:
'''
}
Table class_progression {
id int [pk, increment]
class_id int [ref: > class.id]
level int
type class_progression_type
entity_id [null, ref: > entity.id]
}
Table class_trainings {
id int [pk, increment]
class_id int [ref: class.id]
item varchar [note: "Возможно нужна связь с чем-то ещё"]
stage: int [note: "0-untrained, 1-trained..."]
}
Enum class_progression_type {
entity [note: "{}.system.items"]
ancestry_feat [note: "{}.system.ancestryFeatLevels"]
class_feat [note: "{}.system.classFeatLevels"]
general_feat [note: "{}.system.generalFeatLevels"]
skill_feat [note: "{}.system.skillFeatLevels"]
skill_increase [note: "{}.system.skillIncreaseLevels"]
}
// Condition
Table condition {
id int [pk, ref: - entity.id]
group condition_group
Note: '''{} = Item.condition
Перенаправление:
{}.system.publication -> entity_sources
{}.system.traits -> entity_traits
Рассмотреть:
duration
overrides
references - всегда пустое
value
Не использованы поля:
'''
}
Enum condition_group {
senses
abilities
death
attitudes
detection
}
// Deity
Table deity {
id int [pk, ref: - entity.id]
category deity_category
Note: '''{} = Item.deity
Перенаправление:
{}.system.publication -> entity_sources
{}.system.traits -> entity_traits
attribute -> deity_attribute
skill -> deity_skills
spells -> deity_spells
weapons -> deity_weapons
Рассмотреть:
domains - нужная другая таблица?
font
sanctification
Не использованы поля:
'''
}
Table deity_attributes {
deity_id int [pk, ref: > deity.id]
attribute varchar(3) [pk]
}
Table deity_skills {
deity_id int [pk, ref: > deity.id]
skill varchar [pk]
}
Table deity_spells {
id int [pk, increment]
deity_id int [ref: > deity.id]
level int
spell_id int [ref: > spell.id]
}
Table deity_weapons {
id int [pk, increment]
deity_id int [ref: > deity.id]
weapon varchar
}
Enum deity_category {
deity
pantheon
covenant
philosophy
}
// Feat // Feat
Table feat { Table feat {
id int [pk, ref: - entity.id] id int [pk, ref: - entity.id]
description text [not null, note: "{}.system.description"]
action_type feat_action_type [note: "{}.system.actionType.value"] action_type feat_action_type [note: "{}.system.actionType.value"]
actions int [null, note: "{}.system.actions?.value"] actions int [null, note: "{}.system.actions?.value"]
category feat_category [not null, note: "{}.system.category"] category feat_category [not null, note: "{}.system.category"]
@@ -314,15 +532,48 @@ Enum feat_category {
curse curse
pfsboon pfsboon
} }
Table feat_frequency { Table feat_frequency {
feat_id int [pk, ref: > feat.id] feat_id int [pk, ref: > feat.id]
max int [not null, note: "{Item.feat}.system.frequency.max"] max int [not null, note: "{Item.feat}.system.frequency.max"]
per int [not null, note: "{Item.feat}.system.frequency.per"] per int [not null, note: "{Item.feat}.system.frequency.per"]
value int [null, note "{Item.feat}.system.frequency.value - что это вообще?!"] value int [null, note: "{Item.feat}.system.frequency.value - что это вообще?!"]
} }
// Heritage
Table heritage {
id int [pk, ref: - entity.id]
ancestry_id [null, ref: > ancestry.id]
Note: '''{} = Item.heritage
Перенаправление:
{}.system.publication -> entity_sources
{}.system.traits -> entity_traits
Рассмотреть:
Не использованы поля:
'''
}
// Spell
Table spell {
id int [pk, ref: - entity.id]
cost int [note: "{}.system.cost"]
Note: '''{} = Item.spell
Перенаправление:
{}.system.publication -> entity_sources
{}.system.traits -> entity_traits
Рассмотреть:
Не использованы поля:
'''
}
@@ -333,8 +584,6 @@ Table feat_frequency {
Table template { Table template {
id int [pk, ref: - entity.id] id int [pk, ref: - entity.id]
description text [not null, note: "{}.system.description"]
Note: '''{} = Item. Note: '''{} = Item.
Перенаправление: Перенаправление:
@@ -347,3 +596,9 @@ Table template {
''' '''
} }
*/ */
// consumable -> equipment?
// effect???
// equipment
// kit
// shield -> equipment