Tabletop Simulator

Tabletop Simulator

Encoder
74 Comments
GoldDragon 1 Sep @ 8:49am 
Will do.
And I'll make sure to give credit when its all done.
Tipsy Hobbit  [author] 31 Aug @ 7:25pm 
I recommend visiting the GitHub and looking under the module section for the demo module. It is fully commented, describing what functions/variables are required for the encoder API to function. Then check out the power/toughness module to see a basic counter setup.
GoldDragon 28 Aug @ 4:33pm 
Thanks
I'm trying to make use of a counter like this, I did find something that will work for what I need but eventually want to make something custom that fits more with what I'm making.
Tis why i wanted to ask about some of that.
Tipsy Hobbit  [author] 28 Aug @ 2:24pm 
The encoder itself does nothing, you need the modules as well. Once the modules are spawned and registered with the encoder, a menu button should show up on the sides of cards which gives access to all thee modules you registered. The counters and such are actually ui elements attached to the card, so they can't fall off or get lost. I recommend checking out a MTG table to see how it functions when setup.
GoldDragon 24 Aug @ 12:31pm 
I need a little help with this, and how much can be done with this.
Like if I put an encoder on a card and it was a counter, can i put the encoder anywhere on the card and it will stay there? Will multiple counters have proper spacing?
What can I do with this, because this would save me so much headache
Tipsy Hobbit  [author] 22 Apr @ 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 22 Apr @ 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] 21 Apr, 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 21 Apr, 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] 3 Jun, 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 2 Jun, 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] 7 May, 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 7 May, 2021 @ 1:03pm 
For me personally both would be nice.
Tipsy Hobbit  [author] 7 May, 2021 @ 10:44am 
Do you mean how to use it on a table, or how to use the api?
Smokey Digsby 6 May, 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] 5 Feb, 2021 @ 2:09pm 
Link is dead >-<
Tipsy Hobbit  [author] 16 Dec, 2020 @ 11:17am 
Should be fixed for the most part, barring some interesting table setups introducing edge cases.
Tipsy Hobbit  [author] 16 Dec, 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 15 Dec, 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] 15 Dec, 2020 @ 4:33pm 
That is actually a pretty clever check, will use that instead of searching the player hands.
Oops I Baked a Pie 14 Dec, 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] 30 Sep, 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 29 Sep, 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 4 Sep, 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] 4 Sep, 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 4 Sep, 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://gtm.steamproxy.vip/sharedfiles/filedetails/?id=2207810826

me and a friend keep having problems with it, like removing the + / + counters on cards
Amuzet  [author] 27 Jul, 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 11 Jul, 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 2 Jul, 2020 @ 9:37pm 
Thanks, I appreciate it a bunch!!
Tipsy Hobbit  [author] 2 Jul, 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 2 Jul, 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 30 Apr, 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 30 Apr, 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] 23 Apr, 2020 @ 1:45pm 
Stickers would be a method a handling it, will have to look into it a bit more.
The Unstable Anarchy of ヤギ 23 Apr, 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] 22 Apr, 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 ヤギ 20 Apr, 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 15 Dec, 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 15 Dec, 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] 14 Sep, 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 10 Sep, 2019 @ 7:46am 
Untapper doesn't work and UI doesn't properly work either.
Tipsy Hobbit  [author] 11 Jan, 2019 @ 8:26pm 
Will check into that.
WaferLake 10 Jan, 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 10 Jan, 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 25 Oct, 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 16 Aug, 2018 @ 6:27pm 
Thanks so much. I could not figure it out!!
Tipsy Hobbit  [author] 16 Aug, 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 15 Aug, 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?