View Full Version : [TOOL] - Mass Import Custom Tokens

11-02-2017, 01:33 AM
Recently I had to import over 390 custom tokens... and after 2 days I still had another few 100 more to do!! It was so slow and painful having to copy and paste the token, right click it, select custom, alt tab, get the url, tab back, paste the url, hit import... and repeat!!

So I made this quick and dirty solution for importing 100s of token images into TTS. All you do is make a template object, drop it on the tool, and then copy all your urls into the text tool and hit the button. So much faster.

At this time, as that was all I needed, this script only works on the default TTS "CUSTOM TOKEN" object.. but the method can be easily adapted to all custom objects. If there is interest I could expand the mod.. but it is what it is at this time!

LINK : Mass Import Custom Tokens (http://steamcommunity.com/sharedfiles/filedetails/?id=1188576836) @SteamWorkshop

Create 1 Token as a "template" for all your other tokens.
Make a text file of all your URLs, 1 URL per line. If you use DropBox or GoogleDrive you can simply select all the images and get the urls in one click.
Paste your URL list into TTS, by selecting the TEXT TOOL and editing the TEXT FIELD in the mod. Just simply ctrl+v to paste it in. (remember to delete anything I had in the tool)
Drop your template token onto the tool
Press the button
After it has finished, press the button next to the bag and it will spit everything out of the bag into the table to fix GUID issues and load all the images into your TTS cache.
When all the loading is done you will notice a button at the base of the table to pack everything backup into the bag
Save the completed bag to import into your mod.
Enjoy your hours of extra time by going for a surf with your kids.


11-02-2017, 08:36 AM
Suggestion: give an option to spawn into a bag. Otherwise, this is fantastic and I'm looking forward to using it.

Edit: I wonder if one could add more parameters to the spawn using a tab delimited spreadsheet format.

11-03-2017, 02:51 PM
You could probably make it able to handle tab delimited, or some other kind of mark to separate things and make it add Names and Descriptions, though I am not sure I would want to add that myself. The Text Tool while it can take much larger amounts of text, still has limits and keeping the tool focused on URLs seams the best idea for me.

I think dropping them into a Bag is a good idea. You would still need to then drag them all out of the bag, but it would fox the falling off the table problem... Useing Dak';s frame delay code he gave me will allow things to drop a little and stop the inside each other problem.

01-13-2018, 05:20 PM
UPDATED 14/01/2018

It now works on all objects in TTS (apart form custom decks and asset bundles)
It now can read off two url lists.
List 1 = image slot 1 or diffuse map for custom OBJs
List 2 = image slot 2 or normal map for custom OBJs
Imported objects are placed inside a Bag to be neat. You can save this to your chest and then import it into any mod you are working on.
GoogleDrive and Dropbox RAW links, will be rephrased automatically. So you can paste raw links form those sites into the mod and it will work.

To use only 1 image list, simply select the 2nd list and select all and delete. The default "empty" for a text field says "Type Here". This means empty as far as the mod is concerned.

If you want to use two urls lists then they MUST be the exact same length of lines, as in have the same number of URLs in each list.


04-01-2018, 12:21 AM
UPDATE - 01/04/2018

There was a lot broken with this mod. I basically went through and redid it from scratch.

• FIXED : - There was a bug with all the results having \r appended to all the urls. This was fine for image 1, something to do with how TTS works, but it was causing all sorts of problems for image 2, I never noticed it as I have not ever used it in a project for objects with 2 images.

• FIXED : - There was a scripting error, that seems to have crept in. I think long ago I accidentally uploaded the wrong version. The "nil" error is now fixed. I wounder how long it has not worked at all on the workshop : (

• ADDED : - I have placed a "Fix GUIDS" button. One of the issues with this mod is that everything in the bag has the same GUID until it is pulled into the world. This is a common issue in TTS with bags and decks you run into all the time, Simply press the button and the bag contents will be spat into the air and drop back into the table. Run this after the clone has finished.