Summary
Centralized configuration for combat system settings. Allows DMs to customize rules to match their table's preferences.
Phase: Post-MVP Enhancement
Systems: Configuration, Combat System
Prerequisites
Goals
- Centralized config.yml for combat settings
- Runtime reloadable (/reloadconfig or part of /reloadyaml)
- Sensible defaults matching standard D&D 5e
Configuration Options
config.yml
# plugins/jkvttplugin/config.yml
combat:
# Initiative tie-breaking
# Options: "bonus" (higher init bonus), "dex_score" (higher DEX),
# "rolloff" (re-roll), "dm_decides" (prompt DM)
initiative_tiebreaker: "bonus"
# Critical hit damage calculation
# Options: "double_dice" (2x dice), "roll_twice" (roll dice twice),
# "max_plus_roll" (max dice + roll)
critical_hit_mode: "double_dice"
# Movement enforcement level
# Options: "none" (no tracking), "soft" (warn only), "hard" (prevent)
movement_enforcement: "soft"
# Show movement range particles
movement_particles: true
# Combat log verbosity
# Options: "minimal", "normal", "verbose"
combat_log_level: "normal"
# Death and dying rules
death:
# Instant death if damage >= max HP in one hit
instant_death_massive_damage: false
# Allow negative HP tracking (for resurrection purposes)
track_negative_hp: false
# Auto-stabilize at 3 successes vs require action
auto_stabilize: true
# Turn announcements
announcements:
# Show available actions on turn start
show_actions: true
# Show condition reminders
show_condition_reminders: true
# Dramatic reveal messages
dramatic_reveals: true
# Advantage/Disadvantage (when implemented)
advantage:
# Auto-detect advantage situations
auto_detect: false
# Prompt for advantage/disadvantage on attacks
prompt_on_attack: true
Command
# Reload configuration
/reloadconfig
> Configuration reloaded!
> Combat settings updated.
# Or include in existing reload
/reloadyaml
> Reloading all YAML content...
> Configuration reloaded.
Runtime Access
public class CombatConfig {
private static CombatConfig instance;
// Initiative
private String tiebreaker = "bonus";
// Criticals
private String criticalHitMode = "double_dice";
// Movement
private String movementEnforcement = "soft";
private boolean movementParticles = true;
// Death
private boolean instantDeathMassiveDamage = false;
public static void reload() {
// Load from config.yml
}
public static String getTiebreaker() {
return instance.tiebreaker;
}
// ... getters for all settings
}
Usage in Combat Code
// Initiative tie-breaking
switch (CombatConfig.getTiebreaker()) {
case "bonus" -> higherBonusWins();
case "dex_score" -> higherDexScoreWins();
case "rolloff" -> performRolloff();
case "dm_decides" -> promptDmForDecision();
}
// Critical damage
switch (CombatConfig.getCriticalHitMode()) {
case "double_dice" -> damage = rollDice() * 2 + modifier;
case "roll_twice" -> damage = rollDice() + rollDice() + modifier;
case "max_plus_roll" -> damage = maxDice() + rollDice() + modifier;
}
Default Values
All settings have sensible defaults matching standard D&D 5e rules:
- Tie-breaker: Higher initiative bonus
- Criticals: Double dice
- Movement: Soft enforcement
- Death: Standard death saves
Config Validation
// Validate config values on load
if (!VALID_TIEBREAKERS.contains(tiebreaker)) {
logger.warning("Invalid tiebreaker '" + tiebreaker + "', using default 'bonus'");
tiebreaker = "bonus";
}
Hot Reload Support
// Watch for config changes (optional enhancement)
// Or just support /reloadconfig command
Related Issues
Summary
Centralized configuration for combat system settings. Allows DMs to customize rules to match their table's preferences.
Phase: Post-MVP Enhancement
Systems: Configuration, Combat System
Prerequisites
Goals
Configuration Options
config.yml
Command
Runtime Access
Usage in Combat Code
Default Values
All settings have sensible defaults matching standard D&D 5e rules:
Config Validation
Hot Reload Support
Related Issues