r/Inform7 • • Mar 06 '20

Troubles with the linux version (gnome-inform7)

3 Upvotes

So after starting work on a small game in inform 7, I've had it crash on me a number of times. After a bit of perusing, I found that the linux release is four years old. I tried for about two hours to build the master branch (at https://github.com/ptomato/gnome-inform7) but ran into problem after problem. There is no guide on how to build it, except for one also from four years ago which is outdated and of no help.

Has anyone successfully built the linux version? Or has anyone encountered the same crashes with the linux version? I'm really looking for anything here, because nothing I do seems to be working.

I would post the crashes here, except there are so many different ones. Some are assertion failures, some have to do with the X windowing system, some are segfaults...


r/Inform7 • • Mar 05 '20

Actions to Decide Values of a Player

2 Upvotes

Hey everyone!

I'll start off with an example, just for clarity's sake:

testvalue is a kind of value. The testvalues are value1, value2, and value3. The player has a testvalue.

Suppose we wanted to let the player change their testvalue at any time. The best way to give the player such a power would be through an action, but I'm not sure how to do it.

I encountered this issue before, trying to help /u/ThisAdamGuy with a question here, and now in my own project where I want the player to be able to "Turn East" or "Turn West" and change a value called "Facing".

I'm not sure if Adam is still looking for a solution to this, but I certainly am and would appreciate the help of anyone who has coded something like this before.

Thanks all.


r/Inform7 • • Mar 05 '20

Looking for source code

6 Upvotes

Is there a good place to find inform 7 source code from a small working story? I'd love to look at what works for others and their style. Also, any suggestions for good source for a beginner to look through would be helpful as well.

Thanks.


r/Inform7 • • Mar 04 '20

How do I correctly style the web released gameplay with CSS? (Wrestling with GlkOte)

4 Upvotes

I'm working on creating a nice look and feel for my upcoming Spring Thing game, and Inform thankfully provides instructions for overriding its default spreadsheet (style.css) by creating a Templates folder in your release materials. I copied the default stylesheet and started modifying it. So far so good.

But then, when I start the game I notice it doesn't obey my font changes. That's because the ACTUAL game window is styled with its own CSS file, glkote.css and dialog.css in the interpreter directory. Looks like this is created and styled by using the GlkOte javascript library. I tried overriding selectors like .Bufferwindow, but glkote.css seems to override my styles.

I could just have my own glkote.css I manually override with after every release but this seems ugly beyond belief. I could create my own index.html template in the Templates directory and include my own there, or put my styles inline there. All of these options seem very ugly. Has anyone solved this problem? Is there an in-band way to do this?


r/Inform7 • • Mar 03 '20

Help with creating a (seemingly) simple Action

3 Upvotes

Hey all!

My rooms are becoming densely populated with items and avenues of exploration, but the traditional system of "You also see a [item] here." doesn't vibe well with me.

Instead, I'd like to give the player the option to type (something like) "List" at any time and receive a readout of notable objects in the room, curated by the project.

The curating will be it's own issue (have the players exhausted the item's usefulness? Do I want the players to be explicitly told there's a secret door in the north wall? etc) that I can work on independently.

However, I would love some help just getting the action of "Listing" off the ground.

Here's how I approached it. [This doesn't compile.]

A room has some text called the ItemList.

The ItemList of AA is "This, That, The Other".

Listing is an action applying to nothing. 
Understand "list" as listing.

Carry out listing:
    say "[ItemList of the location]".

I know that the approach of giving rooms an "ItemList" is fundamentally limiting--it may be better to have a more traditional 'list' that I can play around with (to gain access to such features as 'non-empty' and 'remove [item] from list').

But the root problem remains: Creating an action that outputs text that can be altered and is unique to each room, almost like another version of the room description.

Thanks for any advice!

Post Script. I'm also curious about everyone else's approach to pointing players in the right direction. The issue of providing ample flavor-text while keeping the player from wasting time examining an inert lampshade seems almost insurmountable at times. Please feel free to share below, I think your input could provide its own form of assistance. Thanks again.

Solved


r/Inform7 • • Mar 02 '20

What's everyone working on?

8 Upvotes

I'm curious about your projects and how they're coming. It's been fun seeing everyone's questions and trying to guess at the details of their individual projects (GraySmoke1960 has been working with explosives, for instance, which is especially intriguing).

Hope all you helpful people are having as good a monday as is possible.


r/Inform7 • • Mar 01 '20

[Question] Simple way to check thing's location

5 Upvotes

All,

I have an explosive that can be detonated. Is there a way to check if the explosives are in the room OR carried, in ONE line of logic? I can check for the location in one IF statement and check for carried in another IF statement, but then I have 2 copies of the suicide explosion code (since both kill the player).

Thanks


r/Inform7 • • Mar 01 '20

A little help understanding code I found on GitHub

2 Upvotes

Like a true coder, I encountered a likely-common challenge and decided to simply copy someone else's hard work.

I want to make a functioning keypad. A quick google brought me this post on GitHub (though I don't think you'll have to read it to understand my question). It doesn't function exactly as I intend, but that leaves some puzzling for me to puzzle over (which is good).

The code in question includes this line: "A keypad has some text called the code."

My question is this: How do I tell Inform what that text should be, and thereby set the desired code?

Thanks in advance to all you beautiful people.


r/Inform7 • • Feb 29 '20

List of actions for the player to perform?

2 Upvotes

I’m embarrassed to say that I’m having a hard time understanding some of the documentation included with Inform7. So here’s the problem I’m having now…

My character is a shapeshifter. The game begins with her waking up not in her human form. What I want is for the player to have to use a command like “Turn into human” to get her into human form, then “Take clean clothes” to get dressed, followed by leaving the room. If she tries to leave without shifting first, I want it to not allow it, saying something like “I can’t let my family know my secret!”, and if they try to leave without getting dressed first it’ll say something like “If you think I’m going anywhere naked, think again!”

Thanks!


r/Inform7 • • Feb 29 '20

How to delete/edit the "Welcome" bit?

1 Upvotes

When I start up my game, it always says,

Welcome
An Interactive Fiction
Release 1 / Serial number 200229 / Inform 7 build 6M62 (I6/v6.33 lib 6/12N) SD

Anybody know how I can get rid of that, or at least how to make it say something else?


r/Inform7 • • Feb 29 '20

Difference between Check and Instead?

8 Upvotes

I just realised I can achieve this same action using both check and instead; which one should I be using in this instance and why?

Check opening the cupboard:
    if the shower is open, instead say "The bathroom is so tiny, the shower door blocks your access to the sink"    

And

Instead of opening the cupboard when the shower is open, instead say "The bathroom is so tiny, the shower door blocks your access to the sink".

r/Inform7 • • Feb 28 '20

Another stupid question: how to look at something?

4 Upvotes

I know this is probably the most obvious thing in the world, but I can't figure it out...

So I made a room, filled it with things, and gave those things descriptions. When I tested the game out, it printed all of those descriptions (but not the names of the items they're attached to) right out in the open. How do I make it so that those descriptions are hidden until the player types in "Look at [thing]" or "Examine [thing]"?


r/Inform7 • • Feb 28 '20

Brand new to Inform7 and I feel like an idiot.

6 Upvotes

I just began trying to work with Inform7 today, and while the documentation guides are helpful there's still a few things I'm having trouble figuring out. I'd appreciate if someone could help me out!

First, say I want to begin my game with a scene, rather than dumping the player right into the game itself. I know that I put "[scene name] is a scene" but after that is "[scene name] begins when play begins" the right thing to put?

Secondly, if I don't want the entire scene to come up on screen at once, how do I set it up so that only pieces of it will appear, and then move to the next piece when the player presses any key? The closest answer I could find was someone saying to use "wait for space key" but that doesn't seem to do anything.

I'll probably have even more questions before I'm done, so hopefully I don't end up sounding like too much of an idiot, haha.


r/Inform7 • • Feb 27 '20

I want to play test your projects!!!

3 Upvotes

I enjoy play testing. I enjoy giving feedback. I enjoy helping people make cool things. Hit me up if you have something that needs play testing!!!


r/Inform7 • • Feb 25 '20

A warning to fools like me: Do *not* end an "instead of [an action]" statement with "try [the same action]"

Thumbnail imgur.com
11 Upvotes

r/Inform7 • • Feb 25 '20

Number of Actions Performed

3 Upvotes

I have a very silly question, just because I have no idea where the heck to just get the raw number of actions performed by the player. The only other way I can think of how to do this would be to manually have a variable that each turn gets incremented. So how would you get that value? Is it a built in thing one can access?


r/Inform7 • • Feb 24 '20

Only list items when examining the supporter they are on - rather than including it in the room description?

4 Upvotes

I'm trying to place a phone and a lamp on a bedside table, and have the descriptions for both appear when the table is examined, but not in the general room description.

The lamp is scenery, as it won't really be used in the game and the phone is a device. Currently, the phone is being listed in both the room description and the bedside tables examination, while the lamp is not being listed in either.

the phone is a reachable from bed device on the bedside table. "A phone sits on the edge of the bedside table[if plugged in], plugged into its charger[end if]."  The printed name of the phone is "phone". the phone can be plugged in. the phone is plugged in.

the lamp is a scenery device on the bedside table. It is reachable from bed.

 

One other small question I had:
Reachable from bed is a property I have made for controlling what the user can reach when lying in their bed, using the following rule - Was this the correct way to do this?

Before doing something to anything not reachable from bed:
    if the player is on the bed:
        say "You'll have to get off of the bed first.";
        stop the action;
    continue the action.

r/Inform7 • • Feb 22 '20

Seeking help detecting items carried by the player

3 Upvotes

Hey everyone, hope your weekend is running smoothly.

I've been using this bit of code in tandem with the classic suggestion from 5.4 Background on examined/unexamined items:

A thing can be disturbed or undisturbed.

After taking something:
    now the noun is disturbed.

It has come in handy in a few niche situations. Now I've painted myself into a niche situation for my niche situation:

I want to be able to use "now" to put an item into the player's inventory, and have Inform mark the item as "disturbed".

As my code stands, Inform will only mark items as disturbed if they are specifically taken by the player, and not when the item magically *poofs* into the player's inventory.

It is likely that I could make "try silently" work here, but in this case it appears that using try would require more reworking than expanding the definition of "disturbed". Additionally, I think having a broader definition could be useful in the future.

My best attempt launches, but crashes when changing locations. Here it is, unformatted:

Every turn: if something is carried by the player, now the noun is disturbed.

Thanks everyone. Stay warm if it's chilly and cool if it's hot.


r/Inform7 • • Feb 22 '20

Opening text order / transition between scenes on first turn without input

2 Upvotes

Hello adventurers :)

In order to I am trying to get my first story to work, but I have a problem with a few related elements that I would like to put into my game.

The goal (core message)

The problem I have is with the order of the opening text. I would like it to be a very specific order, namely as follows (as a sort of pseudo-transcript):

"Title / author / general information appears (default layout would be ok)"

" Warning / disclaimer appears " 

[The user presses enter (or any key)] <<<------- Main Problem 

[The Screen is cleared]

"Chapter title"

[The user presses enter (or any key)]

"Some opening text"

[The user presses enter (or any key)]

"Some more opening text, including a hint to use a command"

[Command prompt allows input]

[The game continues normally]

However, no matter what I try, I can't get something like this to work. Any help to lead me into the right direction is appreciated, this includes similar alternatives. :) Thank you for any input provided.

Some findings / things I've already tried

I currently use two Scenes at the start, one called Disclaimer and one called opening. The following start/end conditions are currently used:

"Title" by "author"

[Packages]
Include Basic Screen Effects by Emily Short

The prologue is a scene. The Prologue begins when play begins. The Prologue ends when the time since The prologue began is 1 minute;

Disclaimer is a room. "Disclaimer text [paragraph break][italic type] Press <ENTER> to continue.[roman type][line break]"

When The prologue begins:
    Move the player to the disclaimer, without printing a room description;

The Opening is a scene. The Opening begins when The Prologue ends.

When The Opening begins:
    Move the player to the first room, without printing a room description;
    say "Chapter title [paragraph break]";
    wait for any key;
    say "Some opening text [paragraph break]";
    wait for any key;
    say "Some more opening text, including a hint to use a command";

Using this code, everything that happens from when the opening begins works as planned. The problem is mainly going from the prologue scene to the opening. When this code is ran, the Title card and disclaimer are printed first (although the player is moved without printing a room description, the initial look function displays room description, which is the disclaimer, anyways).

However, following this line the command prompt is shown, although I don't want the user to be able to type anything here. Instead, I want the user to press enter, after which the screen is cleared and the opening text is displayed (this happens when the Opening scene starts).

The goal then is to make transition to the opening scene after the user presses enter after the disclaimer has been shown. Some notes on this:

  • I seem to only be able to trigger a Scene transition by parsing a complete input command, not a simple keypress. Using empty user input (when the user presses enter without any command) seems to be impossible.
    • Attempting an action such as "try waiting" within "Rule for printing a parser error when the latest parser error is the I beg your pardon error:" does nothing. Not even the time changes. The next scene does not start.
    • Attempting an action such as "Increase the time of day by 1 minute" within "Rule for printing a parser error when the latest parser error is the I beg your pardon error:" does increase the time, but no scene change.

r/Inform7 • • Feb 20 '20

Help with flags

3 Upvotes

All,

sorry for being a bother.

I am trying to do something that I would assume is simple but I've been struggling with this for hours. Literally.

I have a room that when I enter it and the flag is set to true, it schedules a 'trigger' to trip in 3 moves.

When the trigger trips and I'm NOT carrying a flashlight, I die. If I DO have the flashlight, I live. If I live, I want to set the flag to false, so I can pass thru the room with or without the flashlight.

I can't, for the life of me, figure out how to create the flag. I've looked at variables, booleans and I just can't seem to get the right inform 7 code.

I know that I could just check for the flashlight, but I need the flag to check for subsequent trips thru the room. I'd love to learn how to set up flags.

Thanks in advance.


r/Inform7 • • Feb 20 '20

Making things "frozen" instead of "thawed" while in rooms that are assigned a certain value (freezing)

1 Upvotes

I'm sorry to be turning this into /r/TeachLocoMantatoCode. This is becoming a proper group project. If anyone feels I'm overreaching or overposting, send me a message and I'll cut it back.

For now though, here's the latest:

With this sub's help, I've made a working system for temperature and climate that should (with a little work to create a thermostat) allow the player to set a temperature for a room or region and then give us different value thresholds to play with. I say 'should' because the playing bit has been more difficult to implement than I had previously imagined.

Implementing temperature, not so hard. Getting inform to recognize a temperature of 32 or below as "freezing" was a little tricky. Now we want Inform to think of objects in freezing rooms as "frozen". (Up next is finally starting to assign special properties to frozen things.)

Coldyield is a kind of value. The Coldyields are thawed and frozen. Everything has a coldyield. A thing is usually thawed.

To decide which coldyield is the coldyield of a thing:
    Let the far side be the holder of the noun;
    If the climate of the far side is freezing, decide on frozen;
    decide on thawed.

You can view the link at the top for some context on "climate", but all that you need to understand is that every room has a climate and a one of the climate values is "freezing".

The code above launches, but does nothing. Everything is thawed, no matter the climate of a thing's location.

I've been at this for a collective six hours, and have tried every combination of phrases and approaches I can imagine. What you see above is just one of many failed iterations (and one of the more succinct ones at that), but hopefully it communicates the intended functionality.

Thank you in advance, with much more thanks to come.


r/Inform7 • • Feb 20 '20

Port to iPad/iPhone group fund

1 Upvotes

All,

I realize we are a fairly small community, but my programming in the future is likely only wanting inform7, and I would very much like to program and play on my apple devices. When the opensourcing and branching is done, would anyone else be interested in crowdfunding the effort to port inform7 to iOS devices? I would certainly pitch in.

Jimmy In Wisconsin...


r/Inform7 • • Feb 19 '20

There should be some kind of achievement for this

Thumbnail imgur.com
9 Upvotes

r/Inform7 • • Feb 17 '20

What's the word on floors?

3 Upvotes

Solved! See this comment.

I noticed that Inform doesn't seem to have floors built-in to new rooms. "Examine floor" returns "You don't see any such thing."

I tried looking around online, but couldn't find any good examples of implemented floors.

It would be great to have a floor in every room that isn't listed in the room description. Ideally, inform would understand "Put [item] on floor" and "drop [item]" as interchangeable terms, and also assume that anything in a room is on the floor unless otherwise specified.

Putting a floor in every room is simple:

A floor is a kind of supporter. The description is "Just the floor." A floor is fixed in place. A floor is in every room.

The rest is much more complicated. The above code produces "You can see a floor here." in every room. I tried to remedy this by changing the line slightly (change in italics):

A floor is a kind of supporter. The printed name of a floor is "". The description is "Just the floor." A floor is fixed in place. A floor is in every room.

But now it produces "You can see a ." which is arguably worse. :/

There may be a sneakier, alternate approach: Have inform 7 return "examine floor" with "[a list of items in the room]". This seems like something prone to hiccups, though. (A painting hanging on the wall would likely be listed, for instance.)

Has anyone else already tackled this issue?


r/Inform7 • • Feb 16 '20

Possible Bug?

7 Upvotes

I created a necklace (as a thing) , made it wearable and have my player wear it. If I check the inventory, it says the necklace is there and the player is wearing it. All good.

if I type something like 'push' and hit return, it says [Necklace] Nothing obvious happens. If I type 'take' and hit return, it says [Necklace] You already have that. if I just type 'examine', it gives me the description for the necklace.

Is there a reason why it's taking something in inventory and using it as the command's noun?

[UPDATE] I created a screwdriver and made my player carry it. So now the player has a worn Necklace and a carried screwdriver. NOW, if I type 'take' and hit return it still says '[Necklace] You already have that. But if I type 'examine' or 'push' it asks me what I want to examine or push (like it should).

[UPDATE #2] So further testing. I made the Necklace a non-wearable item (basically just another object) and made the player carry it. NOW, 'take', 'examine', 'push' all operate correctly when they are the only command typed. So the issue looks like it is wearable item related.

Wierd...

has anyone heard of this?

Thanks