Page 7 of 8 FirstFirst ... 5678 LastLast
Results 151 to 175 of 188

Thread: Atom Text Editor Plugin Feedback

  1. #151
    Quick Question: I like to have my editor window open in Atom be "split", or two Panes showing my single file in Atom-speak.
    The 2nd pane disappears when I click
    Tableop Simulator -> Save and Play

    Is there a way to save the "Pane" settings between runs of the code?

    SamF7

  2. Update 10.3.0

    • Added 'log' and 'logStyle' functions
    • Fixed active editor not being active after Save & Play
    • Removed 'experimental' tag from some features

  3. Quote Originally Posted by SamF7 View Post
    Quick Question: I like to have my editor window open in Atom be "split", or two Panes showing my single file in Atom-speak.
    The 2nd pane disappears when I click
    Tableop Simulator -> Save and Play

    Is there a way to save the "Pane" settings between runs of the code?

    SamF7
    This requires a pretty substantial rewrite of how Save & Play works... which will probably happen, but not in the immediate future. In the meantime I recommend binding a keyboard shortcut to splitting, so you can hit it again right after you do Save & Play, or if you're feeling adventurous you could write your own macro to call Save & Play, wait for the tabs to reopen, and then split them. Alternatively there might be some other package that saves editor states and allows you to restore them (which would hopefully play nice with the TTS plugin)

  4. #154
    Gotcha! Thanks for the reply. I'll bind a keyboard command for splitting and see if that meets my needs.

    SamF7

  5. #155

    Post Player class Ideas

    I feel like the Player class is a little bit lacking, so here's a couple of my ideas for new functions under the Player class:

    Player.getTurn() -- returns the player_color of whose turn it is
    Player.setTurn(string player_color)
    Player.onPlayerJoin(Player joined) -- Event, fires on a player joining the game and not picking a color, parameter is the new Player
    Player.onPlayerLeave(string player_color) --Event,fires on player leaving game, parameter is the seat that they just left from
    Player.getTurnOrder() --returns a table of strings of player_color in turn order

    and some function per Player, for example the Player.White
    Player.White.isTurn -- read-only, bool
    Player.White.setTurn()
    Player.White.endTurn() --same as player clicking End Turn
    Player.White.onJoin() -- Event, fires when anyone sits at this color
    Player.White.onLeave() --Event, fires when anybody leaves this color, either from leaving game or going spectate

    feel free to tack them onto a todo list if you like em.

  6. #156
    Join Date
    Sep 2016
    Posts
    216
    Quote Originally Posted by ukilop0617 View Post
    I feel like the Player class is a little bit lacking, so here's a couple of my ideas for new functions under the Player class:

    Player.getTurn() -- returns the player_color of whose turn it is
    Player.setTurn(string player_color)
    Player.onPlayerJoin(Player joined) -- Event, fires on a player joining the game and not picking a color, parameter is the new Player
    Player.onPlayerLeave(string player_color) --Event,fires on player leaving game, parameter is the seat that they just left from
    Player.getTurnOrder() --returns a table of strings of player_color in turn order

    and some function per Player, for example the Player.White
    Player.White.isTurn -- read-only, bool
    Player.White.setTurn()
    Player.White.endTurn() --same as player clicking End Turn
    Player.White.onJoin() -- Event, fires when anyone sits at this color
    Player.White.onLeave() --Event, fires when anybody leaves this color, either from leaving game or going spectate

    feel free to tack them onto a todo list if you like em.
    ukilop0617, these are pretty good suggestions, but this thread is only meant to be for feedback on the Atom plugin. There is a sub-forum where you can post scripting suggestions:

    http://www.berserk-games.com/forums/...ng-Suggestions

    However, do note that there are a couple other threads with similar suggestions, including one made by yours truely:

    http://www.berserk-games.com/forums/...S-turn-tracker!
    http://www.berserk-games.com/forums/...8-Turn-control
    http://www.berserk-games.com/forums/...1-Turn-control

  7. #157
    Are there any plans to fix the bug that causes Atom to mark Global.-1.ttslua as inaccessable to even Atom itself?

    Every time I use Save and Play from within Atom, it updates properly to TTS, but then fails to open Global.-1.ttslua. The only way around it is to close and restart Atom, but doing that after EVERY SINGLE TINY UPDATE gets really old, really fast.

    ttsatombug.png

    I saw another thread that recommended using the Portable version instead. Well... that didn't matter one single tiny bit.

    Is there a way to specify WHERE to save the temporary files? Having them sit somewhere deep in AppData could be the issue here.

  8. Update 10.6.1

    • No longer wipes temp files or closes tabs when communicating with TTS
    • Added verbose logging option in settings
    • Creates Project folder whenever scripts arrive from TTS, not just when you hit Get Lua Scripts.


    This is a rewrite on how the plugin deals with the files sent from TTS; should be much more stable as it now keeps the files open. Atom features like split panes and bookmarks should hopefully work better.

    If you are experiencing difficulties with Atom communicating with TTS then please use the logging introduced in this update, and the latest hotfix for TTS itself, to help us work out what the problem is:

    • In the plugin settings, enable verbose logging; it will be output to the Developer Console.
    • In Tabletop Simulator, turn on external API logging on the command console with '+debug_external_api' (or enable it all the time by adding it to your autoexec, with 'edit autoexec')


    With these turned on you will be able to see what happens when you hit Get Lua Scripts or Save & Play. If you see a bunch of stuff in the atom console but nothing in the TTS console then the communication is failing to happen at all: likely cause would be your firewall or security software. If you see some output in TTS but it doesn't finish then there is a bug in TTS, and posting your logs will help us find it.

  9. #159
    Join Date
    Jun 2017
    Location
    Sweden
    Posts
    24
    Just curious.
    Could we have a different color for semi keywords, like table so that we get a visual feedback and reduces the chans someone accidentally overrides them resulting in JSON commands not working?

    It might be good to include a linter like linter-luaparse to the installation so that we get some pre save and play feedback on the syntax?

  10. The plugin includes a linter provider: install a linter package to make use of it. The standard atom linter is 'linter' by steelbrain.

  11. #161
    I'm new to TTS scripting, so pardon me if I miss something obvious. I've imported an unscripted custom token from my saved objects and now I want to add a script to it. Using the right button in TTS and choosing scripting brings up a new pane in Atom. I put some code there, do save and play, but then I get a dialog in TTS "Custom token", asking me about an image, thickness, etc... like it has completely forgotten that the token itself already exists.

    Nothing suspicious in the verbose logs, and after this the communication between TTS and Atom breaks down...

    What am I missing?

  12. Update 10.6.2

    • More verbose logging
    • Fixed Global Only and Open Nothing communication settings
    • Info displayed when files received improved


    @springboard can you check the new logs for your problem? Anything with a red > can be expanded.

  13. #163
    Here's the log: https://pastebin.com/WTzq44Y0 This time, the error results in the object I was trying to script to disappear from TTS, which I guess should not happen, even if there are errors :-)

    Apart from the permission error at the end (which probably is the symptom, not the root cause), the 'undefined' message after saving seems suspicious...

    Hope this helps you debug it!

  14. So if I'm understanding your situation: you have a save file, you right click an object on it and send it to atom, type in some code, hit save & play, and the object disappears? Can you post the save and tell me what object it is?

  15. #165
    Yes, that's what's happening.

    Save here: https://www.dropbox.com/s/tj4j0mggnv...ve_6.json?dl=0

    The object is called 'TEST'.

    Thanks for looking into this!

  16. I'm afraid it works fine for me :/ I'll push out the current build in case it randomly fixes your problem.

  17. Update 10.6.3

    • Now checks if the active save has been altered in TTS; if so it prompts user about overwrite when they Save & Play
    • Improved confirmation dialogs
    • Added automatic creation of empty XML when object sent from TTS, and setting toggle for it.
    • Added menu option to create XML stub for object
    • Fixed Goto Last Error bug

  18. #168
    With the latest version I get this when I try to get the scripts from TTS:

    Uncaught Error: EPERM: operation not permitted, mkdir 'C:\Users\Peter\AppData\Local\Temp\AtomPortableTem p\TabletopSimulator\Tabletop Simulator Lua'

  19. Is the space in 'AtomPortableTem p' intentional? Also what is your load/save setting (the first one)?

  20. #170
    The space is not in the error message, copy-and-past bug, sorry.
    I'm using "Automatically open all files sent from TTS" (default)

  21. #171
    I reinstalled ATOM, moving from the portable version to the latest standard version. The EPERM option on start is gone now, but the original problem (objects disappearing after hitting save and play) is still there.

    Any help would be most appreciated :-)

  22. #172
    OK, it turns out the problem also happens when I use the built-in scripting editor. I open a standard table (in this case the Classic - Cards table), spawn a Go piece, right click to add a script and paste this:

    Code:
    function onLoad(save_state)
        self.createButton({
            label="Click", click_function="dealCard", function_owner=self,
            position={0,0.5,0}, height=400, width=600, font_size=300
        })
    end
    When I do save and play, I get an error 'end expected near eof', and the Go piece simply disappears!

  23. #173
    Join Date
    Sep 2016
    Posts
    216
    springboard,

    I think you're running into a common misconception about TTS scripting. When you press Save & Play, it will revert to the last loaded save file and update the scripts. If the object you created doesn't exist in the previous save file, it will disappear and the script will be lost. Please ensure that after you add any objects and/or update their positions and before you add/update any scripts, you save the file and then load it.

  24. #174
    Excellent, that was the problem! Seems TTS scripting has quite some little idiosyncrasies :-)

  25. Ah, cool. Happy programming! @Sancho: nice spot, I was totally fixated on it being a bug; thanks!

Page 7 of 8 FirstFirst ... 5678 LastLast

Posting Permissions

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