#Krystaline's document relinking
1 messages · Page 1 of 1 (latest)
Just gonna pop us into a thread here
So yeah, I gotcha — much more vast scope than I realized at first.
So where we're at now, is we can do the script to relink all your tokens, which should be really helpful. But yeah, the pins can't be auto-fixed I'm afraid.
I'm almost ready to ask for the macro for the tokens, just making sure the folders are sorted correctly in order. I'm pretty anal... I mean type A... I mean Attention to Detail is my middle name
There's a lot of those around here 🙂
Looking back, I probably should have just migrated it from v8 to v11 and been done with it 😦
Should I relink all of the 'speaking' macros before I do the tokens? Or should I ask the Macro Wizards?
I'm heading there to ask now. Just finished putting things in order
Yep, I've got everything we need
Ok, I need to know who to thank also
One of our best scriptwriters ( @tepid monolith ) whipped up what we need.
I'll make sure to thank him/her/they after we are done
Got things ready to go there?
I have the scenes, actors, journal in sidebar. All my stuff is ordered like I want it to appear.
Cool. Click on an empty hotbar slot at the bottom of the screen, and change the Type dropdown in there to Script.
Open and in Script
Paste this in, but don't run it yet:
for (const scene of game.scenes){
let updates=[]
for (let tokenDoc of scene.tokens){
let act=game.actors.getName(tokenDoc.name)
if (!act){
ui.notifications.warn(`Token ${tokenDoc.name} on scene ${scene.name} doesn't have a matching actor`)
}else{
updates.push({
_id:tokenDoc.id,
actorId:act.id
})
}
}
await scene.updateEmbeddedDocuments("Token",updates)
ui.notifications.notify(`Finished scene ${scene.name}`)
}```
Ok, I'm making my .zip backup so I won't run it
Oh crap I think I opened up wrong. one second. I don't think I ran as admin
Ehhhhhhh really shouldn't be running as admin regardless
Yes, always need to have the world closed before copying files.
I have not done anything different than in the past 200 backups
maybe that is it
Don't mean to hold you up
All good
Got the script pasted in?
pasted in, yes
Okay. So when you execute this, it's gonna start throwing notification banners. Blue ones as it completes each scene, and yellow ones any time it comes across a token that doesn't match any actor by name.
They will probably sort of fly by, and disappear on you, but it'll all be logged in the console so you'll be able to go back through after and find the ones that need fixing.
Ok understood
Coolcool. Okay, go ahead and run it. 🙂
Ok I've named it Sanity
So it looks like the SRDs I dropped and added 'names' to on the map are the yellow banners. original creations are all running blue
Yeah the yellow ones are gonna be anyone who had a different token name than their linked actor's actual name.
I guess I'll just drop SRDs on the map and not rename them
Basically the yellow-tagged ones are gonna need manual fixing.
So, let me ask. If I have 20 guards, do each of them need an individual actor? Can I just load one in and make copies of it?
I put a commoner down and called him Farmer, then duplicated it 20 times. Do I have to put 20 commoners down and not rename them?
What I would do here is actually check those examples to see if their sheets don't open when you double-click the token. Unlinked actors should actually still open fine I think?
I'll check.
Even if this is 50% better, that means only 40 hours of work still ahead
F12 will give them all to me?
If they don't, then what you'll need to do is drop a new Commoner from the sidebar into the scene, rename it Farmer, then copy/paste it around (like you did the first time).
Yeah F12 > Console
I think it's done
So I have to relink the macro for the chat in the sidebar - I had the people talking jump to the sidebar chat window.
I have to relink all the map pins
I have to fix all the tokens that didn't get fixed
So in the future when I 'm doing their next installment and its all mine, I make compendiums and work from the compendium to link things, journal to journal, etc. But I leave everything in the sidebar and don't clean it up?
Yeah: Put everything in compendium packs that you want the end users to have access/reference to in compendium packs. And have everything in your sidebars in the state that you want your end users to have their sidebars in. Basically making an entire world as if it were your own. And then we do a few clicks of magic to pull all of it into an Adventure for distribution.
Ok, so much easier than a remake
Yeah for sure
Thanks again for your help.
I have more work to do ... argh. But I think that light is not a train
haha
I truly wish you didn't ever have to do any of this extra work, it sucks. But we'll always try to help get you through the broken parts as best we can.
Do I need to keep that macro in the game?
Nah you can delete that now.
I'll wait until I'm ready to pack it up
The All Caps is what was original
3 LARGE SANDBOX AND 40+ DUNGEON MAPS
200+ ILLUSTRATED NPCS
30+ NEW MAGIC ITEMS
80+ NEW MONSTERS AND TEMPLATES
30+ NEW SUBCLASSES
40+ NEW SPELLS AND FEATS
442 Actors
325 items
65 Journals
1 Macro
64 scenes
13 roll tables
You've saved me again.
So one more question
This is a spy vs the world with assassinations and coups for power type
I have the character sheet with a name that is different than the token name. Is that what is causing the problem? Do they just have to have the name the GM wants the players to have as a character name too?
So this discrepancy is just what's making the automated script not be able to fix that token. You don't have to change the way it's designed, you'll just need to manually replace the token in the scene for this actor.
Like, find and delete the token that's there (and broken), and drop a new one in.
Ok, I undestand, and change the name on the characgter sheet? Will it break again?
Don't need to change anything on the sheet
When I changed the name to match the token, it now shows "Represented Actor"
What needs to be done is the old token needs to be deleted and a new one dropped in.
I understand that, but won't it break again because the token name doesn't match a character sheet?
That's all the script did, it just couldn't do it for these particular ones.
Nope, because you won't be running the script again.
It's totally fine to have a mismatch between actor and token names in regular play and packaging.
Ok, I'm gonna believe you. It's doable what I wanted, and If I hadn't cleaned up the sidebar, we would have not had this break in the links
Yeah
(I've gotta run for a bit, so will go dark here shortly. But others have been following along and will jump in if they can, if you have more questions.)
Ok so thanks!