When actor.update() fires, Foundry auto-submits any open character
sheet form before re-rendering. If the sheet still showed the old
credits value (e.g. 500), that stale value raced the new one (852)
and got merged server-side into the corrupt string "852,500".
Fix: pass {render: false} to actor.update() so Foundry skips the
auto-submit entirely, then manually call app.render() on all open
sheets for that actor — they read fresh data and render cleanly.
The non-Mk2 sheet had two inputs named system.details.credits (header
+ finances tab). Foundry concatenates duplicate names as "500,500"
which is not a valid number, causing the field to show blank/grey
after saving.
Fix: finances tab input made readonly with no name attribute — header
is now the sole authoritative credits field.
Also: on-boot sanitization now covers credits, fixing any actors
already storing the corrupted comma-string value.
- Read credits via actor._source (raw DB) to bypass DataModel
- Read all finance fields via _readFinance() using same approach
- Calculate now zeros ALL income + expense fields after applying
(salary, bpnReward, other income, accommodation, drugs, subs,
other expense, bulletTax, ammoSpentSession, debt)
- Auto-refresh ledger via updateActor hook whenever any actor updates
- Ledger now reflects live sheet values immediately
- Add isPlayerCharacter field to template.json (character.details)
- Bio tab: checkbox 'Player Character' bound to system.details.isPlayerCharacter
- SLAGMFinanceTool Application: GM-only window listing all PC-flagged
actors with current balance, weekly income, weekly expenses, net
weekly income, and a Calculate button per character
- Calculate button: applies netWeekly to credits (credits += net)
- Calculate All button: applies week to every listed PC at once
- Actor Directory: GM-only 'Finance Ledger' button opens the tool
- CSS: styled PC flag row and full GM Finance Ledger table
- Version bump: 1.4.5 → 1.4.6
Three bugs:
1. weeklyExpenses total omitted bulletTax from the sum (both getData paths)
Fix: add (_exp.bulletTax||0) to the calculation
2. _applyBulletTax read undefined credits as 0 (actors created before the
credits field existed have null/undefined, not zero)
Fix: fallback to 500 (template default) only when value is null/undefined
3. Finances tab CURRENT BALANCE showed just C because input had no placeholder
Fix: add placeholder=500 min=0 to the credits input in character-sheet.hbs
Foundry v14 rejects actor.update() silently when one field in the payload
has a schema conflict. The combined update (credits + finances nested paths)
was being dropped entirely, so credits never changed.
Fix: two separate actor.update() calls
1. Credit deduction: update("system.details.credits") alone — critical
2. Finances tracking: update(finances paths) — non-critical, caught silently
Added console.log so GMs can confirm credit deductions in browser console:
Zero Engine | Bullet Tax: Joe credits 500c -> 440c (-60c)
- Add Body Blocker armor (AR 1, Dice 1, 120c) with custom SVG icon
Concealable civilian vest, sits between Street Clothes and Downtown Jacket
- _activateDrug now automatically deducts drug cost from actor credits
Shows notification: drug name, cost charged, old and new credit total
Credits cannot go below 0
- Set costs on 7 drugs that were missing them (cost was 0):
Painkillers 30c, Stimulant 40c, Sedative 35c, Redline 110c,
Calm-Line 65c, Rush 85c, UV 200c
- Rebuild: sla-armors (18), sla-drugs (16)
- DSN: register ze-stress-dice system separately so normal/stress d6 presets dont overwrite each other
- DSN: use term.options.appearance.system to force correct preset on every roll - bypasses user saved DSN system preference
- Remove v1.3.8 flag-patching ready hook (no longer needed)
- UI: dice icon on attribute header enlarged (13px to 20px) with glow
- UI: attr-btn smaller (24px to 16px), skill +/- smaller (20px to 14px)
- UI: clicking attribute name, skill name, or weapon name now triggers roll