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

    RebMiami:

    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:

    elem.property(myelement, "HighPressure", 50)
    elem.property(myelement, "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))
    elements.property(elements.AU3FGEN_PT_COPR, 'Name', 'COPR')
    elements.property(elements.AU3FGEN_PT_COPR, 'Description', 'Copper. ')
    elements.property(elements.AU3FGEN_PT_COPR, 'Color', '0xD16300')
    elements.property(elements.AU3FGEN_PT_COPR, 'MenuSection', '1')
    elements.property(elements.AU3FGEN_PT_COPR, 'Gravity', '0')
    elements.property(elements.AU3FGEN_PT_COPR, 'Flammable', '')
    elements.property(elements.AU3FGEN_PT_COPR, 'Explosive', '0')
    elements.property(elements.AU3FGEN_PT_COPR, 'Loss', '0')
    elements.property(elements.AU3FGEN_PT_COPR, 'AirLoss', '1')
    elements.property(elements.AU3FGEN_PT_COPR, 'AirDrag', '0')
    elements.property(elements.AU3FGEN_PT_COPR, 'Advection', '1')
    elements.property(elements.AU3FGEN_PT_COPR, 'Weight', '0')
    elements.property(elements.AU3FGEN_PT_COPR, 'Diffusion', '0')
    elements.property(elements.AU3FGEN_PT_COPR, 'Diffusion', '2')
    local g = function(i, x, y, s, n)
    --Update Function
    end
    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
    end
    tpt.graphics_func(gfunc, tpt.element[COPR])
    end
    tpt.graphics_func(g, tpt.element('COPR'))

     

    POWDERED COPPER code:

     

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

    end
    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