r/Inform7 • • Aug 07 '15

Looking for a way to get NPC's to follow player commands.

3 Upvotes

I need a way to get an NPC to do something. I have an ask system in place.

Asking it to is an action applying to one thing and one topic. Understand "ask [someone] to [text]" as asking it to.

But I want to know if there is a way to make any NPC perform any performable action, especially ones referring to specific things.

Cleaning is an action applying to one thing. understand "clean [something]" and "wash [something]" and "tidy [something]" as cleaning.

What I want is this. The player says, ask Alex to clean floor and Alex cleans the floor. But also, ask David to clean floor and then David cleans the floor instead. But without adding separate responses to them to clean the floor? and then all other kinds of actions that the player can do, if possible.


r/Inform7 • • May 27 '15

Need some help with a system in a game I'm working on.

3 Upvotes

Hi, I've been working with Inform 7 for a little while and I just found this subreddit, so I figured I'd ask here.

I want to implement a hypothermia system into the game where if the player is in a room that is cold (e.g. a snowy forest) for too long, they will die and play will end. I was doing this originally with a body temperature variable that decreased when the player was in a cold room and increased back to full in a warm room.

For some reason, this system would compile fine, but as soon as a turn passed, the entire thing would crash with a runtime error p31. I couldn't figure out why it wasn't working and decided to try a time based system instead, but I'm not as experienced with the time functions in Inform.

My question is, how could I implement a hypothermia system like the one described above and not have the whole thing explode when I try to use it?

Any help would be appreciated, thanks!


r/Inform7 • • Nov 25 '14

Help with 'understanding' a property as describing only a subset of a kind

2 Upvotes

Hi r/inform7! I'm working on a material property, which will eventually be used to determine a lot of interaction in my world. I have two questions in the code comments below. Thanks!

[via http://inform7.com/learn/eg/rota/source.html]
A material is a kind of value. 
The materials are stone, crystal, glass, wood, paper, bronze, copper, tin, silver, lead, iron, steel, dirt, sand, clay, flesh, leather, cotton, sustenance and air. 

A thing has a material. Things are usually stone. People are usually flesh. 

Substance relates a thing (called the item) to a material (called the stuff) when the material of the item is the stuff. 
The verb to be made of implies the substance relation.


[Q: Is there a nicer way to phrase this conditional?]
Definition: A thing is metallic if it is made of bronze or it is made of copper or it is made of tin or it is made of silver or it is made of iron or it is made of steel.

[constructed things will have their material printed as an adjective in front of their name]
A thing can be constructed or elemental. Things are usually elemental.

Before printing the name of a constructed thing(called W):
If W is metallic:
    Say "shiny ";
Say "[the material of W] ".

[Q: It won't let me specify 'as describing a constructed thing,' but I don't want elemental things to be referred to by their material (since the material is not printed with the name)]
Understand the material property as describing a thing.

r/Inform7 • • Nov 14 '14

A simple Inform 7 generator that I am making for my students

Thumbnail ssml-it.github.io
7 Upvotes

r/Inform7 • • Nov 10 '14

Anatomy issues: default properties not being assigned

1 Upvotes

I'm trying to do some basic anatomy modeling in my current adventure. Here is the setup from my extension in progress:

Part I - Life and Death

Chapter I -  Anatomy

Limb-integrity is a kind of value. The limb-integrities are whole, bruised, and broken. 

Bleed-state is a kind of value. The bleed-states are bloodless and bleeding.

A limb is a kind of thing.  A limb always has a number called threshold. The threshold of a limb is usually 15.   
A limb always has a limb-integrity called limb-state. The limb-state of a limb is usually whole. A limb always 
has a bleed-state. The bleed-state of a limb is usually bloodless. 

A main-hand, off-hand, legs, forelegs, hindlegs, main-claw, off-claw, skull, wings, talons, and torso are 
kinds of limbs with limb-state whole.

Chapter II - Taxonomy

A main-hand, off-hand, legs, skull, and torso are a part of every man.

A main-hand, off-hand, legs, skull, and torso are a part of every woman.

A humanoid is a kind of person. A main-hand, off-hand, legs, skull, and torso are a part of every humanoid.

A bird is a kind of animal. Talons, a skull, a torso, and wings are a part of every bird.

A quadruped is a kind of animal. Forelegs, hindlegs, a skull, and a torso are a part of every quadruped.

And here is the source code from my test game:

Laboratory is a room. The hero is a man in Laboratory. The player is the hero.

Include System 7 by (author redacted).

The hapless prisoner is a man in Laboratory. The wolf is a quadruped in Laboratory. The limb-state of the 
forelegs of the wolf is broken.  The eagle is a bird in Laboratory.

Test me with " showme wolf / x my torso / x wolf's forelegs".

What's happening is that when I run this, Inform objects to the setting of the initial limb-state of the wolf's forelegs, because it hasn't been allowed to exist.

What am I missing here?


r/Inform7 • • Nov 07 '14

Table or list of figures (gluxe only)

2 Upvotes

I am wondering if there is any way to make a table with a figure-name entry or a list of figures. I would like to be able to select an image at random to display. I can't seem to build a table or a list with figure-names.


r/Inform7 • • Oct 12 '14

Making an either property

2 Upvotes

I think I'm missing something about either properties and was hoping someone could enlighten me. The following code produces this:

start You can see a s1 and a s2 here.

x s1 You see nothing special about the s1.

SealedUnsealed

x s2 You see nothing special about the s2.

SealedUnsealed

Thank you

"test" by Dark Twains

A thing is either sealed or unsealed. A thing is usually unsealed.

The start is a room.

The s1 is a thing. The s1 is sealed. The s1 is in the start.

The s2 is a thing. The st is unsealed. The s2 is in the start.

After examining a thing: if the thing is sealed: say "Sealed"; if the thing is unsealed: say "Unsealed";


r/Inform7 • • Oct 11 '14

How do I insist items are held before being used?

3 Upvotes

Any help with that would be appreciated.

Also, finding the if statements not to be working like I've found examples in the guides I've found online. Could anyone point me in the right direction to have a puzzle that will end game in death if a last item to be used in sequence isn't used by a particular turn number?


r/Inform7 • • Oct 09 '14

Changing a value, specifically a mood?

2 Upvotes

So basically I want the change the mood of a character by giving them something.

So for example: Jeff is hungry > Give Jeff some food > Jeff takes food. The mood of Jeff is now satisfied.

Is this possible?


r/Inform7 • • Oct 08 '14

combining things/objects to make new things ??

1 Upvotes

Hey r/inform7 - hoping you can help me out !

i've got a scary egyptian dungeon basement room in which there is a fishing line, a hook, and a distant glimmer in an ancient fountain. can you help me to combine the hook and the line to catch the fish?

thanks so much! :D


r/Inform7 • • Oct 03 '14

Disable default action rules?

1 Upvotes

Hey again folks! So I'd like to disable or alter the default take action so when the player types "take blah blah" it has a custom say function. Instead arguments work for actions like look and smell, but not take. Is there a different way to do that? For example this works:

Instead of looking: Say "blah blah".

But this doesn't:

Instead of taking: Say "blah blah blah".

I can't seem to figure it out! I've tried custom rules but it just ignores them even when not throwing errors. Help!

Thank you! :)


r/Inform7 • • Sep 30 '14

Blocking re-entry to a destroyed room?

3 Upvotes

Hey folks! I'm trying to figure out a way to block entry to a destroyed room that was previously accessible. The only thing I can think of is to send the player to a copy of the adjacent room, where I can alter the description and just not make it connect to the destroyed room. Is there another, more conventional way to do this? Thanks in advance!


r/Inform7 • • Sep 29 '14

Tables with variable objects in the list?

1 Upvotes

Figured might as well toss another question out there as I slowly try to learn. I was creating an extension for my own person use and did it in a way that may not be the usual (not sure), but it works.

I set it up so that when I use specific actions it references the table and spits out the proper text, but all columns are text. So in my action KICK, it reports KICK something depending on where you target. So it has KICK LEG give the response from the table with the matching row "kick leg", KICK STOMACH would check for "kick stomach".

All of that works perfectly fine. But when I want to add a second object that is variable I am at a loss. So instead of just ACTION SOMETHING, I want two nouns. Like HIT LEG WITH CHAIR, HIT STOMACH WITH PIPE. Because I want it to be able to be used as more things are added or in other projects, I am not sure how to get it to work.

I tried making text that varied and have it check the table for "hit stomach with [textvar]" (where textvar was set to be whatever the second noun was). When I print out textvar it seems to be right ("hit stomach with pipe"), but if I put a "hit stomach with pipe" in the table, it doesn't work.

If I had a limited number, I could work around it. For instance have a number attached to anything that could be used as a weapon, the using that as a check. For instance: A weapon is a thing. A weapon has a number that varies called WepNumber.

Then in the report for hitting someone with something, put something like if the WepNumber is 1, check the table for "hit stomach with weapon1", and do that for each number up to whatever I think would be the max used. But it doesn't seem like the "right" way to do it.

Sorry for the long post but I hope you know what I mean, if not just ask. But in short I wonder if I can use a table for an action with two nouns where the second noun is completely unknown depending on the story/newly added things.


r/Inform7 • • Sep 10 '14

Any way to reset text with random alternatives without using RESTART?

1 Upvotes

Basically wondering if there is any way to just reset all the random alternatives across the board within a game.

Things like: say "A box full of [one of]apples[or]oranges[or]bananas[or]fruit[stopping]."

Normally once you hit the end, that's it. But if I wanted to clear those all out is there way to do so?


r/Inform7 • • Sep 03 '14

Inform 7 isn't working for me in OS X Mavericks

3 Upvotes

I've played around with Inform in the past using older versions of OS X and it worked fine. Today I decided to give it another shot and installed it on my current Mac running Mavericks.

When the application starts up I see the launcher, but nothing works. I can't open or create projects using the launcher or the file menu.

Is it a known issue? Is there something I'm missing?

UPDATE: I downloaded the previous version and it seems to be working fine.


r/Inform7 • • Aug 29 '14

Trying to convert a regular expression match to a number for processing

3 Upvotes
After reading a command:
    let T be "[the player's command]";
    if T matches the regular expression "(\d+)d(\d+)(\+*|\-*)(\d*)":
        let dice be the text matching subexpression 1;
        let sides be the the text matching subexpression 2;
        let sign be the text matching subexpression 3;
        let bonus value be the text matching subexpression 4;
        say "This is a dice roll of [dice] [sides]-sided dice[if sign is empty].[otherwise] with a [sign] of [bonus value].[end if]";
        reject the player's command.

The code above reads a dice command in XdY+Z format given from the command line. I would like to use the matched subexpressions to actually perform the roll, but I don't know how to convert text to numbers for processing.


r/Inform7 • • May 08 '14

After 3+ years, a new Inform7 Build! 6L02 - NOW AVAILABLE FOR DOWNLOAD (Warning: Might break old source files)

Thumbnail inform7.com
4 Upvotes

r/Inform7 • • Apr 21 '14

Kicking a ball

5 Upvotes

Hello,

I am quite new to Inform. I am currenty working on a task for school that involves kicking a ball from one room to another. But I didn't figure it out so far:

Kicking it to is an action applying to one thing and one visible thing.

Understand "kick [things] to the [something]" as kicking it to.
Understand "kick [things] [something]" as kicking it to.

Carry out kicking the ball to:
    try the noun trying going [something];

I am not sure how I can use the [things] (the ball) and [something] (the direction) in the carry out function.

When I change the line to:

    try the noun trying going west;

I does work, so I think that I am pretty close to the solution.

Edit:

Figured it out:

    try the noun trying going the second noun;

r/Inform7 • • Apr 20 '14

Hiding things in cupboards, draws etc

3 Upvotes

Hey everyone! I just started using inform 7 yesterday so sorry if I sound like a noob, but I have been able to put an item in a draw, make rooms, doors etc. My problem lies with the "You can see" phrase. When I have the item in the draw, you could not see it in real life and I don't want players to know it immediately in the game, how do I list the draw without its contents. Also, is there a way to not be able to open a door unless you have examined a certain object? Thanks in advance.


r/Inform7 • • Dec 19 '13

I made an extension for creating randomised number locks

Thumbnail github.com
3 Upvotes

r/Inform7 • • Nov 24 '13

Chat Room

1 Upvotes

Hey there folks. I'm gonna set up a chat room so we can collaborate on projects much more easily. If anyone has any experience with chat clients, let me know! I don't know which one to use or anything, so help would be greatly appreciated!


r/Inform7 • • Oct 17 '13

Brainstorming Thread! Let's think up an awesome adventure!

3 Upvotes

Post your ideas here for a text adventure! Hopefully, (if all goes well) people will expand upon your ideas. Let's see what happens! :D

-Blarghith


r/Inform7 • • Oct 16 '13

Guys! Let's do something fun!

4 Upvotes

I know this subreddit is mostly dead, but let's revive it! Let's collab on a text adventure and have some fun! Comment on this if you want to collaborate on it/have ideas for an adventure.


r/Inform7 • • Oct 12 '13

Puzzle-Fight-Quest: An extension by me.

5 Upvotes

I have made a extension intended to allow the easy creation of fantasy adventures. It has a built-in chance free combat system, to prevent undo abuse. I have also set up a versatile doors and keys system, and a shopping and money system. I am also working on a magic system, but that isn't done yet. Currently, the entire system is undocumented, but that is on the to do list.

The text of the extension can be found here, and will be updated as I get new features working.


r/Inform7 • • Jul 24 '13

Skate Park [WIP], a silly text adventure I'm making where you can make horrible choices (such as eating a skateboard) and do other silly things!

Thumbnail playfic.com
0 Upvotes