Image and effect translation crawler + Tabletop Simulator importer for Battle Spirits mod: https://steamcommunity.com/sharedfiles/filedetails/?id=1629315994
- Python >= 3.2, >= 3.7 is recommended
- Tabletop Simulator (Only for importing to Tabletop Simulator)
- TS-DeckBuilder.exe, located in
YOUR_TABLETOP_INSTALLATION_FOLDER/Modding/
(Only for importing to Tabletop Simulator)
Download/clone the repo
- In your
~/Documents/My Games/Tabletop Simulator/Saves
folder, copy an existing save.json
file and rename it asTS_Save_-.json
, this will be used later. Skip this if you are only downloading images.
TODO: Add effect scraper usage guide
-
Run
main.py
-
Choose operation. We need to download the images of the cards first, so input
D
ord
-
Enter a specific link if Fandom link is not simply the generation name appended at the end. Else leave empty and press Enter.
-
Enter the generation name of the cards you want to import (i.e. BS60, BSC39) and press Enter
Battle Spirits card importer v0.1.1 Download card images from fandom: [D/d] Scrape card effects: [S/s] Load card names onto cards: [L/l] Choice: d Please input the card generation abbreviation (i.e. BSC28): CB23 Page link (LEAVE EMPTY TO AUTO GENERATE): Continue? [(Y/y)/(N/n)]:
-
When cards are done downloading, they are saved in the
./downloads/GENERATION_NAME/assets
folder, open this folder and check for bad images -
(Continue if you are importing to Tabletop Simulator) Open the deck builder, drag all the downloaded images into it.
-
In the deck builder, export the deck as a
.png
file. If there are more than 69 cards, there will be multiple tabs in the deck builder and you have to export multiple.png
files and retain the order of the.png
(Order: Ascending alphabetical order)Mode LastWriteTime Length Name ---- ------------- ------ ---- d----- 2022/07/11 2:38 assets -a---- 2022/07/11 2:40 58510913 BS60-1.png -a---- 2022/07/11 2:40 5013 BS60-1.tsdb -a---- 2022/07/11 2:40 59341844 BS60.png -a---- 2022/07/11 2:40 5369 BS60.tsdb
(BS60.png contains BS02-X08 to BS60-058, BS60-1.png contains BS60-059 to SD56-RV009)
-
Open Tabletop Simulator, load save
-
(The one copied earlier), and load an empty table -
Click on Objects > Components > Cards > Custom Deck and import cards, DO NOT CHANGE THE ORDER OF THE CARDS/SHUFFLE: In case of multiple exported images from Deck Builder, have both decks of cards face down, and put first exported image on top of the latter, to retain card order (i.e. BS60 stack on top of BS60-1 stack)
-
Overwrite the save file (Save 0)
-
Rerun
main.py
or continue the script, and inputl
/L
to load card namesContinue? [(Y/y)/(N/n)]: y Download card images from fandom: [D/d] Load card names onto cards: [L/l] Choice: l Please input the card generation abbreviation (i.e. BSC28): CB23 ... CB23-001 CB23-002 CB23-003 ... file_lines: 69, cards: 69 Imported Continue? [(Y/y)/(N/n)]:
-
Enter the card generation name
-
Names will be loaded into "Save -":
-
Cards are now named and imported
-
AssertionError
with files_lines != cards:file_lines: 70, cards: 69 Traceback (most recent call last): File "G:\CRAWLER\batosupi-crawler\main.py", line 13, in <module> tabletop_name_import.tabletopNameImport(cardGenerationName) File "G:\CRAWLER\batosupi-crawler\tabletop_name_import.py", line 44, in tabletopNameImport assert len(cards) == len(file_lines) AssertionError
Check the txt file generated in the
./decks
directory, see if there are any missing or duplicate card names. Remember to retain alphabetical order.