Sorry, we don't support your browser.  Install a modern browser
This post is closed.

Implement a REST API#766

If TTS would include a REST API (by default only listening to localhost) it would be possible to interact with it from outside of the gui. For instance by building a custom controller that might react to status changes (I.e. Light a led whenever any player peeks a card, or trigger an action only if the left menu is shown). The possibilities would be endless.

5 years ago

You can implement this yourself we support custom messaging between the game and external ports https://api.tabletopsimulator.com/externaleditorapi/

5 years ago

Thank you very much for your feedback, this might be what I’m after,
although… the documentation you linked says:

“TTS listens for incoming localhost TCP connections on port 39999.”

TTS is open on my Linux computer and that port is not open.
Did I miss anything?

Thanks,

5 years ago

I now opened an editor (that’s VS code actually implementing that API) and I could not import the LUA code from TTS at first. At the second try, I was able to connect and actually found the open port as pictured.

It is not open all the time though. What is it needed for it to open? Could it be a bug for which the port is not open 100% of the time, or is there anything else I am missing? Thank you,

5 years ago

No exprience with the Linux version, but the Windows version opens the port when you start a game. It’s not open when you’re at the main menu. You might also have to be host.

5 years ago

It happens randomly also with 13.1 not to have that port open, but it _is_ most of the time admittedly.

It is still unclear to me how to send messages but that is up to me. I guess this question could be closed then.

5 years ago
Changed the status to
Archived
5 years ago