Element saving question

  • bowserinator
    1st Oct 2014 Member 0 Permalink

    1. Why is the element limit 255? Is it the save format or something?

    2. Can anyone explain the format of saving tpt as in what bytes do what? Like for example:

    <2048 bytes stating something> <something> like that

    3. What would happen if we went over the element limit but didn't save those with ids > 255? What would happen if we did?

  • jacob1
    1st Oct 2014 Developer 0 Permalink
    1. The save format is one reason, another is that the internal variables all expect it. in pmap for example, the first 8 bits are used to store the type, and all the other bits the particle index. We could change it to 9 or 10 bits, but then we would have to change a lot of the >>8's in the source.

    2. Didn't find much on the forums, but there is this: http://boxmein.net/tptelements/OPS-reference.html
    And of course, the actual source (serialiseOPS function).

    3. Well ... then there would be a lot of empty spaces where the >255 elements were. Things like CLNE could still clone them since ctype isn't limited to just 1 byte.
  • bowserinator
    1st Oct 2014 Member 0 Permalink

    OK Thanks