Settings

onelivesleft edited this page Dec 21, 2017 · 6 revisions

Loading / Saving

Communication with Tabletop Simulator

This setting details how Atom communicates with Tabletop Simulator. When scripts are sent from TTS to Atom they are held in a folder on the hard disk. By default Atom then opens these files in a tab each. This setting can be changed so that only the Global script is automatically opened, or no scripts are opened automatically at all; they can all still be opened by clicking on them in the project view. An additional option available here is to disable communication with Tabletop Simulator entirely.


Convert between unicode characters and \u{xxxx} escape sequences when loading/saving

Scripts held in Tabletop Simulator saves cannot have extended unicode characters. When this option is enabled Atom will convert any such characters into an escape sequence which Tabletop Simulator is happy with when sending to it, and will convert them back into unicode characters when fetching them from TTS into Atom.

  • As of v10.2 Tabletop Simulator fully supports utf-8, so this setting will no longer convert them into \u escape sequences. However, it will still convert those sequences to utf-8 when you load a script in Atom.

Experimental: Ignore files from outwith the TTS folder

By default Atom will close all open files when you initiate a Save And Play; if you enable this option then it will only do so for Tabletop Simulator script files, leaving any other open files alone.


Experimental: Insert other files specified in source code

If enabled then you may use the #include command to insert one script into another when it is sent to Tabletop Simulator.


Experimental: Base path for files you wish to #include

This option sets the folder used as the base path when the above option is searching for files.


Delay Linter When Loading

Sometimes the linter may attempt to lint a file before Atom has finished processing its grammar, resulting in false-positive warnings (generally on comment lines). Setting a delay here of (of say 2000 or 3000 milliseconds) can fix this issue.


Autocomplete

Only autocomplete API suggestions

This option defaults to on, which means that when Atom is suggesting autocompletions it does so only with its knowledge of the Tabletop Simulator (and relevant Lua) API. If you disable this setting then it will also look at your code, allowing it to suggest your own variable and function names.


Function Parameters

When the autocomplete inserts function snippets it may insert the parameters for the functions in a variety of ways; this option dictates which way is used.


Style

Parameter TYPE & NAME Format

This option dictates how the autocomplete function parameters are inserted if the Function Parameter option is set to TYPE & NAME. It defaults to type_name; a programmer who preferred camelCase might switch it to typeName.


Coroutine Postfix

This option sets the postfix used when automatically generating a coroutine name; it is appended to the name of the parent function. By default it is _routine; for camelCase you should change it to Routine.


GUID Postfix

When autocompleting the getObjectFromGUID API call additional snippets will be suggested where the autocomplete attempts to guess the name of the variable holding the GUID by looking at the variable being assigned to. By default this postfix is _GUID; this means that if you type deck_of_cards = getObjectFromGUID( then the autocomplete will guess deck_of_cards = getObjectFromGUID(deck_of_cards_GUID).


Generate GUID Code

When using the Generate GUID Code command, the variable name in the code will be formatted by this setting. Supports four fields: Name, Nickname, Description, Tooltip; insert them using (Field), or (field) for lowercase / (FIELD) for uppercase. i.e. (Name) will insert the Name field as-is, (nickname) will convert the Nickname field to lowercase, (TOOLTIP) will convert the Tooltip field to uppercase. (Field:#) will truncate the entry after # characters. (Field?xxx:yyy) will check if the field has any text; if it does it will insert xxx, otherwise it will insert yyy. You can use square brackets to perform text replacements on the resulting variable name: [from:to]. e.g. [die_:d] will replace every instance of die_ with d, meaning instead of getting die_6_A you will get d6_A.


Editor

Report TTS message in pop-up

This option sets how Atom behaves when it receives a message from TTS; either a a run-time error message or a value being returned from a executing code. By default it will flash a notification pop-up for a few seconds, but with this setting you can disable the pop-up or make it stay visible until dismissed.


Highlight GUID object in TTS

When enabled, any time your Atom cursor is near a GUID string the matching object in TTS will be highlighted. If it's a visible object then a border will flash around it, and if it's an invisible zone then it will briefly appear as a white block.


Show function name in status bar

When enabled the name of the function the cursor is inside will be displayed in the status bar (along with any parent functions). Clicking on the function in the status bar will jump the cursor to its beginning, while shift-clicking will select the function in the editor.


Show function prefix during Go To Function

As it describes itself. Disabling this option means the functions will be listed without the word function before them.


You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.