Problem with Cloak of Darkness specification

I don’t know how familiar you are with reading Inform 6, but the code you posted does prevent the player from dropping the cloak anywhere other than in the Cloakroom.

Removing the logic from the first branch of the if:

if (location == cloakroom) {
    ...
}
else
“This isn’t the best place to leave a smart cloak
lying around.”;

In Inform 6, a bare string which isn’t part of a statement means “print this string and return true”. Returning true from a Before rule prevents the action from taking place. So if the player tries to drop the cloak anywhere other than the Cloakroom, they get the message “This isn’t the best place to leave a smart cloak lying around" and the cloak isn’t dropped.

You are correct. I was mistaken about how the script worked. I looked at it and saw only the text and because I don’t know inform 6, I mistook the logic. It is humbling but I am glad for it. This exercise has been a great benefit to me and my attempt at rolling my own CoD.

Can the discussion of how to implement cloak of darkness according to its specifications be put somewhere else? (starting here and everyone’s messages after there except Matt’s, Josh’s, and Piergiorgio’s I believe)

edited out stuff from other thread

Probably could be. I wonder if there might be some possible way to flag a message for moderator attention…:wink:

Completely slipped my mind, sorry! I’ve done that

I think a new spec would still be useful in order to give game authors a better idea of what the existing systems can do - how many more complex things can they handle than Cloak of Darkness? Everyone “knows” that PAW/Quill/AGT have issues compared to Inform or TADS… but a new spec would make it more apparent as to what those issues are, and allow people to make a more informed decision. If you will permit me to analogize software to hardware, systems that can run Cloak of Darkness are your minimal Z3-capable systems, and systems that can run Hypothetical New Spec are Interactive Fiction Plus systems. Sure, to a layman, the games would look similar - but to someone at Infocom, they would very much care about the differences (I’ve been assigned a Z3 game, how does that constrain my narrative? I’ve been assigned a Z5 game, what features should I try and flaunt?) and this scenario is the one which modern IF writers find themselves - especially in this growing age of intentional creation of portable, retro text adventures. We “lost the sauce” a bit about portability and lower-end hardware in the 2010s compared to the IF Renaissance (first decade of Inform/TADS’ existence) due to the growing power of web browsers (even on mobile devices) and the sunsetting of lower-end devices such as PDAs and Kindles, but we’re now growing aware of it again. Heck, these lower-end systems (such as Adventuron) have been described as being more fun to write in than a larger system such as Inform, allowing for a renaissance of parser microfiction, and so I think it would be useful to be able to compare systems such as Adventuron, PunyInform, etc.

If z3 is the bar then a cloak of darkness revised would need to demonstrate something extremely challenging or fundamentally impossible in that system. For example the location description. This is one of first and biggest pieces of currency in IF. After reading this post I wanted to experiment and made this example. You are in a closet. The closets description conveys world state in the form of its color. The player can paint the closet a new color and change the rooms description. In my example I added a generic verb ‘paint’, and 3 generic nouns ‘closet’, ‘black’, and ‘red’. Then with 8 lines of rule logic I made this gameplay.

Yeah… I don’t exactly think Z3 is the bar, as Cloak of Darkness can be done in some “lesser” systems. Though this example itself is a great demo for something that many IF games might want. I wonder if some sort of table-checklist would be better for evaluating IF systems than a binary “Can it run this demo or not?” Scott Adams-esque games might not want variable room descriptions, but a system that can support such a dynamic world model is definitely a bar of its own (due to the storytelling and puzzle potential) and we need to be able to know what systems can do that or not.