Remote Toy

  • Marte2007
    15th Sep 2011 Member 0 Permalink
    Some time ago, I asked the developers if TPT could have a remote interface like Telnet or D-Bus (->), and they said

    TheWiseEyes:

    Not a chance. That's sort of plain stupid.

    and

    TheWiseEyes:

    It's stupid because TPT is designed to be a game, not a server app where you telnet in, attach to it and hope it works fine

    Disappointed with these responses, I decided to make it on my own, since I think I won't be the only one that will like it.

    After a long time, here is the first BETA of Remote Toy!
    It's a Lua script that allows other programs to execute commands in TPT, by simply writing to a .txt file, and polling another one for response.
    Please note that Remote means other programs but on the local machine, not on a remote one; actually it could be used via remote console protocols (like Telnet or SSH) or file transfer protocols (like FTP, SMB or Dropbox) if you already have a server for them and you can access/share the TPT folder with them.
    It includes a Python 2.x program that acts both as an example and a fully working CLI (remember to edit it with a text editor and change the path to your TPT install folder).

    Here's how it works: you put a command in remotetoy.input.txt, Remote Toy reads it and clears it, executes it, and puts its result in remotetoy.output.txt. The remotetoy.status.txt file contains a status string of these:
    • ready: Remote Toy is ready to receive commands
    • busy: the last command sent is being evaluated
    • disabled: Remote Toy is disabled


    WARNING: sending a wrong Lua command makes Remote Toy hang without warning, to make it work again disable then re-enable it.

    To load it, you can:
    • start it manually, with dofile("remotetoy.lua") in console
    • start it from the autorun.lua file (with the same command above)
    • use Cr15py's LUA Modloader

    Once loaded, enable/disable it with the . (dot) key. When enabled it slows TPT a little, so if it's too slow for you, disable it when not needed.

    There is a demo save here:


    It is released under GNU GPL v3

    Now the most important part: DOWNLOAD LINK
    If you want to send feedback or report bugs, do it here or write me an email.
  • mniip
    15th Sep 2011 Developer 0 Permalink
    Too lazy to read source, what is synthax of commands? Lua?
  • Marte2007
    15th Sep 2011 Member 0 Permalink
    Yes it is. Just remember to put return in front of the command if you want the response back. Remote Toy acts as a one-command Lua function.
  • MasterMind555
    15th Sep 2011 Member 0 Permalink
    @Lord-Spectre (View Post)
    Why does EVERYONE writes "LUA"
    It's "Lua", "LUA" looks like your yelling
    "JAVA", "C SHARP", "BINARY", "ASSEMBLY"
    C'mon..
  • Marte2007
    15th Sep 2011 Member 0 Permalink
    @MasterMind555 (View Post)
    I didn't. If you mean

    Lord-Spectre:

    Cr15py's LUA Modloader

    I was quoting its author.
  • Jackeea
    15th Sep 2011 Banned 0 Permalink
    This post is hidden because the user is banned
  • MasterMind555
    15th Sep 2011 Member 0 Permalink
    @Jackeea (View Post)
    No, some are mistaking Lua for LUA, it's Lua, it's not an acronym.

    http://www.google.ca/search?q=lua
    Look at the official Lua website, it's Lua
  • Jackeea
    15th Sep 2011 Banned 0 Permalink
    This post is hidden because the user is banned
  • Marte2007
    15th Sep 2011 Member 0 Permalink
    @MasterMind555 (View Post)
    I know, it's probably you that told me once...
  • MasterMind555
    15th Sep 2011 Member 0 Permalink
    @Lord-Spectre (View Post)
    Lol I told everyone at least once...

    Anyways is this script like TPT Multiplayer or just remote toy?