How thiagorpg-stack/fvtt_ajustar_ameacas works
Tormenta20: Ajustar ND is a Foundry VTT module for recalibrating a threat’s stats and text to a target challenge rating and role. A GM opens the adjustment dialog from an actor sheet or directory, configures options and templates, reviews a simulated before-and-after preview, then applies the result—by default as a copy. The rule engine consults parameter tables and calculates combat changes, warnings, and template effects. README-documented capabilities include resistance and spell-circle advice, hand-written text updates, and Boss, Swarm, and Band templates. Some subsystem details are documented but their implementations were not sampled.
Main entry points: ajuste.js Adjustment planner · main.js Module hooks · dialogo.js Adjustment dialog · aplicar.js Simulation and apply
Components 17
Foundry entry
- Module hooks
scripts/main.js - Foundry actors
- Foundry chat
Adjustment workflow
- Adjustment dialog
scripts/dialogo.js - Preview view
templates/dialogo.hbs - Simulation and apply
scripts/aplicar.js
Rules engine
- Adjustment planner
scripts/ajuste.js - Combat planning
scripts/calculo.js - Damage balancing
scripts/dano.js - Table lookup
scripts/tabelas.js - Threat parameters
data/tables.json - Sheet text updates
scripts/textos.js - Spell-circle advice
scripts/circulos.js - Tier warnings
scripts/patamares.js
Templates and messages
- Threat templates
scripts/templates.js - Welcome messages
scripts/boas-vindas.js
Other components
- GM
Connections 23
- GM → Module hooks: opens adjustment
scripts/main.js - Module hooks → Adjustment dialog: opens dialog
scripts/main.js - Adjustment dialog → Preview view: renders
scripts/dialogo.js - Adjustment dialog → Foundry actors: reads actor
scripts/dialogo.js - Adjustment dialog → Simulation and apply: simulates or applies
scripts/dialogo.js - Simulation and apply → Adjustment planner: calculates adjustment
scripts/aplicar.js - Simulation and apply → Threat parameters: loads tables
scripts/aplicar.js - Simulation and apply → Foundry actors: measures and writes
scripts/aplicar.js - Adjustment planner → Combat planning: plans combat
scripts/ajuste.js - Adjustment planner → Table lookup: normalizes rating
scripts/ajuste.js - Adjustment planner → Sheet text updates: updates descriptions
scripts/ajuste.js - Adjustment planner → Spell-circle advice: gets spell advice
scripts/ajuste.js - Adjustment planner → Tier warnings: gets tier warnings
scripts/ajuste.js - Adjustment planner → Threat templates: applies template effects
scripts/ajuste.js - Combat planning → Table lookup: queries parameters
scripts/calculo.js - Combat planning → Damage balancing: balances weapon damage
scripts/calculo.js - Combat planning → Sheet text updates: matches weapon names
scripts/calculo.js - Tier warnings → Table lookup: queries tier values
scripts/patamares.js - Threat templates → Table lookup: reads rating values
scripts/templates.js - Threat templates → Tier warnings: gets rating tier
scripts/templates.js - Threat templates → Damage balancing: computes damage average
scripts/templates.js - Module hooks → Welcome messages: builds chat message
scripts/main.js - Module hooks → Foundry chat: sends whisper
scripts/main.js