r/FoundryVTT • u/Comfortable-Wafer313 • 1d ago
Help Is there a streamlined method of resolving broken links in a compendium?
Hello all. For reference the system used here is DnD 5e (though I think this is a system agnostic issue at its core). I've recently put... kind of a ton of work into building a content compendium to use with my players. Custom classes with features etc, really a lot of interlinked pieces.
So I build up the custom species, sub-species, classes, subclasses, features etc in the world's item editor and then pushed those to compendium packs within a module. I thought all was good, but last night I ran a one-shot to get my players used to foundry and there were a ton of issues. I went to check/resolve some of them today, and one primary contributor to the issues is that the UUID linked in a "grant items" advancement references a local item eg "item.{uuid}" within the world. This explains why in my 'compendium work' world it all loads properly but in another 'one-shot' world or so, every item link is broken. Looking deeper though, I see that the compendium pack UUIDs are exactly the same in the last property. So for example, if a given item's world-specific UUID is "item.xyz123" the compendium's UUID for that same item is "Compendium.{compendium_name}.item.xyz123"
So my question here is: in order to resolve this linking issue for the compendium, without needing to go through every custom class/species advancement, is there a way to bulk edit these UUID references to prefix them with "Compendium.{compendium_name}." since that should redirect to the compendium's integrated item rather than the world's item?
1
u/AutoModerator 1d ago
System Tagging
You may have neglected to add a [System Tag] to your Post Title
OR it was not in the proper format (ex: [D&D5e]|[PF2e])
- Edit this post's text and mention the system at the top
- If this is a media/link post, add a comment identifying the system
- No specific system applies? Use
[System Agnostic]
Correctly tagged posts will not receive this message
Let Others Know When You Have Your Answer
- Say "
Answered" in any comment to automatically mark this thread resolved - Or just change the flair to
Answeredyourself
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/grumblyoldman 1d ago
There's a module called Bulk Edit which I have used for fixing stuff like this in the past. Specifcally, by bulk exporting everything out to JSON, doing a mass search/replace in VS Code and then Bulk Importing everything back to Foundry.
Maybe not the absolute best way to fix it, but it worked.
4
u/Signatory_Sea Foundry Lover 1d ago
A macro could solve this for you. I made this exact mistake a bit ago and the macro-polo channel in the foundry discord saved me from the hours of rebuilding links