• Welcome to the new COTI server. We've moved the Citizens to a new server. Please let us know in the COTI Website issue forum if you find any problems.
  • We, the systems administration staff, apologize for this unexpected outage of the boards. We have resolved the root cause of the problem and there should be no further disruptions.

Inform 7

aramis

Administrator
Administrator
Baronet
Is it just me, or are the inform 7 error messages incredibly unhelpful?

I'm trying to figure out how to implement the maintenance hatch key...
Code:
before opening the avionics maintenance hatch:
    unless the player has the hatch key, stop the action.

Fails to stop the action. Further, it objects if the key is anywhere but the player at start.

When it works, Inform 7 actually is much easier than inform 6, but it's frustrating to use, and the biggest problem is the lack of a decent manual, followed closely by the inept wording of the errors.
 
They do leave something to be desired. On the plus side of the equation, there is a very helpful community at intfiction.org where you can get plenty of clarification and suggestions for making your code work.
 
Last edited:
Have you thought of using "Python Universe Builder" or "P.A.W.S." which are based on python and come with complete source code?
Python should allow using Grokitbot or PyAIML to pre-parse user input as well as generating NPC responses. Both of these allow the program to make calls to external programs, too.
No. Inform is the industry standard for IF games, and with good reason.

Inform 7 is actually a new language that compiles to inform 6, which it then compiles into z-code. Which, if it pisses me off enough, I'll just generate the inform 6 and tweak from there.

For future reference, I consider suggestions of a different programming language when one is asking for help in a particular language to be both off topic and rather rude.

It would be exactly the same as someone asking for the spanish way of saying "May I have the milk, please" and asking them "Have you tried saying it in greek? It's easier to say in greek."

If someone does that with a natural language, I'll infract them right off for insulting others.
 
By the way, I got door key code and doors working as I wanted. Getting the directions to be nautical relatives instead of compass absolutes was causing some interesting behaviors...

Code:
An mh_door is a kind of door.
An iris_door is a kind of door.
A sliding_door is a kind of door. 

Before going through a mh_door:
	if the player has a hatch key:
		do nothing;
	otherwise:
		say "You need the hatch key to go through the door.";
		stop the action.

Before opening a mh_door:
	if the player has a hatch key:
		do nothing;
	otherwise:
		say "You need the hatch key to open the door.";
		stop the action.

Before going through an iris_door (called this_door):
	if the player has a crew key:
		now this_door is open;
		say "[This_door] opens automatically as you move purposefully towards it."
	otherwise:
		say "You need the crew key to go through the iris valve.";
		stop the action.

Before opening an iris_door:
	if the player has a crew key:
		do nothing;
	otherwise:
		say "You need the crew key to open the iris valve.";
		stop the action.

After going through an iris_door (called this_door):
	now this_door is closed;
	say "The [this_door] closes behind you."

After going through an sliding_door (called this_door):
	now this_door is closed;
	say "The [this_door] closes behind you."
 
For future reference, I consider suggestions of a different programming language when one is asking for help in a particular language to be both off topic and rather rude.

Your original post indicated a general level of frustration with your chosen tools.
I merely offered links to alternative tools which you might not be aware of that you might find useful or interesting. Ordinarily, this sort of action would be considered both helpful and informative. Apparently it is not considered that here by the moderator(s). I shall not offer such in the future then.

Whether you chose to investigate further is your choice.
 
If by 'nautical directions' you mean forward/aft/port/starboard, drop me a line in email and I'll send you code; that was one of the first things I got working in my unfinished I7 project.
 
If by 'nautical directions' you mean forward/aft/port/starboard, drop me a line in email and I'll send you code; that was one of the first things I got working in my unfinished I7 project.

I know how to put them in in Inform 7 .... but the compiler mangled things such that

An Iris_Door is a kind of door.

Bridge Iris is an Iris_Door. It is aft of the Bridge and fore of the crew commons.

The Ship's Locker Door is a door. The Ship's Locker Door is port of the bridge and starboard of the Ship's Locker.​

Resulted in moving to port taking you to crew commons, and to aft taking you to the ship's locker.
 
/me blinks.

I'd be curious to know how THAT happened...

As am I, but for now, I'm writing I7 code using the predefined compass.

I may intercept the I6 precompile, and change all the n_to to f_to, then compile from the i6 code manually.

For those who don't know -
There are 3 levels of codebase to be aware of.
  • z-code - the final compiled code to be executed by the z-machine virtual machine.
  • Inform 6 - kind c++ -like language - lots of objects, and a bunch of included assumptions in header files.
  • Inform 7 - near natural language programming language.
The compiler only makes z-code from inform 6 code. To compile inform 7 to z-code, it first translates/transforms inform 7 into info inform 6 codebase, then compiles that to z-code.
 
Years back I did quite a lot of goofing around with Inform 6, though never anything Travelleresque (or even really RPG-related). I'm totally intrigued now, though. Aramis, apologies if I'm prying or clueless here, but what is this project you're working on now? :D
 
Years back I did quite a lot of goofing around with Inform 6, though never anything Travelleresque (or even really RPG-related). I'm totally intrigued now, though. Aramis, apologies if I'm prying or clueless here, but what is this project you're working on now? :D

Just a walkthrough of the Type A as presented in the Snapshot maps.

If I build the first such one, I figure others can make use of the above code snippet, and make similar for other classes. The point being to make "accessible" the layouts for some of the blind players. It's been a week of medical appointments, so I've stalled out... but...

Watch for a posting of a zip containing the z-file sometime this month.

I'm doing it in Inform 7 to force myself to come to grips with it. I'm afraid I shan't do it again, tho', as inform 6 is MUCH better control over the coding.
 
Just updated the zip to include the whole Type A.

Reminder to self: Next time, use inform 6. Naturalistic language isn't worth the imprecision and inability to use multiple entries for doors. And the generated source code in inform 6 is a troublesome lot to read.
 
Note: it's not where I really WANT it to be, but to get it there, I'd need to restart in Inform 6 and rework from scratch - because then I can have multiple directions exit to the same door.

For a simple walkthrough, tho', Seven is easy enough.
 
Thanks very much! I'm going to download this and take it for a spin. (Or a wander?) The idea of a template/toolbox for other starships is an interesting one... and tempting, especially if you've already done so much of the heavy lifting ;)

I can see what you mean about the advantages of Inform 6 over 7 -- and especially in the earlier days of IF, with a much stronger focus on complicated and clever puzzle-construction, I wonder whether #7 would have had any takers at all.
 
A bit of Necromancy

Thanks very much! I'm going to download this and take it for a spin. (Or a wander?) The idea of a template/toolbox for other starships is an interesting one... and tempting, especially if you've already done so much of the heavy lifting ;)

I can see what you mean about the advantages of Inform 6 over 7 -- and especially in the earlier days of IF, with a much stronger focus on complicated and clever puzzle-construction, I wonder whether #7 would have had any takers at all.

So I realize this thread is a couple years old now, but I'd love to see any more walkthroughs, interactive or not. I'm realizing that I really don't have much of a clue of what the insides of most of the ships are supposed to look like. Deck plans are great visually, but obviously don't help me much. :)

Any takers?
 
So I realize this thread is a couple years old now, but I'd love to see any more walkthroughs, interactive or not. I'm realizing that I really don't have much of a clue of what the insides of most of the ships are supposed to look like. Deck plans are great visually, but obviously don't help me much. :)

Any takers?

I've not done any others yet.

Was the type-A of use? It's interactive only in that you have to open the doors and use the maintenance hatch key.

I think the two I need to do next would be the Type R and type S - that gives the 3 most common player ships - then the A2.
 
Very useful. I just had a wander around and it gave me quite a bit ofinsight into how the ship is set up on the inside. Thank you for that.

I wish the shipboard directions were easier to implement, but the compass points worked well enough. :)
 
Very useful. I just had a wander around and it gave me quite a bit ofinsight into how the ship is set up on the inside. Thank you for that.

I wish the shipboard directions were easier to implement, but the compass points worked well enough. :)

I got that done in i7... code isn't pretty, but it seems to work.

Two more in a new file.

TypeS-i7.zblorb.zip

the Files Area thread: [zblorb] Type S Walkthrough

My manic state is your gain, BlindGuy.

Most of the rooms have dimensions. Most, but not all. Mea Culpa. I'll update it later. (pester me next month.)
 
Last edited:
Back
Top