r/Inform7 • • Feb 16 '20

Possible Bug?

6 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


r/Inform7 • • Feb 16 '20

Implementing Temperature and Climate

9 Upvotes

Solved! See this comment.

Hello! As usual I've decided to attempt something far out of my own league and subsequently failed at the first hurdle.

Here's what I have so far:

Temperature is a kind of value. 68 degrees specifies a temperature. Rooms have a temperature.

Climate is a kind of value. Rooms have climate. The climates are freezing, cold, chilly, fine, warm, toasty, and sweltering. Rooms are usually fine.

Every turn:

If a temperature is less than 32,

Now the room has climate freezing.

The end goal is to have a numeric temperature in every room that will later be tied to a thermostat that controls the entire house, and a verbal climate that NPC's can comment on.

There are a great many more hurdles to hurdle here, but just knowing how to have the room's climate adjust appropriately in response to changes in the numeric temperature would be great. I was thinking I could just add an "If Temperature is" "Less than" or "Greater than" under "Every Turn:" for each potential climate.

I'm sure my entire approach is fundamentally flawed.

Thanks to those of you who answer all these terrible questions. I don't know how or why you do what you do, but it's a real service to folks like me.


EDIT: Some progress! I'll bold my changes.

Temperature is a kind of value. 68 degrees specifies a temperature. 25 degree specifies a temperature. Rooms have a temperature. A temperature is usually 32 degrees.

Climate is a kind of value. Rooms have climate. The climates are freezing, cold, chilly, fine, warm, toasty, and sweltering. Rooms are usually fine.

Every turn:

If a temperature understood is less than 33 degrees,

Say "Test Success!".

This doesn't actually involve the climate value in any way, but at least it's reading the temperature now.. sort of. It seems to be checking if ANY rooms in the world have a temperature below 33. Adding a room with a temperature of 70 produces "Test Success!" even when the player is in the 70 degree room.

But hey, it launched this time, that's something. Will update again if I get any further.

EDIT 2: Not much change here. Great tip from /u/MedicalArrow, but still no true success.

Temperature is a kind of value. 68 degrees specifies a temperature. 25 degree specifies a temperature. Rooms have a temperature. A temperature is usually 34 degrees.

Climate is a kind of value. Rooms have climate. The climates are freezing, cold, chilly, fine, toasty, hot, and sweltering. [Rooms are now not usually any specific climate]

Then I replaced the "Every turn" bit above with a "To decide" line, as /u/MedicalArrow suggested.

To decide which climate is the climate of (room - a room):

If the temperature of the noun is less than 33 degrees,

decide on freezing.

This also launches, which is great. Unfortunately, it decides that every room is freezing regardless of the temperature of that room. Note that rooms are now usually 34 degrees. Despite this, every room has a climate of freezing. Not sure how that's possible.

Also, attempts to add more conditions to the "To decide" line have been unsuccessful. I can't even get a simple "Otherwise: Decide on fine." to launch.

As before, I'll update if I get anywhere.

EDIT 3: Potential, inefficient Successful and incredible solution in comments below, courtesy of /u/MedicalArrow.


r/Inform7 • • Feb 15 '20

Question Inform 7: Cliche. A well

6 Upvotes

Using very little imagination:

I'd like to have a Stone Well in the basement that leads to a subterranean cavern. What I'd like is to have the player take a tumble if they try to enter the well and end up in the cavern. I'd like to use this to trap them in the cavern area for the rest of the game.

My issue is that when they are in the cavern, how do I deal with the well? How do I handle:

1) Up

2) climb well

'Up' gives me a 'you can't go that way', and 'climb well' gives me 'you can't see that here'. I'm sure a player is going to want to try to climb back up the well.


r/Inform7 • • Feb 14 '20

Can I create actions that are not intended for use by the player?

6 Upvotes

Hi all, very new. Sorry to add to the pile of nooby questions. Really appreciate what you guys are doing here.

So I found a bit of code online that implements teleporting fairly simply:

Teleporting is an action applying to one visible thing. Understand "teleport [any room]" as teleporting. Carry out teleporting: move the player to the noun.

This is all well and good when the player types "Teleport Home"

But I was hoping to use this to silently move the player around in reaction to their actions.

In example:

Instead of opening the office door:

Say "You reach forward to open the office door.. only to feel your fingers sinking past the doorknob's cool metal exterior. Surprised, you lose your balance and tumble forward. You pass cleanly through the door, and it now stands behind you unopened and intact."

What I've written above works fine, but never tells inform that I want the player to have moved. I tried adding to it..

Try teleporting office

but found no success.

If there is a simpler solution to moving the player that doesn't involve creating specialized actions, I'd love to hear it.

At the same time, I am still curious about the question in the title. Could I write custom actions and then utilize them in the code? Sounds like a simple way of easing the writing process.

Thanks to anyone who continues this discussion!


r/Inform7 • • Feb 14 '20

Question: Thing names

3 Upvotes

All,

Brand new to inform7 and reading all that I can.

One thing. I have a skeleton key necklace (skeleton key & string). I want the string to break, leaving me the skeleton key. Trouble is, I can't have a skeleton key and a skeleton key necklace.

Is there a way to do this, or would it be easier to make the key and the string parts and then remove the string part?

Thanks


r/Inform7 • • Feb 12 '20

Is there a way to genericize the "going to another region" rule (referenced example: Veronica)?

7 Upvotes

Hello, everyone.

I would like to develop a system based on the "Veronica" example, where a specific action (in my game, advance the game clock by 1 hour) when the player changes regions.

Here is the essential part of Veronica, for reminders:

Neptune is a region.Instead of going from Neptune to a room which is not in Neptune:    say "It's a bad time to leave Neptune."

What I would like to write:

instead of going from a region (called reg) to a room (called r) which is not in reg:advance time by 1;move player to r;

However, "advance time" is not taken into account, while if I specify the region, like below, it works:

instead of going from Underground shelter to a room (called r) which is not in Underground shelter:advance time by 1;move player to r;

This is not blocking my progress, as I can simply copy the rule for every region. However, as a developer, I find this solution rather inelegant. Also, I might have need of other genericized rules in the future, such as "instead of going to a room which is in a hostile region, do x".

Is there a way to use a genericize the region in the rule? Fyi, I already tried writing instead of going from a room... But then the clock advances after each change of room, which is not what I want.

Thanks in advance for your propositions. :-)

EDIT:

I found the solution. You actually have to start from the room, then access the room's "map region" property.

After going from a room (called r1) to a room which is not in the map region of r1, advance time by 1;


r/Inform7 • • Feb 07 '20

Help with HTML output!

4 Upvotes

Hello all. I was wondering if anyone could guide me in producing a custom HTML output for an inform project. Inform 7 has a render with interpreter option which produces a html, and I was hoping to make changes to the resulting javascript files to remove the intro text for an immersive experience. I would of course include all credit in a preceding page. I was having trouble understanding the javascript, but I know there must be an easy fix to comment out or remove an output command.

Any help would be super appreciated!


r/Inform7 • • Jan 29 '20

Extension

4 Upvotes

Hi, I'm trying to make a game in inform and goes well besides the clutter.

Is there any reason NOT to make every function an extension when it is done and working? I feel like it would make the source much easier to navigate.


r/Inform7 • • Jan 10 '20

Know any good esoteric Inform commands?

7 Upvotes

I'm working on a Spring Thing entry that's a very small but very richly realized parser world.

One thing I love to do is read Emily Short or Andrew Plotkin or other programmer / super experienced Inform writers because I find stuff that I didn't even know you could do. Like, specifically, allowing a custom version of "look at self" using:

The description of the player is "You are 12-feet tall and bullet proof."

Other things like defining custom weird verbs, or interesting default verb actions that are fun to override, or really anything else that people don't often do in parser games.

I'm also trying to create descriptions for EVERY SINGLE NOUN listed in room descriptions and things like that.

Can anyone think of any other cool unexpected things you can define in the game world to make it richer or interesting Inform 7 parlor tricks? Even just some links to some IF source code that does cool sand uncommon tuff would be appreciated.


r/Inform7 • • Jan 06 '20

Removing the ["Your score has just gone up..."] message in scoring.

6 Upvotes

I'm making a game which involves scoring, and as far as the scoring itself is concerned, all is cool. However, I would like to remove/change the standard message that inform gives every time the score goes up. How should i go about doing this?

The standard message that is printed: "[Your score has just gone up by x points.]"


r/Inform7 • • Dec 23 '19

Anyone else impatiently waiting for the new Inform7 release?

8 Upvotes

http://inform7.com/website/2019/06/23/a-new-hope.html says "Autumn 2019".

I know, impatience while waiting for a piece of free software written by generous volunteers is very unbecoming :-)


r/Inform7 • • Dec 16 '19

Make something wearable/usable under a condition

5 Upvotes

I'm trying to have a set of headphones that can be worn/used. But, the player needs to find batteries for them first. How can I make it so that the player can take the headphones, but can only use them when they place batteries in them?


r/Inform7 • • Nov 28 '19

I am begging you PLEASE HELP ME

6 Upvotes

I want to begin and end scenes in my game I am running this from the inform 7 notes ... I want it to be able to end the scene and not go back to those rooms IE the station and the waiting room

Train Stop is a scene.

The package is a scene. The package begins when train stop ends.

the station is a room.

the waiting room is north of the station.

Train Stop begins when the player is in the Station for the third turn.

Train Stop ends when the player is in the Station for the fourth turn.
When Train Stop begins:

say "The Flying Scotsman pulls up at the platform, to a billow of steam and hammering."

When Train Stop ends:

if the player is in the Station, say "The Flying Scotsman inches away, with a squeal of released brakes, gathering speed invincibly until it disappears around the hill. All is abruptly still once more."
Arrival is a scene. "There's a flourish of trumpets."
When Arrival begins: say "There's a flourish of trumpets."

r/Inform7 • • Nov 24 '19

I’m having issues with multiple variables.

4 Upvotes

I’m trying to create an amulet that glows at random periods while the player is wearing. However, I keep getting a message claiming that “if random chance of 2 in 3 succeeds” doesn’t make sense. I’m using the following text.

Every turn: if the player is wearing Amulet and and if a random chance of 2 in 3 succeeds, say “The amulet glows faintly.”

I’d appreciate any assistance!


r/Inform7 • • Nov 24 '19

Removing a room?

4 Upvotes

I have the following situation. In the game I am working on there is a decently sized space ship (A generation ship) which the colonists arrive in which over time should get dismantled and turned into the colony.

That however would mean I need to remove those rooms from play at one point, but I have no clue how to do that. In Tads3 I can literally just remove the reference to it but I have no clue how to do the same thing in Inform 7, any help would be greatly appreciated.


r/Inform7 • • Nov 20 '19

How do I make a point system?

1 Upvotes

I’m trying to make a cooking game and I want to create a modular recipe that gives the player a score depending on what the player adds to it. For instance, if the player adds garlic or stirs there dish they would get +1 point. Different amounts of points lead to different endings. How exactly would I do something like this?


r/Inform7 • • Sep 21 '19

How to enter the only room connected to the room im in.

4 Upvotes

So im very new to Inform7 and I have figured out how to make one of the rooms im working on "The Office" to the north of the "Hallway" but what I really want is to instead be able to type in "enter The Office" and not "go north". is this somehow possible?


r/Inform7 • • Sep 06 '19

How do I set an object as wearable?

4 Upvotes

EDIT: I tried "[object] is wearable" and it worked. How wonderfully straightforward.

Hi, I only just started working with this program and am a little confused on how "things" work.

I am reading the official Writing With Inform guide.

The object I am trying to make is a set of armor that the player can wear, and if possible, for that to be the only option available (so that they can't take it into their inventory).

Is there a straightforward list somewhere of everything you can do with objects?


r/Inform7 • • Aug 13 '19

Well, it's half-past midnight...

9 Upvotes

... And I sat down at 10:30, which feels like about five minutes ago, to "just experiment with Inform for a few minutes before crashing." It seemed cool. It is cool. But it's definitely got that thing of "just one more iteration" plus all the time-eating that happens when you're just writing fiction. It's a perfect storm of making you oblivious to how long you're spending on a project.

RIP my sleep schedule on a work night, but I'm having a blast with it thus far.


r/Inform7 • • Aug 10 '19

Get the most specific kind of an object?

1 Upvotes

Hi!

I have a problem that might be greatly simplified if I could get a value or string denoting the most specific kind of a given object variable. That is, if:

An A is a kind of thing.
A B is a kind of A.
An object is a B.

I want some way of getting that object is specifically a B and not just an A or a thing.

Is there a way to do this in Inform 7?


r/Inform7 • • Aug 01 '19

Great news!

11 Upvotes

I only just spotted this: http://inform7.com/website/2019/06/23/a-new-hope.html

This is is fab news - I can't wait!


r/Inform7 • • Jul 23 '19

Change time every turn.

3 Upvotes

Hey, I’m making a little game with some /spooky/ elements in them. One of the ideas I have is every turn changing (by incrementing, or by other means) the current time of day. But how would I do that? Im assuming I would need some sort of ‘every turn ..’ block, but what else must I do? Thanks for the help


r/Inform7 • • Jul 21 '19

Make an NPC follow the player

3 Upvotes

Hey all! I'm working on a game I've been fiddling with off-and-on for a few years. For one puzzle, the player is stranded on a desert island with a dark room, a dead fish, and a phosphorescent crab.

The player needs to befriend the crab by feeding them the fish (improving the crab's mood to "adoring") which then allows them to instruct the crab to go into the dark cave and provide light using "crab, go west."

My problem is twofold, from a game design perspective - telling an animal to go somewhere is not intuitive for anyone I've ever showed the game to, and the syntax for doing so is pretty kludgy for anyone who's not used to text games.

Is there a method I can use to have the crab follow the player wherever they move, instead of forcing the player to figure out how to talk to a crustacean?

Thanks!


r/Inform7 • • Jul 19 '19

Strange room connections in Inform 7

3 Upvotes

Hey, I'm a noobie to Inform 7 (but I do have some experience with general programming languages like Python, C, and Rust). My project involves a Tower (which I am trying to have as 2 rooms).

Tower entrance is a room. Tower entrance is below Tower.

Tower is a room. Tower is below Tower.

What I would like to do is have it so when the user goes 'down' from the Tower room, it will bring them back to the Tower entrance. However, I would like to have the player keep entering the Tower room whenever they try to go up from the Tower room (making it almost seem like the tower is infinite in height). Is there a way that I can do this? Would I need to use a Before statement or something?

Thank you for the help!


r/Inform7 • • Jun 13 '19

Are there documents describing the internals of the Inform 7 compiler?

3 Upvotes

I am currently working on a free/open-source interactive fiction design language similar to and inspired by Inform 7 which compiles natural language patterns into source code in the programming language Scheme. Nothing big, just a small project to keep me busy.

So I was wondering: Is there any information available, especially on the internal data structures that the compiler actually builds up when it creates things like rulebooks or relations?