Script Server + Manager

  • Schicko
    1st Feb 2015 Member 0 Permalink

    @jacob1 (View Post)

    Thanks for the reply. That's a shame though, I use a trackball, so I can't scroll. Perhaps you could add scroll function using Up/Down or even [/] on a later update. It's no biggie if the HUD background thing isn't changed though, I guess I could just turn it off if I want to.

  • 2015
    29th Apr 2015 Member 0 Permalink

    I love TPTMUlti

  • jacob1
    30th Apr 2015 Developer 0 Permalink
    There were two updates waiting to be approved and one new script waiting, i've gone through the entire queue finally. If your script is waiting more than a few hours, either post here or send a convo to me on the forums. I probably either didn't see you uploaded a script, or it had a minor issue which I was waiting to resolve. If you talk to me i'll tell you what exactly the problem is sooner :)

    I generally accept anything as long as it works but I might make some changes sometimes. I fixed cccp3's script for him after he submitted a broken update, RCA's script update I rejected for embeding another script in it without much reason. The new script I just approved I ran through a formatter to make sure the spacing was correct.
  • kungfushark
    14th May 2015 Member 0 Permalink

    How do you use this?

     

    Edit: Nevermind, I was posting in a shortcut folder.

    Edited once by kungfushark. Last: 14th May 2015
  • rop1p
    29th Jun 2015 Member 0 Permalink

    quick question...how do I run LUA scripts? I can't figure it out.

    figured it out!

    Edited once by rop1p. Last: 29th Jun 2015
  • Zuxod
    9th Jul 2015 Member 0 Permalink

    Is it possible to scroll down the menu to see more scripts?

  • jacob1
    9th Jul 2015 Developer 0 Permalink
    @Zuxod (View Post)
    Yes, if you have a scrollwheel / scrollbar. It really does need some updates :|, also a search.
  • cccp3
    13th Sep 2015 Member 0 Permalink

    aha thanks jacob1

    Edited 2 times by cccp3. Last: 13th Sep 2015
  • jacob1
    28th Nov 2015 Developer 0 Permalink
    Updated the script manager to 3.5 with some changes done over the last few months.

    Version 3.5:
    Lua5.2 support
    TPT 91.0 platform API support (no need to set exe name anymore, proper OS detection)
    [] can be used to scroll
    Fix bug where it wouldn't remember you updated a script

    Only downside to the update is that if you are using a fancy executable name you might not be able to have TPT automatically restart. Once TPT 91.0 comes out though that will be fixed because it can use the platform api.

    Also I created a download with this and TPT Multiplayer together: https://dl.dropboxusercontent.com/u/43784416/PowderToy/manager%2BTPTMP.zip
    Edited once by jacob1. Last: 28th Nov 2015
  • jacob1
    2nd Jan 2016 Developer 0 Permalink
    Just a note, when you submit scripts, please test that they work and run. If you submit a script and it doesn't work at all, it won't be approved and will probably just be deleted forever. I tried for like 10 minutes to fix up a script that was just submitted, but it had so many problems I didn't want to bother.

    For most scripts I just quickly confirm it doesn't do anything bad and it works properly before approving it, but if it is clear you haven't tested then it won't be approved.

    You can always ask for help in the Lua sections of the forum if needed. Some problems I have been noticing are stuff like this:
    local dorkybobster = elements.allocate("EXTR" , "EXPL")
    elements.element(dorkybobster, elements.element(elements.DEFAULT_PT_SNOW))
    elements.property(dorkybobster, "Name" , "EXPL")
    elements.property(dorkybobster, "Description" , "Basic Explosive, possibly strong.")
    elements.property(elements.dorkybobster_PT_EXPL, "Colour", 0x003486)

    The last line is wrong for a few reasons, elements.dorkybobster_PT_EXPL needs to be always uppercase. Also, it should have been elements.EXTR_PT_EXPL, because EXTR and EXPL are the strings passed into the elements.allocate function. The script started out just fine until it started doing that, and every line following had elements.dorkybobster_PT_EXPL which just errored.

    It is best to continue using the return value of elements.allocate for the first argument of all elements.property calls. It looks a lot cleaner:
    elements.property(dorkybobster, "Colour", 0x003486)

    Make sure your script has correct indentation too. I have my own script to fix indentation issues, and it helps find problems like where exactly the missing or extra 'end's are. The script that was submitted just a bit ago had an extra end in the middle of the script, and was missing two 'ends' at the very bottom.

    Also make sure you don't throw in unused functions. There was an entire update function in this script that wasn't even used.