AWESOMIUM

  • ThunderSt
    31st Jul 2012 Member 0 Permalink

    @Poorsoft (View Post)

     

    Nothing special.

    This kind of scripting is just like if you put all of the commands into console, but autorun.lua alearedy does that each time you open TPT for you.

     

    Check this thread:

    https://powdertoy.co.uk/Discussions/Thread/View.html?Thread=14540&PageNum=0

     

    Basically, memorize the commands and how to use them, and you'll know how to do this.

    The most basic ones start always by ''tpt.el''.

  • Catelite
    31st Jul 2012 Former Staff 0 Permalink

    lol, EXOT's solid mode is just settings its own velocity to 0 below a certain temperature.

  • ThunderSt
    31st Jul 2012 Member 0 Permalink

    @Catelite (View Post)

     

    Yea.. powders can go through it..

     

    Edit:

     

    Alright people, I need ideas:

     

    Since I created AWSM out of PSTE, I'll have to do some changes to CLST and reuse PSTS for something else.. 

    Feel free to give ideas, and I'll add ''Credits to'' lines in the script for the changed lines.

    Just a note: CLST has to turn into something which keeps the +nitro=tnt conversion acceptable.

     

    JUST AN EDIT:

     

    tpt.el.eqve.name = 'awsm'
    tpt.el.eqve.description = 'AWESOMIUM. Is just awesome...'
    tpt.el.eqve.color = 0xFFFF00
    tpt.eltransition.eqve.tempLowValue = 1200
    tpt.eltransition.eqve.tempLowType = tpt.element('glow')
    tpt.eltransition.eqve.tempHighValue = 9000
    tpt.eltransition.eqve.tempHighType = tpt.element('bomb')
    tpt.eltransition.eqve.presHighValue = 900
    tpt.eltransition.eqve.presHighType = 0
    tpt.el.eqve.diffusion = 3
    tpt.el.eqve.gravity = 5
    tpt.el.eqve.weight = 5
    tpt.el.eqve.heat = 5000
    tpt.el.eqve.hardness = 1
    tpt.el.eqve.properties = 2600
    tpt.el.eqve.falldown = 5

    tpt.eltransition.glow.tempHighValue = 800
    tpt.eltransition.glow.tempHighType = tpt.element('awsm')

     

    From now on I use this one. If anyone wants to use it, go ahead, but I only update the other one.



    Well, I'll update it so AWSM appears in a tab, once I know where is the submenu name-number list.

  • jacob1
    31st Jul 2012 Developer 2 Permalink
    ThunderSt:
    @jacob1 (View Post)
    How do you use the tpt.el/graphics_func ?


    You can look at the wiki, but it might not be that helpful.

    I copied this from the readme for my mod though. It explains graphics functions:

    Lua Graphics Functions: Allows you to change an element's graphics function.The values i, colr, colg, and colb are passed into the function. You must return cache, pixel_mode, cola, colr, colg, colb, firea, firer, fireg, and fireb in that order. If you leave any out or as nil, it will get it's default value. The cola value is unused right now, but return 255 just incase. The cache value is a boolean that tells if it will add these valuesinto the graphics cache, meaning it will remember the return values and notrun your function again. This eliminates lag when a lot of particles aredrawn. The pixel_mode properties can be found in powdergraphics.h.
    Example:
    function graphics(i, colr, colg, colb) -- blue green with a bluish glow
    return 1,0x00FF0008,255,0,255,255,255,0,0,255
    end
    tpt.graphics_func(graphics,tpt.el.eqve.id)

    You need to actually know lua to use them.

    to make eqve go in a menu, use tpt.el.eqve.menu = 1 and tpt.el.eqve.menusection = (number of menusection)
  • lorddeath
    31st Jul 2012 Member 0 Permalink

    lol instead of putting it in autorun lua i actually typed all that into lua lol

  • ThunderSt
    1st Aug 2012 Member 0 Permalink

    I know, the problem is I don't know the numbers of menusections.

     

    And thanks for the func_ usage.

  • ultibore
    5th Aug 2012 Member 0 Permalink

    @ThunderSt (View Post)

     

    I know you dislike my attitude but I like to give a hint, it is best even not to sacrifice eqve ( though it is kind of useless) but to use gol names, because using gol names doesn't cause the gol type to be rewritten, since all gol types are sorts of life ( as you may have noticed) , just replace bran or frog or things like that with new types, then you still are able to use bran and frog and not lose any element ( in this way you can have
    24 extra elements without sacrificing others).  

     

  • ThunderSt
    5th Aug 2012 Member 0 Permalink

    @ultibore (View Post)

    Hmm.. so that's from where bran comes from.. thanks for the hint.

  • boxmein
    5th Aug 2012 Former Staff 0 Permalink
    @ultibore (View Post)
    @ThunderSt (View Post)
    Funner fact: Only BRAN works that way. That's because it was the only one left behind as an element to use for lua, a /* FREE */ element. Other GOL types won't.
  • ultibore
    8th Aug 2012 Member 0 Permalink

    @boxmein (View Post)

    Thanks for warning so soon , it is a bummer though... (I didn't checked it out, I dumbly assumed, but I found another option (requiring effort) after some searching)

     

    @ThunderSt  ( ignore the hyperlinks at define)

    If you really want to have some new element indices, it's possible to use (download if necessary) a c-editor to edit the powder toy source code and place a nem element name before num ( there will be a line < #define PT_NUM 161> (may be a higher number in later source code), just put a or some lines < #define PT_NAME xxx  >  before the PT_NUM and increase the number of PT_NUM accordingly, that should be enough to create a or some new element index/indices.

     

    note: I heard it might currently only go till 256/255 for binary reasons