duplicate-actor
Clone Foundry VTT actors as full copies for safe battle re-runs. Keep sheets rollable while preserving items, spells, effects, and token data.
Instructions
Clone one or more existing WORLD actors as full copies — the whole sheet travels (system data, embedded items, spells, effects, prototype token), so every copy stays fully rollable. THE sandbox path: clone PCs as "(Sim)" copies (suffix: " (Sim)") so a player can re-run a battle without touching the real sheets. Resolution is STRICT (exact id or exact name — look up with list-actors first); a missing source is reported per-actor, never fatal to the batch. Name the copies with newNames[] (index-aligned) or a suffix on every source name (default " (Copy)"). Pass folder (id or exact name, created if absent) to file the copies together — omit to file each beside its source. Pass owner (user id or exact/partial name; + ownershipLevel, default OWNER) to set each copy's ownership to exactly {default: NONE, that user: level} — omit to copy the source's ownership unchanged. GM-only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| owner | No | User who should own the copies — a user id or exact/partial user name. When set, each copy's ownership becomes exactly {default: NONE, this user: ownershipLevel}. Omit to copy the source actor's ownership unchanged. | |
| folder | No | Actor folder to file ALL the copies under — a folder id or exact name (created if absent), same contract as create-actor-from-compendium. Omit to file each copy beside its source (the source actor's own folder). | |
| suffix | No | Appended to each SOURCE name to build a copy's name when newNames does not supply one (e.g. " (Sim)" → "Gren (Sim)"). Default: " (Copy)". | |
| newNames | No | Names for the copies, aligned by index with actorIdentifiers. Entries the array does not cover fall back to the source name + suffix. Omit to name every copy that way. | |
| ownershipLevel | No | Permission level the `owner` user gets on each copy (default OWNER — full control, the sandbox use case). Only meaningful together with owner. | OWNER |
| actorIdentifiers | Yes | Source actors to duplicate — exact actor names or IDs (e.g., ["Gren"] or ["5GRD8GE7GJUWEbB2"]). Resolution is STRICT (exact id, then exact name — no fuzzy matching), so look up the precise name/ID with list-actors first. |