Skip to content

Releases: martin-papy/coc7-qol

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 18 Jun 10:01
05c4d1c

What's Changed

Full Changelog: v0.4.9...v0.5.0

v0.4.9

Choose a tag to compare

@github-actions github-actions released this 01 Jun 02:13
42ec7a4

What's Changed

  • fix: make AI generator dialogs scrollable on small displays (#8) by @martin-papy in #9
  • Release prep: AI dialog scroll fix (#8) + Playwright testing docs by @martin-papy in #10

Full Changelog: v0.4.8...v0.4.9

v0.4.8

Choose a tag to compare

@github-actions github-actions released this 22 May 06:28
08921f6

What's Changed

  • ci: bump actions/checkout to v5 for Node.js 24 support by @martin-papy in #3
  • fix: route blind/private rolls to GM when chat box is 'Self' by @martin-papy in #5
  • chore: add v0.4.8 changelog entry by @martin-papy in #7

Full Changelog: v0.4.7...v0.4.8

v0.4.7

Choose a tag to compare

@github-actions github-actions released this 19 May 09:29
8b33ebd

What's Changed

New Contributors

Full Changelog: v0.4.6...v0.4.7

v0.4.6

Choose a tag to compare

@martin-papy martin-papy released this 17 May 03:53
bd8fa19

Added

  • AI NPC equipment — NPC generation now returns weapons and possessions alongside characteristics and skills. Weapons render in a dedicated section of the confirmation dialog (name, skill, damage, range, ammo); possessions render as a flat list. Items can be toggled on/off before acceptance and are created in a single batch on accept.
  • AI NPC warnings — A warnings section in the confirmation dialog surfaces non-blocking issues raised by the generator (e.g. ambiguous skill, suspicious value) so the GM can review them before creating the actor.
  • Language-aware prompts — The NPC system prompt now instructs the model to honour the world locale for names and prose, so output matches the language of the campaign.
  • Roll visibility selector — A roll visibility dropdown (public / private / blind / self) is now embedded in the CoC7 bonus dialog. The last choice is remembered per user and persisted through CoC7 standby flags so it survives the standby → resolve roundtrip.

Fixed

  • AI-generated NPCs that reference a weapon now also get the matching skill auto-added when it is missing from the skills list (e.g. Pocket KnifeFighting (Brawl)), with a fallback skill value of 20.
  • Civilian NPCs default to 0 weapons unless the role is explicitly combat — pharmacists no longer ship with revolvers.
  • Weapon usesPerRound split into normal and max so multi-shot weapons map correctly to CoC7's data model, and default ammo now falls back to magazine capacity instead of zero.
  • Weapon detail span in the NPC confirmation dialog is HTML-escaped, and remove listeners are deduplicated to avoid double-firing on re-render.

Full Changelog: v0.4.5...v0.4.6

v0.4.5

Choose a tag to compare

@martin-papy martin-papy released this 13 May 04:08
bb628b2

Security

  • escapeHtml extended to the full OWASP attribute-value set (&, <, >, ", ', /, backtick), closing escape gaps that surfaced with French apostrophes breaking the placeholder attribute.
  • Gemini API key moved from the URL query string to the x-goog-api-key request header so the key no longer leaks into browser history, proxy logs, or Referer headers.
  • Provider error responses sanitized before display: formatApiError() maps 401/429/5xx to friendly strings, strips HTML tags, and truncates unknown bodies to 300 chars — Cloudflare/proxy HTML interstitials no longer reach ui.notifications.error.
  • API key setting hint strengthened to surface the direct-browser-access caveat. Users are now advised to use a provider-scoped, spend-limited key.

Fixed

  • 60 s AbortController timeout added to all three LLM providers. Stuck requests now fail cleanly instead of leaving the UI in "Generating…" indefinitely.
  • Anthropic max_tokens raised from 1024 to 4096. Long NPC responses no longer get truncated mid-JSON.
  • applyRandomCharacteristics now returns a new object instead of mutating its argument.
  • Weapon range enforced as a finite integer or null for melee — string units can no longer slip through.
  • Single quotes added to escapeHtml; placeholder attribute switched to double quotes so French strings render correctly.

Changed

  • Module compatibility bumped: FoundryVTT minimum v13, verified v14. CoC7 system minimum v8.

Full Changelog: v0.4.4...v0.4.5

v0.4.4

Choose a tag to compare

@martin-papy martin-papy released this 17 Apr 01:02
c7cd6d8

Internationalization Support

This release adds full i18n support to the CoC7 QoL module. All user-visible strings are now managed through FoundryVTT's translation system.

What's New

  • English and French — Complete translations for all dialogs, buttons, settings, and notifications
  • Automatic localization — UI automatically displays in the user's configured FoundryVTT language
  • Developer-friendly — Helper functions t() and tf() for consistent string handling across modules

Files Included

All runtime files: module.json, scripts/, lang/, styles/

Language Files

  • lang/en.json — 75 English translation keys
  • lang/fr.json — 75 French translations with professional typography

Technical Details

  • Uses FoundryVTT v13+ i18n API (game.i18n.localize, game.i18n.format)
  • Proper handling of module load timing constraints via lazy getters
  • No impact on LLM prompt content (system/user prompts remain hardcoded)

Installation

From FoundryVTT: Go to Settings > Manage Modules > Install Module and use the manifest URL:

https://github.com/martin-papy/coc7-qol/releases/latest/download/module.json

Or download the zip and extract to your Data/modules/ directory.

v0.4.3

Choose a tag to compare

@martin-papy martin-papy released this 16 Apr 07:32
9b5bac8

What's new

NPC random characteristics

When generating an NPC, a new Random characteristics checkbox lets the AI return rulebook dice formulas (e.g. 5*(3d6)) instead of fixed values. The characteristics are rolled on token drop, giving each NPC a unique stat spread without losing the AI-generated flavour.

README screenshots

Added in-context screenshots to the README for all features (Weapon Generation, NPC Generation, Close All Cards, Possession Tab Image Popout).

v0.4.2

Choose a tag to compare

@martin-papy martin-papy released this 16 Apr 05:08
c02cb5b

Code cleanup & optimisation

This release contains no user-visible changes — it is a pure internal refactor.

What changed

  • Extracted all inline CSS from JavaScript files into two dedicated stylesheets (styles/close-all-cards.css, styles/ai-generator.css)
  • Extracted shared escapeHtml utility into scripts/utils.js (was copy-pasted across 4 files)
  • Merged the duplicate weapon/NPC prompt-view functions in dialog-injector.js into a single parameterised flow (config-object pattern)

v0.4.1

Choose a tag to compare

@martin-papy martin-papy released this 15 Apr 08:40
d0fae75

Fixed

  • Improved error logging for AI generation failures: invalid JSON responses from LLM providers now log the full raw response to the browser console, and all FoundryVTT operation errors (actor/item creation, skill attachment) are consistently logged with their full stack trace.