Commit Graph
44 Commits
Author SHA1 Message Date
tevans e6e8986e25 v1.7.4: Add KickStart, KickStart Plus, KickStart Solo to drugs compendium 2026-06-10 20:00:48 +01:00
tevans 748b7bc7d9 v1.7.3: NPC initiative button — pool max(5,AGI)+threatLevel d6, count 6s 2026-06-10 19:17:43 +01:00
tevans e20b9292db v1.7.2: Group NPC threat level slider — CSS + dynamic track fill 2026-06-10 19:04:02 +01:00
tevans 19edd20518 v1.7.1: bump version 2026-06-10 18:48:38 +01:00
tevans 0d71470596 v1.7.0: Add 5 GM tool windows (Credit Distribution, Shift Ledger, NPC Threat Board, BPN Tracker, Condition Applicator)
- SLACreditDistributionTool: per-PC credit table, bulk pay, deduct expenses
- SLAShiftLedger: full finance breakdown per PC, process shift, export to chat
- SLANPCThreatBoard: filterable NPC grid with health bars, threat ratings, inline HP edit
- SLABPNTracker: BPN mission cards grouped by code, pay out rewards, assign BPN
- SLAConditionApplicator: two-panel toggle UI to apply/remove conditions across PCs
- All tools wired into scene controls (tokens group) and Actor Directory header
- Version bump 1.6.5 -> 1.7.0
2026-06-10 18:25:56 +01:00
tevans cd38fd5d9b feat: SLAGMStatusWindow — draggable PC status board with live refresh (v1.6.5) 2026-06-10 18:11:57 +01:00
tevans d47871ea38 fix: scene controls PC Status button for Foundry v14 API (v1.6.4) 2026-06-10 18:02:25 +01:00
tevans c09de0b476 feat: move STATUS to GM scene controls, fix PopOut module for v14 (v1.6.3) 2026-06-10 17:31:42 +01:00
tevans 25250dc98a feat: Showing Off mechanic (v1.6.2)
Every roll dialog now has a gold SHOWING OFF button:
- Each click posts a big gold fanfare chat message + plays a WebAudio arpeggio
- Reduces the dice pool by 1 per click (floor: 1d6)
- Total dice display turns gold and shows the penalty
- Immediately increments actor system.details.showingOff tally
- At exactly 20 pts: public milestone broadcast with GM alert
- Finance tab: gold SHOWING OFF hero panel shows career total (editable)
- Hourly PC Status Report now includes Showing Off tally (yellow at >0, orange at 10+, red at 20+)
- template.json: showingOff: 0 added to character.details
- _playShowingOffFanfare(): ascending C-major arpeggio via WebAudio API
2026-06-04 00:02:51 +01:00
tevans 27bc43cea6 fix+feat: button overrun, natural weapon rolls, Wraith Teeth & Claw (v1.6.1)
CSS: morph-shift-btn now flex: 0 0 auto; max-width: 110px
     specialty-name gets flex: 1; min-width: 0 so it takes remaining space
     flex-wrap on specialty-name-row prevents overflow

Natural weapons:
- template.json: isNaturalWeapon/naturalWeaponDamage/AP/ROF fields on specialty
- Morphic Strike: ROF 2, isNaturalWeapon: true
- Wraith Teeth & Claw added to wraithraider racial abilities (DMG 2, AP 1, ROF 2)
- _ensureRacialAbilities patches existing items with missing natural weapon fields
- _onNaturalWeaponRoll: STR + Melee roll through full weapon chat card pipeline
- STRIKE button appears on any specialty with isNaturalWeapon: true
- All condition/drug/armor/racial mods applied to natural weapon rolls
2026-06-03 23:50:05 +01:00
tevans 7564cd4201 feat: condition modifiers applied to ALL roll paths (v1.6.0)
Every dice roll now checks active conditions before building its pool:
- _onRoll (legacy .rollable attribute + skill paths)
- _onRollEbbFormula (Empathy + Ebb pool)
- _rollInitiative (bonus-successes roll pool + chat card label)
- _onVitalSave (Health/Resolve saves, with auto-fail at 0 dice)

Condition penalty is shown in the formula string on every chat card.
Panicking (-2 all) and Shaken (-1 all) now silently reduce every roll
until the GM clears the condition.
2026-06-03 23:25:04 +01:00
tevans 2033f50a57 feat: LAD Account, condition fixes, hourly PC status report
- LAD Account checkbox (bio tab) adds locked 50c/week to Finances
- Active conditions now show dice penalty text inline on the sheet
- _applyStatusCondition() helper: toggleStatusEffect with ActiveEffect fallback
  so panic/crit/instability conditions always land reliably
- Condition-clear button also falls back to direct ActiveEffect delete
- _broadcastPCConditions(): whispered GM report of all PC HP/Resolve/Stress/conditions
- STATUS button (GM-only) on vitals row triggers report on demand
- Hourly setInterval fires the report automatically while Foundry is running
- Version bump 1.5.9
2026-06-03 22:45:00 +01:00
tevans f5ce207afb bump version to 1.5.8 2026-06-03 19:39:20 +01:00
tevans 953392b55c feat: SLA-specific art for generated NPCs, weapons, armor, abilities
Copied 37 SLA art assets from Data/assets/SLA_Assets into
systems/zero-engine/assets/npc-art/ so they deploy with the system
to remote servers via GitHub pull.

NPC portraits (from Species folder):
  carrion.png        — Advanced Carrion
  streetgang.png     — Human
  serialkiller.png   — Brain Waster
  monstaret.png      — Stormer 313
  machine.png        — Stormer 711

Weapons (SLA weapon art):
  pistol, smg, shotgun, rifle, sniper, knife, combat-knife,
  blade, sabre, baton, club, chainsaw, hatchet,
  claws, natural-weapon, heavy

Armor (by ARM rating):
  street.png (0-1), light.png (1-2), heavy.png (3-4), exo.png (5+)

Abilities (trait/special art):
  attack, psychosis, hard-hitting, fast-reflexes, menacing,
  regeneration, enemy, contagion

All icon helper functions updated to use SLA art paths.
2026-06-03 18:50:47 +01:00
tevans ef5ea36e4c feat: Group NPC — folders, NPC icons, weapon/ability icons
Folder structure:
- Actors sidebar: Generated NPCs > [Type] (e.g. Generated NPCs > Carrion)
- Folders created automatically if they do not already exist
- Each type gets its own colour-coded subfolder

NPC actor portrait:
- Street Gang / Serial Killer: mystery-man.svg
- Carrion / Serial Killer:     skull.svg
- Monstaret:                   hazard.svg
- Machine:                     daze.svg

Weapon item icons mapped by name:
- Bite/claw/natural:   unarmed-punch-fist.webp
- Acid/spit:           aura.svg
- Rifle/minigun:       rifle-bayonet.webp
- Shotgun:             gun-blunderbuss.webp
- Pistol/SMG/ranged:   gun-pistol-flintlock-metal.webp
- Blunt melee:         club-simple-black.webp
- Blade/knife/sharp:   dagger-straight-sharp.webp

Armor icons: light (<3) vest-simple-leather, heavy (3+) breastplate

Ability icons mapped by keyword (stealth=cowled, acid=aura,
fire=fire, stun/emp=daze, bleed=blood, heal=regen, else=lightning)
2026-06-03 18:40:06 +01:00
tevans 2713db753f fix: weapon roll crash on NPC actors with embedded weapons
NPC actors have flat attribute numbers (e.g. strength: 3) not objects
({value: 3}) and no system.skills object at all. Both _onWeaponRoll
and _onRoll were crashing when Group NPC-generated actors used their
attack buttons.

Fix:
- Read attributes via typeof check — flat number used directly,
  object uses .value — so NPC stat values are used correctly
- skills accessed via system.skills?.[skill] optional chaining so
  missing skills object returns 0 rather than throwing TypeError
2026-06-03 17:57:41 +01:00
tevans 5482acd2f9 fix: Group NPC — embed weapons/armor/abilities on created actors
- Weapon items created as embedded weapon Items with proper schema
  (melee vs ranged category, damage, AP, range, ROF from note field)
- Armor items created for NPCs with armour description (skips
  Built-in for machines — they use the armor stat directly)
- Ability items created as specialty Items showing in Stats tab
- Biography formatted with armour, weapons, abilities sections

- Card backgrounds now tinted by type colour (very subtle 7% opacity)
  so Carrion/Gang/Monstaret/Machine are visually distinct at a glance

- Count selector replaced with number input (1–10) instead of dropdown
2026-06-03 17:51:54 +01:00
tevans bf5c82359b feat: Group NPC Generator — major expansion
New type:
- Street Gang: varied melee + 40% chance ranged, 7 ability pool,
  8 name parts, scavenged armour pool

Weapons & armour on all types:
- Each generated NPC now carries randomised weapons (conventional
  or integrated) and an armour description displayed on the card
- Natural weapons shown in green with paw icon
- Integrated/conventional weapons shown in blue with crosshairs

Monstaret — 6 distinct subtypes with unique profiles:
  Fang Beast, Rend Beast, Pit-Thing, Lurker, Howler, Crawler
  Each has its own stat range, natural weapons, and 4 specific abilities

Machine — 4 distinct subtypes with integrated weapon loadouts:
  Combat Unit, Scout Drone, Heavy Assault Unit, Maintenance Unit
  Each has 2-3 integrated weapons with damage/AP/range/notes

Carrion — natural weapons (Bite AP 1, Claws) + contagion/death rattle
Serial Killer — signature melee + 30% secondary ranged, body armour pool
2026-06-03 16:31:23 +01:00
tevans 167df8a266 feat: Group NPC Generator tool
Four NPC types: Carrion, Serial Killer, Monstaret, Machine
Each with SLA-appropriate stat ranges, name generators, ability pools.

Features:
- Type selector tabs (colour-coded per type)
- Count 1-10, Generate / Add More / Clear All
- Compact 2-column grid of NPC cards
- Inline editable: name, STR/AGI/WIT/EMP, HP (current/max), ARM, DMG, notes
- +/- HP buttons with live colour bar (green > yellow > red)
- Defeat toggle (grey out) and Reset HP to max
- Reroll individual NPC (preserves notes)
- Create as World Actors button
- Green "Group NPCs" button in Actor Directory (GM only)

v1.5.2
2026-06-03 16:17:56 +01:00
tevans 313850dcd2 fix: prevent "852,500" corruption in Finance Ledger calculate
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.
2026-06-03 00:05:18 +01:00
tevans b744b91354 fix: prevent duplicate credits submission causing NaN corruption
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.
2026-06-03 00:01:46 +01:00
tevans 5a43027ec8 fix: rewrite GM Finance Ledger
- 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
2026-06-02 23:47:16 +01:00
tevans bfc05c053f debug: log raw credits value in Finance Ledger, multi-path read, string corruption guard 2026-06-02 23:32:24 +01:00
tevans 2945f66d9a fix: guard against NaN credits in GM Finance Ledger 2026-06-02 23:20:03 +01:00
tevans 02d7177122 feat: Player Character flag + GM Finance Ledger
- 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
2026-06-02 22:09:34 +00:00
tevans 049273fbc6 fix: bullet tax balance + expenses total (v1.4.5)
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
2026-06-02 22:53:00 +01:00
tevans 7de21e290d fix: split bullet tax credit update into standalone call (v1.4.4)
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)
2026-06-02 22:40:17 +01:00
tevans 86df96132e fix: bullet tax doubled + full caliber catalog + fix undefined/undefined (v1.4.3)
Bullet tax rules (per user spec):
- Tax is now 2x base round cost on every shot (ammo cost + levy)
- e.g. 7mm standard = 10c/round -> 20c charged per round fired
- Applied immediately on ATTACK press, not deferred to REST
- Weapon locking still only on push + bane (unchanged)

Ammo catalog expanded (was missing 9 calibers -> 0 tax for those weapons):
- .44 (Revolver): 8/24/45c standard/AP/HE
- .454 (Heavy Pistol): 10/28/50c
- .50 (Heavy Pistol): 12/35/60c
- 3mm (Machine Pistol): 3/9/20c
- 7mm (SLA Carbine/LMG): 10/28/55c
- 8mm (Sniper Rifle): 14/40/75c
- 12g (Shotgun): 18/45/80c
- 40mm (Grenade/Launcher): 80/180/140c
- Rail (Rail Gun): 50/120/200c

SLA_WEAPON_DEFAULT_CALIBER expanded to cover all weapon types

Chat display: removed undefined/undefined (Remaining X/Y) - weapons are
always assumed loaded; display now shows Rounds fired + tax cost only

Tax notification updated to show 2x calculation clearly
2026-06-02 22:32:11 +01:00
tevans 4e3554c28b fix: readability — solid dark backgrounds on all chat cards (v1.4.2)
Root cause: all chat card containers used rgba() with 0.2-0.4 opacity,
which becomes nearly transparent on Foundry v14 parchment chat bg.
Light text (white, cyan, yellow, green) was invisible on the result.

CSS fixes (solid dark backgrounds replacing transparent rgba):
- .panic-result: rgba(139,0,0,0.2) -> #1c0808 + color: #e0e0e0
- .panic-success: rgba(0,128,0,0.2) -> #081c08 + green text toned to #55ee55
- .panic-effect: rgba(0,0,0,0.4) -> #111111 + color: #e0e0e0
- .critical-injury: rgba(220,20,60,0.2) -> #1c080d + color: #e0e0e0
- .crit-effects/.crit-healing/.crit-recovery: rgba(0,0,0,0.3) -> #111111
- .time-limit: rgba(255,170,0,0.2) -> #1a1200

New CSS classes added (were missing entirely):
- .instability-result with dark bg, border, and sub-element rules
- .instability-no-effect, .instability-effect-text, .instability-auto-note
- .panic-auto (auto-applied row)
- .drug-gm-alert, .weapon-reload-chat

JS inline style fixes:
- Rest card: rgba(0,60,30,0.3) -> #0a1a0e (solid)
- Ammo empty card: rgba(80,20,0,0.3) -> #1a0800 (solid)
- Instability effect text: color:#333 (dark on dark) -> CSS class #d8d8d8
- Instability auto-note: color:#ffcc44 inline -> CSS class
2026-06-02 22:05:05 +01:00
tevans 76e086ca6c feat: Body Blocker armor + drug credit deduction on use (v1.4.1)
- 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)
2026-06-02 21:42:29 +01:00
tevans 304e47f507 feat: racial natural weapons + specialty icons (v1.4.0)
Weapons added (4 new, total 36):
- Shaktar Claws: melee, DMG 2, AP 1, ROF 2, Engaged
- Stormer Teeth: melee, DMG 3, AP 1, ROF 1, Engaged
- Stormer Claws: melee, DMG 3, AP 1, ROF 2, Engaged
- Vevaphon Claws: melee, DMG 2, AP 1, ROF 2, Engaged

Icons added:
- 4 new weapon SVG icons (weapon-shaktar-claws, stormer-teeth, stormer-claws, vevaphon-claws)
- 16 specialty SVG icons replacing broken Foundry defaults (icons/svg/ paths no longer exist in v14)
  Fixes: Hard Hitter, Sniper, Fast Reflexes, True Grit, all others now have custom icons

Packs rebuilt: sla-weapons (36), sla-specialties (16)
2026-06-02 21:20:45 +01:00
tevans e155a2dd1b fix: correct DSN dice skins + UI tweaks (v1.3.9)
- 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
2026-06-02 21:12:02 +01:00
tevans 6edce3ed77 fix: force zero-engine dice system for all users on load (v1.3.8) 2026-06-02 19:46:45 +00:00
tevans bf927ed382 chore: bump version to 1.3.7 2026-06-02 20:30:02 +01:00
tevans 9343f61413 feat: replace SVG icons with real SLA artwork for all 135 items (v1.3.6) 2026-06-02 16:36:39 +01:00
tevans 90e0ad178a feat: 7 compendium packs, 135 items total with custom icons (v1.3.5)
Weapons: 32 (added 16 new: GA50, FEN 209/401/701/981, Street Sweeper, Reaper LMG, MILA Launcher, Mutilator Sword, Chainaxe, Chainsaw, Riot Shield, Frag Grenade, Stun Grenade, Ebb Sword, Stormer Chuckleduster)
Armors: 17 (added 11: Street Clothes, Shiver Flak/Full, Crackshot, Shock, Stealth Suit, Ebb Deathsuit, PP10 HARD, Thresher Light/Heavy, DN Power)
Drugs: 16 (added 9: Shatter, Blaze UV, Drum, Honesty, Flip, Bozerker, Push, Bubbles, Slosh)
Equipment: 11 new items (medkit, stim patch, bandage, cutting charge, comms, drone, toolkit, torch, access card, duct tape)
Ammo: 13 types (10mm/9mm/5.56/7.62/12g/44/.454/40mm in STD/AP/slug/smoke variants)
New icons: 30+ custom SVGs for all new types
2026-06-02 16:17:44 +01:00
tevans 3c2437b369 feat: 16 SLA weapons with custom icons (v1.3.4) 2026-06-02 16:04:26 +01:00
tevans 92be561740 feat: custom icons for all items, weapons pack added (v1.3.3) 2026-06-02 15:55:42 +01:00
tevans 523b1e50c8 fix: rebuild packs with compacted .ldb files, bump to 1.3.2 2026-06-02 15:41:04 +01:00
tevans 89a4314ea7 fix: bump version to 1.3.1, remove LevelDB LOCK files from git 2026-06-02 15:34:25 +01:00
tevans c8a2da7f17 feat: add LevelDB compendium packs (armors, drugs, ebb formulae, specialties) 2026-06-02 15:23:28 +01:00
tevans 3584706134 fix: add url field to system.json 2026-06-02 12:39:02 +01:00
tevans 19c2be6def fix: add manifest and download URLs to system.json 2026-06-02 12:35:59 +01:00
tevans 2ebd5803fc Initial commit — full system source + zero-engine-state.md reference 2026-06-01 23:19:46 +01:00