Flammable Lua bug

  • Videogamer555
    26th Dec 2011 Member 0 Permalink
    When setting an element's flammable property, if I set it at a huge number it not only burns hotter, it also burns EXPLOSIVELY FAST without even setting the explosive property. The speed of the burn and the temperature of the flame produced should be 2 separate properties in Lua. I wanted to make magnesium by making METL flammable, but when doing so I have to set the "flammable" setting to 3370 as magnesium burns at at 3370K. However using that number causes the metal to basically explode! magnesium ribbon when burned in the lab is NOT consumed almost instantly. It burns bright and hot, but the magnesium is not instantly vaporized. It burns slow and takes a while to burn the full length of the ribbon.

    Yes I can set "flammable" to 20 to make it burn slow, but then it also burns in a way that barely gets hot! Magnesium burns VERY HOT!

    Someone REALLY needs to make burn temperature and burn speed TWO SEPARATE VARIABLES in Lua.
  • vanquish349
    26th Dec 2011 Member 0 Permalink
    firstly this isn't a bug, and secondly it isnt going to be changed for just you.
  • Videogamer555
    26th Dec 2011 Member 0 Permalink
    Is that your response to everyone's suggestion is to assume that their suggestion is something that would only be of interest to the suggester?

    I only gave my intended use of ONE EXAMPLE of how this could be used. Remember that new features or elements have to have a reason to be implemented, and I was just giving a good reason.

    Do you realize that with your attitude if you were the developer that TPT would still be a very primative program, because you'd never listen to ANYONE's suggestion because you would assume that their suggestion would only be of value to the suggestor.

    What I suggested was a general idea that if implemented would open the door to THOUSANDS of new creations, each of which could have different burning speeds and temperatures based on the needs of the individual using it.

    There's a reason that element and feature suggestions are allowed on these forums, and it's the same reason that people such as yourself who COMPULSIVELY say "that feature is useless" (without even coming to that conclusion based on analyzing the suggestion, but rather on a gut instinct that if it had to be suggested then that means it's not already in TPT, and if it's not already in TPT then that means it's useless) aren't the sort who make friends on this forum. You see it's not finished yet, and so the developers LIKE to hear suggestions just in case they happened to not think of a really good feature that someone else has thought of.

    Do you know that without people such as myself making suggestions that TPT wouldn't even be half of what it is today. It is because of suggestions such as my own, which actually got implemented that TPT is as good as it is. I mean the developers can't possibly singlehandedly think of EVERY good feature or element to add.

    So you know I don't really like your tone and attitude in that reply. Next time just think of the possibilites if the suggestion is implemented, BEFORE you jump on it as a bad idea.

    Oh, and ultimately the developers, and NOT YOU make the call as to what goes into TPT.
  • TheWiseEyes
    26th Dec 2011 Banned 0 Permalink
    This post is hidden because the user is banned
  • Simon
    26th Dec 2011 Administrator 0 Permalink
    @Videogamer555 (View Post)
    vanquish pretty much said it, the only way you're going to get something to burn hot, very slowly is if you create your own element update function, example
    math.randomseed(os.time())
    function magn_update(i, x, y, s, n)
    next = tpt.get_property("type", x+math.random(-1, 1), y+math.random(-1, 1))
    if next == tpt.el.fire.id or next == tpt.el.plsm.id then
    tpt.parts[i].type = tpt.el.plsm.id
    tpt.parts[i].life = 300
    tpt.parts[i].temp = 5000
    end
    end
    tpt.element_func(magn_update, tpt.el.dmnd.id)
    This would make diamond burn with a hot, plasma flame.
  • Videogamer555
    26th Dec 2011 Member 0 Permalink
    COOL! Can you explain how this works?


    function magn_update(i, x, y, s, n)

    like what the i, s, and n mean.

    why there is no "register function" statement used.



    Also would like to know how to make it check temperature state and not just the presence of flame or plasma in determining of if the material should burn.
  • keperitan
    26th Dec 2011 Member 0 Permalink
    math.randomseed(os.time())
    function magn_update(i, x, y, s, n)
    next = tpt.get_property("type", x+math.random(-1, 1), y+math.random(-1, 1))
    blah =  tpt.get_property("temp", x+math.random(-1, 1), y+math.random(-1, 1)) 
    if next == tpt.el.fire.id or next == tpt.el.plsm.id or blah >= yourtemp then
    tpt.parts[i].type = tpt.el.plsm.id
    tpt.parts[i].life = 300
    tpt.parts[i].temp = 5000
    end
    end
    tpt.element_func(magn_update, tpt.el.dmnd.id)

    Change yourtemp to anything you like.