Lua Element Creator

  • FeynmanLogomaker
    19th Dec 2013 Member 8 Permalink

    This is a free-to-use, free-to-copy program to be used by anyone who wants to create an element. You no longer need to know Lua or the complex API usually used to create elements.

    To run it, just extract everything from the .zip (preferably into your Powder Toy folder), then run whichever executable suits your operating system. (If you don't know, use the _x86 version to be safe). When you're finished with your element, press Ctrl-S or click File/Save and select a file name/location, just as you would in Microsoft Word, etc.



        Lua Element Tool:

              Used for creating a Lua script that can in turn create an element.


         Graphics Function Helper (now integrated into the main program, activated by Ctrl-F):

              Used to create a simple template for a graphics function, with just the return



         TPT Transparency Setter:

              Can be used to make Powder Toy (or any other window) semi- or fully-transparent. Works similar to 

              Transparent Windows, but you don't need a free trial or anything.


    Get the most current version here.

    A github repo containing the most current (beta) version can be found here.

    The Github release is here. (This is going to be out of date)



    The source is included in the package (that's LuaElement.au3), in case you wish to modify it. If you have written a mod of it but don’t want to or are unable to compile it, I will be perfectly willing to do it for you. (That will now almost certainly be the case, as the code used for sending the bug report email is not released for security reasons)


    You can find the full version history here, and I will add more versions to that folder as I go along.



    Suggestions are very welcome! Just put them in the comments on this thread, and they will be implemented if possible. 





    FeatureDeadlineExtraOption to save element as a non-Lua file readable by the program (probably .LEP), that opens by default with the program (or capability to read from a .lua file)Not likely to be implemented Instead of entering a number for falldown and menusection, a pulldown menu to make it simpler and easierAdded in 4.7.1 (Unreleased) Instead of entering a number for Explosive mode, radio buttons, to make it simpler and easierAdded in 5.0.3Was later changed from radio buttons to a simple pull-down menuAutomatic downloading of update itselfAdded in 6.5.7Still may be a bit buggySkipping of the update check/alert if there is no internet connectionAdded in 6.8.2Instead of testing for an internet connection, it simply reviews the validity – much simpler and slightly less error-prone.Add help menu, option to report bugsAdded in 7.5.5 May be completely redesigning the user interface lookUnknown Add option to change element group - i.e. other than AU3FGENAdded in 8.1.5    



    (If the first number in the latest version is higher than your version, you should definitely update - it's either an important bugfix, new important feature or important change)

    VersionChangedAddedRemovedFixed1.5.2 Color sliders Bug fixes2.0.3Fixed major writing issueSave, Save As... tabs Hotkeys! Ctrl-S to save, and Ctrl-Shift-S to save as!Big ugly button 3.3.2 Update function editing (it actually wrote a graphics function instead, which has been fixed)  3.5.2Changed background from grey to plain white Changed code-editing font from default to Consolas, a more suitable monospaced font  Rendering of sliders on startup3.5.3Sliders default to 255   4.1.0Widened it by 100% to make code-editing easier Restyled the GUI just a bitGraphics function editor Fixed update function editor actually registering to the element's graphics function4.1.1Changed the icon   4.1.5Fixed version numbering in both the executable and the folderChanged the icon back to the original (the new one wasn't that great)  Minor bugfixes4.5.0 Now actually appears in the menu  5.0.3Changed the inputs for Explosive, Menusection and Falldown to drop-down menusBegan Github repository - all versions hereon will be posted on Github  5.2.0Changed color scheme for code editing to black-on-whiteChanged default text for graphics function to something much more useful   5.2.0/2.0.0 Now includes another program, used for easily making the return value for a graphics function  5.2.0+2.0.0 (2)Updated all the iconsNow comes with a Window Transparency Setter - it does the same thing as Transparent Windows, but a lot easier and free-er!  6.1.3Updated the icon to something much more professional-lookingPress Ctrl-F to run the Graphics Function Helper, now embedded in the program.Automatically checks for updates! On startup, if your software is out of date, it will display a dialog telling your version, the most current version, and what's new. Graphics Function Helper now returns a function that   Fixed a small bug in which closing the GFH also closed the main window6.5.7 Added ability to automatically download the latest version if available  6.8.2 Only offers to update if it actually found useful data  7.5.5Improved lookAdded ability to send bug report from the programTPT Transparency Setter 7.5.6Minor punctuation fix   8.1.5Improved usabilityImproved startup speedGeneral rewordingsRe-included TPT Transparency Setter - there was no reason to remove it in the first place. Fixed issue with Graphics Function Helper8.2.7Improved update dialog (it will no longer list version changes occurring before the user's version)                       





    If anyone wants to contribute to the development of this project, I would be very happy to add you. Just comment here, PM me, or do it on Github.




    Edited 65 times by FeynmanLogomaker. Last: 29th Sep 2014
  • Nobody905
    20th Dec 2013 Member 0 Permalink

    Nice. What language did you use?

    I am actually working an Element Creator just to try out the BlackBerry 10 language, I plan on making it for Android as well.


    I thought of making a Windows version, but as soon as I tried to make a button in C++ I said: "Nope..."

  • kentakon
    20th Dec 2013 Banned 0 Permalink
    This post is hidden because the user is banned
  • FeynmanLogomaker
    20th Dec 2013 Member 0 Permalink

    I used AutoIt. It is often used for making viruses, and it is highly compressed, so it is often used for viruses. Don't worry, it's perfectly safe.

  • kentakon
    20th Dec 2013 Banned 0 Permalink
    This post is hidden because the user is banned
  • Nobody905
    20th Dec 2013 Member 0 Permalink

    @FeynmanLogomaker (View Post)

     I know, I used it. It's safe.

     The elements it makes are broken though. Here's an example of what it makes:, 'Name', 'BOOM'), 'Description', '111111'), 'Color', '0xD60833'), 'Menusection', '11'), 'Gravity', '34'), 'Flammable', '43'), 'Explosive', '4'), 'Loss', '657'), 'AirLoss', '37563'), 'AirDrag', '367345'), 'Advection', '3745'), 'Weight', '54376'), 'Diffusion', '-1')

  • FeynmanLogomaker
    20th Dec 2013 Member 0 Permalink

    ...The heck even happened there?

    That will be fixed in the next version (hopefully released later today). Thanks!


    EDIT: Already released, the new version is quite good!


    EDIT: New layout of thread! Woo-hoo!

    Edited 2 times by FeynmanLogomaker. Last: 23rd Dec 2013
  • zBuilder
    24th Dec 2013 Member 0 Permalink

    why does it say "autorun.lua:1 bad agrument to 'property'(number expected,got nil)" when loaded in TPT? how do I fix this?

  • FeynmanLogomaker
    24th Dec 2013 Member 0 Permalink

    I don't know, could you post the code it made?

  • zBuilder
    25th Dec 2013 Member 0 Permalink

 , 'Name', 'GUM'), 'Description', 'gooey stuff'), 'Color', '0xFFCFEB'), 'Menusection', '11'), 'Gravity', '1'), 'Flammable', '0'), 'Explosive', '0'), 'Loss', '0'), 'AirLoss', '1'), 'AirDrag', '0'), 'Advection', '1'), 'Weight', '25'), 'Diffusion', '0')
    local g = function(i, x, y, s, n)
    --Update Function
    tpt.element_func(g, tpt.element('GUM'))
    local g = function(i, r, g, b)
    --Graphics Function
    tpt.graphics_func(g, tpt.element('GUM'))


    I figured out though that the program isn't writing the declaration

    (from what I seen would be similar to this  local element1 = elements.allocate("AU3FGEN", "GUM")

    although,when I add that and fix "Menusection" to say "MenuSection" it loads and can be used, though it doesn't show in the menu...

    Edited once by zBuilder. Last: 25th Dec 2013
Locked by LBPHacker: dead script