Tabletop Simulator

Tabletop Simulator

Shuffle Players Button
16 Comments
CaptainTenille 10 Mar, 2021 @ 10:08am 
Note: I tried changing to this line of code, but it ends up putting someone into Black and not moving them:

changed from:
local ranColours = {}

to:
local ranColours = {"Red","Green","Yellow","Blue","Purple","Brown"}

...now if I can just get that last player out of Black
CaptainTenille 10 Mar, 2021 @ 10:05am 
This only swaps the player colors that are seated. Is there a way to alter this to place the players into randomly selected seats of every possible seat, including the one that they were seated in, or ones that nobody was seated in? So, for example in a table with 6 seats, can 4 players be switched to any of the 6 available seats (i per seat obviously).
ChizBallz 2 May, 2018 @ 9:26pm 
How to make this so that it doesn't say black has to be seated to work? Can it check for grey instead.
HOLY-BG 12 Feb, 2018 @ 11:53am 
WWW Image Error: Couldn't connect to server.
Markimus  [author] 4 Jul, 2017 @ 3:30am 
Yep. I've been thinking of revisiting this and replacing the Black seat with a Grey seat. I haven't got round to it yet.
MrStump 3 Jul, 2017 @ 3:52pm 
With the new ability to get Grey players, you can just record everyone's steam_id, then kick everyone to grey, then seat the players from grey by going through all grey players and finding their stead_id to seat them.

Or you can swap seats by booting someone to grey, moving someone to their seat and moving the grey booted person into tho thief's seat.
Markimus  [author] 19 May, 2017 @ 5:17pm 
Hmm, alright. I prefer the Black seat to always be used as a vacant space.
Lost Savage 19 May, 2017 @ 5:05pm 
function findUnusedColor()
---local checkList = {'Brown', 'Teal', 'Black', 'White', 'Red', 'Orange', 'Yellow', 'Green', 'Blue', 'Purple', 'Pink'}

---for i, playerColor in ipairs(checkList) do
------if not Player[playerColor].seated then
---------return playerColor
------end
---end
end
Lost Savage 19 May, 2017 @ 5:02pm 
It finds an unseated player using the 10 normal colors + black. One of them will always be free.
Markimus  [author] 19 May, 2017 @ 4:57pm 
If there's a full table, how will you shuffle all the players without it erroring out?
Lost Savage 19 May, 2017 @ 3:02pm 
Markimus, I used some of your code in Secret Hitler: Consolidator Edition (Global around line 2392). I simplified the code for my needs and may have removed a bug. The code also removes the no player black requirement.
Markimus  [author] 17 Mar, 2017 @ 5:54pm 
Nope, you can't do that either. There's no way to change colour or change the hand zones in any way via Scripting.
Unreal Ed 17 Mar, 2017 @ 5:26pm 
Can't you change the colors of the hand zones through scripting? You'd get a list of all the colors and just assign those randomly to currently existing hand zones. Or don't even get the list and assign random colors as long as they dont repeat.

You don't want to move the actual placement of the zones anyway as that's usually carefully considered around the table
Markimus  [author] 17 Mar, 2017 @ 12:28pm 
You can't move hand zones via Scripting, which would be required to move colours around the table randomly.
Unreal Ed 17 Mar, 2017 @ 4:00am 
Does it just switch which player is assigned to which color? or does it also randomly changes which colors are where around the table? I'd love if you could choose between either options
darleth 17 Mar, 2017 @ 12:32am 
Thanks a lot...