What is Element ID?

  • timpfeifer
    30th Dec 2012 Member 0 Permalink

    Hello

     

    In jacob1's mod is "ElementID" example:tpt.Moving_Solid(Number ElementID)

    So,I wonder what ElementID is.

  • jacob1
    30th Dec 2012 Developer 0 Permalink
    @timpfeifer (View Post)
    each element gets it's own id in the game, but there is another way (at least, there should be). Do tpt.moving_solid("DMND") or any other name. It works with names too if it's in quotes

    DMND's id is 28, but you probably wouldn't know that without looking at the source
  • boxmein
    30th Dec 2012 Former Staff 0 Permalink
    @timpfeifer (View Post)
    You get an element ID when you do
    tpt.element("fire")
    , or when you just do
    "fire"
    , or when you do
    tpt.el.fire.id
    , or when you do
    elements.DEFAULT_PT_FIRE
    (useful with the new api), or for example when you create a new element with
    local fire = elements.allocate("Derp", "fire")
    . All these you can use.
  • timpfeifer
    30th Dec 2012 Member 0 Permalink

    where are the ID

  • boxmein
    31st Dec 2012 Former Staff 0 Permalink
    @timpfeifer (View Post)
    :(
    Element IDs are the way elements are stored in the game. You have a huge grid with tons of points, and storing names is inefficient, so they use made-up numbers for each instead.
  • Jallibad
    31st Dec 2012 Member 0 Permalink

    @timpfeifer (View Post)

     this is out of date but I'm too lazy to get the source.

    http://pastebin.com/ukzRdNWr

  • timpfeifer
    31st Dec 2012 Member 0 Permalink

    thank you

  • TPTROXRLYITSTRUE
    31st Dec 2012 Banned 0 Permalink
    This post is hidden because the user is banned
  • Jallibad
    1st Jan 2013 Member 0 Permalink

    @TPTROXRLYITSTRUE (View Post)

     I think it's C-4

  • Skoper
    12th Dec 2013 Member 0 Permalink

    @Jallibad

    how to add a new element id?

    Edited 2 times by lolcrafte2. Last: 12th Dec 2013
Locked by jacob1: old / some bad info here