I think I was going to use reserved pointers for accessing these values; for example, -10 (placed in any slot in a special node) might be substituted with the party's x coordinate while -11 is their y coordinate. Pointers do reference SDFs, so there might be a real SDF underlying the reserved pointer (in the 300+ range), but I think it might be better for the reserved pointers to access such values more directly. I think it depends whether we'd want to use the values in SDF calculations; though, if we do, we could have a special case for pointers whereby SDF coordinates -x,-x refers to the value of pointer x (so, -10,-10 is the pseudo-SDF containing their x coordinate).
There's at least a partial implementation of these pointers in the code; I'm not sure if it's actually being used in the special node logic yet.
I personally don't think it's a particularly great idea to be using reserved SDFs to store any sort of information. The game already uses SDFs with x-values in the range 300..310 to store settings, information about a split party, and possibly other data, but I think it would be better to move this data into a dedicated area so that the range 300..310 (and more!) can be freed up for use by scenario designers. Though of course, we can expand the SDF array in the other dimension too, which is probably more than enough for most uses you could imagine; but expanding in both directions may be better for SDF organization.
Other ideas for info to be made available:
- The current coordinate could in some situations be populated with the coordinates of a monster, for example if a node is called when the monster dies or when the party sees the monster. Or there could be a separate place for this information, if you think there might be cases when both details are useful.
- We could have special items (maybe even ordinary items) that, when used, require the player to target a space; then the targeted space would be made available in this way.
- The currently active creature (for "Affect PC" nodes).
- Current town and outdoor section?
Exile 2 Book of Items
(I didn't create it, I just converted it to HTML.)
"Man, I know how you feel. I once spent an hour playing WordPad before realising that it was a text editor." – Thuryl
"Dikiyoba just hopes no one ever blows up Saturn. Getting those rings back into their proper position would take hours."
"—Alorael, who spells phoenetically. No matter how much his orthography is a wreck, intelligibility rises from the ashes."
"I've never played a Spiderweb game. I didn't even know SW made games until I saw this thread." —Nikki