### XML Element Example
Source: https://github.com/vidalvanbergen/fightclub5exml/blob/master/SOURCES.md
Demonstrates the basic structure of an XML element with a start tag, content, and end tag. Used for defining named properties.
```xml
Wizard
```
--------------------------------
### Install xsltproc on Windows
Source: https://github.com/vidalvanbergen/fightclub5exml/blob/master/README.md
Use Chocolatey to install the xsltproc utility on Windows systems.
```bash
choco install xsltproc
```
--------------------------------
### Install libxslt on macOS
Source: https://github.com/vidalvanbergen/fightclub5exml/blob/master/README.md
Use Homebrew to install the libxslt package on macOS systems.
```bash
brew install libxslt
```
--------------------------------
### Compendium Tag Example
Source: https://github.com/vidalvanbergen/fightclub5exml/blob/master/SOURCES.md
An example of the opening compendium tag with the auto_indent attribute.
```xml
```
--------------------------------
### Define a Ranger Class in XML
Source: https://github.com/vidalvanbergen/fightclub5exml/blob/master/SOURCES.md
Example of a complete class definition for a Ranger, including all proficiencies, starting wealth, spellcasting details, and autolevel progression.
```xml
Ranger10Strength, Dexterity, Animal Handling, Athletics, Insight, Investigation, Nature, Perception, Stealth, Survival3Light Armor, Medium Armor, ShieldsSimple Weapons, Martial WeaponsNone5d4x10WisdomL0, 20, 30, 30, 4, 20, 4, 20, 4, 30, 4, 30, 4, 3, 20, 4, 3, 20, 4, 3, 30, 4, 3, 30, 4, 3, 3, 10, 4, 3, 3, 10, 4, 3, 3, 20, 4, 3, 3, 20, 4, 3, 3, 3, 10, 4, 3, 3, 3, 10, 4, 3, 3, 3, 20, 4, 3, 3, 3, 2Starting RangerAs a 1st-level Ranger, you begin play with 10 + your Constitution modifier hit points.You are proficient with the following items, in addition to any proficiencies provided by your race or background. • Armor: light armor, medium armor, shields • Weapons: simple weapons, martial weapons • Tools: none
```
--------------------------------
### Define a Monster in XML
Source: https://github.com/vidalvanbergen/fightclub5exml/blob/master/SOURCES.md
A complete example of a monster definition including stats, traits, and actions.
```xml
Adult Red DragonHdragonChaotic Evil19 (natural armor)256 (19d12+133)walk 40 ft., climb 40 ft., fly 80 ft.271025161321Dex +6, Con +13, Wis +7, Cha +11Perception +13, Stealth +623Common, Draconic17fireblindsight 60 ft., darkvision 120 ft.Legendary Resistance (3/Day)3/DAYIf the dragon fails a saving throw, it can choose to succeed instead.MultiattackThe dragon can use its Frightful Presence. It then makes three attacks: one with its bite and two with its claws.BiteMelee Weapon Attack: +14 to hit, reach 10 ft., one target. Hit: 19 (2d10 + 8) piercing damage plus 7 (2d6) fire damage.Bite|+14|2d10+8ClawMelee Weapon Attack: +14 to hit, reach 5 ft., one target. Hit: 15 (2d6 + 8) slashing damage.Claw|+14|2d6+8TailMelee Weapon Attack: +14 to hit, reach 15 ft., one target. Hit: 17 (2d8 + 8) bludgeoning damage.Tail|+14|2d8+8Frightful Presence
```
--------------------------------
### Define a Feat in XML
Source: https://github.com/vidalvanbergen/fightclub5exml/blob/master/SOURCES.md
Example of a feat definition including name, prerequisites, proficiency, description text, and ability score modifiers.
```xml
Squat Nimbleness (Dexterity + Acrobatics)Dwarf, Gnome, Halfling, Small RaceAcrobaticsYou are uncommonly nimble for your race. You gain the following benefits:
• Increase your Strength or Dexterity score by 1, to a maximum of 20.
• Increase your walking speed by 5 feet.
• You gain proficiency in the Acrobatics or Athletics skill (your choice). If you're already proficient in the skill, your proficiency bonus is doubled for any check you make with it.
• You have advantage on any Strength (Athletics) or Dexterity (Acrobatics) check you make to escape from being grappled.
Source: Xanathar's Guide to Everything p. 75dexterity +1speed +5
```
--------------------------------
### XML Element with Text Content Example
Source: https://github.com/vidalvanbergen/fightclub5exml/blob/master/SOURCES.md
An example of an XML element named 'name' containing text content, representing a specific value like a character's name.
```xml
Gandalf the Grey
```
--------------------------------
### Define a Spell in XML
Source: https://github.com/vidalvanbergen/fightclub5exml/blob/master/SOURCES.md
Full example of a spell definition including name, level, school, casting time, range, components, duration, description text, and roll formulas.
```xml
Magic Missile1EVFighter (Eldritch Knight), Sorcerer, Wizard120 feetV, SInstantaneousYou create three glowing darts of magical force. Each dart hits a creature of your choice that you can see within range. A dart deals 1d4+1 force damage to its target. The darts all strike simultaneously and you can direct them to hit one creature or several.At Higher Levels:When you cast this spell using a spell slot of 2nd level or higher, the spell creates one more dart for each slot above 1st.Source: Player's Handbook (2014) p. 2571d4+1(1d4+1)+(1d4+1)+(1d4+1)
```
--------------------------------
### XML Element with Multiple Text Values Example
Source: https://github.com/vidalvanbergen/fightclub5exml/blob/master/SOURCES.md
Demonstrates an element that accepts multiple text values, separated by commas. This is used for properties that can have several associated entries, like classes.
```xml
Fighter, Wizard
```
--------------------------------
### Self-Closing XML Element Example
Source: https://github.com/vidalvanbergen/fightclub5exml/blob/master/SOURCES.md
Shows how to use a self-closing tag for elements that do not contain content or are optional. Useful for template elements.
```xml
```
--------------------------------
### Define Plate Armor in XML
Source: https://github.com/vidalvanbergen/fightclub5exml/blob/master/SOURCES.md
Example of defining heavy armor with specific properties like AC, strength requirement, and stealth disadvantage.
```xml
Plate ArmoruncommonHA651500.018115Plate consists of shaped, interlocking metal plates to cover the entire body. A suit of plate includes gauntlets, heavy leather boots, a visored helmet, and thick layers of padding underneath the armor. Buckles and straps distribute the weight over the body.The wearer has disadvantage on Stealth (Dexterity) checks.If the wearer has a Strength score lower than 15, their speed is reduced by 10 feet.Source: Player's Handbook (2014) p. 145
```
--------------------------------
### Create Collection File with Simple References
Source: https://context7.com/vidalvanbergen/fightclub5exml/llms.txt
Collection files list source XML files to merge using simple elements. This method is suitable for basic compendium structures.
```xml
```
--------------------------------
### Navigate to Repository Root
Source: https://github.com/vidalvanbergen/fightclub5exml/blob/master/README.md
Change the current working directory to the repository root folder.
```bash
cd C:\Users\YOUR_USER_NAME\Documents\FightClub5eXML-master
```
```bash
cd /Users/YOUR_USER_NAME/Documents/FightClub5eXML-master
```
--------------------------------
### Generate partial collection files automatically
Source: https://github.com/vidalvanbergen/fightclub5exml/blob/master/SOURCES.md
Run this utility script to scan a directory for source XML files and generate a corresponding partial collection file.
```bash
/Utilities/source-xml-collector.sh /path/to/source/
```
--------------------------------
### Validate XML with xmllint
Source: https://github.com/vidalvanbergen/fightclub5exml/blob/master/SOURCES.md
Use the command line to validate an XML file against the provided XSD schema.
```bash
xmllint --noout --schema Utilities/compendium.xsd Sources/CoreRulebooks.xml
```
--------------------------------
### Extend Spell Classes
Source: https://github.com/vidalvanbergen/fightclub5exml/blob/master/SOURCES.md
Example of adding additional classes to an existing spell by creating a partial XML definition.
```xml
Magic MissileBard (Esoteric)
```
--------------------------------
### Build Collections Script
Source: https://github.com/vidalvanbergen/fightclub5exml/blob/master/CONTRIBUTING.md
Execute the build script to compile collections. This is a recommended step for testing changes before submitting a pull request.
```bash
./build-collections.sh
```
--------------------------------
### Define Longsword in XML
Source: https://github.com/vidalvanbergen/fightclub5exml/blob/master/SOURCES.md
Example of defining a melee weapon with versatile properties, damage types, and proficiency information.
```xml
LongswordcommonM315.0V,M1d81d10SVersatile: This weapon can be used with one or two hands. A damage value in parentheses appears with the property—the damage when the weapon is used with two hands to make a melee Attack.Proficiency: martial, longswordSource: Player's Handbook (2014) p. 149
```
--------------------------------
### Batch Compile All Collections with build-collections.sh
Source: https://context7.com/vidalvanbergen/fightclub5exml/llms.txt
The build-collections.sh script compiles all collection files in parallel. Options include removing edition tags, validating XML, and compiling specific files.
```bash
# Compile all collections in the Collections directory
./build-collections.sh
# Compile all collections and remove '[5.5e]' tags from output
./build-collections.sh -5.5e
# Compile specific collection files only
./build-collections.sh Core_Rulebooks_5e.xml Core_Supplements_5e.xml
# Compile with XML schema validation (requires xmllint)
./build-collections.sh --validate
# Combine options: compile specific files with tag removal
./build-collections.sh -5.5e WotC_5.5e+Legacy_5e.xml
# Output:
# Starting compilation using 8 cores.
# > Created: 'Core_Rulebooks_5e.xml'
# > Created: 'Core_Supplements_5e.xml'
# Compilation completed!
```
--------------------------------
### Build Collections Script Usage
Source: https://github.com/vidalvanbergen/fightclub5exml/blob/master/README.md
Use this bash script to compile all collections in the Collections directory into compendiums. Options allow for removing version tags and specifying individual collections.
```bash
Usage:
./build-collections.sh [-5.5e] [-h/?] [collection_names...]
-5.5e Remove '[5.5e]' from the generated compendiums.
collection_names Optional list of specific collections to compile.
-h/? Display this help message.
If no collection names are provided, all XML files in the 'Collections' directory will be processed.
Examples:
./build-collections.sh Compile all collections.
./build-collections.sh -5.5e Compile all collections and remove '[5.5e]'.
./build-collections.sh collection1.xml Compile only 'collection1.xml'.
./build-collections.sh -5.5e collection1.xml collection2.xml Compile 'collection1.xml' and 'collection2.xml' and remove '[5.5e]'.
```
--------------------------------
### Define a collection using elements
Source: https://github.com/vidalvanbergen/fightclub5exml/blob/master/SOURCES.md
Use this method for a straightforward list of source XML files. Each referenced file must contain a root element.
```xml
```
--------------------------------
### Define Longbow in XML
Source: https://github.com/vidalvanbergen/fightclub5exml/blob/master/SOURCES.md
Example of defining a ranged weapon with ammunition properties, damage, range, and descriptive text about ammunition usage.
```xml
LongbowcommonR250.0A,H,2H,M1d8P150/600Ammo: arrowAmmunition: You can use a weapon that has the ammunition property to make a ranged attack only if you have ammunition to fire from the weapon. Each time you attack with the weapon, you expend one piece of ammunition. Drawing the ammunition from a quiver, case, or other container is part of the attack (you need a free hand to load a one-handed weapon). At the end of the battle, you can recover half your expended ammunition by taking a minute to search the battlefield.
```
--------------------------------
### Compile Collection to Compendium
Source: https://github.com/vidalvanbergen/fightclub5exml/blob/master/README.md
Execute xsltproc to merge a collection file into a final compendium XML file.
```bash
xsltproc --xinclude -o Compendiums/WotC_only.xml Utilities/merge.xslt Collections/WotC_5e_only.xml
```
--------------------------------
### Generate Collection XML with Bash Script
Source: https://github.com/vidalvanbergen/fightclub5exml/blob/master/Utilities/README.md
Execute the generate-partial-collection.sh script to recursively find source XML files within a specified directory and create a partial collection.xml file.
```bash
./generate-partial-collection.sh Sources/DND_5e/Homebrew/
```
--------------------------------
### Create Collection File with XInclude
Source: https://context7.com/vidalvanbergen/fightclub5exml/llms.txt
XInclude allows modular inclusion of partial collection files for complex compendium builds. It enables combining multiple source categories efficiently.
```xml
```
--------------------------------
### Validate XML Files with xmllint
Source: https://context7.com/vidalvanbergen/fightclub5exml/llms.txt
Use xmllint to validate compendium and collection files against their respective XSD schemas.
```bash
# Validate a compendium source file
xmllint --noout --schema Utilities/compendium.xsd Sources/DND_5e/WizardsOfTheCoast/01_Core/01_Players_Handbook/spells-phb.xml
# Validate a collection file
xmllint --noout --schema Utilities/collection.xsd Collections/Core_Rulebooks_5e.xml
# Validate all source files in a directory
for f in Sources/DND_5e/WizardsOfTheCoast/01_Core/01_Players_Handbook/*.xml; do
xmllint --noout --schema Utilities/compendium.xsd "$f" && echo "✓ $f"
done
# Output on success: (no output, exit code 0)
```
--------------------------------
### Windows Build Collections Script Usage
Source: https://github.com/vidalvanbergen/fightclub5exml/blob/master/README.md
This is the Windows batch file equivalent for compiling collections into compendiums. It supports similar options to the bash script.
```batch
WIN-build-collections.bat [-5.5e] [-h/-?] [collection_names...]
```
--------------------------------
### Define the base XML structure
Source: https://github.com/vidalvanbergen/fightclub5exml/blob/master/SOURCES.md
The standard template for a Fight Club 5e compendium XML file.
```xml
```
--------------------------------
### Build Single Collection Manually
Source: https://github.com/vidalvanbergen/fightclub5exml/blob/master/CONTRIBUTING.md
Manually build a specific collection using xsltproc and the merge XSLT. This allows for targeted testing of collection updates.
```bash
xsltproc --xinclude -o Compendiums/