Tabletop Simulator

Tabletop Simulator

Easy Modules for MTG Encoder
59 Comments
Tyrant  [author] 1 Jun, 2024 @ 7:57am 
I haven't played TTS MTG in over 2 years at this point, Pie is still keeping their tables supported, so you should probably use those instead:
https://test-steamproxy.haloskins.io/sharedfiles/filedetails/?id=2296042369
Debatra 31 May, 2024 @ 4:03pm 
It breaks when trying to get the loyalty of "Nissa, Steward of Elements", represented as "X". Can't even interact with the button to change it to an actual number. Can turn the counter off to stop getting error messages though. This also happens when using "B.O.B. (Bevy of Beebles)", which has "*" loyalty, but that's an UN-set card and thus less likely to occur than a card reprinted in MH3.
Tyrant  [author] 22 Nov, 2023 @ 7:10am 
Accepted the pull request that fixes the issue from the previous comment.
AriZona Green Tea 34 Oz Drinker 21 Nov, 2023 @ 5:55pm 
There's a problem when importing Henzie "Toolbox" Torre with this module, no matter how I change the data for the name of the card, it never sees it as a 3/3 creature, the power/toughness never shows up at all.
NeM 16 Nov, 2023 @ 11:45pm 
BakedPie forked your mod to fix this issue, plus, he fixed the "Player Gem always showing" issue, but his version cant be exported outside of his modules for now, I try to figure it out why.
NeM 16 Nov, 2023 @ 10:18pm 
I have issues to make it working :
- If I import a previous deck, it doesnt work.
- If I create a new custom deck, it works fine.

Any idea ?
thelastaudst117 13 Jun, 2023 @ 11:33am 
Hi i was just wondering if there was a way to get the encoder to work with non magic the gathering cards/custom cards, is there a way to have a card with a non mtg card name still get encoded, similarly is there a way to get a custom card to automatically set toughness from the description without having to name it after an mtg token. i am testing custom cards for a custom card game out on tts and the auto encode features are very helpful but i would like to be able to name my cards so that they can be searched for and i currently cant do both
The Unstable Anarchy of ヤギ 23 Feb, 2022 @ 2:36pm 
While it says these require the card to have proper oracle data my testing has found that it really only cares about cardname, which makes it annoying for customs since anything with a non-oracle name simply doesn't load the any of the modules. This can be fixed by naming the card "Custom Card" or removing it's name entirely but doing so makes searching for cards in a deck obnoxious.
.BAD. Épísôdè -(OG) 18 Oct, 2021 @ 10:28pm 
Love this mod, thanks so much!
DynaLight 17 May, 2021 @ 10:15pm 
Is there a quick reset button or do I need to re-import my deck after a game?
Wall rush man 11 May, 2021 @ 2:39am 
Oh, also have you set this up to detect modular yet? When I play modular cards it doesn't seem to be adding the +1/+1s
Wall rush man 11 May, 2021 @ 2:35am 
How does this automatically detect who owns what deck? because every time I spawn a deck every card in it is treated as owned by grey. Is there a way to manually change the ownership gem of a deck (without pulling every card out individually and setting their ownerships directly)?
gfsnilrem 24 Mar, 2021 @ 9:58pm 
@Oops That's not what is happening at all... you linked it and I tried to use it... it was completely and totally non-functional so I reported the bugs, turns out most of them were due to Scryfall going through some issues last night, so I commented on the ones that were due to that and which ones weren't.

I love the fact that it does +1/+1 counters, tracks ownership/control and changes to p/t. I love the minimalist interface (the hidden buttons and low contrast icons). I would much rather use this mod then try to develop my own version from scratch. Currently trying to figure out how much the oddities are going to drive me crazy and if that makes coding all this over again myself worth it or not... I do use a lot of custom cards and the encoder doesn't play well with other mods and this doesn't play well with unrecognized cards... so I may have to... but I don't want to so I am trying to get this to work. Nothing is trying to rag on this mod it is super slick and I like it.
Oops I Baked a Pie 24 Mar, 2021 @ 4:55pm 
@gfsnilrem you missed the bit where the majority of the importing isn't done directly by this mod. The importing is done via Amuzet's Card Importer (which is primarily used via chat commands) whereas this mod parses the name/oracle data to add convenient buttons when possible. It does appear that the token loading isn't perfect (I think the script does precisely check whether the name of an all_parts object is the same as the card).. but again this isn't directly this mod. There's also - the Encoder. It's a bunch of stuff together.

Its not perfect - there is no perfection.. Plus many folks have completely different preferences/desires ;-)

I linked this to ya cuz I thought it'd make for good inspiration for what you were doing with Omes loader. But it sort of turned into "let's point out all the issues and how it's different from what you were doing on your end".. :-/
gfsnilrem 24 Mar, 2021 @ 2:46pm 
@Comment 3: Related issue...

Tokens that share a name with a card get the stats of the card, not the token, Black Zombie Adorned Pouncer is a 1/1 not a 4/4. Obviously I can just change the stats but it was funny when I pulled the Adorned Pouncer token out of the token stack and got... a 1/1 I can't think of a time this happens outside of Eternalize... and its not a huge deal, just funny
gfsnilrem 24 Mar, 2021 @ 2:33pm 
@Comment 4: Most cards create 1 token and it wouldn't change, for cards that make multiple (or a token and emblem) it would ask which one you want... clicking a button in that menu would close the menu and spawn the token. It would be faster than going through a deck or 2 or three cards and finding the one you want then deleting the others. It could even be the right click action (there currently isn't one for the token button) so it is all upside.

I wouldn't do that until I had cached the token data in the card so you don't have to use Amuzet's Card Importer or tokens and it would be very fast. Obviously your call, but think about it for the right click action when you get the Caching done...

RE: Elspeth... fair, you're forcing the default version which didn't have a token... and I see that The List and Mystery Booster are NOT default version (even for cards that they would be expected to be) so that isn't a big issue.
gfsnilrem 24 Mar, 2021 @ 2:13pm 
@Comment 3: I can't find an Embalm card your tool makes tokens for, it knows a token exists and it tries to create a token, but it doesn't actually create a token. It happens on Aven Initiate, Honored Hydra, Anointer Priest, Angel of Sanctions... It happens on Eternalize too, Adorned Pouncer for example doesn't make a 4/4 black double striker.

if I use the middle right button (Re-Import) on Anointer Priest I get a copy of Anointer Priest, if I use the lower right button (Emblems & Tokens) I get a text object on the table that says I am trying to import a token or emblem, but it just sits... and blocks all other token creation (it queues it).

This is still happening and does not seem to be a Scryfall issue.
gfsnilrem 24 Mar, 2021 @ 1:56pm 
@Comment 2: The Elephant token was having the same issues as the cards in 1, it is working now.
gfsnilrem 24 Mar, 2021 @ 1:55pm 
@Comment 1: I didn't have the names wrong. I know this because as I said the menus generated by the encoder worked and were able to create a copy of the cards and the copies used different images (the same card from a different set) and both the version I created and the version that the Encoder created had the same issue where your mod didn't create any buttons, and cards I picked up before and after that card all worked and I tried that card multiple times and I never had a card not get your buttons on one try and then get them on another try.

The Tool menu worked, the re-import in the tool menu worked... your mod didn't work, on the original cards or the re-imported cards.

The cards in question are working now, so I am going to assume the issue was caused by Scryfall not returning correct values (because it was having issues last night) and those bad values were being Cached at some level (your mod, the encoder mod, TTS web request cache, etc).
Tyrant  [author] 24 Mar, 2021 @ 10:53am 
@ comment 4:
no, you're not gonna get a menu that turns a single-click action into open menu > choose card > click > close menu - that would take longer than just importing and then you grabbing the card you want.

Copy the tokens normally, that's why that feature exists on TTS.

The module uses scryfall data, if the data's missing on scryfall, I can't do anything - the default elspeth printing doesn't have its emblem data on scryfall.

I can't cache that data right now, no - but something like that's planned.

Crystalline Giant uses extremely uncommon wording, most auto functions depend on text pattern-matching.
Tyrant  [author] 24 Mar, 2021 @ 10:52am 
@ comment 3:
both cards are working normally, you probably tried to use it while scryfall was down - all functions use scryfall API, pretty much.

@ comment 2:
the buttons show up fine here, auto pow/tou isn't triggering but right now it isn't worth looking into for one card - the auto systems for tokens will be updated in a while.

@ comment 1:
all listed cards work normally - you either had misnamed/nameless objects or scryfall API was down when you tried to use the functions.
The tool menu isn't my work, neither is the re-import in that.
gfsnilrem 23 Mar, 2021 @ 3:00pm 
Tolsimir Wolfblood isn't working either... it gets just the tool menus nothing else, when I pull out the right hand menu and choose Card Importer and Respawn I get a second copy of Tolsimir (but with a different expansion symbol so the card is recognized) and that copy doesn't have any of the extra buttons either (P/T, counters, or the enable/disable buttons for anything)
Same problem with Elesh Norn, Flawless Maneuver, Expedition Map, Bramble Sovereign, Gavony Township, and Mycoloth...
All these cards get the tool menus and when I spawn a copy through the menu the expansion symbol (usually) changes so it is pulling a new image for the card, but the new copy also has no easy buttons at all...
gfsnilrem 23 Mar, 2021 @ 2:42pm 
My Elephant token isn't getting easy buttons...
Use Generous Gift to create an elephant token and that token gets no buttons (It gets menu buttons but not the controller, p/t, etc buttons or the toggle buttons to create them)

Other tokens (such as the elemental created by Grove of the Guardian) do get those buttons (I checked all 27 tokens this deck makes and only the elephant doesn't get the buttons.
gfsnilrem 23 Mar, 2021 @ 12:50pm 
if I try to create a token from a card that doesn't create tokens it does nothing, if I try to create a token from Anointer Priest or Angel of Sanctions it creates the "Importing emblems and tokens" tag but then does nothing (and queues all further token requests until you manually clear)
gfsnilrem 23 Mar, 2021 @ 12:47pm 
When I hit the token/Emblem button on Reef Worm I get three tokens (Fish, Whale, Kraken) which seems less than ideal, could we get a menu instead of spawning all three?

When I hit the button on Elspeth Sun's Champion I get a soldier token... no Emblem.

Speaking of Elspeth I want to make three tokens at a time, not one, but if I triple click I get 'spam-click detected try again in a few seconds' instead of getting 3 tokens.

Can you cache the token that is created instead of querying Scryfall each time (this would help with the menu question from the worm above)?

Angel of Invention activates the +1/+1 module but Crystalline Giant does not.
Tyrant  [author] 7 Mar, 2021 @ 9:21am 
Oh right, after recent changes the module isn't using description data - so it's not gonna work. The new system fetches scryfall data based on the card name and uses that.

Which means I forgot that the old parsing was also used for custom cards. There is a wonky workaround for now, which is that the new system still falls back to getting pow/tou from the description if the card is a token - so if you change the name of the card object to "Weird" and put " 12/12 " in the description, then it would automatically detect the stats.
Besi 7 Mar, 2021 @ 4:58am 
Or maybe i can modify the code of this to recognize any card with powtou in its description as a card that should have autoactivated powtou? sorry for all the comments
Besi 7 Mar, 2021 @ 4:36am 
so ive figured it out. the auto powtou command doesnt recognize that im playing a card that has power and toughness even though the description of the card does have powertou since im playing a "blank card"(all my cards that require powtou module are spawned via the card spawner ontop of blank cards). so im just wondering now how does one go about fixing this? respawn all my cards as spirit tokens? urge scryfal to give blank cards power and toughness via oracle text? edit the importer somehow?
Besi 7 Mar, 2021 @ 3:41am 
hm maybe im not asking the right question then. Why is it that MTG cards imported and placed have the powtou displayed automatically and my cards do not?
Tyrant  [author] 7 Mar, 2021 @ 1:57am 
The easiest way would be for your module to fetch the encoded card's data off of the encoder and change 'displayPowTou' to 'not displayPowTou' within the tyrantUnified table.

Otherwise, I don't believe there's a good way for you to call ToggleDisplayPowTou externally as it's a button function that takes 3 separate arguments.
Besi 7 Mar, 2021 @ 12:53am 
Hey again! I was wondering, if i wanted this function "ToggleDisplayPowTou" to be called when i encode cards how would i go about that? i have auto encoding disabled and instead use large invisible play boards that encode objects on collision. Ive tried importing some of my cards from my table into this mod to see if the auto encoder would fix this and it didnt. Any help is much appreciated like always.
Besi 15 Feb, 2021 @ 11:02pm 
OMG THANKYOU SO MUCH THAT EXPLAINS WHAT I WAS DOING WRONG! ALSO FOR ANYONE READING THIS ALSO WONT WORK IF YOU DIDNT IMPORT THE CARD USING THE AMUZET CARD IMPORTER!
Tyrant  [author] 14 Feb, 2021 @ 2:59pm 
The scenario you described only won't work if the card was already encoded as a 2/2, as it would still have that data saved in the encoder. But copying the object would show it as a 5/5.
Tyrant  [author] 14 Feb, 2021 @ 2:57pm 
If you format it properly, it will work by updating the description, yeah.
All the automatic features just read the description looking for text that looks like proper info based on how data is on cards imported with Amuzet's importer.
Besi 14 Feb, 2021 @ 11:31am 
So i was posting about this on amuzets page but i was wondering if the potential for supporting custom card games oracle text ? for example, if i were to edit the description of a card to say 5/5 instead of 2/2 , save and reload, the card would then be a 5/5, or if there is anyway to tell the module custom oracle text as it stands?
Oops I Baked a Pie 2 Feb, 2021 @ 11:45am 
@Medic
It's quite likely one of my tables or a table that uses some of my scripts.
I do modify existing scripts including the one of this page, and they're meant to work without the update (the update would remove my modifications).
I'll see about removing the ability to do that right-click update on the bits that I've modified. Granted, you're the first person I know who has found it ;-)
MEDIC 2 Feb, 2021 @ 4:41am 
Oh, Thank you very much tyrant! That actually helps alot.
Tyrant  [author] 1 Feb, 2021 @ 11:38am 
@MEDIC you probably hit update on a table that has modified versions of the modules instead of the originals. You can see how the error for mine says line 2443, but the code in question is on line 2474 in the latest version - which means that the table you have has edited my code and disabled auto-update.
So I can't really help you there.
MEDIC 1 Feb, 2021 @ 9:28am 
Hey Tyrant! I recently found the "Update" button on this thing hidden in one of the tables I play on, But after hitting it I now get this whenever I pick up a card. Do you have any suggestions as to what i'm doing wrong? https://cdn.discordapp.com/attachments/542188874848272395/805851275705974824/unknown.png
Tyrant  [author] 20 Jan, 2021 @ 6:19pm 
Can't really reproduce it on my end. I've pinged you on discord; if you want to show what's going on at some point, we can set a table up there.
Debatra 20 Jan, 2021 @ 5:32pm 
My full list is Basic Menu, Auto-Encoder, Power/Toughness, Status Effects, Copy, +1/+1, Notepad, Color, Token, Keyword, Loyalty, Phasing, Morph, and of course Card Importer. Even removing everything that yours makes redundant doesn't change anything though. This only ever happens when I'm using yours.
Tyrant  [author] 20 Jan, 2021 @ 5:21pm 
Which other modules are you using that show information on the card? Things like the token, phase and notepad modules, for example.
Debatra 20 Jan, 2021 @ 5:19pm 
Then the question becomes why this happens so often with this module and not others.
Tyrant  [author] 20 Jan, 2021 @ 5:15pm 
There isn't any specific code to remove encoder buttons anywhere in this module - so if things disappear it's probably a combination of lag + the encoder rebuilding buttons. For all modules that update information on the card, rebuildButtons is called on the encoder - when this happens the encoder removes all buttons on the card and then re-creates them.
Debatra 20 Jan, 2021 @ 3:26pm 
This module will sometimes make encoder things disappear from cards when they're updated, though it fortunately all comes back in a bit.
Tyrant  [author] 1 Jan, 2021 @ 2:34am 
The module doesn't fetch data on its own, it just parses what's already on the card. To work with only a name field, it would need to query scryfall once for every card that's played... which would be slow and inefficient either way. Perhaps a separate module could be made for that, you place the deck and it queries the cards and sets all of their descriptions at once.
The Unstable Anarchy of ヤギ 30 Dec, 2020 @ 7:41pm 
would it be possible to have a backup for oracle data in the description somehow? Customs would be nice to get working automatically, and no one really cares about descriptions
Tyrant  [author] 12 Dec, 2020 @ 7:53am 
No, there are currently no plans for adding forced object interactions to this module (draw, untap, scry, cascade etc - anything that would forcibly interact with/move objects through code).
Remixed Witch 11 Dec, 2020 @ 10:11am 
Hello, I was wondering if you have thought about possibly interrogating a Cascade feature into your module. Thank you anyways for the great tool you've provided
Tyrant  [author] 7 Dec, 2020 @ 7:28am 
Version 2.23
-New command 'auto player on/off' - Allows each player to disable/re-enable auto-encoding (and therefore all auto-features) for themselves.
-Fixed some settings not being saved.