diff --git a/dbml/schema.dbml b/dbml/schema.dbml index f82959c..f793912 100644 --- a/dbml/schema.dbml +++ b/dbml/schema.dbml @@ -39,18 +39,19 @@ Enum alias_type { // Keywords Table keyword { id int [pk, increment] - + } Table entity_keywords { entity_id int [ref: > entity.id] keyword_id int [ref: > keyword.id] } +Table keyword_aliases { + keyword_id int [pk, ref: keyword.id] + type alias_type [pk] + value varchar +} // Sources -TableGroup source_group { - source - entity_sources -} Table source { id int [pk, increment] name varchar @@ -63,10 +64,6 @@ Table entity_sources { } // External links -TableGroup external_group { - external_target - entity_external -} Table external_target { id int name varchar @@ -78,20 +75,44 @@ Table entity_external { path varchar } +// ---------------------------------------------- + // Traits -TableGroup trait_group { - trait - entity_traits -} Table trait { id int [pk] name varchar [not null] description text + type trait_type } Table entity_traits { entity_id int [ref: > entity.id] trait_id int [ref: > trait.id] } +Enum trait_type { + regular + tradition +} + +// Frequency +Table frequency { + id int [pk, ref: - entity.id] + + max int [not null, note: "{}.max"] + per int [not null, note: "{}.per"] + value int [null, note: "{}.value"] + + Note: '''{} = {Item.[action|feat].system.frequency} + + Используется для подключения полей из таблиц схем {Item.feat} и {Item.action}''' +} + +// Languages +Table language { + id int [pk] + name varchar + rarity entity_rarity +} + // ---------------------------------------------- @@ -99,28 +120,20 @@ Table entity_traits { Table action { id int [pk, ref: - entity.id] - type action_type [not null, note: "{}.system.actionType.value"] - actions int [null, note: "{}.system.actions?.value"] - category action_category [null, note: "{}.system.category"] // Нет у 81 объекта - death_note bool [null, note: "{}.system.deathNote"] + type action_type [not null, note: "{}.actionType.value"] + actions int [null, note: "{}.actions?.value"] + category action_category [null, note: "{}.category"] // Нет у 81 объекта + death_note bool [null, note: "{}.deathNote"] - Note: '''{} = Item.action + Note: '''{} = Item.action.system Перенаправление: - {}.system.publication -> entity_sources - {}.system.traits -> entity_traits - - {}.system.frequency -> ??? Возможно нужно на общую frequency + {}.publication -> entity_sources + {}.traits -> entity_traits + {}.frequency -> frequency Рассмотреть: - {}.system.selfEffect - {}.system.duration - {}.system.start - .value всегда 103462347 - {}.system.target - - Не использованы поля: - {}.system.subfeatures - пишем в описании пока что, потом подключение таблицы - {}.system.actionCategory - всегда пробел??? + {}.selfEffect - служебный словарь Foundry ''' } Enum action_type { @@ -140,26 +153,27 @@ Enum action_category { Table ancestry { id int [pk, ref: - entity.id] - hp int [not null, note: "{}.system.hp"] - reach int [not null, note: "{}.system.reach"] - size ancestry_size [not null, note: "{}.system.size"] - speed int [not null, note: "{}.system.speed"] - vision ancestry_vision [not null, note: "{}.system.vision"] + hp int [not null, note: "{}.hp"] + reach int [not null, note: "{}.reach"] + size ancestry_size [not null, note: "{}.size"] + speed int [not null, note: "{}.speed"] + vision ancestry_vision [not null, note: "{}.vision"] - Note: '''{} = Item.ancestry + Note: '''{} = Item.ancestry.system Перенаправление: - {}.system.publication -> entity_sources - {}.system.traits -> entity_traits + {}.publication -> entity_sources + {}.traits -> entity_traits + {}.languages -> ancestry_languages + {}.additionalLanguages -> ancestry_languages + {}.boosts -> ancestry_boosts + {}.flaws -> ancestry_boosts Рассмотреть: - {}.system.boosts - {}.system.flaws - {}.system.items - TODO добавить в определение dict-типа - {}.system.lanuages + {}.items - TODO добавить в определение dict-типа Не использованы поля: - {}.system.additionalLanguages + {}.additionalLanguages ''' } Enum ancestry_size { @@ -173,41 +187,54 @@ Enum ancestry_vision { low_light_vision // low-light-vision darkvision } +Table ancestry_languages { + ancestry_id int [pk, ref: > ancestry.id] + language_id int [pk, ref: > language.id] + additional bool [not null] +} +Table ancestry_boosts { + id int [pk, increment] + ancestry_id int [ref: > ancestry.id] + boost bool [not null, default: true, note: "false = flaw"] + value varchar(3) [null, note: "null = free boost (all 6 values in foundry)"] + + +} // Armor Table armor { id int [pk, ref: - entity.id] - ac_bonus int [not null, note: "{}.system.acBonus"] - strength int [null, note: "{}.system.strength"] - check_penalty int [not null, note: "{}.system.checkPenalty"] - dex_cap int [not null, note: "{}.system.dexCap"] - speed_penalty int [not null, note: "{}.system.speedPenalty"] + ac_bonus int [not null, note: "{}.acBonus"] + strength int [null, note: "{}.strength"] + check_penalty int [not null, note: "{}.checkPenalty"] + dex_cap int [not null, note: "{}.dexCap"] + speed_penalty int [not null, note: "{}.speedPenalty"] - bulk float [not null, note: "{}.system.bulk"] - category armor_category [not null, note: "{}.system.category"] - group armor_group [null, note: "{}.system.group"] // 16 без группы - level int [not null, note: "{}.system.level.value"] - price int [not null, note: "price({}.system.price.value)"] - size armor_size [not null, note: "{}.system.size"] + bulk float [not null, note: "{}.bulk"] + category armor_category [not null, note: "{}.category"] + group armor_group [null, note: "{}.group"] // 16 без группы + level int [not null, note: "{}.level.value"] + price int [not null, note: "price({}.price.value)"] + size armor_size [not null, note: "{}.size"] - Note: '''{} = Item.armor + Note: '''{} = Item.armor.system Перенаправление: - {}.system.publication -> entity_sources - {}.system.traits -> entity_traits + {}.publication -> entity_sources + {}.traits -> entity_traits Рассмотреть: - {}.system.base_item - возможно связь на себя - {}.system.material - {}.system.runes - {}.system.specific + {}.base_item - возможно связь на себя + {}.material + {}.runes + {}.specific Не использованы поля: - {}.system.containerId - пустое - {}.system.hardness - всегда 0 - {}.system.hp - всегда 0 - {}.system.quantity - всегда 1 + {}.containerId - пустое + {}.hardness - всегда 0 + {}.hp - всегда 0 + {}.quantity - всегда 1 ''' } @@ -237,16 +264,16 @@ Enum armor_size { Table background { id int [pk, ref: - entity.id] - Note: '''{} = Item.background + Note: '''{} = Item.background.system Перенаправление: - {}.system.publication -> entity_sources - {}.system.traits -> entity_traits - {}.system.items -> background_items - {}.system.trainedSkills -> background_skills + {}.publication -> entity_sources + {}.traits -> entity_traits + {}.items -> background_items + {}.trainedSkills -> background_skills Рассмотреть: - {}.system.boosts + {}.boosts Не использованы поля: ''' @@ -276,31 +303,31 @@ Table background_skills { Table backpack { id int [pk, ref: - entity.id] - level int [note: "{}.system.bulk.level.value"] + level int [note: "{}.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"] + capacity int [note: "{}.bulk.heldOrStowed"] + heldOrStowed float [note: "{}.bulk.heldOrStowed"] + ignored int [note: "{}.bulk.ignored"] + value float [note: "{}.bulk.value"] + hardness int [note: "{}.bulk.hardness"] + quantity int [note: "{}.bulk.quantity"] - price int [note: "price({}.system.price.value)"] - size varchar [note: "{}.system.bulk.size (always med)"] - stowing bool [note: "{}.system.stowing"] + price int [note: "price({}.price.value)"] + size varchar [note: "{}.bulk.size (always med)"] + stowing bool [note: "{}.stowing"] usage - Note: '''{} = Item.backpack + Note: '''{} = Item.backpack.system Перенаправление: - {}.system.publication -> entity_sources - {}.system.traits -> entity_traits + {}.publication -> entity_sources + {}.traits -> entity_traits Рассмотреть: - {}.system.material + {}.material Не использованы поля: - {}.system.collapsed - всегда false + {}.collapsed - всегда false ''' } Enum backpack_usage { @@ -315,26 +342,26 @@ Enum backpack_usage { Table campaign_feature { id int [pk, ref: - entity.id] - level int [note: "{}.system.level"] + level int [note: "{}.level"] - type action_type [note: "{}.system.actionType"] - action int [note: "{}.system.actions"] - category campaign_feature_category [note: "{}.system.category"] + type action_type [note: "{}.actionType"] + action int [note: "{}.actions"] + category campaign_feature_category [note: "{}.category"] - Note: '''{} = Item.campaignFeature + Note: '''{} = Item.campaignFeature.system Перенаправление: - {}.system.publication -> entity_sources - {}.system.traits -> entity_traits + {}.publication -> entity_sources + {}.traits -> entity_traits Рассмотреть: - {}.system.prerequisites - очень странная структура, + {}.prerequisites - очень странная структура, но, похоже, просто одиночное value Не использованы поля: - {}.system.requirements - всегда пустое - {}.system.trigger - всегда пустое + {}.requirements - всегда пустое + {}.trigger - всегда пустое ''' } Enum campaign_feature_category { @@ -349,31 +376,30 @@ Enum campaign_feature_category { Table class { id int [pk, ref: - entity.id] - hp int [note: "{}.system.hp"] - perception int [note: "{}.system.perception"] - spellcasting bool [note: "{}.system.spellcasting"] + hp int [note: "{}.hp"] + perception int [note: "{}.perception"] + spellcasting bool [note: "{}.spellcasting"] - Note: '''{} = Item.class + Note: '''{} = Item.class.system Перенаправление: - {}.system.publication -> entity_sources - {}.system.traits -> entity_traits + {}.publication -> entity_sources + {}.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 + {}.ancestryFeatLevels -> class_progression + {}.classFeatLevels -> class_progression + {}.generalFeatLevels -> class_progression + {}.items -> class_progression + {}.skillFeatLevels -> class_progression + {}.skillIncreaseLevels -> class_progression + {}.attacks.[!other] -> class_trainings + {}.defenses -> class_trainings + {}.savingThrows -> class_trainings Рассмотреть: - {}.system.keyAbility - {}.system.attacks.other + {}.keyAbility + {}.attacks.other Не использованы поля: ''' @@ -406,17 +432,17 @@ Table condition { group condition_group - Note: '''{} = Item.condition + Note: '''{} = Item.condition.system Перенаправление: - {}.system.publication -> entity_sources - {}.system.traits -> entity_traits + {}.publication -> entity_sources + {}.traits -> entity_traits Рассмотреть: - duration - overrides - references - всегда пустое - value + {}.duration + {}.overrides + {}.references - всегда пустое + {}.value Не использованы поля: ''' @@ -436,21 +462,21 @@ Table deity { category deity_category - Note: '''{} = Item.deity + Note: '''{} = Item.deity.system Перенаправление: - {}.system.publication -> entity_sources - {}.system.traits -> entity_traits + {}.publication -> entity_sources + {}.traits -> entity_traits - attribute -> deity_attribute - skill -> deity_skills - spells -> deity_spells - weapons -> deity_weapons + {}.attribute -> deity_attribute + {}.skill -> deity_skills + {}.spells -> deity_spells + {}.weapons -> deity_weapons Рассмотреть: - domains - нужная другая таблица? - font - sanctification + {}.domains - нужная другая таблица? + {}.font + {}.sanctification Не использованы поля: ''' @@ -485,32 +511,32 @@ Enum deity_category { Table feat { id int [pk, ref: - entity.id] - action_type feat_action_type [note: "{}.system.actionType.value"] - actions int [null, note: "{}.system.actions?.value"] - category feat_category [not null, note: "{}.system.category"] - level int [not null, note: "{}.system.level.value"] - level_taker int [null, note: "{}.system.level.taken"] // Всего 2 значения: 1, 2 - max_takable int [null, note: "{}.system.level.maxTakable"] - location varchar(12) [null, note: "{}.system.level.location"] - only_level_1 bool [null, note: "{}.system.onlyLevel1"] + action_type feat_action_type [note: "{}.actionType.value"] + actions int [null, note: "{}.actions?.value"] + category feat_category [not null, note: "{}.category"] + level int [not null, note: "{}.level.value"] + level_taker int [null, note: "{}.level.taken"] // Всего 2 значения: 1, 2 + max_takable int [null, note: "{}.level.maxTakable"] + location varchar(12) [null, note: "{}.level.location"] + only_level_1 bool [null, note: "{}.onlyLevel1"] - Note: '''{} = Item.feat + Note: '''{} = Item.feat.system Перенаправление: - {}.system.publication -> entity_sources - {}.system.traits -> entity_traits - {}.system.frequency -> feat_frequency + {}.publication -> entity_sources + {}.traits -> entity_traits + {}.frequency -> frequency Рассмотреть: - {}.system.prerequisites - {}.system.selfEffect - {}.system.duration - {}.system.start - .value всегда 103462347 - {}.system.target + {}.prerequisites + {}.selfEffect + {}.duration + {}.start - .value всегда 103462347 + {}.target Не использованы поля: - {}.system.subfeatures - пишем в описании пока что, потом подключение таблицы - {}.system.actionCategory - всегда пробел??? + {}.subfeatures - пишем в описании пока что, потом подключение таблицы + {}.actionCategory - всегда пробел??? ''' } Enum feat_action_type { @@ -532,12 +558,6 @@ Enum feat_category { curse pfsboon } -Table feat_frequency { - feat_id int [pk, ref: > feat.id] - max int [not null, note: "{Item.feat}.system.frequency.max"] - per int [not null, note: "{Item.feat}.system.frequency.per"] - value int [null, note: "{Item.feat}.system.frequency.value - что это вообще?!"] -} // Heritage Table heritage { @@ -545,11 +565,11 @@ Table heritage { ancestry_id [null, ref: > ancestry.id] - Note: '''{} = Item.heritage + Note: '''{} = Item.heritage.system Перенаправление: - {}.system.publication -> entity_sources - {}.system.traits -> entity_traits + {}.publication -> entity_sources + {}.traits -> entity_traits Рассмотреть: @@ -561,20 +581,42 @@ Table heritage { Table spell { id int [pk, ref: - entity.id] - cost int [note: "{}.system.cost"] + level int [note: "{}.level"] + cost int [note: "{}.cost"] + counteraction bool [note: "{}.counteraction"] + sustained bool [note: "{}.duration.sustained"] + duration varchar [note: "{}.duration.value"] + range varchar [note: "{}.range.value"] + requirements varchar [note: "{}.requirements"] + target varchar [note: "{}.target.value"] + time varchar [note: "{}.time.value"] - Note: '''{} = Item.spell + can_heightening bool [note: "{}.heightening != null"] + + Note: '''{} = Item.spell.system Перенаправление: - {}.system.publication -> entity_sources - {}.system.traits -> entity_traits + {}.publication -> entity_sources + {}.traits -> entity_traits Рассмотреть: + {}.area + damage + defense Не использованы поля: + heightening + overlays ''' } +Table spell_ritual { + spell_id int [pk, ref: - spell.id] + primary_check varchar [note: "{}.primary.check"] + secondary_casters int [note: "{}.secondary.casters"] + secondary_checks varchar [note: "{}.secondary.checks"] + Note: "{} = Item.spell.system.ritual" +} @@ -584,11 +626,11 @@ Table spell { Table template { id int [pk, ref: - entity.id] - Note: '''{} = Item. + Note: '''{} = Item..system Перенаправление: - {}.system.publication -> entity_sources - {}.system.traits -> entity_traits + {}.publication -> entity_sources + {}.traits -> entity_traits Рассмотреть: @@ -600,5 +642,7 @@ Table template { // consumable -> equipment? // effect??? // equipment -// kit -// shield -> equipment \ No newline at end of file +// kit -> equipment +// shield -> equipment +// treasure -> equipment +// weapon -> equipment \ No newline at end of file