+2 votes
1.4k views
in Module Development by (584 points) 16 28 37 2 2
I am trying to test what happens when a setting is accessed for the first time and to do that I need to clear the settings I currently have.

I don't see anything in the documentation telling me how to do that.

2 Answers

+1 vote
by (584 points) 16 28 37
1

The closest I get to this right now is by setting the value to null like this:

game.settings.set('module-name', 'data-key', null);

0 votes
by (123 points) 6
0

I think the only way to do this is to delete the setting's line out of the settings.db database file. Make sure you know what you're doing and have backed up your data before touching this file.

by (584 points) 16 28 37
This sounds a bit too risky, I know that the Foundry devs are actually recommending people NOT to do that. It's also hard to ask users to do that if you are troubleshooting.
by (123 points) 6
+1
Indeed. I completely agree, but was just sharing what I do.
...