Computed new value properties

I’m afraid you’re not going to be able to do this in the general case, i.e., you won’t be able to write an extension that one could just include that could automatically handle all the arbitrary kinds of things that a given story might have defined. With custom coding on a per story basis you should be able to.

See discussion at: Programatically printing all properties associated with object?. There’s a lot of introspection one might want that you can’t get.

I think it would likely be possible to do it by implementing another step between ni (the I7 compiler) and the I6 compiler that analyzed auto.inf and then generated more Inform 6 code that it would add to auto.inf. I’ve toyed with the idea. But it seems like a bad investment of effort given how unclear it is whether one would even finish such a thing before the next release of I7 not just broke it but utterly obliterated it.

2 Likes