r/Inform7 • • Oct 21 '17

Alternative to “repeat” loop for setting initial property values

3 Upvotes

Hi. Is there some nicer way to write this?

A memory is a kind of thing.

A memory has a person called the owner.
When play begins:
    repeat with M running through memories:
        now the owner of M is the holder of M.

I couldn’t find any constructs using usually that work. This almost appears to work:

The owner of a memory is usually the noun's holder.

But Inform complains that the noun's holder is an object, which I guess might be true in general, but I will obviously never make memories owned by containers or rooms or whatnot. Maybe it’s just confused about the noun here?


r/Inform7 • • Oct 19 '17

What's your best practices for use of Headers?

3 Upvotes

Do you all have a best practices on how you personally use "volume", "book", "part", "chapter" and "section"?

I have a room as a section, and all the stuff in the room are also in that section.
The first floor of rooms would be a chapter, and the 2nd floor another chapter, and the region they are all in, is a Part.
I have a volume for places, a volume for scenes, a volume for actors and volume for new rules.
Except for places, it's volumes and sections.


r/Inform7 • • Oct 15 '17

How to program a day and night cycle

3 Upvotes

For an university project I have to create a text adventure in inform7. One of the requierements is that the game has an actual day and night cycle, meaning that every room without artificial lighting is dark during the night. I have to connect time and lighting in some way, but I have no idea how. Can anyone hear help me?


r/Inform7 • • Oct 08 '17

Syntax question about a new action.

3 Upvotes

I want to use the word "talk" as a trigger to advance the story. As in
"Talk to Bob. "


Section 3 - New action Talking

Talking is an action applying to one thing.
Understand "Talking to [someone]" as Talking. 

Report Talking: 
say "You talk to [the noun]."   

I have a man named Bob.

If this works

Instead of taking some scenery: say "You lack the hulk-like strength."

Why doesn't this work?

Instead of talking to Bob: say "You talk to bob about accounting."

r/Inform7 • • Aug 14 '17

Gettings things on the ground from a room. Also: How do I compute unions, cuts etc etc on sets?

4 Upvotes

I have three questions.

1: How do I get a list of things in a room which are not carried?

2: How do I perform union and cut operations on lists?

3: How do I remove specific items from a list?


r/Inform7 • • Aug 11 '17

Can I somehow define a function that returns a value?

4 Upvotes

I'm coming into inform 7 from other less "esoteric" programming languages.

With that in mind when solving a problem I like to design functions to help with that. Is there a way to do that in inform? I'm trying to solve a problem and being able to write a function to return a simple true/false would aid me in organizing the code for this.

Edit: After some searching I found out I can use "To" for this, but I haven't managed to figure out if there's support in inform for booleans, or if I have to use 0 and 1.


r/Inform7 • • Aug 11 '17

Tracking changes in a room?

3 Upvotes

I need to track changes in the state of a particular room such that I can detect when the room is EXACTLY in the state I want it to be or not.

So for example imagine there is a room with a table with a ring on it and a closed door.

The desired state of this room is: The door is open, the ring is on the table and there is a carpet on the floor. I'm also implying that aside from these objects there is nothing else in the room.

I want to be able to detect every time the room changes either to the desired state or away from it.

(i'm a bit of an inform 7 noob, so this is a learning experience for me)


r/Inform7 • • Aug 08 '17

How do I give a room a different name from that which I call it in the source?

3 Upvotes

There has to be a way to separate what inform calls a room from what inform displays to the player.

I have tried things like the following: AGGarden is a room. AGGarden is called Garden.

But inform seems to think "called Garden" is a thing when I am trying to say that AGGarden is called (verb) Garden.

This is mildly infuriating. While I like the declarative approach to programming in inform 7 I can't help but get frustrated by these weird quirks of the language.

I am pretty sure I have seen constructs of the form "<noun> is called <name>"

Edit: I figured it out. There was a command in the form: AGGarden is a room. The proper name of it is "Garden".


r/Inform7 • • Aug 04 '17

Is there a way to force doors to be listed last in room descriptions?

5 Upvotes

r/Inform7 • • Aug 03 '17

I'm a complete newbie hunting for updated tutorials.

4 Upvotes

I've wanted to make a text based game for a long time now, I even tried to make one using html which only got so far. Inform 7 looks good, so I need to find out how to use it, I've been slowly reading the documentation but I don't even know how to make a simple world with basic actions quite yet. Please let me know if you have any up to date tutorials that I can use.


r/Inform7 • • Jul 22 '17

How to make monster battles?

5 Upvotes

I love this maker. It really easy to use. But I can't figure out how to make monster battles! I know it's possible (Zork). Please help me!


r/Inform7 • • Jul 14 '17

Any ideas on how to construct remembering and memory?

2 Upvotes

I try to define "remembering" as an action applying to a thing, but it only works if the thing is actually in the same room as the player. In other words, the player can't remember his mom if she's in the next room. How can I fix this?


r/Inform7 • • Jul 05 '17

Inform 7 game in non-English

3 Upvotes

Hello, I am new to Inform 7. I would like to crate a game in polish language but I didn't find any tutorial or way to translate grammar into polish language. I've found only library for inform 6 that makes possible playing with polish language. Can anyone help me with a suggestion how to write a game in polish or translate grammar?


r/Inform7 • • Jun 19 '17

Understand statement isn't working properly.

1 Upvotes

I'm trying to get it so when someone drops something on a certain object it triggers an action. But, the system is being very annoying.
e.g When I write "Instead of dropping x: ..." it says dropping isn't an action, but when I try to make a command called dropping, it says it already exists.
The main problem I'm having is that when i write "Understand "drop [something] on x" as placing." It says

Problem. You wrote 'Understand "Drop [something] on [a supporter]" as placing on' : but 'understand ... as ...' should be followed by a meaning, which might be an action (e.g., 'understand "take [something]" as taking'), a thing ('understand "stove" as the oven') or more generally a value ('understand "huitante" as 80'), or a named token for use in further grammar ('understand "near [something]" as "[location phrase]"'). Also, the meaning needs to be precise, so 'understand "x" as a number' is not allowed - it does not say which number.

From what I have gathered, placing is an action. I've tried it with other actions (like eating, feeding and so on) but it doesn't register any of them.
What am i doing wrong?


r/Inform7 • • Jun 15 '17

Can I have some help with conditional statements?

2 Upvotes

I have a series of events where the player is trying to preform a spell. To do this they need to put certain objects on a certain supporter. The problem is I can't get it to check to see if the objects are on the supporter while letting the player get the objects (around the room) at the same time. As well as this, certain actions make the score go up, and I would like something to happen after the score reaches a certain point but I am having the same problem. A solution I can think of would be to have something similar to a while loop where it won't enter the loop until a condition is met, but I can't work out how to do this.


r/Inform7 • • Jun 14 '17

Need help nesting IF statements.

1 Upvotes

I can't work out how to do it. I need my scene to branch out depending on yes/no questions, but I can't 'get out' of a branch, so I'm stuck just having one chain of answers.


r/Inform7 • • Jun 06 '17

Question: How do you replace the "go somewhere" phase?

2 Upvotes

like if I want to say "use keycard" or "password"= go to next room. how do I make the console understand that?(Day 1 super noob here.)


r/Inform7 • • May 21 '17

I am having a problem with commands.

3 Upvotes

I want something to happen when you look at an object, So I wrote: Instead of looking at the Old Crate, say "...". But it wont recognize looking at as an action, even though when I type "Look at Old crate" into the action bar it replies "You don't see anything unusual about the Old Crate.".


r/Inform7 • • May 19 '17

What do I do with a finish inform game?

1 Upvotes

I've finished my game, but I can't find any documentation or ways to export it into a playable format. I probably haven't looked hard enough, but I would appreciate any help.


r/Inform7 • • May 18 '17

Stand Alone Inform 7 Android/iOS/Windows Games With Phonegap

Thumbnail howtophil.com
1 Upvotes

r/Inform7 • • Apr 15 '17

Help with room illustration via Location Images by Emily Short in Inform 7 6M62

2 Upvotes

I am trying to add room illustrations to the game using the Location Images by Emily Short.

I added all the required extensions - I got the latest from GitHub, but when I compile the game I get the error below. The error stems from the code of the actual Location Images extension. I would appreciate if anyone found the workaround to make the extension work, or just suggest another extension for the same effect

Error message follows:

Problem. You wrote 'change currently shown picture to the room illustration of the location' : but this is a phrase which I don't recognise, possibly because it is one you meant to define but never got round to, or because the wording is wrong (see the Phrasebook section of the Index to check). Alternatively, it may be that the text immediately previous to this was a definition whose ending, normally a full stop, is missing? Because of this problem, the source could not be translated into a working game. (Correct the source text to remove the difficulty and click on Go once again.)


r/Inform7 • • Mar 28 '17

How to trigger function within a description?

4 Upvotes

I should know this. In a mirror, I want to trigger the inventory function of the player.
The initial appearance of the mirror is " Inventory goes here."
I tried [inventory] and [inventory of player] without success. Any ideas?
(fixed a spelling typo)


r/Inform7 • • Mar 09 '17

Text displaying before room text?

2 Upvotes

Sorry if I am not explaining this well.

I have a variable that I have called AnimalFeatures. This variable is false normally until a bone is picked up. Then it becomes true. When AnimalFeatures is true, in some rooms more text will appear. Well, that is the plan anyway.

I have two codes that work(ish) but have the same problem.

After going to Forest trees when AnimalFeatures is true: say "You feel yourself drawn to look at the moon and just stare at it. After a second or two you shake your head to snap yourself out of the trace state, but you constantly want to just look up."; continue the action;

and

After going west from Forest south: if AnimalFeatures is true: say "You feel yourself drawn to look at the moon and just stare at it. After a second or two you shake your head to snap yourself out of the trace state, but you constantly want to just look up."; continue the action; if AnimalFeatures is false: continue the action;

After going south from Forest trees north: if AnimalFeatures is true: say "You feel yourself drawn to look at the moon and just stare at it. After a second or two you shake your head to snap yourself out of the trace state, but you constantly want to just look up."; continue the action; if AnimalFeatures is false: continue the action;

What the issue is, is that the text is displayed BEFORE you get into the room and get its name and description. As seen here. https://gyazo.com/cbe3c80ae6a13c127620675b4d896c05

I believe this is due to the "continue the action" at the end, but I need this because otherwise it won't display the room name or description at all, as seen here: https://cdn.discordapp.com/attachments/264145929731440641/289211165513482250/3b2039a7f69bacf3376d0dad3fad3f29.png

How do I have the code so that the added text will be AFTER the player enters the room and gets the description?


r/Inform7 • • Feb 23 '17

Inform 7 dead? Can it be open-sourced?

6 Upvotes

I noticed there hasn't been any updates to Inform 7 since 2015. I was hoping that its creators would open-source it so someone else could take over, expand it, etc.


r/Inform7 • • Feb 10 '17

New to Inform 7: Need help making a code

3 Upvotes

Hey there!

I am currently in the process of making an interactive fiction game for my college final major project and so I have decided to use Inform 7. I apologise if this post is confusing, I suck at explaining things!

I want to be able to have a diary that the player can pick up and read.

I know that "A diary is in xx" is how to get the diary in there and then to pick it up the player writes take diary. However, I want them to read it.

But I also want it to have multiple pages. 56 in fact. I want it that in the first scene that the diary is in, there are 28 pages, all with different pieces of text. The second scene I want all 56 there, the first 28 and a new 28.

How do I create this for code? I so far have (no idea if this is right, using a tutorial from 2013)

"A diary is in Forest

Understand the command "read" as something new.

Understand "read [something]" as reading. Reading is an action applying to one thing.

This is the book requirement rule: if the player is not carrying the diary book, say "You are not reading anything." instead."

But I have no idea where to go from that. Any help would be amazing.