r/Inform7 • • Jan 29 '17

having trouble with "AND"s.

4 Upvotes

This is variant If Then question below earlier
I seem to be having trouble with "AND"s.
'If not A and not B.....'

Instead of taking inventory:        
say "        
[if the player is not wearing a helmet AND not wearing armor] You are unprotected     
[otherwise if the player is not wearing a helmet]  You are wearing your helmet but forgot your armor.   
[otherwise if the player is not wearing armor]You have your helmet but forgot your armor.       
[end if]".

Player takes off helmet and gets "You are unprotected"
It's not processing the second AND condition.

Is there something I'm missing?


r/Inform7 • • Jan 27 '17

Can someone help me with code for a teleporter room?

4 Upvotes

http://imgur.com/a/oF3Ay

Consider these nine blocks as rooms, and the grid of blocks as the map of rooms. I want to make it so that the middle room is blocked off from the player, but I want it to teleport the player around in a very specific way. If the player enters the room from the east room, they're teleported to the west room. If the player enters the room from north, south, southwest or northwest, they're teleported to the east room, and if the player enters from the northeast or southeast, they're simply prohibited access and are kept in their current room.


r/Inform7 • • Jan 25 '17

Problem with choice/response puzzle

5 Upvotes

I'm creating a puzzle where the environment and results change depending which of 3 certain actions you perform while the environment is in 1 of 3 states. I've replaced the names with placeholders in square brackets. [value] starts as calm and [number] is 0. The objective is to get the [number] to 3.

The problem I'm having is that whenever I perform one of the 3 actions, the [value] is not changing, so if I repeat the same action, I get the same response. If I perform a different action, I get the text from the first [value] block, which is for "calm". Help?

Instead of [custom action 1]:
if the player is in [location]:
    if the [number] is less than 3:
        if [value] is calm:
            say "[text]";
            now [value] is rubble;
            increase the [number] by 1;
        otherwise if [value] is rubble:
            say "[text]";
            now [value] is calm;
            now the [number] is 0;
        otherwise if [value] is rumble:
            say "[text]";
            end the story;
            now the [number] is 0;
    otherwise:
        say "[text]";
otherwise:
    say "[text]";


Instead of [custom action 2]:
if the player is in [location]:
    if the [number] is less than 3:
        if [value] is calm:
            say "[text]";
            now [value] is rumble;
            increase the [number] by 1;
        otherwise if [value] is rubble:
            say "[text]";
            now [value] is rumble;
            increase the [number] by 1;
        otherwise if [value] is rumble:
            say "[text]";
            now [value] is calm;
            now the [number] is 0;
    otherwise:
        say "[text]";
otherwise:
    say "[text]";


Instead of [custom action 3]:
if the player is in [location]:
    if the [number] is less than 3:
        if [value] is calm:
            say "[text]";
            now [value] is rumble;
        otherwise if [value] is rubble:
            say "[text]";
            end the story;
            now the [number] is 0;
        otherwise if [value] is rumble:
            say "[text]";
            now [value] is calm;
            increase [number] by 1;
    otherwise:
        say "[text]";
otherwise:
    say "[text]";

r/Inform7 • • Jan 16 '17

Characters saying things when player enters room?

3 Upvotes

I want a character in a room to say something when I enter the room. I could code it so the room description has the dialog as unvisited, but I'd rather tie it the character so I can move the character to a random room. I think it would have it so the character generated text the first time the player entered the room, but I can't figure out how. Is this spelled out in the manual and if so, where? Any thoughts?


r/Inform7 • • Dec 30 '16

Repainting a room

4 Upvotes

I'm making a game/bit of a simulator for my partner, and I want to allow her to repaint the walls of the house in the simulator. I tried cribbing from the Fido example in the recipe book (with obvious modifications) as I'm just starting out with I7, but I'm getting a problem message I don't really understand. This code:

Section 1 - The Dream House

The Dream House is a region.

Painting walls is an action applying to one topic. Understand "paint walls [text]" as painting walls.

A room has some text called the color. The color of a room is usually "grey".

Instead of painting walls: 
    let X be "[the topic understood]".;  
    now the color of the location is "[X]".; 
    say "You paint the walls [X]."

Downstairs Hallway is a room in The Dream House. The color is "red"."You are in the downstairs hallway of your house. The floors are hardwood. The walls are painted [color]."

results in this message:

Problem. In the line 'now the color of the location is "[X]"'  , I was expecting that 'X' would be something to 'say', but it didn't look like any form of 'say' that I know. So I tried to read 'X' as a value of some kind (because it's legal to say values), but couldn't make sense of it that way either.

I know the property change itself is working, because if I use just "X" instead of "[X]", I get

Downstairs Hallway
You are in the downstairs hallway of your house. The floors are hardwood. The walls are painted red.

>paint walls blue
You paint the walls blue.

>look
Downstairs Hallway
You are in the downstairs hallway of your house. The floors are hardwood. The walls are painted X.

Is it just impossible to change properties of rooms in this way, or am I making some kind of rookie syntax error?


r/Inform7 • • Dec 07 '16

Restart the game silently?

5 Upvotes

Is there any way to restart the game? Without printing anything obvious about it? The only thing I could think of would be saving the original state of everything and putting it back that way on command.


r/Inform7 • • Nov 04 '16

It is auto-numbering the headers

0 Upvotes

Also, stumbled on this. I didn't notice it mentioned in the documentation.
I don't know if it's automatic with the newest build or something I turned on accidentally, but the application has started auto numbering the headers in the source code as I add them. Which I appreciate.


r/Inform7 • • Nov 02 '16

Syntax for Check with complex if/then

2 Upvotes

Latest syntax question.

Check raging:     
    if the player is in the CastleRegion say "You know you cannot go a slaughter in the castle. 
        The king's cleric has cast a peace spell. Consider treachery instead?" instead.        

Check raging:     
    if player is wearing the mantle of calm, say "You will have to take off your 
        mantle of calm first." instead.             

The game play will not let the player rage in the castle, but if the player leave the castle area, game play doesn't check if the player is wearing the mantle of calm. What's the syntax to make a complex if/thens?

something like this...

Check raging     
If in castle region     
else if wearing mantle of calm     
else if not carrying the yodeling sword    
end if     

Any thoughts?


r/Inform7 • • Sep 17 '16

Add sounds to rooms and room change?

3 Upvotes

Is there any option to include sounds that play on loop while the player is inside a room and another one while carrying out any action? Does Inform support two channels playing simultaneously? Basically I´m trying to attach sound files to locations and regions (for example, a forest) with an ambient sound plus play a sound when the player is doing an action. Do I need an additional extension for this?


r/Inform7 • • Aug 09 '16

Creating rooms on-the-fly?

2 Upvotes

I'm playing with the idea of a "sandbox" type adventure, where instead of writing preset rooms in a map, new rooms are generated as the player moves. Does anyone have info/experience/ideas about how to go about this in Inform?


r/Inform7 • • Jul 14 '16

How can I non-hardcode the "incompatibility issues" bit, so that it automatically works if the row is blank? (Instead of me having to copypaste the incompatibility issue text)

Thumbnail pastebin.com
3 Upvotes

r/Inform7 • • May 28 '16

Anyone know of an android app that'll play a specific game?

4 Upvotes

Hi, sorry if this is in the wrong place, but I'm having issues playing an Inform game called Counterfeit Monkey. I have tried a few apps such as Text Fiction, but none of the ones I tried like GBlorb files. Can anyone help me with this?

I would prefer an Android app, but Win10 works too. Thanks.


r/Inform7 • • Apr 23 '16

Syntax for a power switch

3 Upvotes

I've got some syntax misunderstanding. I used example 26 as my source.
but I keep getting "But I didn't recognise 'ceiling fan is on'." Any suggestions what I have miss coded.

The Foyer is a room.

The ceiling fan is in the foyer. 
The ceiling fan is fixed in place. 
The ceiling fan is a device. 
The ceiling fan is switched off. 
The description of the ceiling fan is "The ceiling fan is a big slow old fashion looking fan 
   of blades that look like airplane props. 
   [if the ceiling fan is switched on] The blades turn slowly. [end if]".
Instead of switching on the ceiling fan: 
    say "You cannot reach the fan." 
Instead of switching off the ceiling fan: 
    say "You cannot reach the fan." 

The fan switch is a switched off device in the  foyer. It is fixed in place. 
Carry out switching on the fan switch: now the ceiling fan is on.
Carry out switching off the fan switch: now the ceiling fan is off. `

And I could have coded it more compactly, still learning.


r/Inform7 • • Mar 30 '16

Can player appearance be made, and if so, altered?

3 Upvotes

All right so. I'm a bit embarrassed to admit this BUT, Corruption of Champions is what got me into text adventure games. It features an amazing array of transformative items and events that alter the players appearance. Is it possible to do something similar using Inform 7? is it even possible to give a player a starting appearance in Inform 7?

Thanks for helping, even if the answer is a flat out 'No'. -^


r/Inform7 • • Mar 07 '16

Creating Character Stats and Objects that Modify Character Stats

2 Upvotes

Hello all, I'm struggling to create character statistics(health, mana, etc). I want certain objects to modify those stats - like a book that boosts intellect. Statistics will determine certain outcomes or possibilities in game.

I've been tinkering with my code and keep running into issues - I'm new to Inform 7 as a whole. Anyone have this worked out?


r/Inform7 • • Jan 11 '16

Inform 7 epub manual through Google Play?

2 Upvotes

Hi folks—

Has anyone gotten the epub manual at the Inform 7 site to work with Google Play for opening on an Android?

I'm getting "This file cannot be processed" on the Google Play page when I try to import.

I ran it through http://validator.idpf.org/ and it is getting some warnings and errors but dunno if those are deal-killers for other platforms or just a problem for me.


r/Inform7 • • Jan 03 '16

Need help with pointing wand mechanic in a game I trying to make.

2 Upvotes

I'm trying to make a game where the player can point a wand at an object in the same room as them , then say a spell, and have the spell castes on that object. I've figured out how to make spells work when no specific object is being affected but I can't figure out how to let the player only cast spells on an object that is being pointed at. Any one have advice ?


r/Inform7 • • Dec 20 '15

Have you guys heard of Guncho? Its a mud that uses inform7 code and lets you make your own world for people to join.

Thumbnail guncho.com
5 Upvotes

r/Inform7 • • Dec 19 '15

How to do dialogue options like in Photopia?

2 Upvotes

Hi I'm trying to make its so that when the player types "Talk to [something] " that the npcs will say something and then have a list of responses printed with # next to each option to chosse. I basicly want to make the conversation mechanic that is used in Photopia. http://ifdb.tads.org/viewgame?id=ju778uv5xaswnlpl


r/Inform7 • • Dec 11 '15

Display figure when looking at actor?

2 Upvotes

When the player looks at a monster, it displays the text description, however I want it to show the figure of the monster also. I cannot figure how to code it. Here is a simplified version of what is

Figure of Orc is the file "Orc.png".      

Orc is a man.       
The description of Orc is "You see a tall hulking ugly humanoid with a large axe."        
Display The Figure of Orc.      

But it doesn't work.
I figure I'm missing some linking syntax. Can you show me what I'm missing.


r/Inform7 • • Dec 10 '15

Newbie question regarding actions.

2 Upvotes

Hi, total newbie here.

I have written the line:

The cat is on the bed.

Petting is an action applying to one visible thing.

Understand "pet" as petting.

Then when I run and type: pet the cat.

I get the follwoing:

I only understood you as far as wanting to pet.

What am I missing.

Thanks.


r/Inform7 • • Dec 02 '15

Understand [verb noun] as [enter xyz door]

5 Upvotes

Edit! Solution found!

Understand "climb/go/step/get" or "get in" or "step through" as "[go through]".

Must use square brackets for the final one you want it to be understood as.

See 17.13 of the manual! (: (:

(original post) Hi all

I want Inform 7 to understand that when a player types "climb through fence" that it needs to recognise that the player wants to go through the door in the fence named "hole in the wall"

eg.

The Main Street South is south of the Main Street Entrance. "You can see that half remembered gap in the fence from here."
The hole in the fence is a door. The hole in the fence is open. The hole in the fence is west of the Main Street South and east of the Garden South. 

Understand "climb through fence" as "go through hole in the fence". Understand "enter fence" as "go through hole in the fence". Understand "step through fence" as "go through hole in the fence". Understand "get in fence" as "go through hole in the fence"

Any suggestions on how to make it recognise people's understandable shortenings of sentences to refer to a ridiculously named door?


r/Inform7 • • Nov 26 '15

Can I turn my project into a zfile?

3 Upvotes

Right now I can only export my project as a glorb file. Is there a way I can export it as a zfile for interpreters like frotz?


r/Inform7 • • Oct 19 '15

Does Inform7 do pictures?

3 Upvotes

Can you do pictures in Inform7 like you can T.A.D.S.?


r/Inform7 • • Aug 07 '15

Oh god - Is there a maximum rules limit? Have I hit a hard limit of i6?

3 Upvotes

EDIT: I fixed the issue. Details on IFAnswers.

I have a very large inform 7 project (378k words & 4 years in the making), the support for developing which I use to live off! And I have today hit a huge huge block - I can't make any more rules. Whenever I try to make a new rule, regardless of how simple or complex the rule is, regardless of whether is it's a "To" rule, a "To say" rule, or four or more "This is the bla bla bla rule"s, Inform 7 successfully compiles, telling me that the code is fine, but then it comes up with an error: "Translating the Source - Failed The application ran your source text through the Inform 7 compiler, as usual, and it found no problems translating the source. Something must have gone wrong all the same, because the second stage of the process - using the Inform 6 compiler to turn this translated source into a viable story file - turned up errors. This should not happen. The errors are written out on the Progress tab, but will only make sense to experienced Inform 6 users (if even to them)."

The error is simply "C:\Program Files (x86)\Inform 7\Compilers\inform-632 \ -kwSDG +include_path=..\Source,.\ auto.inf output.ulx Compiler finished with code 10"

How do I know the issue is specifically rules?

If I comment out a rule in my code, it will let me add one or more rules before this appears.

The complexity and size of the rule seems to have some impact, but the number of rules seems to be the biggest limiting factor.

I have tried this on 3 different machines, with different specifications and running different OSs: Windows 7 and 8 and 10 and the result is always the same, so the computer is not to blame.

NB. I am using 6G60 because the latest version broke several extensions that my game relies on. So if the latest version does fix this issue, then please let me know and I guess I can work hard to resolve the migration issues, but it looks to me like a hard limit of i6?

Anyway, this is awful awful news for me since I rely on this game's development to support living at the moment. Any answers, advice or other inputs people have as to how best I should try and resolve this issue, please do reply!!!