Tabletop Simulator

Tabletop Simulator

Not enough ratings
MSE Importer
   
Award
Favorite
Favorited
Unfavorite
Type: Utility
Game Category: Card Games
Complexity: High Complexity
Number of Players: 10+
Play Time: 180+ minutes
Assets: Scripting, Cards
Language: English
File Size
Posted
Updated
10.899 KB
Jul 18, 2021 @ 1:53pm
Feb 5, 2024 @ 10:46am
4 Change Notes ( view )

Subscribe to download
MSE Importer

Description
This is a custom card importer for direct MSE -> TTS importing. It will not import cards that are not in the mse files provided. This is meant for more advanced MSE users, as it involves changing export scripts.


Instructions:

1. Export your entire set as images, and upload them to imgur in a single album, in alphabetical order. This should be imgur's default ordering. You will need the link to this album.

2. Export your entire set as text (MSE calls this HTML in the menus for some reason), using the MSE export script below. Upload it to pastebin or a similar text hosting site. You will need the link to the raw version of this item (just the text, no html).

4. Open Importer. If you would like to use a custom card back, set it in the description of the black checker in the middle of the table. A default non-magic cardback is provided.

5. If you would like your cards to print with your steam name in the name text, use the "Toggle Add Owner" option on the checker.

6. Use the import command "mse [text link] [imgur album link]" in the game chat.

7. Cards will spawn in a facedown pile wherever your pointer was when you sent the command.


Card Formatting:

TTS Card Name - [card name] | [card types] | CMC[CMC] | [steam username of spawner]
TTS Card Description - Full rules text


MSE export script:

Create a new "magic-TTS.mse-export-template" folder in MSE's Data directory, add the below as a file called "export-template" (no file extension) and a png icon of your choosing called "icon.png" that is 100x100.

A trailing empty line is very important for some versions of MSE. If you are experiencing strange errors, double check your script has a blank line after the last line of text.

MSE 2.1.2 (converts double quotes to two single quotes when exporting):

https://pastebin.com/raw/J6GNcFff

For other versions, if the above gives issues, try the below scripts (these do not have the double quote conversions and do not work correctly with 2.1.2):

https://pastebin.com/raw/f1STgjZ4

https://pastebin.com/raw/tVY1qn6x


Small examples:

Set 1, 4 custom cards:

Text link (has to be directly to text, note that this is the RAW link from pastebin):
https://pastebin.com/raw/56LBL2fG

imgur Album link (has to be an imgur album with the cards in alphabetical order):
https://imgur.com/a/wPaw5IF

Command:
mse https://pastebin.com/raw/56LBL2fG https://imgur.com/a/wPaw5IF

Set 2, 1 custom card:

Command:
mse https://pastebin.com/raw/z42y3bas https://imgur.com/a/65U8Arp
Popular Discussions View All (1)
23
May 30 @ 1:00pm
Errors
giantweevil
14 Comments
Psiell Apr 5, 2024 @ 6:50pm 
well the script is a blessing regaurdless so thanks. ^~^
giantweevil  [author] Apr 5, 2024 @ 5:07pm 
@Psiell yes, you can use google drive or steam cloud to host images. That's not the actual problem. You could even put those on individual cards using the custom card button in TTS, one by one. What they don't do is host images in an accessible way for a script to pull a large number of images into TTS. Imgur's API does do that, which is why it's used here. Creating custom cards *in bulk* in TTS is a little more complicated than just having them uploaded somewhere.

Ideally, I'd grabbing a directory with images and text file all at once and uploading it to a user's steam cloud, keeping the relevant identifiers and processing from there, but as far as I'm aware there's not a reasonable way to do that in TTS itself. If I had a way to do that, I wouldn't be using two different sites for storage at all, there'd just be a big friendly button to find a directory. I don't like how many manual steps are in the process currently, but it's the best way I could find to do it.
Psiell Apr 5, 2024 @ 3:26pm 
https://www.reddit.com/r/tabletopsimulator/comments/ndjv4p/new_to_tts_how_other_players_could_see_my_custom/ try reading this. it seems to imply that you can indeed just use google drive or steam cloud. so when i upload the content it should all save to my steam cloud if i choose to do so.

you dont need to, the user does when they upload it for people to download. so if i could upload the images via a link on my drive and the raw tts export then it shouldnt be a problem for others to get the images.
Psiell Apr 5, 2024 @ 3:20pm 
cus the goal is import them then upload them as a massive mod of custom ai mtg cards. i would think that saveing them as a custom object would be good enough.
Psiell Apr 5, 2024 @ 3:19pm 
if i upload the cards as a mod to the steam workshop it should work right?.
giantweevil  [author] Apr 5, 2024 @ 2:55pm 
@Psiell for other people to see the images, they need to be hosted somewhere public. Only the host would be able to see the images if they were just pulled from the host's computer. It might be possible to have them get directly uploaded to the user's steam cloud, but I haven't seen any way to do that in the TTS documentation.
Psiell Apr 5, 2024 @ 2:08pm 
is it possible to point it towards a folder on your pc and have it pull from that? and have it import them via the alphabetical sort option
Psiell Apr 5, 2024 @ 2:04pm 
i see. that sucks. oh well.
giantweevil  [author] Apr 5, 2024 @ 1:58pm 
@Psiell Imgur is used because of the kinds of access it provides for free, to only lightly authenticated clients (which is to say, an API key as opposed to OAuth). Google Drive doesn't have an equivalent, and I'm not aware of another image hosting site that does. In the background direct links to every image in the album get pulled, so direct linking being free is also a requirement. Other image hosting sites generally charge for direct linking.
Psiell Apr 5, 2024 @ 1:50pm 
ok so appearently for the last year imgur has had constant problems for many with error 404 or 500 upon trying to upload or look at images. please please fix this with some other site/solution. i really relly want this to work as there is no other mse importer that keeps text.