V1.22.0: campaign settings for dice, scores, multiclassing, auto-rolls, XP and crits
- Settings grouped into Characters, Dice & rolls, Combat and Progression - Dice: digital, physical or both; a campaign's own choice applies to every character - Ability scores by 4d6, the standard array or point buy (27 points, 8 to 15) - Track XP can be turned off for milestone levelling: XP is hidden and not awarded - New settings saved ahead of their features: multiclassing, auto-rolled monster and NPC attacks, roll visibility, hidden monster rolls, HP on level up, crit rule - docs/CAMPAIGN_SETTINGS.md lists every setting Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -41,7 +41,7 @@ import { effectsSummary } from '../lib/gear';
|
||||
import { extractErrorMessage, spellLevelLabel } from '../lib/format';
|
||||
import { matchesSearch, type EntryKind, type EntryRef } from '../lib/campaignEntries';
|
||||
import { speciesIcon } from '../lib/speciesIcons';
|
||||
import type { CharacterSummary, Encounter, EncounterMode } from '../api/types';
|
||||
import type { CampaignDiceMode, CharacterSummary, CritRule, Encounter, EncounterMode, HpMethod, RollVisibility, ScoreMethod } from '../api/types';
|
||||
|
||||
// How the encounter list can be ordered. "custom" is the campaign's own order,
|
||||
// which the DM arranges; the rest only change what this browser shows.
|
||||
@@ -787,79 +787,163 @@ export function CampaignHomePage() {
|
||||
startingItemCount: Number(fd.get('startingItemCount')),
|
||||
startingSpellCount: Number(fd.get('startingSpellCount')),
|
||||
skipMotivationRoll: fd.get('skipMotivationRoll') === 'on',
|
||||
abilityScoreMethod: fd.get('abilityScoreMethod') as ScoreMethod,
|
||||
showMonsterHp: fd.get('showMonsterHp') === 'on',
|
||||
subclassesEnabled: fd.get('subclassesEnabled') === 'on',
|
||||
multiclassEnabled: fd.get('multiclassEnabled') === 'on',
|
||||
areaAttackAcPenalty: Number(fd.get('areaAttackAcPenalty')),
|
||||
maxEquipped: Number(fd.get('maxEquipped')),
|
||||
maxEquippedWeapons: Number(fd.get('maxEquippedWeapons')),
|
||||
diceMode: fd.get('diceMode') as CampaignDiceMode,
|
||||
rollVisibility: fd.get('rollVisibility') as RollVisibility,
|
||||
hideMonsterRolls: fd.get('hideMonsterRolls') === 'on',
|
||||
autoRollMonsters: fd.get('autoRollMonsters') === 'on',
|
||||
autoRollNpcs: fd.get('autoRollNpcs') === 'on',
|
||||
critRule: fd.get('critRule') as CritRule,
|
||||
trackXp: fd.get('trackXp') === 'on',
|
||||
hpOnLevelUp: fd.get('hpOnLevelUp') as HpMethod,
|
||||
});
|
||||
}}
|
||||
>
|
||||
<div className="grid grid-cols-3">
|
||||
<div className="field">
|
||||
<label>Starting gold</label>
|
||||
<NumberInput name="startingGold" min={0} max={1000000} keepValue defaultValue={campaign.startingGold} />
|
||||
<fieldset className="settings-group">
|
||||
<legend>Characters</legend>
|
||||
<div className="grid grid-cols-3">
|
||||
<div className="field">
|
||||
<label>Starting gold</label>
|
||||
<NumberInput name="startingGold" min={0} max={1000000} keepValue defaultValue={campaign.startingGold} />
|
||||
</div>
|
||||
<div className="field">
|
||||
<label>Starting items (weapons + items)</label>
|
||||
<NumberInput name="startingItemCount" min={0} max={50} keepValue defaultValue={campaign.startingItemCount} />
|
||||
</div>
|
||||
<div className="field">
|
||||
<label>Starting spells</label>
|
||||
<NumberInput name="startingSpellCount" min={0} max={50} keepValue defaultValue={campaign.startingSpellCount} />
|
||||
</div>
|
||||
</div>
|
||||
<div className="field">
|
||||
<label>Starting items (weapons + items)</label>
|
||||
<NumberInput name="startingItemCount" min={0} max={50} keepValue defaultValue={campaign.startingItemCount} />
|
||||
<label>Ability scores are made by</label>
|
||||
<select name="abilityScoreMethod" defaultValue={campaign.abilityScoreMethod}>
|
||||
<option value="ROLL_4D6">Rolling 4d6 and dropping the lowest, six times</option>
|
||||
<option value="STANDARD_ARRAY">The standard array: 15, 14, 13, 12, 10, 8</option>
|
||||
<option value="POINT_BUY">Point buy: 27 points, scores 8 to 15</option>
|
||||
</select>
|
||||
</div>
|
||||
<div className="field">
|
||||
<label>Starting spells</label>
|
||||
<NumberInput name="startingSpellCount" min={0} max={50} keepValue defaultValue={campaign.startingSpellCount} />
|
||||
<label className="checkbox-row">
|
||||
<input type="checkbox" name="skipMotivationRoll" defaultChecked={campaign.skipMotivationRoll} />
|
||||
Skip the motivation step when building a character
|
||||
</label>
|
||||
<label className="checkbox-row mt-sm">
|
||||
<input type="checkbox" name="subclassesEnabled" defaultChecked={campaign.subclassesEnabled} />
|
||||
Characters choose a subclass (untick and every class follows one path, with nothing to choose)
|
||||
</label>
|
||||
<label className="checkbox-row mt-sm">
|
||||
<input type="checkbox" name="multiclassEnabled" defaultChecked={campaign.multiclassEnabled} />
|
||||
Multiclassing: on a level up a character may take a level in another class whose ability requirements they meet
|
||||
</label>
|
||||
<label className="flex-row flex-wrap gap-sm mt-sm">
|
||||
Equipped at once
|
||||
<NumberInput
|
||||
name="maxEquipped"
|
||||
min={1}
|
||||
max={20}
|
||||
keepValue
|
||||
defaultValue={campaign.maxEquipped}
|
||||
style={{ width: 70 }}
|
||||
title="How many weapons and items a character can have equipped together. Only equipped gear can be used in an encounter or gives its effects."
|
||||
/>
|
||||
things, of which
|
||||
<NumberInput
|
||||
name="maxEquippedWeapons"
|
||||
min={0}
|
||||
max={20}
|
||||
keepValue
|
||||
defaultValue={campaign.maxEquippedWeapons}
|
||||
style={{ width: 70 }}
|
||||
title="How many of those can be weapons. A weapon for each hand, like a pair of daggers, is made as one weapon."
|
||||
/>
|
||||
<span className="combatant-sub">
|
||||
can be weapons. Armor and shields are items and count. Lowering these takes nothing off anyone; they are checked when
|
||||
something is put on.
|
||||
</span>
|
||||
</label>
|
||||
</fieldset>
|
||||
|
||||
<fieldset className="settings-group">
|
||||
<legend>Dice & rolls</legend>
|
||||
<div className="grid grid-cols-2">
|
||||
<div className="field">
|
||||
<label>Dice at this table</label>
|
||||
<select name="diceMode" defaultValue={campaign.diceMode}>
|
||||
<option value="BOTH">Both: digital, or type in what a real die shows</option>
|
||||
<option value="DIGITAL">Digital only: the app rolls</option>
|
||||
<option value="PHYSICAL">Physical only: real dice, results typed in</option>
|
||||
</select>
|
||||
</div>
|
||||
<div className="field">
|
||||
<label>Who sees a roll</label>
|
||||
<select name="rollVisibility" defaultValue={campaign.rollVisibility}>
|
||||
<option value="ALL">Everyone sees every roll</option>
|
||||
<option value="OWN">Players see their own; the DM sees all</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label className="checkbox-row">
|
||||
<input type="checkbox" name="skipMotivationRoll" defaultChecked={campaign.skipMotivationRoll} />
|
||||
Skip the motivation step when building a character
|
||||
</label>
|
||||
<label className="checkbox-row mt-sm">
|
||||
<input type="checkbox" name="showMonsterHp" defaultChecked={campaign.showMonsterHp} />
|
||||
Players see the exact hit points of monsters and NPCs in encounters (untick for a health bar only)
|
||||
</label>
|
||||
<label className="checkbox-row mt-sm">
|
||||
<input type="checkbox" name="subclassesEnabled" defaultChecked={campaign.subclassesEnabled} />
|
||||
Characters choose a subclass (untick and every class follows one path, with nothing to choose)
|
||||
</label>
|
||||
<label className="flex-row flex-wrap gap-sm mt-sm">
|
||||
Area attack AC penalty
|
||||
<NumberInput
|
||||
name="areaAttackAcPenalty"
|
||||
min={0}
|
||||
max={10}
|
||||
keepValue
|
||||
defaultValue={campaign.areaAttackAcPenalty}
|
||||
style={{ width: 70 }}
|
||||
title="An attack on several targets is harder to land: each target's AC counts as this much higher for every target beyond the first. 0 turns the penalty off."
|
||||
/>
|
||||
<span className="combatant-sub">added to each target's AC for every target beyond the first (0 for none)</span>
|
||||
</label>
|
||||
<label className="flex-row flex-wrap gap-sm mt-sm">
|
||||
Equipped at once
|
||||
<NumberInput
|
||||
name="maxEquipped"
|
||||
min={1}
|
||||
max={20}
|
||||
keepValue
|
||||
defaultValue={campaign.maxEquipped}
|
||||
style={{ width: 70 }}
|
||||
title="How many weapons and items a character can have equipped together. Only equipped gear can be used in an encounter or gives its effects."
|
||||
/>
|
||||
things, of which
|
||||
<NumberInput
|
||||
name="maxEquippedWeapons"
|
||||
min={0}
|
||||
max={20}
|
||||
keepValue
|
||||
defaultValue={campaign.maxEquippedWeapons}
|
||||
style={{ width: 70 }}
|
||||
title="How many of those can be weapons. A weapon for each hand, like a pair of daggers, is made as one weapon."
|
||||
/>
|
||||
<span className="combatant-sub">
|
||||
can be weapons. Armor and shields are items and count. Lowering these takes nothing off anyone; they are checked when
|
||||
something is put on.
|
||||
</span>
|
||||
</label>
|
||||
<label className="checkbox-row">
|
||||
<input type="checkbox" name="hideMonsterRolls" defaultChecked={campaign.hideMonsterRolls} />
|
||||
Keep my rolls for monsters and NPCs to myself until they are put into play
|
||||
</label>
|
||||
</fieldset>
|
||||
|
||||
<fieldset className="settings-group">
|
||||
<legend>Combat</legend>
|
||||
<label className="checkbox-row">
|
||||
<input type="checkbox" name="autoRollMonsters" defaultChecked={campaign.autoRollMonsters} />
|
||||
Auto-roll monster attacks: on a monster's turn its target, to-hit and damage are rolled for me to accept or change
|
||||
</label>
|
||||
<label className="checkbox-row mt-sm">
|
||||
<input type="checkbox" name="autoRollNpcs" defaultChecked={campaign.autoRollNpcs} />
|
||||
Auto-roll NPC attacks the same way (friendly NPCs attack monsters, hostile ones the party)
|
||||
</label>
|
||||
<label className="checkbox-row mt-sm">
|
||||
<input type="checkbox" name="showMonsterHp" defaultChecked={campaign.showMonsterHp} />
|
||||
Players see the exact hit points of monsters and NPCs in encounters (untick for a health bar only)
|
||||
</label>
|
||||
<div className="field mt-sm">
|
||||
<label>A critical hit</label>
|
||||
<select name="critRule" defaultValue={campaign.critRule}>
|
||||
<option value="DOUBLE_DICE">Rolls the damage dice twice (the rule)</option>
|
||||
<option value="MAX_PLUS_ROLL">Takes the dice at their maximum, plus one roll of them</option>
|
||||
</select>
|
||||
</div>
|
||||
<label className="flex-row flex-wrap gap-sm mt-sm">
|
||||
Area attack AC penalty
|
||||
<NumberInput
|
||||
name="areaAttackAcPenalty"
|
||||
min={0}
|
||||
max={10}
|
||||
keepValue
|
||||
defaultValue={campaign.areaAttackAcPenalty}
|
||||
style={{ width: 70 }}
|
||||
title="An attack on several targets is harder to land: each target's AC counts as this much higher for every target beyond the first. 0 turns the penalty off."
|
||||
/>
|
||||
<span className="combatant-sub">added to each target's AC for every target beyond the first (0 for none)</span>
|
||||
</label>
|
||||
</fieldset>
|
||||
|
||||
<fieldset className="settings-group">
|
||||
<legend>Progression</legend>
|
||||
<label className="checkbox-row">
|
||||
<input type="checkbox" name="trackXp" defaultChecked={campaign.trackXp} />
|
||||
Track experience points (untick for milestone levelling: no XP, and you decide when the party levels)
|
||||
</label>
|
||||
<div className="field mt-sm">
|
||||
<label>Hit points on a level up</label>
|
||||
<select name="hpOnLevelUp" defaultValue={campaign.hpOnLevelUp}>
|
||||
<option value="AVERAGE">The hit die's average (rounded up) + Constitution</option>
|
||||
<option value="ROLL">Roll the hit die + Constitution</option>
|
||||
</select>
|
||||
</div>
|
||||
</fieldset>
|
||||
<button type="submit" className="btn btn-primary mt-md" disabled={updateCampaign.isPending}>
|
||||
Save Settings
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user