pf2e
pf2e copied to clipboard
Add option to remove Source ID
Suggestion: Add an interface button that would allow items to be unlinked from their original source, which can currently only be done through JS (likely for GMs only) or otherwise allow disabling the refresh button
Use case: Creating custom items or other elements based on pre-existing ones ties them permanently to the source item, with the possibility of immediately losing any custom changes at one click of the refresh button. To avoid this, one either has to create items from scratch, which can be inefficient when changes are relatively minor, or use JS to remove the source flag. Having the option for GMs to unlink items from their source within the interface would make it much easier and avoid loss of progress
@pinkflumph Do you know how to do this using JS? I haven't managed it, as I get validationFailures on my attempts using item.updateSource()
@robinsving In case you still need it (or for anyone else who stumbles onto this discussion), here is a macro generated with the help of the Foundry PF2e Discord:
let uuid = await Dialog.prompt({
title: 'Remove Source ID',
content: `
<form class="flexcol">
<div class="form-group">
<label>UUID</label>
<input type="text" placeholder="Enter Value">
</div>
</form>
`
callback: (html) => html.find('input').val()
})
fromUuidSync(uuid).unsetFlag("core", "sourceId")
It opens a pop-up with a field - just copy and paste the item's UUID into it, and it will remove the source ID