C. Everett's Problems/Questions (1 PROBLEM+0 QUESTION)

Erm. Yeah, it would, but you could if you wanted also have it execute a rule in the effects column; just add a line like “if the effect entry is a rule: follow the effect entry” to the rule that prints description texts.

Okay, well, let’s break it down.

The ultimate action the player is going to do to succeed, in both cases, is going to be downloading themselves into a body. So you need to have an action that allows him to do that. The action can check that an organic body or a robot body is available, and fail if it isn’t. Something vaguely like this:

Instead of downloading when the organic body is in the growth vat and the Galatea protocol is in an extension port that is part of the main terminal:
[winning stuff]

Instead of downloading when the android chassis is complete and the android is hooked to the computer:
[different winning stuff]

and then you’ll also want to give sensible messages when the player tries to download but the bodies aren’t ready. Like:

Instead of downloading when the organic body is in the growth vat and the Galatea protocol is not in an extension port which is part of the main terminal:
say “[something about having the body but not the protocol]”

And similar rules for having the protocol but not the body; or having the android chassis ready but not hooked up; and one more for the base case where the player isn’t ready at all:

Instead of downloading: [this rule is less specific, so it will only happen if the other two don’t]:
say “[message about not being able to download when there isn’t an available body]”

====

Okay. so that gives us our final success. How do we let the player get the bodies ready?

For the organic option, you’ll need an action for growing the body in the growth vat. Are you having the player press a button somewhere to activate this, or something along those lines? Whatever the action is, that’ll need to check that “pattern data” is inserted, and then it will need to create the organic body. So you’d want something attached to a rule about pushing a button (or whatever):

Instead of pushing the vat grow button when the pattern data is in the master terminal and the wet frame is in the growth vat:
remove the wet frame from play;
move the organic body to the growth vat.

and then some rule that tells the player about how he’s failed if he pushes the button (or whatever) when the wet frame isn’t there and/or the pattern data isn’t inserted.

====

To create the robot body, you’ll need to hook things up to one another with things like “ATTACH LEG TO CHASSIS” or whatever, and ATTACH ANDROID TO COMPUTER. “Attach” is defined by Inform as part of the “tying it to” action; if you don’t like that, you could create your own attachment verb, but let’s assume for now you’re sticking with tying it to. What I suggest is that you create some rules like

A spare leg is a kind of thing. (and then provide two spare legs in various places)

Instead of tying a spare leg to the android chassis:
now the noun is part of the android chassis;
if the number of spare legs which are part of the android is 2:
say “You screw in the second leg. Success!”;
otherwise:
say “You give the android a leg. Better, but he looks a bit lop-sided without a left leg.”

…and something similar for the two arms.

“part of” is an idea that Inform already has built in, conveniently; that means that once something is part of the android, it will always be visible when the android is, it’ll move around with him, and the player won’t be able to take it off again unless you make some further rules to allow that. And you can tell whether the android is complete or not by checking whether he has two spare legs and two spare arms. Maybe you might even write a definition at this point:

Definition: the android chassis is complete:
if two spare arms are part of the android chassis and two spare legs are part of the android chassis:
yes;
otherwise:
no.

…and that would make it easier to check that you have a full-model body to work with.

If that all didn’t make sense, let me put it this way: you have here not one puzzle, but three. There’s the master puzzle of downloading into a body, but then there are also two other puzzles involving prepping the two kinds of body to be downloaded into. If you apply to each of these puzzles the same basic structure I outlined, you should wind up where you want to be.

Good luck, and keep letting us know if you get stuck on specifics.

I have another problem, but this one is rather minor. I’m not sure how to word this code:

Instead of opening Sensitive Organics when the Bio Key is not in the player inventory:
	say "You need a Bio Key to open this.  Catherine had one.  It should be around here somewhere.". 

“if the player does not enclose the Bio Key” will check for cases where the player doesn’t have it.

I don’t have anything to add to emshort’s suggestions on the technical side, but just wanted to say that it sounds like you’re going to have a pretty cool game when you’re done.

@Endosphere: Thank you! I’ll be sure to put a link up here to the game when I’m finished.

Now I’m having trouble with the journal entries. Most of them spill out of the description column, and Inform doesn’t like it. Is there anything I can do to fix this without gutting most of my journal entries?

I think there’s something I’m not getting about the definition thing.

Definition: and2 is complete: if maniplimb is part of and2 and distancelegs is part of and2; yes; otherwise; no.

What did I do wrong?

(Maniplimb is a pair of arms, and distancelegs is a pair of legs. And2 is the android chassis. In case that’s not clear.)

Definition: and2 is complete: if maniplimb is part of and2 and distancelegs is part of and2; yes; otherwise; no.

There are two problems. One is punctuation. Semicolons are for ending a line; you need a comma between the condition and the decision.

The second is that “otherwise” isn’t needed in definitions. Each line in a definition is a decision. Here’s how it should look:

Definition: and2 is complete: if maniplimb is part of and2 and distancelegs is part of and2, yes; no.

You might find the syntax summary useful for these kinds of questions:

inform7.com/learn/documents/I7_syntax.txt

…I know I do!

–Erik

Thank you ektemple.

…Aaand now I’ve hit another snag. God. I’m feeling so inept today.

If and2 is complete:
	move and2 to Inventory;
	move Automa to on assembly platform.

I have a feeling “If and2 is complete:” is where the problem is. Is that it?

Yes, but not the only one. First, “if’s” are conditional statements that can only be used as phrases within some context (like a rule) otherwise inform doesn’t know when to check it. You need to tuck it into a rule (see below). Also, unless you have a room or container called “inventory,” the line “move and2 to Inventory” won’t work either; inform doesn’t recognize “inventory” as an actual place. Say “move and2 to the player” or better yet (since it’s clearer), “now the player carries and2.” Also, unless you have something called “on assembly platform” you need to change that as well (just get rid of “on”).

Since I don’t know exactly when you want this condition to be checked, and I don’t know what actions you have created, I can’t give you more specific advice. Assumming you have some sort of action which connects the various parts called, for example, “connecting it with” you could do something like:Carry out connecting something with: if and2 is complete: now the player carries and2; move Automa to assembly platform.If you still can’t get it to work, post the code for whatever action you’re using that you want to trigger the above behavior.

When you say the entries “spill out” of a column, I’m not exactly sure what you mean in a technical sense. What is Inform doing to indicate the program “doesn’t like” this (compiler error, strange in-game effects, etc)?

Don’t feel bad about that. Despite what the I7 documentation seems to imply, in my experience anything beyond the simplest declaration of a functional adjective is much more likely to work reliably and as intended if you phrase it as a “to decide” rule rather than a “definition.” You’re probably better off writing the rule this way:

To decide if (gadget - an and2) is complete: if gadget incorporates a maniplimb and gadget incorporates a distancelegs: decide yes; otherwise: decide no.
You would then want to write rules in this way:

[Insert your rule for doing something to an and2 here]: if the noun is complete: [do stuff]
etc.

Although it may not affect you in this particular case, complex “definition” phrasing often compiles fine but subtly fails to work, which can leave one scratching one’s head as one’s code grows in complexity.

I find this alarming, because definitions are in many ways more robust than “to decide” phrases, and they’re especially preferable in cases where you want to define a concept like “being complete”, where subsequently you might want to be able to refer to, e.g., “the list of complete androids”.

I know you may not have a good example to hand, but if you do run across some more cases where you think the definition is misbehaving, please do report it as a bug. (If it’s not a bug, just a misunderstanding, it’s possible that we could still use that report to refine the documentation a bit.)

A cursory scan of some of my older files didn’t turn up any surviving examples :frowning: , but I’ll keep your suggestion about making a bug report in mind for the future.

Seems like I had an issue with Definition too, and recently. This was right at about two months ago. I had done something like:

Volition is a kind. zen is [the non-]volition. Definition: zen is primed: no. Definition: a volition is primed if the sub-intent of it is primed or it is in-progress.

Note that the adjective “primed” is recursive on Definition, that its base case “zen” is put into its own line. IIRC, I had issues with this regarding either an infinite loop (which might have been my fault) or, when the subintent of a volition is zen (and therefore never primed), it was acting otherwise. I do remember I re-arranged it as:

Definition: a volition is primed if the sub-intent of it is primed or it is in-progress or it is not zen.

and got better results. Endosphere, you ever did something with recursion or separating out a particular instantiation like that?

I take that back. It was, IIRC:

The verb to be actualized by implies the incorporation relation. Definition: a volition is primed if it is not in-progress or it is actualized by something.

Which didn’t work as expected. But, it was “something”'s fault, not Definition’s. It actually works again if I had said:

Volition is a kind OF THING.

The “something” doesn’t catch stuff higher on the inheritance tree than Thing. So, false alarm, sorry.

…and the infinite loop:

Definition: a volition is primed if it is not in-progress or it is actualized by something primed.

… was my fault. (Note the last word in that code.) I don’t think Inform could’ve caught the problem there.

I do have a room called Inventory. I’m not sure I get the code you posted. Would that trigger the events I want when both sets of limbs are connected to and2? And I don’t think I have an action called connecting it with. I’m using “attach”.

Sorry. Here it is:

Table of Cath's Entries index title description -- "November 3, 20X3" "I've just arrived at the research facility. It's spartan, but it has the appropriate resources. I think I'll do just fine here." -- "November 9, 20X3" "Today, I was properly introduced to Richard, our robotics expert. He's a bit... messy, but amiable enough. I think I've made a friend."" -- "November 28, 20X3" "DATA CORRUPTED" -- "December 12, 20X3" "DATA CORRUPTED" -- "January 2, 20X4" "Most of the staff went away for New Year's, so I rang in the new year with Richard and the facility's resident A.I. He likes to be called Abe. I'm not sure why, and neither is he." -- "September 17, 20X4" "This is outrageous. The higher-ups are enacting a Crypt Protocol. They won't even tell us why, and I've got both Anima One and Two running live organics. I'll have to abort them both if they aren't finished soon." -- "September 27, 20X4" "DATA CORRUPTED" -- "October 13, 20X4" "Anima One managed to finish up, after some tinkering with the porccesses. I owe a lot of gratitude to Richard. Even though Anima Two wasn't able to finish before final Crypt Protocols, they both might've been lost if it wasn't for his help. He can hold his own when it comes to organics, it seems, and all this time I never had the vaguest idea. I'm ashamed to say I'm a little bit envious, as I can't manage a thing in his area of expertise." -- "November 3, 20X4" "Hard to imagine it's been just a year since I came here, and I'm already leaving. The organism from Anima One is finally able to walk on its own, so we need to leave. Hell, we should've left days ago. They never did tell us what the Crypt was for, but come late October, they didn't need to. It's just starting to get ugly out there... I'm naming the organism Quincy." -- "For Abe..." "We certainly got to know each other this past year, didn't we? Not nearly as well as I'd have liked, but I suppose there's nothing to be done now. I really wish we didn't have to put you in the Vault, but they sent a representative to oversee Crypt procedures. The most I can do is offer you a way out when, if, you ever wake up. You'll find everything you need in my PC's data ports, and in my desk. If you do decide to find us... be careful out there. --Cath"

You have one " too many at the end of this line:

--   "November 9, 20X3"      "Today, I was properly introduced to Richard, our robotics expert.  He's a bit... messy, but amiable enough.  I think I've made a friend.""

Wow. Just… wow. I can’t believe it was something so simple.

It’s working just fine now. Many thanks.

Alright. I’m 99% sure I have nearly everything done. Now I’m just working on some cosmetic things. Like:

If I want the opening text to display after the title and version stuff, how do I do that?

And these actually aren’t so cosmetic–

How do I make a room act as a ‘finish line’? You know, you enter it, you win?
How do I keep a certain character from entering a room?

There’s an automatic LOOK action after the banner, so you can fit text in between with this:

Before looking for the first time: say "And the adventure begins..."; continue the action.

You could use an “after going to” rule, but an every turn rule covers all methods of entering the room, even when you move the player there by hand.

Every turn when the location is the treasure room: say "Yay! You found the treasure!"; end the game in victory.

That very much depends on how you move the character around (I assume you mean an NPC). In general you can just block the character’s movement:

Instead of the robot trying going to the incinerator: if the player is in the location of the robot: say "The robot heads towards the incinerator, hesitates and turns around."
If you mean you have several player characters and some of them aren’t allowed to go to some rooms, you can do:

Instead of going to the incinerator when the player is the robot: say "You'd melt to death!"