Hey all,
I've got about 800 colors to replace in my blueprints and doing it by hand would take a day. Whenever I run search and replace on the json for my blueprints, even after wiping everything else in the project including all generated sets, I still get most, but not all, of my old values on the colors. I've torn my hair out on this one, any ideas on what I am doing wrong? I also posted this in #tabletop-creator but the forums may be a better place for this question. Thanks in advance.
#Help with search and replace of json files
1 messages · Page 1 of 1 (latest)
If you are replacing the colors in the json files it should work. Make sure you are editing the correct json files inside the /data/ folder of your project. Colors are stored as "#RRGGBBAA" format
Are you reloading the project after you change the json files or you allow the project to autoreload itself when the changes are detected? (it should)
Thanks, I may not have autoreloaded the project correctly (been queuing it up by hitting 'recent'), I'll give it another go today.
Ugh I think I need to do this by hand. It just doesn't stick! I'm going through all blueprint files, doing a search and replace... It says it has changed 'x' number of values but when I re-open TC I invariably see the original color pop up. It makes zero sense!
I mean it surely doesn't have anything to do if the object is visable or anything as I'm just manipulating the json files.... So I really don't know how this is happening. I open TC and the search and replace comes up as if I missed one single value (even though I changed nothing after altering the json and opening TC) but when I explore the blueprint most values didn't stick.
The only thing wrong with the blueprint designs is that I didn't have a handle on layers, so I've got like 500 'images' on one layer (planning on fixing that now that I know how). All of those images are blank so I can get my colors in there.
Here is what I'm seeing in TC, with the replacement color not sticking when I turn the image to visable:
Right. I'm going to take a breather, this has driven me crazy. One more screenshot - here is a color value that appears but does NOT appear in the json file:
So, the values **are **replaced in your VSCode. I was thinking that maybe the color is serialized differently by precision errors in the json but if you know that replaced some values then it can't be...
Another thing that could be happening is that you are replacing only colors in the blueprints but in the set values you have set the same color as well, **but **in the screenshots that you sent you show the blueprint editor so it can't be as wel...
Another thing could be that you are replacing colors in **another **project folder that is not the project you have opened in TC (maybe you have a copy in your computer of that project?)
Right now i'm out of ideas, so if you don't find out why this is happening, you may need to send me the project folder compressed to see if I can find the root of the problem to [email protected]
Thank you my friend - I'll keep these in mind as I try and work through it today. I'm sure it's something on my end more than Pixellato's and will report back if I find it before I manually get it done. That last screenshot is interesting as I opened TC, didn't change anything, found that C4B859 color, and searched for it with no results. So didn't open / search and replace / etc. and it couldn't find it.