Results 1 to 7 of 7

Thread: New Scripting Documentation!

  1. #1
    Join Date
    Jan 2014
    Posts
    986

    New Scripting Documentation!

    We have a brand new lua scripting documentation page up at https://api.tabletopsimulator.com/.

    Let us know what you think and feel free to submit pull requests to fix or improve anything now that it's all hosted on github.

    We will be keeping the old api around for now until everyone gets a chance to look this one over.

  2. #2
    awesome... I have been working on some tutorials for my channel.. if you are interesterd.

    Also I would love a "code snipet section" top be added.
    My Boardgame uTube chan - Tragic's Table Top
    BGG Guild of BoardGame uTubers - Tube Tables

  3. #3
    found a type-o

    https://api.tabletopsimulator.com/sp...s/#custom-tile

    image_button should be image_bottom
    My Boardgame uTube chan - Tragic's Table Top
    BGG Guild of BoardGame uTubers - Tube Tables

  4. #4
    The API does not document how to pass turn via script and should be added. Also, you should reference global functions in sections related. For example getSeatedPlayers() is global and not referred to in the Turns section (I find these are very much related to each other).

    I would also recommend you complete the Base section, rename it to "Base / Global"
    These are a loose collection of functions which can be used to perform a variety of actions within Tabletop Simulator.
    This makes it sound like not all global functions have been documented in the API reference--which could be frustrating when search for features that are not referenced. Perhaps the wording "loose" need to change to something like "a complete collection"
    https://api.tabletopsimulator.com/base/

    I've been searching and searching and it puzzles me why this is not available to Modders. I don't understand why the developer would choose to not make turn passing available via LUA scripts. Was this done intentionally or just overlooked?

    I find that interaction with the turns feature critical for a successfully game setup--the work arounds are bandaids. I mean you have Workshop mods that completely bypass the turn system with their own custom code, because it's the only way anyone has figured out how to make any turn based script interaction work correctly in LUA.

    The turn system should be LUA interactive, not require custom LUA scripts and content to bypass a built in game feature.

    Could a developer inform the community how this can be achieved?

    Could anyone explain how to pass current turn with in a script.

    I've been scouring the API and talking to fellow scripters on Discord and nobody seems to know how to pass a turn in a script.

    I imagine it should be a global function you call that passes the current turn to the next player in turn order. However, I cannot find any reference to it. It's obviously in the game with the Pass Turn button in the UI (top center screen). I cannot think why the developers would not give Modders access to this function.

    Also, setting:
    Turns.turn_color = "Green"
    does not set turn to Green

    Thanks!
    https://steamcommunity.com/app/28616...2523069503679/
    http://www.berserk-games.com/forums/...ight=pass+turn

  5. #5

    Unhappy

    Is it ok to use scripts in game? I think, it loses hardcore you know...https://smurfstore.co/
    Last edited by Victoralvit; 04-04-2019 at 05:19 PM.

  6. #6
    Is there a handy way to download the API for off-line reading reference? I looked at the GIT site, but the source is in mark down language which is useless for my needs.

  7. #7
    If you download the git and then follow the build instructions, it'll make a folder called `site` containing the docs in html form. You can then host them locally using the `serve` bat.

Similar Threads

  1. Documentation/API Issues
    By Knil in forum Scripting
    Replies: 15
    Last Post: 06-13-2017, 02:03 PM
  2. Replies: 4
    Last Post: 08-09-2016, 12:05 AM
  3. Documentation Error/Typo - spawnObject
    By ootm in forum Scripting
    Replies: 0
    Last Post: 07-07-2016, 02:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •