Help with properties of element.

  • Hekt0r
    12th Jun 2022 Member 0 Permalink

    Edit: Now fixed i found a tutorial on the wiki to fix all of these things.

     

     

     

     

    i made a custom element PAPR using the following code:

    ------

    local PAPR = elements.allocate("ELEMENT", "PAPR")
    elements.element(PAPR, elements.element(elements.DEFAULT_PT_WOOD))
    elements.property(PAPR, "Name", "PAPR")
    elements.property(PAPR, "Description", "Paper. Very lightweight, easy to burn.")
    elements.property(PAPR, "Colour", 0xFFFFFF)
    elements.property(PAPR, "MenuSection", elem.SC_SOLIDS)
    elements.property(PAPR, "HotAir", -0.009)
    elements.property(PAPR, "Weight", 1)
    elements.property(PAPR, "Temperature", 22)
    elements.property(PAPR, "HighPressure", 20)

    -------

    However there are some issues

    The first one is that it does not burn as easily as i'd like, even though i set it's element to act like wood (i tried with sand too) it is very hard to burn (400+ C).

    That brings me to my second problem, the starting temp is -253 although i set it to 22.

    Third and last problem is that for some reason it keeps generating negitive pressure.

     

    There is no need for a link to the file im assuming since that is all the code, placed in autorun.lua.

     

    Thanks,!

    Edited once by Hekt0r. Last: 12th Jun 2022
  • RebMiami
    13th Jun 2022 Member 1 Permalink

    1. If it's not flammable enough, try increasing "Flammability". That would look like this: elements.element(PAPR, "Flammability", 100) -- You can change this value up and down to suit your needs. For reference, WOOD is 20.

    2. Temperature is in Kelvin, not Celsius. If you want it to start at 22 degrees C, set it to 273.15 + 22.

    3. The "HotAir" property is what's causing it to generate negative pressure. HotAir is used by LAVA to generate pressure and ICE to reduce pressure, so if you don't want PAPR to make or remove any pressure, set "HotAir" to 0.

     

    I'd suggest reading this wiki page for more information on element properties. Hope this helps, and have fun modding!

  • Hekt0r
    13th Jun 2022 Member 0 Permalink

    @RebMiami (View Post)

     Thank you! I already did that however that wiki page helped me with some other problems!