Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Does cloning a campaign copy everything from state.?

I stuffed something up in one campaign with state, I want to clone that campaign to clean out state. Will this work?
1418366509
The Aaron
Roll20 Production Team
API Scripter
no. You can dump the state to the log as a string with: log(JSON.stringify(state)); Then restore it in a new campaign by taking what was dumped out and expanding it to an object again: state = JSON.parse(< the string you got >); Obviously, this will wipe out your current state.
Thanks!