Lua Element Creator

  • phox
    18th Nov 2017 Member 0 Permalink

    i'm not talking about a whole mod. if you spent some time playing around with lua it wouldn't take too long to create something. lmao

  • jacob1
    18th Nov 2017 Developer 1 Permalink


    How do I make element transitions? I am using the GitHub release because it is the only one that works for me.

    Transitions are easy, something like this:, "HighPressure", 50), "HighPressureTransition", elem.DEFAULT_PT_DUST)

    This would make "myelement" transition to DUST at pressures > 50. If you have two custom elements you want to transition into each other, there is one caveat. You need to put the transitions below where both elements are defined (because when saying element A transitions to element B, both must exist for it to work)

    There's also Temperature transitions and Low transitions

    @Potbelly (View Post)
    Yeah, looking at other people's code is definitely the best way to get into making TPT elements. There isn't any good guide for it, and reading the API reference is nice once you know what you are doing, but not for trying to make your first element.

    I've wanted to make an actually good element creator for a while ... but that probably won't happen. My idea was that it would be in game, you could edit properties and reactions on the fly in some interface.
    Edited 2 times by jacob1. Last: 18th Nov 2017
  • optimus2006
    19th Nov 2017 Member 0 Permalink

    {Deleted because I am a freaking idiot}

    Edited 2 times by optimus2006. Last: 19th Nov 2017
  • DiamondChef
    18th Dec 2017 Member 0 Permalink

    When I click the download link I get this message from dropbox saying It says this when I want to download.

    This is what is says when I try to download. Its been like this for like a week.

    Is there any other way to download?

    Edited 2 times by DiamondChef. Last: 18th Dec 2017
  • wersywek
    13th May 2018 Member 0 Permalink

    Hi! I just want to ask: Can somebody make a help site for this crator? I don' know what means air drag and others like this. Please help.

  • cubesmithdotcom
    1st Jun 2018 Member 0 Permalink

    Apparently you've hit the traffic limit, and the github repo doesn't have any executables. I can't follow the guide from the wiki because I can't find the src folder.

  • SubaruEnjoyer
    9th Jun 2018 Member 0 Permalink

    {Comment Deleted because I was stupid}

    Edited 5 times by NuclearCreeper. Last: 9th Jun 2018
  • FeynmanLogomaker
    23rd Oct 2019 Member 0 Permalink

    @DiamondChef (View Post)

     boy howdy this is one hell of a necro but it should be pretty easy to compile it yourself. The scripts are written in AutoIt (because I wrote them when I was 15 and not very good at programming), you can find a guide to compiling them pretty easily here.


    sorry for the full year necro i saw interest in a tool like this and had to check how mine was doing

  • an_annoying_zombine
    3rd Nov 2019 Member 0 Permalink

    how i make a eletrical thing, like COPPER?


    and how i for "melt" COPPER into POWDERED COPPER?


    COPPER code:



    elements.allocate('AU3FGEN', 'COPR')
    elements.element(elements.AU3FGEN_PT_COPR, elements.element(elements.DEFAULT_PT_BCOL)), 'Name', 'COPR'), 'Description', 'Copper. '), 'Color', '0xD16300'), 'MenuSection', '1'), 'Gravity', '0'), 'Flammable', ''), 'Explosive', '0'), 'Loss', '0'), 'AirLoss', '1'), 'AirDrag', '0'), 'Advection', '1'), 'Weight', '0'), 'Diffusion', '0'), 'Diffusion', '2')
    local g = function(i, x, y, s, n)
    --Update Function
    tpt.element_func(g, tpt.element('COPR'))
    local g = function(i, r, g, b)
    local function gfunc(i, r, g, b)
        return 0x00000001, 255, 209, 99, 0, 255, 209, 99, 0
    tpt.graphics_func(gfunc, tpt.element[COPR])
    tpt.graphics_func(g, tpt.element('COPR'))




    elements.allocate('AU3FGEN', 'PCPR')
    elements.element(elements.AU3FGEN_PT_PCPR, elements.element(elements.DEFAULT_PT_BCOL)), 'Name', 'PCPR'), 'Description', 'Powdered Copper. '), 'Color', '0xD16300'), 'MenuSection', '8'), 'Gravity', '2'), 'Flammable', ''), 'Explosive', '0'), 'Loss', '0'), 'AirLoss', '0'), 'AirDrag', '0'), 'Advection', '0'), 'Weight', '5'), 'Diffusion', '0'), 'Diffusion', '1')
    local g = function(i, x, y, s, n)
    --Update Function
    tpt.element_func(g, tpt.element('PCPR'))
    local g = function(i, r, g, b)

    tpt.graphics_func(g, tpt.element('PCPR'))

    Edited 2 times by an_annoying_zombine. Last: 3rd Nov 2019
  • gamers4
    4th Nov 2019 Member 0 Permalink

    Wait, you can make the code shorter. Check my script.

Locked by LBPHacker: dead script