Формат Spell Pack
Импортируйте дополнительные заклинания в приложение через JSON-файл.
Что такое Spell Pack?
Приложение содержит только SRD-заклинания (свободная лицензия). Spell Pack — JSON-файл, добавляющий заклинания из других источников. Импортируйте в Настройки → Наборы заклинаний. Заклинания из Spell Pack заменяют встроенные с таким же ID.
JSON Schema
Используйте JSON Schema для валидации и автодополнения в редакторе. Добавьте $schema в файл — VSCode, IntelliJ и другие редакторы подсветят ошибки и предложат значения полей.
{
"$schema": "https://5e-spellbook.pages.dev/spellpack.schema.json",
"format": 1,
"edition": "edition2014",
"spells": [...]
} Структура верхнего уровня
format number Всегда 1 (текущая версия) edition string "edition2014" или "edition2024" — каждое издание импортируется отдельно spells array Массив объектов заклинаний (см. ниже) {
"format": 1,
"edition": "edition2014",
"spells": [...]
} Поля объекта заклинания
id string обязательно Уникальный идентификатор. Соглашение: название заклинания + аббревиатура источника, в нижнем регистре, без спецсимволов.
"fireboltphb" // Fire Bolt + PHB → fireboltphb
"charmpersonxge" // Charm Person + XGE → charmpersonxge level number обязательно Уровень заклинания. 0 для заговоров, 1–9 для заклинаний с уровнем.
school string обязательно Школа магии. Одно из значений:
abjurationconjurationdivinationenchantmentevocationillusionnecromancytransmutation source string обязательно Аббревиатура книги-источника, например "PHB", "XGE", "TCE". Используется как часть ID заклинания.
Редакция 2014 — несколько книг-источников:
PHBXGETCEEGWAIFTDSCCLLKBMTIDRotFAAGSatOGGR Редакция 2024 — единственный источник: XPHB (Player's Handbook 2024).
XPHB ritual boolean обязательно true если заклинание можно использовать как ритуал, иначе false.
concentration boolean обязательно true если заклинание требует концентрации, иначе false.
components object обязательно Компоненты заклинания — вербальный (V), соматический (S), материальный (M). Каждый — boolean.
{
"verbal": true, // boolean — V component
"somatic": true, // boolean — S component
"material": false // boolean — M component
} materials object | null обязательно Детали материального компонента. null если материалы не нужны. Если указан, cost — стоимость в медных монетах (100 мм = 1 зм), consumed — расходуется ли при использовании.
// No material component
"materials": null
// Material without cost, not consumed
"materials": { "cost": null, "consumed": false }
// Material with cost (in copper), consumed on cast
"materials": { "cost": 2500, "consumed": true }
// 2500 copper = 25 gold pieces castingTime array обязательно Массив элементов времени наложения. Каждый элемент содержит value (число) и unit.
Возможные значения unit:
actionbonusreactionminutehour // 1 action
[{ "value": 1, "unit": "action" }]
// 1 bonus action
[{ "value": 1, "unit": "bonus" }]
// 1 reaction
[{ "value": 1, "unit": "reaction" }]
// 10 minutes
[{ "value": 10, "unit": "minute" }] duration object обязательно Длительность заклинания. Структура зависит от type. Для типа "permanent" опциональный массив ends описывает условия окончания (например "dispel", "trigger").
Возможные значения type:
instanttimedpermanentspecial Значения unit (только для type "timed"):
roundminutehourday // Instantaneous
{ "type": "instant" }
// 1 hour
{ "type": "timed", "unit": "hour", "value": 1 }
// 10 minutes
{ "type": "timed", "unit": "minute", "value": 10 }
// 1 round
{ "type": "timed", "unit": "round", "value": 1 }
// Permanent (until dispelled)
{ "type": "permanent", "ends": ["dispel"] }
// Permanent (until dispelled or triggered)
{ "type": "permanent", "ends": ["dispel", "trigger"] }
// Special duration
{ "type": "special" } range object обязательно Дистанция заклинания. Сочетает тип формы, тип расстояния и опциональное значение расстояния.
Типы формы:
pointconelinecubesphereemanationradiushemispherespecial Типы расстояния:
selftouchfeetmilessightunlimited // 120 feet
{ "type": "point", "distanceType": "feet", "distanceValue": 120 }
// Self
{ "type": "point", "distanceType": "self" }
// Touch
{ "type": "point", "distanceType": "touch" }
// Self, 30-foot cone
{ "type": "cone", "distanceType": "feet", "distanceValue": 30 }
// Self, 60-foot line
{ "type": "line", "distanceType": "feet", "distanceValue": 60 }
// Self, 10-foot radius sphere
{ "type": "sphere", "distanceType": "feet", "distanceValue": 10 }
// Self, 15-foot cube
{ "type": "cube", "distanceType": "feet", "distanceValue": 15 }
// Self, 10-foot emanation
{ "type": "emanation", "distanceType": "feet", "distanceValue": 10 }
// 1 mile
{ "type": "point", "distanceType": "miles", "distanceValue": 1 }
// Sight
{ "type": "point", "distanceType": "sight" }
// Unlimited
{ "type": "point", "distanceType": "unlimited" } en,
ru object обязательно Локализованный контент. Объекты en и ru имеют одинаковую структуру. Текстовые поля поддерживают HTML-разметку.
{
"name": "Fire Bolt", // spell name
"text": "<p>You hurl a mote of fire at a creature...</p>",
// HTML — spell description
"higherLevels": "<p>At higher levels...</p>",
// HTML or null — upcast text
"materialsText": "a tiny strip of phosphorus",
// string or null — material description
"castingCondition": "when a creature you can see..."
// string or null — reaction trigger
} Оба поля en и ru обязательны. Если доступен только один язык — продублируйте содержимое в оба поля.
classes array необязательно Классы, имеющие доступ к заклинанию. В нижнем регистре. Одинаковые 13 классов в обеих редакциях. По умолчанию пустой массив.
artificerbarbarianbardclericdruidfightermonkpaladinrangerroguesorcererwarlockwizard subclasses array необязательно Подклассы, имеющие доступ к заклинанию. В нижнем регистре, через дефис. Списки различаются между редакциями. По умолчанию пустой массив.
"subclasses": ["arcana-domain", "arcane-trickster", "eldritch-knight"] Различия между редакциями
JSON-структура заклинания идентична в обеих редакциях. Различия в содержимом: ID заклинаний, источники и доступные подклассы.
Соглашение по ID заклинаний
ID заклинания — (название + источник) в нижнем регистре, без спецсимволов. В 2014 несколько книг-источников, в 2024 только XPHB — ID различаются.
// edition2014 — source varies per book
"fireboltphb" // Fire Bolt from PHB
"shadowbladexge" // Shadow Blade from XGE
"summonbeasttce" // Summon Beast from TCE
// edition2024 — source is always XPHB (2024 Player's Handbook)
"fireboltxphb" // Fire Bolt from XPHB Книги-источники
Редакция 2014 включает заклинания из 13 книг:
PHBXGETCEEGWAIFTDSCCLLKBMTIDRotFAAGSatOGGR Редакция 2024 включает заклинания из одного источника: XPHB (Player's Handbook 2024).
Подклассы
В обеих редакциях одинаковые 13 классов. Списки подклассов различаются — 2024 добавляет новые, сохраняя большинство из 2014.
Подклассы редакции 2014 (72)
aberrant-mindalchemistambition-domain-(psa)arcana-domainarcane-archerarcane-tricksterarmorerartilleristbattle-smithchronurgy-magiccircle-of-sporescircle-of-starscircle-of-the-landcircle-of-the-mooncircle-of-wildfireclockwork-soulcollege-of-glamourcollege-of-spiritsdeath-domaindivine-souldrakewardeneldritch-knightfey-wandererforge-domaingloom-stalkergrave-domaingraviturgy-magichorizon-walkerknowledge-domainknowledge-domain-(psa)life-domainlight-domainlunar-sorcerymonster-slayernature-domainoath-of-conquestoath-of-devotionoath-of-gloryoath-of-redemptionoath-of-the-ancientsoath-of-the-crownoath-of-the-watchersoath-of-vengeanceoathbreakerorder-domainpath-of-the-ancestral-guardianpath-of-the-giantpath-of-the-totem-warriorpeace-domainpsi-warriorschool-of-illusionshadow-magicsolidarity-domain-(psa)strength-domain-(psa)swarmkeepertempest-domainthe-archfeythe-celestialthe-fathomlessthe-fiendthe-geniethe-great-old-onethe-hexbladethe-undeadthe-undyingtrickery-domaintwilight-domainwar-domainway-of-shadowway-of-the-open-handway-of-the-sun-soulzeal-domain-(psa) Подклассы редакции 2024 (91)
aberrant-mindaberrant-sorceryabjureralchemistambition-domain-(psa)arcana-domainarcane-archerarcane-tricksterarchfey-patronarmorerartilleristbanneretbattle-smithcartographercelestial-patroncircle-of-sporescircle-of-starscircle-of-the-landcircle-of-the-mooncircle-of-the-seacircle-of-the-starscircle-of-wildfireclockwork-sorceryclockwork-soulcollege-of-glamourcollege-of-lorecollege-of-spiritscollege-of-the-moondeath-domaindivine-souldivinerdraconic-sorcerydrakewardeneldritch-knightevokerfey-wandererfiend-patronforge-domaingloom-stalkergrave-domaingreat-old-one-patronhorizon-walkerillusionistknowledge-domainknowledge-domain-(psa)life-domainlight-domainlunar-sorcerymonster-slayernature-domainoath-of-conquestoath-of-devotionoath-of-gloryoath-of-redemptionoath-of-the-ancientsoath-of-the-crownoath-of-the-noble-geniesoath-of-the-watchersoath-of-vengeanceoathbreakerorder-domainpath-of-the-ancestral-guardianpath-of-the-giantpath-of-the-totem-warriorpath-of-the-wild-heartpeace-domainpsi-warriorschool-of-illusionscion-of-the-threeshadow-magicsolidarity-domain-(psa)spellfire-sorcerystrength-domain-(psa)swarmkeepertempest-domainthe-archfeythe-celestialthe-fathomlessthe-fiendthe-geniethe-great-old-onethe-hexbladethe-undeadthe-undyingtrickery-domaintwilight-domainwar-domainwarrior-of-shadowwarrior-of-the-elementsway-of-shadowway-of-the-open-handway-of-the-sun-soulwinter-walkerzeal-domain-(psa) Полный пример
{
"$schema": "https://5e-spellbook.pages.dev/spellpack.schema.json",
"format": 1,
"edition": "edition2014",
"spells": [
{
"id": "fireboltphb",
"level": 0,
"school": "evocation",
"source": "PHB",
"ritual": false,
"concentration": false,
"components": {
"verbal": true,
"somatic": true,
"material": false
},
"materials": null,
"castingTime": [
{ "value": 1, "unit": "action" }
],
"duration": { "type": "instant" },
"range": {
"type": "point",
"distanceType": "feet",
"distanceValue": 120
},
"classes": ["sorcerer", "wizard", "artificer"],
"subclasses": [],
"en": {
"name": "Fire Bolt",
"text": "<p>You hurl a mote of fire at a creature or object within range. Make a ranged spell attack against the target. On a hit, the target takes 1d10 fire damage. A flammable object hit by this spell ignites if it isn't being worn or carried.</p>",
"higherLevels": "<p>This spell's damage increases by 1d10 when you reach 5th level (2d10), 11th level (3d10), and 17th level (4d10).</p>",
"materialsText": null,
"castingCondition": null
},
"ru": {
"name": "Огненный снаряд",
"text": "<p>Вы бросаете сгусток огня в существо или предмет в пределах дистанции. Совершите дальнобойную атаку заклинанием по цели. При попадании цель получает урон огнём 1к10. Горючий предмет, по которому попало это заклинание, загорается, если его никто не несёт и не носит.</p>",
"higherLevels": "<p>Урон заклинания увеличивается на 1к10, когда вы достигаете 5-го уровня (2к10), 11-го уровня (3к10) и 17-го уровня (4к10).</p>",
"materialsText": null,
"castingCondition": null
}
}
]
}