Tabletop Simulator

Tabletop Simulator

Scripted Scoreboard
13 Comments
76561198851239078 15 Feb, 2021 @ 2:32pm 
I have a possible bug report and a suggestion. First, when using the scoreboard with an Oculus Touch controller, pressing a number button on the keypad causes the number to repeat. It is practically impossible to get a single occurrence. So pressing 8 will give you 888 or 88888 or 88888. Also, it would help if there were a "back" (or "erase" or "delete") button that would erase a digit if you make a mistake.

Also, I'm new to Steam, so I'm not sure how to add this to my "chest". Is there some way that I can modify the code? I'd be interested in enhancing this tool. I'm a coder, but I'm very new to steam.

Thanks,
wally0623
Bish 23 Jun, 2020 @ 5:53pm 
Hey pestilentpawnlogin, good work.

However if the current score is minus (-) and you try to subtract from it, it doesn't work as the string search finds the first minus symbol.
Any ideas as my game counts minus scores and plus scores?
pestilentpawnlogin 15 Jun, 2020 @ 5:16pm 
Also, this line in function minus()

b_display.label = b_display.label .. ' + '

Should become this:

b_display.label = b_display.label .. ' - '
pestilentpawnlogin 15 Jun, 2020 @ 5:15pm 
Becomes:

function enter()
if operator == 'add' then
local valueOld = b_standings[designatedPlayer].value
local s = b_display.label
local sn = string.find(s, '+')
local valueNew = string.sub(s, sn + 2, -1)
player_scores[designatedPlayer].score = valueOld + valueNew
updateScores()
elseif operator == 'subtract' then
local valueOld = b_standings[designatedPlayer].value
local s = b_display.label
local sn = string.find(s, '-')
local valueNew = string.sub(s, sn + 2, -1)
player_scores[designatedPlayer].score = valueOld - valueNew
updateScores()
end
end

There's probably better/neater ways but that'll work.
pestilentpawnlogin 15 Jun, 2020 @ 5:14pm 
For Bane and Slipstream,

Split this chunk in two:

function enter()
if operator == 'add' or operator == 'subtract' then
local valueOld = b_standings[designatedPlayer].value
local s = b_display.label
local sn = string.find(s, '+')
local valueNew = string.sub(s, sn + 2, -1)
if operator == 'add' then
player_scores[designatedPlayer].score = valueOld + valueNew
elseif operator == 'subtract' then
player_scores[designatedPlayer].score = valueOld - valueNew
end
updateScores()
end
pestilentpawnlogin 15 Jun, 2020 @ 5:11pm 
I know y'all have probably solved this for yourselves, but just in case anyone's having these same problems (I'm adapting this for my purposes so playing with the scrips)...

For tinnesaile, to color code the player's name insert this line:

b_standings .color = player_scores .color

or

b_standings .font_color = player_scores .color

between

b_standings .value = player_scores .score

and

self.editButton(b_standings ).
SkunkDave 28 May, 2020 @ 10:18am 
I think this will work well for tracking how long each player gets the spotlight in d&d
Tryin not to leave anyone out
Bane / Imo 13 May, 2020 @ 3:28pm 
Using the negative works but it shows a plus sign.
Hanniah (she/they) 9 Jan, 2020 @ 9:33am 
Ignore the 2nd question, my bad
Hanniah (she/they) 9 Jan, 2020 @ 9:32am 
Is this too long dead to get a version that color codes the player names, and can it read more players?
Slipstream 14 Apr, 2018 @ 7:41pm 
Is it supposed to show a + when you click the - button?
MrStump  [author] 25 Jun, 2017 @ 9:53am 
It was made to be used. Glad somebody get something out of it =)
Kkhhaaooss 25 Jun, 2017 @ 9:47am 
I just wanted to let you know I've added your scripted scoreboard to my own mod (original game Shepherd - https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=955335691) with a link back to your mod. Let me know if this is not OK and I'll remove it.