Tabletop Simulator

Tabletop Simulator

62 ratings
Deck Splitter
   
Award
Favorite
Favorited
Unfavorite
Assets: Scripting
Tags: Misc
File Size
Posted
Updated
60.151 KB
8 Aug, 2016 @ 12:09pm
28 Mar, 2017 @ 1:14pm
4 Change Notes ( view )

Subscribe to download
Deck Splitter

Description
A tool that splits a deck into a number of piles. Drop your deck in, set how many piles and cards in each pile you want, then press Split. Card stacks always exit the right side of the tool (just make sure it is laying down).

The tool can be saved to your chest, but I did not program it with save functionality. So if you hit undo, or load up a save file, with a deck already in the tool, you will have to pull it out and put it back in to start the tool up.
27 Comments
schattenseele 23 Jul, 2022 @ 2:25am 
overall great work MrStump .. thx !
ps ... video is privat
David C 8 Dec, 2020 @ 11:37pm 
MrStump, this is very useful. I took your code, did some modifications, and made a device that distributes cards on the table in the form of an "Auction Block," think 'Power Grid' or 'Get off my Land.' Basically, it'll create grid of n rows x m columns of face up cards instead of stacks and cards .

I'd like to put this "Auction Block" up on the workshop, after some cosmetic changes. So, I wanted to check in with you first since I essentially cut-n-pasted your code. Of course, I'll give you due credit.
FourString 25 Feb, 2020 @ 5:43pm 
Super helpful, thank you so much!
IceMaverick 1 Nov, 2018 @ 9:05am 
Apologies, I retract my request. Turns out you've designed another tool that does exactly what I'm looking for.

Also, man you've designed a lot of tools. Keep up the good work on that front.
IceMaverick 1 Nov, 2018 @ 8:47am 
So, this is probably a weird question to get after more than a year of quiet, but I'm looking to modify this tool for a very specific purpose. I'm familiar with scripting, but haven't worked with Lua before and I'm unfamiliar with TTS itself from a code standpoint. The task I have in mind is achieved well by a deck splitter like this, but I need to tweak it a little and my own attempts have failed thus far.
I want the splitter to take a deck of 10, split it into 10 stacks of 1, but lay them out in 2 rows of 5 instead of 1 row of 10. I think I know which function needs modifying, but my own attempts break the splitting function and I'm not sure where to go from here. If you have some time to help me through this, I would appreciate it, if not, I suppose I can live on.
Anjovi 25 Nov, 2017 @ 7:27pm 
Sedawk, that's the exact game that prompted me to look for something like this :D
Sedawk 5 Nov, 2017 @ 5:35pm 
Thanks for this tool! Downloaded Bruges and was racking my brain on how to easily split the deck into 5 stacks to adjust player count. This tool did the trick.
KBB 27 May, 2017 @ 6:47pm 
Thanks that's super helpful, don't worry you've already done a lot! Thank you!
MrStump  [author] 26 May, 2017 @ 9:49pm 
I was intending on re-visiting this tool at some point. I wanted to re-write it to support larger decks, but that was about it. It was just meant to split decks into piles.

And the problem I have with making a tool that is universal enough to allow you to do things like deal to players and to pre-set postions is it ends up having so many options people have tons of trouble setting it up. So I can't make something that fits the bill, sorry.

As for dealing to players, there is a "deal to all players" command which you use on a deck in Lua to give each seated player a card from a deck, so it is easy (See the Knowledge Base on the Tabletop Simulator website if you are curious) relatively speaking. And if you're interested in learning, I've made a guide called Learning Lua in the guides section of the workshop. Sorry I can't do more
KBB 26 May, 2017 @ 2:13pm 
Oh.. and what about dealing face up?