vtt-lair / token-replacer

Foundry VTT - Automatically replace NPC actor tokens and/or portraits dependent on token assets saved in a defined folder structure
MIT License
5 stars 4 forks source link

Fix token paths without CR folder structure and “proper english” configuration #68

Closed kageru closed 3 years ago

kageru commented 3 years ago

Essentially these changes: 1) Don’t escape the token name twice (this broke proper english because spaces were first escaped to %20 and then again to %2520 2) Don’t check for difficulty variables if tr_useStructure is disabled (previously, you would check the value of the text field which is hidden when the directory structure is disabled but could still break token replacing) 3) Make imageNameFormat and folderNameFormat non-const because they are overwritten by debug logging which breaks the save button when debug logging is enabled 4) Add some more logging which I found useful while debugging these issues

vtt-lair commented 3 years ago

Thanks, will merge this in and just run through a few test runs. Should release it in the next few days.