Fixed Value

From Mario Fan Games Galaxy Wiki
Revision as of 21:44, 3 November 2008 by Xgoff (talk | contribs) (huge emphasis on "experimentation"; i have not asked CT about the exact behavior nor was this even that thorough of an experiment)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

A Fixed Value is an integer value that is unique to an object in MMF/TGF, and used to reference that specific object instance. Some expressions of MMF/TGF and their extensions require a fixed value as an argument, so they can affect only that object.

Technical Information

Note: this info was found through experimentation in MMF2/TGF2; it may be different for other Click products

  • Fixed values are assigned during runtime; they do not (as is) exist during edittime
  • Fixed values are assigned in order of object creation, from oldest object to newest
  • The first assigned fixed value is 131,073
  • Each fixed value is 65537 (yes, 65537) greater than the last assigned, and appears to stay this number regardless of how large (data-wise) the object is
  • When an object is destroyed, its former fixed value is not reused by new objects
  • Fixed values are stored as signed 32-bit integers, meaning they range from 0 -> 2,147,483,647 -> -2,147,483,648 -> 0
  • The 65537 increment ensures that should fixed values overflow into negative and make it back into positive (which requires tens of thousands of create-delete cycles), they'll be offset and generally won't repeat already used values (still possible if you have an extremely old object and go through literally millions of create-delete cycles)