This is a web-based skills database, editor and interactive skill tree calculator/planner for MedianXL (Diablo 2 mod). Editor allows users to manage skill parameters like classes, tags, max level and scaling data through a SQLite database interface. Planner provides a fully functional skill tree with character build planning capabilities for different versions of modification (current version: 2.12).
- Database: Ensure
.sqlitefile for a relevant version is present - Usage:
- Open
index.htmlfor skills listing - Open
planner.htmlfor interactive skill tree and build planning - Open
edit.htmlfor database editing (only enabled on localhost) - Open
status.htmlfor current progress display
- Open
medianxl-db/
├── index.html # Skills listing page
├── edit.html # Database editor interface
├── planner.html # Interactive skill tree
├── status.html # Progress status page
├── script.js # Skills viewer functionality
├── utils.js # Utility functions
├── style.css # Main styling
├── skills.sqlite # SQLite database
├── character/ # Character management
├── skills/ # Skills management/classes
├── edit/ # Edit panel modules
├── tree/ # Skill tree modules
├── py/ # Python utilities
├── spellcheck/ # Python spellchecker
└── icons/ # Skill icons and portraits
validate_skill_placeholders.py- Validates skill description placeholders against the databaseextract_placeholder_skills.py- Lists skills that use placeholders in their descriptionsextract_skills_without_placeholders.py- Lists skills missing any placeholder usageextract_non_placeholder_lines.py- Extracts plain text (non-placeholder) lines from descriptionsdb_to_json.py- Extracts database to json filescalculate_mana_params.py- Calculates 3 mana cost params based on level:mana_cost input
-- Core tables
classes (id, name, image_prefix) -- image_prefix stores just the prefix (ama, bar, shared, etc.)
classTabs (id, class_id, tab_index, name)
skills (id, name, display_name, class_id, tab_index, row, col, image, restriction, description, skill_effect, version_id)
skilltags (id, name)
skill_skilltags (skill_id, tag_id) -- Many-to-many relationship
versions (id, major, minor, name, is_active)
-- Stats and scaling system
stats (id, key, name, description, format)
skill_scaling (skill_id, level, stat_id, occurrence_index, value0, value1, value2, value3, version_id)
skill_scaling_constants (skill_id, stat_id, occurrence_index, value0, value1, value2, value3, value0_constant, value1_constant, value2_constant, value3_constant, version_id)
skill_max_levels (skill_id, base_max_level, affected_by_specialization, can_add_points, version_id)
skill_prerequisites (id, skill_id, requirement_type, requirement_value, target_skill_id, target_tab_id, version_id)Location: edit/edit-autocomplete.js
Features:
- Immediate activation: Starts after typing
{{or[[ - Fuzzy filtering: Finds stats or skills even with partial or out-of-order characters
- Score-based ordering: Stats ordered by score
- Smart completion: Completes names in
{{stat}}or[[skill]]format with automatic parameter expansion - Custom styling: Dark theme integration with usage count display
- Keyboard navigation: Arrow keys, Tab completion, Escape to close
Scoring System:
- Exact match: 1000 points
- Starts with query: 500+ points
- Contains query: 200+ points
- Name contains query: 100+ points
- Fuzzy match: 50+ points
Location: edit/edit-validation.js
Features:
- Syntax checking: Detects mismatched braces, triple braces, unclosed placeholders
- Real-time validation: Checks descriptions and restrictions before saving
- Error prevention: Blocks saves with syntax errors
- User feedback: Clear error messages with context
Validation Rules:
- No triple braces
{{{,}}},[[[or]]] - Matching pairs of
{{and}}or[[[and]]] - No unclosed placeholders
- Warns about single braces that look like typos
Location: edit/edit-scaling.js, utils.js, skills/Skill.js
Implementation Details:
- Stat Order Extraction: Parses
skill_effectto find stats in appearance order with occurrence tracking - Placeholder Expansion: Each
{{stat}}placeholder gets its correct scaling values based on occurrence index - Constants Support: Constants can be set for specific occurrences of duplicate stats
- Occurrence Tracking: Each stat instance gets a unique
occurrence_index(0, 1, 2, etc.) - Separate Scaling Values: Each instance can have completely different scaling values
- Visual Indicators: Duplicate stats display as "Damage #2", "Damage #3" etc.
- Order Preservation: Stats appear in scaling section in the exact order they appear in skill descriptions
Example Usage:
Skill Effect:
{{range}}
Some text/Subskill
{{range}}
Scaling Section will show:
- Range: X yards (first instance)
- Some text/Subskill
- Range: X yards (second instance)
Each can have completely different scaling values.
Location: utils.js
Tag Groups:
- Skill Category
- Damage
- Summon
- Teleport
- Custom
Features:
- Centralized tag definitions shared across the application
- Used for filtering, tooltips, and skill categorization
- Displayed in tree tooltips for quick skill type identification
Location: Character.js, character-state.js
Architecture:
- Instance-based design: Character class holds all state and behavior
- Singleton pattern: Single character instance managed by character-state.js
- Backward compatibility: Wrapper functions maintain existing API
- Modular validation: Specialized skill classes handle restriction logic
Character Class Features:
- Instance properties: level, className, skillPoints, maxLevels, questsCompleted, oSkills
- Quest management: Calculate quest points based on character level and completion status
- Skill point calculations: Available, spent, and remaining points
- State management: Export/import for build saving and loading
- oSkills management: Add skills from other classes to your build
Validation System:
- Prerequisite validation: Real-time checking of skill/level/tree requirements
- Class-specific restrictions: Coven, Proficiency, Mastery, and Ultimate skill limits
- OR logic support: Some skills require only ONE of multiple prerequisites
- Dynamic max levels: Efficient calculation with caching and dependency tracking
Class-Specific Restrictions:
- Coven (Sorceress): Pick 2 of 4 exclusive skills (Living Flame, Warp Armor, Snow Queen, Vengeful Power)
- Proficiency (Barbarian): Pick 2 of 5 exclusive skills (Mighty Vigor, Aptitude, Pillage, Warder, Unyielding)
- Mastery: Maximum 3 different Mastery skills across all classes
- Ultimate: Only one Ultimate skill per class allowed
- Tooltips display restriction messages when attempting to allocate beyond limits
Location: skill-calculations.js
Example Max Level Modifiers:
- Specialization: +1 max level per 2 points for active skills
- Barkskin: +1 max level per 5 character levels (self-scaling)
- Noxious Mastery: +1 Curare max level per 2 points
- Lioness: +1 max level per 3 points in Spear tree (self-scaling based on points spent)
Devotion Checking:
- Validates Devotion restrictions (Paladin, Amazon)
- Prevents allocation of groups of skills when devotion is active
- Real-time checking as skills are allocated
Location: py/ folder
Scripts:
-
validate_skill_placeholders.py- Checks all skill placeholders against scaling/stat data
- Finds missing stats, invalid keys, bad references
- Outputs error and summary reports
-
extract_placeholder_skills.py- Extracts skills with
{{stat}}or[[skill]]in descriptions/restrictions - Counts placeholder and stat usages
- Groups output by class and category
- Extracts skills with
-
extract_skills_without_placeholders.py- Lists skills with text but no
{{placeholder}} - Helps identify legacy or incomplete skill info
- Lists skills with text but no
-
extract_non_placeholder_lines.py- Extracts all non-placeholder description/restriction text lines
- Useful for finding standard phrases, warnings, or static lines
-
db_to_json.py- Extracts all data from database and saves it as json format
-
calculate_mana_params.py- Calculates the 3 required parameters for
{{mana_cost}}stat based on in game level and cost mapping - Requires the data to be passed in one of 2 different ways:
- Command line parameter in this format
"[level1: cost1], [level2: cost2], [level3: cost3]"eg. "[1: 10], [2: 12], [3: 14]" - CSV file with name
mana_cost_input.csv, columns: 'lvl' and 'cost', columns separated with "," and rows with "\n" - Output are 3 values per potential solution: "min_mana", "lvl_mana" and "shift"
- Calculates the 3 required parameters for
// Interactive tooltips with scaling
showTooltip() → getSkillCategoryTags() → buildTooltipContent() → expandPlaceholders()
// Shows Skill Category, Summon, and Teleport tags// Stat placeholder auto-expansion examples
{{mana_cost}} → {{mana_cost:%value0%}} (if format is "{name}: {value0}")
{{cold_damage}} → {{cold_damage:%value0%,%value1%}} (if format is "{name}: {value0}-{value1}")
// Skill placeholder examples
[[fireball]] → Displays skill's name (e.g., "Fireball") with a class `has-text-success`
// Skill placeholders reference other skills by their internal name- Uses SQL.js for client-side SQLite operations
- Supports import/export of database files
- Real-time validation of stat references
- SQL.js 1.13.0: Client-side SQLite database
- Bulma CSS 1.0.1: UI framework
- jQuery 3.7.1: DataTables prerequisite
- DataTables 2.3.3: Skills listing table
- Font Awesome 6.0.0: Icons for navigation
- Python 3.9+: For data extraction and validation scripts