Tabletop Simulator

Tabletop Simulator

Encoder
69 Comments
Tipsy Hobbit  [author] Apr 22 @ 4:24pm 
So make sure you load the encoder first, then each module loaded will register itself after being spawned. I highly recommend using Pi's easy modules, they look a lot nicer then the default modules I put together.

Each wooden circle is a different module(+1/+1 counters, Keywords, colors).
There should also be one Menu Module.

Can try and help you more directly if you have more specific questions.
the modules only properly load on save load afaik, place them in, lock them somewhere, and then reload the save
Murdurmuffin Apr 22 @ 11:39am 
Creating a custom play table for myself and friends, partly to enjoy, partly to learn TTS modding.

Spawned this in because I thought it would help me automate some functions in MTG like Untap, Draw, Mill, etc.

It's a bunch of wooden circles that fall all over the place each time I try to move a couple of them and I don't have any understanding of how to work with them after reading your workshop page. Is there a tutorial somewhere here or on youtube? Didn't think I'd need to be an actual wizard to add a couple buttons to my table...
Tipsy Hobbit  [author] Apr 21, 2022 @ 9:28pm 
The core encoder is completely generic. Its main job is to act as an intermediary for different modules by calling each modules createButtons() function. That way modules don't overwrite each others buttons.
BinaryHedgehog Apr 21, 2022 @ 8:51pm 
Hey, I’ve been thinking of scripting a different TCG (actually a Japanese sister series to MTG, coincidentally) and I was curious about something. How much of this mod can be made “generic” or re-tuned to a different card game?
Tipsy Hobbit  [author] Jun 3, 2021 @ 6:57am 
There are a couple of debug tools on the table, so for importing the encoder you want to use the three dots on the workshop icon and select just the bag labeled with a version number.
Ozpl Jun 2, 2021 @ 11:02pm 
I've subscribed and opened this mod but there's debug bar at the middle of the screen - I don't know how to turn it off. Did I do something wrong?
Tipsy Hobbit  [author] May 7, 2021 @ 1:19pm 
Add me on discord: Jophire#9109 if you want to talk about the api/go over the example module.

As for a quickly setting up the encoder on a new table, import just the bag from the table and remove everything from it, with the Encoder itself being the last item removed.

When the encoder is removed all the modules should register themselves. Then you will want to right click the Encoder and select the Update option. This will update the modules and encoder from the github, ensuring you are running the latest version.
Smokey Digsby May 7, 2021 @ 1:03pm 
For me personally both would be nice.
Tipsy Hobbit  [author] May 7, 2021 @ 10:44am 
Do you mean how to use it on a table, or how to use the api?
Smokey Digsby May 6, 2021 @ 10:27pm 
Is there a tutorial on how to use this for those of us who aren't all that knowledgeable with this stuff?
Tipsy Hobbit  [author] Feb 5, 2021 @ 2:09pm 
Link is dead >-<
Tipsy Hobbit  [author] Dec 16, 2020 @ 11:17am 
Should be fixed for the most part, barring some interesting table setups introducing edge cases.
Tipsy Hobbit  [author] Dec 16, 2020 @ 9:37am 
Ah, would probably do a Wait.condition( ) on object dropped to check if it no longer moving before hiding or showing. Will play around with it.
Oops I Baked a Pie Dec 15, 2020 @ 4:42pm 
Oooh, if you're going to use my fix, note an edge issue with it: if some player's lift height is large, it all gets kinda ruined. I've no idea why some of my friends play with lift heights that lift their cards so high, but.. I had to put in a second bandage-fix to lower any player lift_heights to 0.3 (if higher). This went into two spots, onLoad() - checking all connected players, and onPlayerConnect.
Tipsy Hobbit  [author] Dec 15, 2020 @ 4:33pm 
That is actually a pretty clever check, will use that instead of searching the player hands.
Oops I Baked a Pie Dec 14, 2020 @ 2:03pm 
Heyo,

I see you've been fiddling with updating the Encoder recently, and I wanted to drop by a little issue that you might find interesting to add to your contemplations:

The cards are unencoded when they enter hand zones. However, if a player wants to sort through the cards in the hand, pick a few up and shift their position, onObjectDropped gets triggered and the cards are re-encoded (still within the hand-zone).

I thought I'd drop it by you, in case you find this an interesting problem. On my end, I kinda got it sorted. I put in a band-aid fix: inserted a check of the object's height within the onObjectDropped function, working off the notion that cards within a hand are usually floating quite a bit above the table. It's not a perfect solution, maybe you can think of something better.
Tipsy Hobbit  [author] Sep 30, 2020 @ 10:50am 
I broke the xml ui somehow and am trying to fix it, for now don't touch the toggle UI button(it only shows the XML ui)
Hoopester Sep 29, 2020 @ 8:21pm 
I am trying to use this with the card importer, but I'm having issues. I just get errors when I hit the toggle UI button. Moving cards on top of the encoder doesn't do anything.
fare67t Sep 4, 2020 @ 8:37pm 
it does, but theres also a button that pops up under it that looks like
</> or so
and clicking that removes the GUI period, even if its still toggled on (thus, the card name still has the + / + values on it, but you cant edit)
Tipsy Hobbit  [author] Sep 4, 2020 @ 12:43pm 
If my memory serves me correctly, you need to place the card onto the Encoder to toggle option visibility. So to remove the counters, place the card on the encoder and click the counter button.
fare67t Sep 4, 2020 @ 11:26am 
hey there, is there instructions somewhere for the OLDER version of the encoder, like whats included in workshop items like this? https://steamcommunity.com/sharedfiles/filedetails/?id=2207810826

me and a friend keep having problems with it, like removing the + / + counters on cards
Amuzet  [author] Jul 27, 2020 @ 9:58pm 
THEY'RE ON TO US! RUN!
also older versions aren't being told to update and are returning an error it can't find "Encoder Version 99.99" anywhere in the workshop page.
Robotic Mind Jul 11, 2020 @ 4:57pm 
Thanks for the update and letting me know you fixed the UI issues. Unfortunately, my workshop table got DMCA'ed. I guess Wizard lawyers are watching these workshop items. I'm going to keep my table of the workshop and just use my local copy for games. Cheers!
Babyboodle Jul 2, 2020 @ 9:37pm 
Thanks, I appreciate it a bunch!!
Tipsy Hobbit  [author] Jul 2, 2020 @ 8:54pm 
Sorry about that, its an issue with how I first started working on the ui before running into roadblocks, An easy fix would be to just comment out the ui, but you can also try using this version
https://github.com/Jophire/Tabletop-Simulator-Workshop-Items/blob/update_branch/Encoder/Encoder%20Core.lua
Babyboodle Jul 2, 2020 @ 8:00pm 
Hiya Tipsy! I have a question for you regarding the UI implementation. I'm creating a Magic table, and have implemented the script for the Magic: The Gathering Deckbuilder by Glitterclaw from the workshop. However, it appears that the UI for the Encoder overrides the deckbuilder, so I'm looking to solve that issue. I figured I'd ask here to see if you have a quick solution or know how to disable the Encoder's UI from a script level, since you know the code better than I. Otherwise, I'll fiddle with it and figure it out. Either way, thank you! This script is great.
Slamel | TTV Apr 30, 2020 @ 11:43am 
Additionally is there a new link to the Discord server that we can use? That one above is outdated and doesn't work.
Slamel | TTV Apr 30, 2020 @ 10:57am 
When I create a table, and then use additive load (which is what I assume I am supposed to do?) how do I delete the text spots that drop in? I can't interact with them.

Also, it appears that the Token Module is not working in the latest version?
Tipsy Hobbit  [author] Apr 23, 2020 @ 1:45pm 
Stickers would be a method a handling it, will have to look into it a bit more.
The Unstable Anarchy of ヤギ Apr 23, 2020 @ 1:29am 
Does the encoder support images? You could represent keyword counters with them to save space like with color identity and just put them right justified on the bottom of the card art.
Tipsy Hobbit  [author] Apr 22, 2020 @ 7:23pm 
I can make it, but the hard part is figuring where to put it on the card.

And for the morph addon, I guess I could make an edit to add a back facing menu as well.
The Unstable Anarchy of ヤギ Apr 20, 2020 @ 5:29am 
Any chance of getting keyword counters without needing the notepad? There's only 10 right now and I doubt they're making more any time soon.
DieKatzchen Dec 15, 2019 @ 10:04pm 
Or, and I'm sorry for spamming your comment section like this, a better solution would be to add the option to register right click events. I had forgotten that was just invented.
DieKatzchen Dec 15, 2019 @ 5:35pm 
Would it be possible for morph to activate without having to play it face up and activate it through the menu? I don't mind if I have to drop my card on a collision plate, it just defeats the purpose if I have to place it face up first.
Tipsy Hobbit  [author] Sep 14, 2019 @ 11:08pm 
Untapper has always been finicky, it registers your cards by detecting them being placed in your hand. I have not yet found a better way of doing it without also causing other players to cause a false positive on the decode trigger. The UI can still mess up with other ui elements on the board or if updating to a newer version of the encoder(work in progress with getting a better understanding of xml and ui building). sorry of how long its been since I last updated.
Sukinato Sep 10, 2019 @ 7:46am 
Untapper doesn't work and UI doesn't properly work either.
Tipsy Hobbit  [author] Jan 11, 2019 @ 8:26pm 
Will check into that.
WaferLake Jan 10, 2019 @ 11:11pm 
I also get an error when pressing the cube with the home icon on it. Error in script (Global) function <creatzone>: function is not a function and has no __call metamethod
WaferLake Jan 10, 2019 @ 11:00pm 
I get Failed to load image from nh-alliance(.)com/portals/208/EasyDNNnews/98205/98205automate-icon.png
and
Error in Script (Encoder - 8d5a67) function <toggleUI>: function is not a function and has no __call metamethod
Robotic Mind Oct 25, 2018 @ 7:00pm 
I don't think the UI is working. When I click "Toggle UI" on the encoder I receive an error. On top of that the UI shows on load but it is not populated. Can someone please confirm?
Caricifus Aug 16, 2018 @ 6:27pm 
Thanks so much. I could not figure it out!!
Tipsy Hobbit  [author] Aug 16, 2018 @ 7:28am 
Just right click and save as, however, there is an easier way.
In the workshop tab, find the encoder and then click the icon in the top right.
One of the options should allow you to view all the objects in the workshop file.
Then drag the accessory bag onto the table, it will always contain the most up to date parts of the mod.
Caricifus Aug 15, 2018 @ 7:48pm 
So this is so dang cool. How would I go about saving this onto a table of my own, or saving it as an object to be able to bring it into another table?
Tipsy Hobbit  [author] Jun 19, 2018 @ 1:59am 
Okay, looks like the 10.7.1 update fixed the bug, so I never got to see it.
Tipsy Hobbit  [author] Jun 19, 2018 @ 1:16am 
????
What, let me check this out.
Robotic Mind Jun 18, 2018 @ 6:46pm 
Looks like the latest TTS update completely broke your fine work. I hope the people at Berserk patch the issue.
Tipsy Hobbit  [author] Apr 7, 2018 @ 10:40pm 
As of right now the popup menus are part of the core module so players can decide what to display on the cards. I can look at making the menu buttons optional, but they will be on by default; however in that event I will look at adding a menu visibility api function.
HolyRoller Apr 7, 2018 @ 9:39pm 
Oh ok so I did figure out how to only add the counter module. Do you know if there is a way to have only that on a card with no pop out menus?