Tabletop Simulator

Tabletop Simulator

Not enough ratings
Deck Split (script)
Game Type: Scripting
File Size
0.057 MB
May 7, 2017 @ 2:56pm
May 15, 2017 @ 7:25pm
5 Change Notes ( view )

Subscribe to download
Deck Split (script)

Split or spread decks in any amount of piles.
Customizable LUA variables to show only the buttons you want.


- SPLIT: get the full deck split into smaller decks.
- SPREAD: get only the number of cards from the deck and spread them to the side.


1. Save the object to your components or expand from the workshop item
2. Spawn it in any of your games
3. Scale the red object to match the size of the cards you are working with
4. Put a deck on top of it
5. Adjust the amount and other settings with the buttons or in the LUA editor
6. Click the button to perform the action


- Define initial mode: split or spread (default = split)
- Define initial split size (default = 3)
- Define position of the buttons (default = bottom)
- Define direction of the split (default = right)
- Show/hide button to adjust size of the split (default = show)
- Show/hide button to change between the two modes (default = show)
- Show/hide button to change the direction of the split (default = show)
- Show/hide button to reset the split (default = show)
- Define if the cards show be flipped automatically when split (default = false)
- Define the label of the split action button (optional)
- Define the label of the spread action button (optional)
- Define the label of the reset action button (optional)

Feel free to copy, use, change everything.
< >
Markimus Jun 3, 2017 @ 10:50am 
It's alright. I was hoping it wouldn't use gravity to split the cards though. If you use putObject() we'll be able to split very large decks.
Unreal Ed May 11, 2017 @ 4:29am 
Thanks for the changes ! Really appreciate you listening to the feedback, and adding new photos/videos with the new version
dbzao  [author] May 11, 2017 @ 1:20am 
Changed the name to Deck Split and added a bunch of features. Feel free to check it out and use it however you want.
Unreal Ed May 10, 2017 @ 8:05am 
It's a decently easy change to make it a spreader. Instead of going through the whole deck ("deck.getQuantity()") on line 37, you make it use deckerSize.

Also, letting users choose the direction of the spread/split relative to the box would be nice
dbzao  [author] May 9, 2017 @ 3:00pm 
Cool, I will take a look and fix the rotation thing so it always split them to the right of the red box when you are on the button reading orientation.

But yea, it's not really a spreader, I made it to just cut a big deck into smaller decks which I needed for some games. But you already tweaked it as a spreader, so that's cool. Don't think I will change its behavior.
Unreal Ed May 9, 2017 @ 2:17pm 
I actually did add the reset button and changed the functionality for my mod here , if you want to see.

I didn't understand when I first commented that it split the entire deck. It would be nice to have an option to not split (i like the word split better btw) the whole deck but instead only the top cards (essentially making it a spreader, which is what I did in my mod). Some easy-to-tweak numbers at the top to help customize the spacing of the cards would be great.

Also, the cards will only fan out in the same direction, regardless of which way the box is orientated, which I did not expect and had to fiddle in my mod.
dbzao  [author] May 9, 2017 @ 1:14pm 
@Unreal Ed I think the only thing customizable is the initial deck cut size, which I made to be 2 because it's the minimum.

I will consider adding a button to stack it back to the top.

About the name, I think Deck Spreading is something else, and don't think people would be searching for that. I thought about calling it Deck Splittnig, but this script is basically doing the same as the in-game Deck Cut, but dividing it in any size.
Unreal Ed May 9, 2017 @ 6:08am 
Another thing that would be nice is a button to bring them back to the deck.

Also, I feel like the script should be called Deck Spread rather than cut, because cutting a deck is more of a shuffling/anti-cheating trick in card games
Unreal Ed May 9, 2017 @ 6:07am 
I was just thinking 2 days ago that I wanted exactly that functionality!

You should list what is customizable in the script
Seagull Tourney May 7, 2017 @ 3:06pm 
Wow, works as intended!