Skip to content

Commit

Permalink
πŸ›βœ¨β™»οΈ Classes/subclasses; images in templates
Browse files Browse the repository at this point in the history
- ♻️  Refactor class and subclass

General fixes:

- πŸ› include parent source for divided adventures
- πŸ› fix item property rendering/filtering
- πŸ”‡ shorter logged stack traces

Templates and images:

- ✨ New template methods for fluff images
- ⚑️ templates using new methods for image display
- βœ… add additional example templates
  • Loading branch information
ebullient committed Jan 18, 2025
1 parent 4f55c7a commit dd143fb
Show file tree
Hide file tree
Showing 107 changed files with 3,469 additions and 1,011 deletions.
27 changes: 25 additions & 2 deletions docs/templates/dnd5e/QuteBackground.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,20 @@ Extension of [Tools5eQuteBase](Tools5eQuteBase.md).

## Attributes

[fluffImages](#fluffimages), [hasSections](#hassections), [labeledSource](#labeledsource), [name](#name), [prerequisite](#prerequisite), [reprintOf](#reprintof), [source](#source), [sourceAndPage](#sourceandpage), [tags](#tags), [text](#text), [vaultPath](#vaultpath)
[fluffImages](#fluffimages), [hasImages](#hasimages), [hasMoreImages](#hasmoreimages), [hasSections](#hassections), [labeledSource](#labeledsource), [name](#name), [prerequisite](#prerequisite), [reprintOf](#reprintof), [showAllImages](#showallimages), [showMoreImages](#showmoreimages), [showPortraitImage](#showportraitimage), [source](#source), [sourceAndPage](#sourceandpage), [tags](#tags), [text](#text), [vaultPath](#vaultpath)


### fluffImages

List of images for this background (as [ImageRef](../ImageRef.md))
List of images as [ImageRef](../ImageRef.md) (optional)

### hasImages

Return true if any images are present

### hasMoreImages

Return true if more than one image is present

### hasSections

Expand All @@ -33,6 +41,21 @@ Formatted text listing other prerequisite conditions (optional)

List of content superceded by this note (as [Reprinted](../Reprinted.md))

### showAllImages

Return embedded wikilinks for all images
If there is more than one, they will be displayed in a gallery.

### showMoreImages

Return embedded wikilinks for all but the first image
If there is more than one, they will be displayed in a gallery.

### showPortraitImage

Return an embedded wikilink to the first image
Will have the "right" anchor tag.

### source

String describing the content's source(s)
Expand Down
27 changes: 25 additions & 2 deletions docs/templates/dnd5e/QuteBastion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,20 @@ Extension of [Tools5eQuteBase](../Tools5eQuteBase.md).

## Attributes

[fluffImages](#fluffimages), [hasSections](#hassections), [hirelingDescription](#hirelingdescription), [hirelings](#hirelings), [labeledSource](#labeledsource), [level](#level), [name](#name), [orders](#orders), [prerequisite](#prerequisite), [reprintOf](#reprintof), [source](#source), [sourceAndPage](#sourceandpage), [space](#space), [spaceDescription](#spacedescription), [tags](#tags), [text](#text), [type](#type), [vaultPath](#vaultpath)
[fluffImages](#fluffimages), [hasImages](#hasimages), [hasMoreImages](#hasmoreimages), [hasSections](#hassections), [hirelingDescription](#hirelingdescription), [hirelings](#hirelings), [labeledSource](#labeledsource), [level](#level), [name](#name), [orders](#orders), [prerequisite](#prerequisite), [reprintOf](#reprintof), [showAllImages](#showallimages), [showMoreImages](#showmoreimages), [showPortraitImage](#showportraitimage), [source](#source), [sourceAndPage](#sourceandpage), [space](#space), [spaceDescription](#spacedescription), [tags](#tags), [text](#text), [type](#type), [vaultPath](#vaultpath)


### fluffImages

List of images for this bastion (as [ImageRef](../../ImageRef.md), optional)
List of images as [ImageRef](../../ImageRef.md) (optional)

### hasImages

Return true if any images are present

### hasMoreImages

Return true if more than one image is present

### hasSections

Expand Down Expand Up @@ -50,6 +58,21 @@ Formatted text listing other prerequisite conditions (optional)

List of content superceded by this note (as [Reprinted](../../Reprinted.md))

### showAllImages

Return embedded wikilinks for all images
If there is more than one, they will be displayed in a gallery.

### showMoreImages

Return embedded wikilinks for all but the first image
If there is more than one, they will be displayed in a gallery.

### showPortraitImage

Return an embedded wikilink to the first image
Will have the "right" anchor tag.

### source

String describing the content's source(s)
Expand Down
39 changes: 39 additions & 0 deletions docs/templates/dnd5e/QuteClass/HitPointDie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# HitPointDie

Describes the hit point die used by the class.

If referenced as a unit (ignoring inner attributes), it will render
formatted strings based on the class version (2024 or not).

## Attributes

[average](#average), [classic](#classic), [face](#face), [isClassic](#isclassic), [isSidekick](#issidekick), [name](#name), [number](#number), [sidekick](#sidekick)


### average

The average value of a hit dice roll

### classic


### face

Die to roll (8, 10); This will be 0 for sidekicks

### isClassic

True if this is a 2014 class

### isSidekick

Explicit test for sidekick (alternate to 0 face)

### name


### number

How many dice to roll (pretty much always 1)

### sidekick
58 changes: 58 additions & 0 deletions docs/templates/dnd5e/QuteClass/Multiclassing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Multiclassing

Describes the multiclassing information for the class.

If referenced as a unit (ignoring inner attributes), it will render
formatted text describing multiclassing requirements and proficiencies.

## Attributes

[armor](#armor), [classic](#classic), [isClassic](#isclassic), [primaryAbility](#primaryability), [requirements](#requirements), [requirementsSpecial](#requirementsspecial), [skills](#skills), [text](#text), [tools](#tools), [weapons](#weapons)


### armor

Armor proficiencies gained as formatted string
(optional)

### classic


### isClassic

True if this class is from the 2014 edition

### primaryAbility

Primary ability for multiclassing as formatted
string (optional)

### requirements

Prerequisites for multiclassing as formatted
string (optional)

### requirementsSpecial

Special prerequisites for multiclassing as
formatted string (optional)

### skills

Skill proficiencies gained as formatted string
(optional)

### text

Formatted text describing this multiclass
(optional)

### tools

Tool proficiencies gained as formatted string
(optional)

### weapons

Weapon proficiencies gained as formatted string
(optional)
104 changes: 104 additions & 0 deletions docs/templates/dnd5e/QuteClass/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# QuteClass

5eTools class attributes (`class2md.txt`)

Extension of [Tools5eQuteBase](../Tools5eQuteBase.md).

## Attributes

[classProgression](#classprogression), [fluffImages](#fluffimages), [hasImages](#hasimages), [hasMoreImages](#hasmoreimages), [hasSections](#hassections), [hitDice](#hitdice), [hitPointDie](#hitpointdie), [hitRollAverage](#hitrollaverage), [labeledSource](#labeledsource), [multiclassing](#multiclassing), [name](#name), [primaryAbility](#primaryability), [reprintOf](#reprintof), [showAllImages](#showallimages), [showMoreImages](#showmoreimages), [showPortraitImage](#showportraitimage), [source](#source), [sourceAndPage](#sourceandpage), [startingEquipment](#startingequipment), [tags](#tags), [text](#text), [vaultPath](#vaultpath)


### classProgression

Formatted callout containing class and feature progressions.

### fluffImages

List of images as [ImageRef](../../ImageRef.md) (optional)

### hasImages

Return true if any images are present

### hasMoreImages

Return true if more than one image is present

### hasSections

True if the content (text) contains sections

### hitDice

Hit dice for this class as a single digit: 8

### hitPointDie

Hit point die for this class as
[HitPointDie](HitPointDie.md)

### hitRollAverage

Average Hit dice roll as a single digit

### labeledSource

Formatted string describing the content's source(s): `_Source: <sources>_`

### multiclassing

Multiclassing requirements and proficiencies for this class as
[Multiclassing](Multiclassing.md)

### name

Note name

### primaryAbility

Formatted string describing the primary abilities for this class

### reprintOf

List of content superceded by this note (as [Reprinted](../../Reprinted.md))

### showAllImages

Return embedded wikilinks for all images
If there is more than one, they will be displayed in a gallery.

### showMoreImages

Return embedded wikilinks for all but the first image
If there is more than one, they will be displayed in a gallery.

### showPortraitImage

Return an embedded wikilink to the first image
Will have the "right" anchor tag.

### source

String describing the content's source(s)

### sourceAndPage

Book sources as list of [SourceAndPage](../../SourceAndPage.md)

### startingEquipment

Formatted text describing starting equipment as
[StartingEquipment](StartingEquipment.md)

### tags

Collected tags for inclusion in frontmatter

### text

Formatted text. For most templates, this is the bulk of the content.

### vaultPath

Path to this note in the vault
56 changes: 56 additions & 0 deletions docs/templates/dnd5e/QuteClass/StartingEquipment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# StartingEquipment

Describes the starting equipment for the class.

If referenced as a unit (ignoring inner attributes), it will render
structured text describing starting proficiencies and equipment *2014* vs
*2024*.

## Attributes

[armor](#armor), [armorString](#armorstring), [classic](#classic), [equipment](#equipment), [isClassic](#isclassic), [joinOrDefault](#joinordefault), [proficiencies](#proficiencies), [savingThrows](#savingthrows), [skills](#skills), [tools](#tools), [weapons](#weapons)


### armor

List of armor as formatted strings (links)

### armorString

Create a structured string describing armor training.
Slighly different formatting and joining for 2014 vs 2024 materials.

### classic


### equipment

List of equipment as formatted strings (links)

### isClassic

True if this class is from the 2014 edition

### joinOrDefault

Given a list of strings, return a formatted string with a conjunction.

### proficiencies

Formatted string of class proficiencies

### savingThrows

List of saving throws

### skills

List of skills as formatted strings (links)

### tools

List of tools as formatted strings (links)

### weapons

List of weapons as formatted strings (links)
Loading

0 comments on commit dd143fb

Please sign in to comment.