Files

3.1 KiB

SHD Weapon Entry Reference

Canonical surfaces

  • Weapon editor and client payload: src/routes/isac/weapons/+page.svelte
  • Weapon action, validation, persistence, and audit snapshot: src/routes/isac/weapons/+page.server.ts
  • Weapon categories: src/lib/weapons/category-bonuses.ts
  • Weapon mod-slot rules: src/lib/weapons/mod-slots.ts
  • Talent editor and classification: src/routes/isac/talents/
  • Talent screenshot workflow: ../../import-talent-screenshot/SKILL.md
  • Icon validation and persistence: src/lib/server/game-data-icons.ts

Inspect these files before entry when fields or behavior may have changed.

Request path

Prefer a direct authenticated request to the SvelteKit weapon action over editor interaction:

  • Load or inspect /isac/weapons to obtain current talent, attribute, category, and registry data and confirm the authenticated session.
  • Construct FormData from the current contract in +page.svelte and +page.server.ts.
  • Preserve repeated relationship fields such as talent IDs and serialize structured fields such as mod slots exactly as the action expects.
  • Submit one POST request to /isac/weapons?/save with an accepted SvelteKit action response type.
  • Parse the action result, then query the registry and audit surfaces for readback.

Do not treat the action path as a public, version-stable REST API. Re-check the route implementation when it changes. Do not insert into the embedded database or call persistence utilities directly.

Required standard-weapon data

  • Unique name
  • Category: Shotgun, Rifle, MMR, AR, LMG, or SMG
  • Native tier: T0, T1, or T2
  • Damage type: Blast, Pierce, or Shredding
  • RPM, magazine size, reload seconds, accuracy, and stability
  • Damage minimum and maximum for every tier at or above the native tier
  • At least one existing Talent 1 and Talent 2 option
  • One or two unique Tactical Augmentation 01 attribute/value pairs

Weapon mod slots are optional evidence. An otherwise valid weapon with unknown slots may be saved and will remain CONFIG REQUIRED.

Talent icon matching

Query the current weapon or talent registry data to obtain active Talent 1 and Talent 2 icon sets. Match within the correct slot only. Use a visual contact sheet when the set is large; opening the weapon editor is unnecessary.

These weapon talent grids display every talent twice: once for Tier I and once for Tier II. Treat each slot grid as an unordered set, group identical icons across the complete grid, and store each matching talent ID once. Tier variants may occupy different rows, have other talents between them, or appear in either order. Pair by icon artwork only. If a two-icon group has no unique registry match, request a close-up with its name and description and run import-talent-screenshot before continuing.

Image preparation

Use the supplied weapon render as the source of truth. Remove the surrounding game interface and background without redesigning the weapon. Save the final asset in the workspace, include it in the server-action payload when the current weapon contract supports an image, and verify the resulting image URL.