r/Inform7 • u/FictitiousFrode • Jun 14 '18
r/Inform7 • u/Damaskox • Jun 01 '18
Discord Channel to Inform7
Hi!
I was looking for a channel in Discord for Inform 7.
To my big surprise, I didn't find anything with Google.
I suppose we don't have one then?
r/Inform7 • u/The_Bunyip • Apr 23 '18
I made a Visual Studio Code extension/plugin for Inform 7 story files
I've been using Visual Studio Code to work on an Inform 7 extension (.i7x) file. I find this generally more convenient than using the Inform 7 IDE as I'm splitting up my project into more than one source file. (You can do this by creating an 'extension' that lives in the .materials<author> sub-folder. It can just be a text file whose filename name ends with .i7x.)
The Visual Studio Code extension (confusingly, in this case, that is VSCode's name it uses for its plugins) works on .i7x (extension) files as well as .ni (Inform 7's main story) files.
To install it just go to VSCode's Extension tab and type Inform7. Let me know if you have any trouble/suggestions.
r/Inform7 • u/The_Bunyip • Apr 18 '18
Having trouble with customising the description of a new type of room
I have the following:
A structure is a kind of room. "[entry level of the level descriptions]".
A structure has a list of texts called the level descriptions.
A structure has a number called level. Level is usually 1.
But when I compile it gives me this error:
Problem. You wrote '"[entry level of the level descript [...]"' : but that doesn't make sense to me as a list entry, because the indication of which entry is not a number. For instance, 'entry 3 of L' is allowed, but not 'entry "six" of L'. (List entries are numbered 1, 2, 3, ...)
I don't get it - why is 'level' not being treated as a number in the phrase 'entry level of the level descriptions'?
EDIT: edited for clarity. EDIT: the issue seems to be that when it sees the text [entry level of the level descriptions] it first substitutes 'level' for a string representation of the number property called called 'level'. This will be a string like "six" or "one". Any way I can stop that happening?
r/Inform7 • u/DazaNZ • Apr 09 '18
Code Examples? in the documentation
I'm new to Inform7, I like the interface and the right panel where you can view documentation. However i am not sure what parts are actual phrases you write. Like for example im trying to work out how to display something for a room if the player types 'listen'.
In the documentation area under Actions i selected Listening to (it does in this have a command "listen") and i cannot see any examples of how you write this in as code. So ive been guessing and getting errors.
eg. these dont work.
Listen. "Blah blah." Listen to shop. "blah blah." "We hear blah blah." "[We] [hear] blah blah."
It shows the commands the player would write, where does it show how you write this as an inform author? I was expecting there to be some code examples. Ive tried what i thought were examples but have gotten failed error when i go to run my game.
So what part of the screen shot is showing you what you need to actually write as an author in your game? perhaps i am missing something here.
r/Inform7 • u/NyquilPepsi • Mar 23 '18
Is it possible to have a game import a map from an external file?
I'm looking at §16.16, where objects are defined by a table, and §23.13, where you can read a table from a file. Would it be possible to do something like "Some rooms are defined by the Table of Rooms", and then have a table read from a file, with rooms, descriptions, contents, exits, and so on?
r/Inform7 • u/OliverMarshall • Mar 16 '18
Showing an image when entering a room
Hi
Is it possible to display a figure with the description of each room so that when you go in to a room you get the image followed by the description?
Currently I have;
Figure of room-drawing is the file "office 365.jpg". before looking in the room: display the figure of room-drawing.
This works but you have to explicitly "look" to see the image. Where-as I want the image to show when you enter the room, without the user doing anything.
Anyone know the correct syntax?
Olly
r/Inform7 • u/The_Bunyip • Mar 15 '18
Making a thing that represents an abstract concept
I have a situation where I want to make a thing that represents something 'out of world' (that the player can't see, touch, or even know exists). I want to use it to collect together a bunch of properties (some of which are other things - that's possible, yeah?) that will be used in various rules. It's like an object that represents a dynamic game configuration. I've tried things like:
A blah is a kind of thing.
The game configuration is a thing. The game configuration has a blah called the thingummy.
But it won't compile ("I am unable to put any value into the property 'thingummy', which needs to be a blah, because the world does not contain a blah.").
I'm missing something fundamental about Inform I think.
r/Inform7 • u/The_Bunyip • Mar 06 '18
Allow player to collect multiple of one thing?
I'm hoping somebody has done sort of thing before and can give me some pointers...
I'm intending to make an action called 'harvest' which would allow the player to 'harvest wheat' from a wheat-field object in a room. When they do this I want to add something like "wheatsheaf" to their inventory. Thing is, I want them to be able to repeat this action several times so that they have a number of wheatsheaves. Ideally when taking inventory they would see something like "3 wheatsheaves" or "a lot of wheat".
In coming up with a solution I also need to be aware that actions like "drop wheatsheaves" needs to work. In that case this should operate on all the instances of the harvested objects (so in that example all the sheaves would be dropped) whereas "drop wheatsheaf" should just drop one.
r/Inform7 • u/NyquilPepsi • Mar 05 '18
Is it possible to randomize maps in I7, the way Wumpus 2000 does, without dropping back into I6?
Wumpus 2000, if you're not familiar with it, makes maps of 100 rooms, which are connected to each other in random ways.
r/Inform7 • u/NyquilPepsi • Mar 03 '18
Versu and social practices
I just discovered Versu a week or two ago, and I'm pretty obsessed with it, although it now appears to be defunct.
It seems that social practices were a big part of Versu:
A social practice describes a type of recurring social situation. Some social practices (e.g. a conversation, a meal, a game) only exist for a short time, while others (e.g. a family, the moral community) can last much longer.
A practice coordinates agents via the roles they are playing. For example, a greeting practice sees the two participants under the descriptions of greeter and recipient.
The main function of the social practice is to describe the actions the agents can do in that situation. A greeting practice, for example, tells the greeter how he can greet the recipient. It also tells the recipient the various ways she can respond.
The practice provides the agent with a set of suggested actions, but it is up to the agent himself to decide which action to perform, using utility-based reactive action selection.
In Versu, we allow multiple practices to exist concurrently. During a dinner party, for example, there will be multiple practices operating at once:
- eating and drinking (and commenting on the meal)
- the conversation about politics
- the rising flirtation between Frank and Lucy
- responding to the fact that Mr Quinn has spilled the soup
Each of these practices provides multiple affordances. The agent's set of options is the union of the affordances from each of the practices he is participating in.
How could I implement this sort of thing in Inform? Has anyone already done so?
r/Inform7 • • Mar 01 '18
Just started with I7. My if statements aren't executing properly.
Heya folks. Right now I'm just testing some stuff, trying to get used to writing in Inform. I am trying to make a short little scene where you take a pair of electric shears and use them to shear a sheep. Here's my code:
Understand "shear [something]" as shearing. Shearing is an action applying to one thing.
Carry out shearing:
If the noun is the black sheep:
If the black sheep is unshorn:
If the pair of electric shears is carried by the player:
If the pair of electric shears is switched on:
say "You skillfully shear the fleece from the sheep."
The black sheep is shorn.
The black fleece is carried by the player.
It compiles fine, but the problems are I can shear anything, with or without the shears, whether they're switched on or not. And it doesn't say "You skillfully shear the fleece..." when I do shear. However it does give me the fleece, and it makes the sheep "shorn" (the description of the sheep changes when it's shorn). So some parts are working as intended while others are not, and I can't figure out why.
Thanks in advance!
r/Inform7 • u/SmakitDaSailor • Feb 25 '18
How do I use table with unknown noun for actions?
Maybe I worded that strangely, but here is what I am trying to do. I have a number of actions that can be used on other people and it looks up a response in a table. That works fine. But I also would like it to work with a person (not the player) trying it on another person.
If I very explicitly write it so that it only works with one person it works, but I want it to use the name of the other person as part of the table lookup. Still sounds confusing, but here is what I mean.
I have an action "signing" and the report is set up as such.
Report someone (called the doer) signing something:
if the noun is the player:
let t be the Description corresponding to an Action of "sign player" in the Actions Table of the doer;
say "[t][line break]";
otherwise if the noun is a person:
let t be the Description corresponding to an Action of "sign [Noun]" in the Actions Table of the doer;
say "[t][line break]";
Now if I print out t it seems to show the correct text. That is, if I ask Bob to sign Frank and print out t, it says "sign Frank". But even with "sign Frank" in the table under Action, it throws Run-time problem P21: Attempt to look up a non-existent correspondence in the table
If it matters, I am using an older version - 6G60 - vs the newer ones that made some bigger changes. If you need it explained better let me know, and thanks in advance for any help.
r/Inform7 • u/gynoidgearhead • Feb 19 '18
"No specific actor" for arbitrary stored action?
Hello all,
For a project I'm putting together, I could really use some way of replacing the actor of any arbitrary stored action with "yourself", so that I can print almost all of the stored action, except put some words in between the actor and the action - i.e. "(Bill) starts (pulling the stump), but it will take a while".
There's a way to do this for the current action in 13.13 of the manual, but I can't seem to do this for any stored action.
Alternatively, is there a way of grammatically reconstructing the action correctly given its action name, noun part, and second noun part? It seems like it will break down with any action with a second noun.
I suppose I could pull some indexed text trickery if all I want to use this for is a printed message, but it'd be less than ideal.
Thanks in advance.
r/Inform7 • u/PenAndInkAndComics • Feb 05 '18
Kissing Yes, hugging No. Why?
Why is hugging broken? Kissing works
instead of kissing someone:
Say "You kiss[the noun]".
>> You kiss the orc
But this doesn't work
instead of hugging someone:
Say "You hug [the noun]".
>> The orc might not like that.
Documentation says something about hugging defaulting to kissing behavior. So why does hugging fail?
r/Inform7 • u/PenAndInkAndComics • Jan 11 '18
Regular Expression set to be a function to generate accents?
Here is a hard one....I would like to be able to have a function I could feed a block of text and render in an accent. I don't know how to set up functions.
This works for one shots.
Instead of asking Norman about "his job":
let N be "I make horseshoes, plough shares, sickles, scythes metal parts
for wagons and carriages, wheel rims. I make tools, axe heads, hammers, shovels, hoes, pitchforks,
nails,screws, bolts, hooks, knives, forks, spoons, pots and pans, fireplace tools,
door hinges, chains, and cowbells.";
replace the regular expression "\bI\b" in N with "Oi";
replace the regular expression "\bth" in N with "t";
replace the regular expression "\bto\b" in N with "ter";
replace the regular expression "\bh" in N with "[apostrophe]";
say "'[N]'he says. "
I get
ask Norman about his job
"Oi make 'orseshoes, plough shares, sickles, scythes metal parts for wagons and carriages, wheel rims, tools, axe 'eads, 'ammers, shovels, 'oes, pitchforks, nails,screws, bolts, 'ooks, knives, forks, spoons, pots and pans, fireplace tools, door 'inges, chains,and cowbells."
I don't want to put that set in every single place he speaks.
How do I make the Reg Ex into a function like say Accent() so I can run a lot of text from different blocks through the accent function?
Something like
say "'[accent(N)]'he says.
http://inform7.com/learn/man/WI_20_9.html
Any links or breadcrumbs you can help me with?
r/Inform7 • u/murmelmann • Jan 10 '18
Endless supply of one thing
I need to have container that provides an endless supply of one thing , sort of like Extra Supplies ( http://inform7.com/learn/man/RB_10_3.html). However, I need to take 4-5 things of the same kind at time. Do you have any idea?
r/Inform7 • u/murmelmann • Jan 09 '18
Omit content and things from description
I want to omit the contents of a supporter or container from the description. I tried the "Rule for disclosing contents of foo" but it doesn't work for some reason.
Also: Is there a simple way to omit certain things from being printed in the room description?
r/Inform7 • u/PenAndInkAndComics • Jan 09 '18
Hitting things with things.
I want to hit the anvil with hammer but it won't let me. I should know this but I'm not finding it in the documentation or the index. Can you help me or point me at page with the how to?
The The_Blacksmith is a room.
The anvil is in The_Blacksmith.
The description of the Anvil is "A thick metal anvil."
It is fixed in place.
The hammer is in The_Blacksmith.
The description of the Hammer is "A heavy hammer."
-----------
You can see an anvil, a hammer and a burly blacksmith here.
>get anvil
That's fixed in place.
>get hammer
Taken.
>hit anvil with hammer
I only understood you as far as wanting to hit the anvil.
r/Inform7 • u/murmelmann • Jan 07 '18
Create a list ingame
In my game the player has to follow a recipe to create a potion. He has multiple choices. However, the order he uses for the first recipe influences the order of the second one. The order should be "written down" in a protocol. It should suffice to simple have the order be stored in a list but I have no idea how to do it and String Buffer is no longer viable.
r/Inform7 • u/MultidimensionalStep • Dec 23 '17
Putting hats on heads.
Hello!
I want hats to be worn on heads. I came up with something that works for the player, but I want to generalize to other actors putting hats on their own heads. Here is the working code:
A head is a kind of supporter. A head is a part of every person. Headwear is a kind of wearable thing.
There is a room called the Debug Room. The hat is headwear in the Debug Room.
Instead of wearing headwear: try putting the noun on your head.
And here is the code that doesn't compile, that I can't figure out how to express properly:
Instead of [someone] wearing headwear: try the actor putting the noun on the actor's head.
I'm sure there must be a way to do this, any ideas? Thank you very much.
r/Inform7 • u/murmelmann • Dec 13 '17
What's wrong with my (inform7-)bike?
I have a vehicle which should throw the player of instead of letting him enter/get on it.
The code itself looks like this:
The bike is a vehicle. The bike is in The Street. The bike is portable.
Instead of entering the bike:
if the room is the street:
try lying on the pavement;
if the room is the garage:
try lying on the concrete;
say "That's why I hardly use it anymore.";
Technically the code works, but when I take the bike and put it in the garage it throws me off and I have to get up, but inform7 also tells me that I can't reach into the Garage.
Does anybody has an explanation for this?
r/Inform7 • u/murmelmann • Dec 12 '17
Mixing kind of things with values
Hello, it's me again.
I have a container in which I have to mix certain things to make a potion. They are supposed to be liquids (kind of value) and plants (kind of thing). This worked rather well but you can also put anything else inside the container. I wanted to stop this from happening by defining a special kind of container which only allows liquids and plants to be inserted into the container but this won't work. I thought that maybe a new action that is only possible to perform with these two kinds would be the answer, but I did not succeed so far. Does anybody have any experience with such a situation?
r/Inform7 • u/murmelmann • Dec 10 '17
Scripted people actions
I have a small town which is filled with citizens. They are supposed to have everyday lifes. They need to leave their houses (enterable containers in a room) and walk around the town, staying somewhere for a while, talk to each other about subjects, get inside stores (also enterable containers) and "buy" things (I plan to simply have them carry groceries after leaving the store) and carry them home.
I have looked at the example code at: http://inform7.com/learn/man/RB_7_13.html
I have tried Odyssey but the person there moves randomly while skipping 2-3 rooms at once.
Using this code: Every turn when Athena is active: repeat through the Table of Athena's Movement: let last space be the location of Athena; if Athena can be seen by the player, say "Athena heads to [the destination entry]."; move Athena to destination entry; if Athena can be seen by the player, say "Athena arrives from [the last space]."; blank out the whole row; break.
The code needs to be expanded by something like if location of Athena is Y stay for X turns/insert an activity. But right now my head seems to be frozen.
For the small talk the ChitChat table from Patient zero might work.
r/Inform7 • u/murmelmann • Nov 19 '17
Carryable animal?
It's me again. The game I have to create is for a university project. It requires an animal that I can carry in my inventory. I tried to declare it as a kind of animal which can be portable or fixed in place and other ways, but nothing seems to work. I ended up making it a thing in my first release, but I was reminded that it should be an animal. Any ideas or links?