Example Mods Walkthrough
Daggerfall Forever ships with 8 example mods in mods/examples/. They demonstrate both pure JSON data overrides and scripted plugin.js gameplay systems.
1. steel-and-sinew (JSON Combat Override)
- Files:
manifest.json,combat.json - What it does: Adjusts armor-weight fatigue drain so heavy armor is more exhausting while light armor is more agile.
- How it works: Declares
"data": { "combat": "combat.json" }with noplugin.js.modDataSync.jsmerges its multipliers (heavyArmorFatigueMultiplier: 1.25,mediumArmorFatigueMultiplier: 1.05,lightArmorFatigueMultiplier: 0.85) into the combat fatigue pipeline.
2. apothecary-elixirs (JSON Potion Recipes)
- Files:
manifest.json,potions.json - What it does: Adds two new brewable potions: Pure Vigor Elixir (price
95, magnitude40–80) and Frostward Cordial (price85,100%base chance). - How it works: Declares
"data": { "potions": "potions.json" }.potions.jsonis an array of recipe objects specifyingname,displayName,price,ingredients(template IDs),effect,textureRecord, andsettings. On sync,overridePotionRecipesregisters them into the alchemy table.
3. desert-frost (Scripted Environmental Hazard)
- Files:
manifest.json,plugin.js - What it does: Exposes outdoor adventurers in desert or mountain biomes at night to freezing winds that drain fatigue unless protected by frost resistance.
- How it works: Subscribes to
api.events.on('worldTick', ...), checksapi.world.isNight(),!api.world.isInterior(), andapi.world.getCurrentBiome(). If the player lacksapi.player.hasEffect('resistFrost'), it callsapi.player.damageFatigue(5), tracks ticks inapi.storage, and warns the player viaapi.ui.notifyevery 6 ticks.
4. blood-tithe (Scripted Unlockable Feat)
- Files:
manifest.json,plugin.js - What it does: Tracks melee kills; after slaying 5 enemies, unlocks the Blood-Tithe perk, which siphons
+15 HPand+30 SPon every subsequent kill. - How it works: Registers the perk metadata via
api.perks.register, listens tocombat:enemyKill, incrementsslainCountinapi.storage, callsapi.perks.unlock('blood-tithe')at 5 kills, and heals/restores fatigue on future kills wheneverapi.perks.has('blood-tithe')is true.
5. heroic-feats (Condition-Checked Milestone Perks)
- Files:
manifest.json,plugin.js - What it does: Introduces 5 milestone feats that automatically activate once character requirements are met:
- Blade Mastery -
+15%damage and+10%crit chance with Long Blades (Requires Long Blade>= 50). - Arcane Reservoir -
+25Max Magicka (Requires Mysticism>= 50). - Shadow Step -
40%quieter stealth movement and+25%backstab damage (Requires Stealth>= 50). - Iron Constitution -
-30%disease/poison susceptibility and+15Max HP (Requires Level>= 5). - Treasure Hunter -
+20%gold in dungeon chests and corpses (Requires Mercantile>= 40).
- Blade Mastery -
- How it works: Each
api.perks.registercall includes acheck: (entity) => booleanpredicate evaluated againstentity.skills/entity.level.
6. duelists-flow (Combo System + Perk + Localization)
- Files:
manifest.json,plugin.js - What it does: Adds a rhythmic combat combo system. Consecutive landed hits within
6000 msbuild a combo streak:- 3 hits (Flow State): Restores
+12 FP. - 5 hits (Deadly Precision): Restores
+5 HP,+25 FP, and unlocks the Duelist's Trance perk (+5%hit chance and halved combo-break fatigue penalty). - 7+ hits (odd streaks, Master Duelist): Restores
+10 HPand+35 FP. - Missed swing (with streak >= 2): Breaks flow and drains
10 FP(5 FPwith Duelist's Trance).
- 3 hits (Flow State): Restores
- How it works: Keeps ephemeral
currentStreakin memory (avoiding save bloat), persistsbestStreakinapi.storage, usesapi.ui.showMidScreenfor the live combo counter, and localizes all messages viaapi.ui.t.
7. items-quality (Quality Tiers + Material Rebalance)
- Files:
manifest.json,quality.json,materials.json,plugin.js - What it does: Adds 5 craftsmanship quality tiers (Crude, Standard, Fine, Superior, Masterwork) to weapons and armor, modifying damage/armor (
-1to+3), durability loss, max condition, and trade value (0.6xto4.0x), alongside flattened material scaling. - How it works: Declares
"data": { "quality": "quality.json", "materials": "materials.json" }.modDataSync.jsreads these tables to enable quality rolls on loot and shop stock, whileplugin.jslogs initialization.
8. weapons-reforged (Material JSON + On-Hit Script Effects)
- Files:
manifest.json,materials.json,plugin.js - What it does: Gives high-tier weapon materials distinct combat identities on top of stat rebalancing:
- Adamantium (
6):20%chance on hit to sunder enemy armor (-25condition or+2armor penalty). - Ebony (
7): Siphons10fatigue from the target and restores10fatigue to the player. - Daedric (
9): Curses the wielder - missed swings drain15fatigue, and attacking below25%HP drains5 HP. - Wall Clank: Notifies the player when a swing strikes a stone wall (
weaponWallClank).
- Adamantium (
- How it works: Combines
materials.jsondata overrides withcombatAttackResolvedandweaponWallClanklisteners inplugin.js.