Ambrosia Garden Archive
    • Extra2 Link Question


      Is it just me, or do Extra2 values 1201 and up act the same as the normal Extra2 values 1001-1200? On my game, they act properly to disable other sprites with the same Extra2, and are properly disabled after saving and reloading.

      Perhaps more importantly, if it isn't just me, why did it take a full year to notice this?

      Assuming that this isn't a feature of my personal copy of the game, it looks like the maximum number of Extra2s you can use before the game starts choking is about 2500, and these can be any numbers you want - the way the game stores them seems to be able to prevent conflicts until you hit ~2500 separate values. Note that I've only tested up to around 1000 Extra2 values in a level, and the game crashed while loading the level with around 2800 unique Extra2s.

      Edwards

    • Quote

      Perhaps more importantly, if it isn't just me, why did it take a full year to notice this?

      I dunno. Maybe we all took the documentation at face value? Nobody has yet had need of more than 200 extra2's.

    • Interesting indeed. wonders the outcome of a negative Extra2 value This I gotta see...

    • I thought it was, if not common knowledge, at least something that would be naturally tried and confirmed as working. I noticed this quite some time ago, when I did a survey of which Extra2 values were actually used by custom levels so that I would know which values to watch for collisions in the Extra2 collision feature of SketchMapMerge (as I suspected values outside of the 1000-1200 range could work). I saw that one could use, and people actually did use, values outside of the documented range, so I ended up deciding that any Extra2 value higher than 8 should be watched for collisions (8 is not as it is the default Extra2 for "Enemy MEGA Turret", oddly enough). However, I still strongly discourage using Extra2 values below 1000 (besides, of course, 0-7), and even more so negative values: just like resource IDs below 128, using them is (let's sing it all together now) asking for trouble. In particular, you'll notice that by the previous logic, since Extra2 values are signed (including in my code), negative values are not going to be monitored for collisions by SMM (in fact, auto-background sprites use, strangely enough, -999).