Okay, so I admit I’m a total newb/noob/n00b/newbie <==== [choose your preference.] I just started designing and Inform 7 about 3 days ago, and it took me hours just to figure out how to have the command “go to the door” replace “go to [specific door name]”.
So I have four issues so far with this program that I have not been able to get over, but here are my basic newbile questions. I’ll start with my main one:
1.) Is there a way to generate items? I don’t mean create items, but actually bring non-existent items into play as an effect. The closest thing I saw to this was in chap. 8.10, on removing things from play, so you can have on-stage/off-stage. I could just make an off-stage item and bring it on-stage, but what if I don’t want a set number of items? E.g., what if I wanted to make a soda-dispensing machine that could theoretically generate an infinite number of soda bottles? I’m asking this because I wanted to make a coffee shop, and I didn’t like the money system they have built in for “Ex. 253 - frozen assets” because you have to take something already on the shelf in order to buy it. You can’t, say, type command in “small” and generate a small coffee. I tried creating a table (basically on the same model from “Ex. 362 - complementary peanuts”) and added entry that lists items, with something like “now player has/carries x entry.” As I expected, it didn’t really like that too much. I’m guessing partly because the item must already be located somewhere in play. But like I said, I really don’t feel like making a limited number of extra items somewhere inaccessible in play. Am I missing something here?
2.) nested ifs - this has been my biggest frustration with Inform 7 so far. I must be missing something, because the colons feel pretty useless. I miss programming with Java, where a nested if is a nested if. For whatever reason, Inform hates me when I try to get it to produce multiple effects. For example, let’s say I have something like this:
if player’s command is topic entry:
if the price of money is less than m entry, say “Sorry bud, you don’t have enough money for that.”;
otherwise:
decrease price of money by m entry;
say “[commentary entry][line break]”;
now player has x entry;
rule succeeds;
I can get it to work one of those effects without the colon. but not all of them. I keep running into this problem. I had to get around it with inefficiency by making phrases, like so:
Understand “go to the door” as door finding.
Understand “go to door” as door finding.
Understand “open the door” as door finding.
Understand “open door” as door finding.
Door finding is an action applying to nothing.
Report door finding: if the player can see a closed nWi door, declare dooring; otherwise say “Where’s a closed door? You’re losing your mind.”
To declare dooring:
if the location contains exactly one closed nWi door, declare doooring;
otherwise say “which door do you mean? There is [list of doors in location].”
To declare doooring:
if the location contains a nWi door (called target), try opening the target.
Again, I must be missing something. It seems silly that I have to make two phrases instead of doing nested ifs. What the heck? What’s the point of the colon if Inform gets mad at me every time I try to use it?
3.) pockets so another thing I’m really struggling with is trying to create pockets on clothes. I’ve made pockets. But what’s really dumb is I cannot seem how to include pocketed items in take inventory. More importantly if I put something in a pocket, then I cannot take it out unless I say command “take [something] out of [pocket name]”, and if I’m wearing a jacket with a pocket + pants with two pockets, this can be a hassle. I’m trying to make some basic take-out commands. Understand “take [things inside] out of [something]” as removing it from. <–so far so good. but the issue is when I need to supply a missing second-noun, which searches through all the containers I’m wearing and takes it out. Actually, I’ve been able to do this, but where I’m stuck is if I need to take all the container component parts of clothes out.
Understand “take [things inside] out” as taking something out.
Understand “take out [things inside]” as taking something out.
Taking something out is an action applying to one thing.
[all the remove it from checks]
Carry out taking something out:
try removing [things inside] from [every container object player is wearing/carrying + every container object that is a part of the object that the player is wearing/carrying
so the problem (to start with) is I cannot seem list all container parts of things worn by the player.
HELP!
4.) conversations last but not least. I would love a simple answer to how to make changing state conversations. So for example if I answer a particular command that matches the topic entry, how can I have the effect be to switch to another conversation table, or change the command prompt, etc?
5.) Okay one last question. If there’s a great downloadable Inform 7 source code that answers any of the above questions and more that someone could recommend, I would really appreciate it. thanks
-P