Questions tagged [tabletop-simulator]
26 questions
3
votes
1 answer
Work out world coordinates relative to position and rotation of an object in lua
I am trying to make a new tool for the tabletop simulator community based on my "pack up bag". The Packup Bag is a tool that remembers world position and rotation of objects you place inside it, so you can then place them back in the same positions…

aJynks
- 677
- 2
- 14
- 27
2
votes
1 answer
lua how to get table within table use variable value rather than variable as an index? TTS
Newbie Programmer
I am using table within a table to store information on tabletop simulator using scripting
rpgPlayer = 123456 -- this is a string of values
masterTable.rpgPlayer = { test = "test1"}
for n in pairs(masterTable) do
print(n) ---…

Plucky Hero
- 23
- 2
2
votes
1 answer
Tabletop Simulator - Textbox - Auto Re-Size Text?
I'm making a somewhat obscure and out-of-print game, Creatures & Cultists, available on Tabletop Simulator. The player board has various text-boxes. For two of those text-boxes, I need the text to reduce in size, when there's not enough room to…

frieze55
- 21
- 2
2
votes
1 answer
Accessing data found in another object/script
In Tabletop Simulator, how can I exchange information between objects?
Is there a way, for example, to create a global variable?

ikegami
- 367,544
- 15
- 269
- 518
2
votes
1 answer
Tabletop Simulator Lua Error: "attempt to perform arithmetic on a string value"
First, a bit of context (in addition to the fact that I'm fairly new to coding)... I'm developing a board game, and for the Tabletop Simulator version of said game, I've created a series of UI menu actions that pop up whenever a player presses a…

Carl
- 401
- 1
- 8
- 12
2
votes
3 answers
Replace Accented Characters in string to standard with LUA
**THIS ERROR LOOKS LIKE IT IS A BUG IN UNITY. THE CODE SEEMS TO WORK FINE OUTSIDE OF TABLETOP SIMULATOR (THE GAME I AM MODDING)
I'm marking this as solved but leaving it for the mods to remove if needed, as the code might still be useful to other…

aJynks
- 677
- 2
- 14
- 27
2
votes
3 answers
How to order a Table to tables based on 1 single data part of it?
I am a hobbyest making mods in TableTop Simulator using LUA and have a question that I can not seam to work out.
I have a number of "objects" which is a table in TTS that contains various data for those objects. For example.. obj.position =…

aJynks
- 677
- 2
- 14
- 27
1
vote
1 answer
Copy list of files from directory+subfolders to another folder
First of all, I am a total beginner. I was trying an ultimate script bat file solution for a game. To not annoy you with details, let me tell you what I tried to do.
Example:
I have 17 files. 10 of them are .jpg and 7 of them are .obj files.
The…

pogos
- 45
- 8
1
vote
0 answers
LUA Scripting in Tabletop Simulator
Not sure if this is the place to post this kind of question, I think someone needs to be familiar with the TableTop Simulator game to help, but I figured I'd try. I am trying to create a script that uses Script Boxes to check what the description of…

Bulthax
- 9
- 3
0
votes
0 answers
Why do players get demoted after a server host migration?
I created a Tabletop Simulator object with the following script:
function onLoad()
for _, player in ipairs(Player.getPlayers()) do
if player.promoted == false and player.admin == false then
player.promote()
end
…

Timwi
- 65,159
- 33
- 165
- 230
0
votes
0 answers
Backtracking issues in procedurally-generated mazes
this is my first time posting here and my first attempt at programming in Lua, so I'm not incredibly advanced, but I do have experience in C# and JS. Recently I've been writing a small program in Lua 5.2 to procedurally generate mazes for a board…

snow
- 1
0
votes
1 answer
Lua float precision messed up?
disclaimer: im using lua on the table top simulator game, I don't know if this interfere in any kind of way with the "regular work" of lua
I already have a bunch of vectors pre-calculated:
grey_res = {55.00, 3, -10.80},
commerce = {55.00, 3,…

Riccardo Di Michele
- 11
- 1
0
votes
1 answer
Unable to add a script button as a left sidebar new tool item in Tabletop Simulator
I am preparing a mod for a tabletop simulator game, and I will be using clickable buttons as there are many options and different setups depending on the number of players that come and how they want to play the game. However, the game is extensive…

Alban Lusitanae
- 225
- 3
- 12
0
votes
3 answers
LUA error "pattern too complex" - Tabletop Simulator
I have a string and I am trying to extract a particular section of from it using a LUA pattern match. I saved this as regex which you can see here, along with the string and regex syntax which extracts the exact section I want (the green capture…

Mucker
- 257
- 3
- 12
0
votes
1 answer
LUA executing code in wrong order - Could be Tabletop Simulator related
I am fairly new to LUA and still learning. So far I haven't came across any async features, but my code seems to be behaving this way. It is really bizarre. I have the following function:
function chgAttacker(attacker)
local stats =…

Mucker
- 257
- 3
- 12