Can anybody point me to the code underlying the I7 debugging command “showme”? I’d like to be able to generate a list of all object in a game, along with their properties and attributes. I’m thinking about this in the context of wanting to be able to save state for a web-based game, where this (and perhaps knowing the current scene) would be enough to allow save/restore, rather than taking a snapshot of the entire VMs memory. I suppose I’d want to package all this up as JSON and squirrel it away somewhere.
I have a very concrete understanding of how this worked with I6 --it is laid out in the showobj routine in parserm.h. I wish I could just plunder that code, but according to the I7 documentation, objects, their properties, flags, etc., aren’t stored in the same way in I7.
In I7 I can repeat with item running through objects in the game and figure out containment (holder of the item), but I have no idea of the arcana needed to comprehensively list their associated attribute and properties.
[But what about globals? Well, I’d just tuck them into some convenient dummy object “The gameState is nowhere. The gameState has a number called ennui. The ennui of the gameState is 5., etc.” I suppose score, turn count, etc., could be tucked into that object as well at the end of every turn.]
Thoughts? Thanks - Jack