Immense programming language differences

Martha is a woman in [starting location]. The player is Martha.

[to change to third person but not needed to customise the PC itself]
When play begins:
    now the story viewpoint is third person singular.

The main issue (if you can call it that) is that Inform 7 always implicitly creates a player character (called “yourself”) in the first defined location so it’s easy to forget to alter it. adv3 and adv3lite both force you to think about the PC since they require you to define it explicitly.

4 Likes

Interesting language use indeed. I’ll check it out!

4 Likes

interesting to see the different ways the languages structure what is the same thing on the player’s end :slight_smile: tads3 modifies the player character in order to change the presentation of the story and inform 7 seems to modify the story structure to change the presentation of the player character.

3 Likes

Going back to the original question – I think this whole thing got off on the wrong foot.

The MANY flag in ZIL controls whether a verb accepts multiple objects. This is really completely different from whether “all” works in parsing!

I7 lets you make the same distinction as ZIL’s MANY flag. It’s the difference between these lines:

Understand "get [things]" as taking.

Understand "get [something]" as taking.

So it’s equally simple, really.

(Arguably this should be a property of the action, not the grammar line. But both ZIL and Inform use a grammar line flag.)

4 Likes

Oddly, as Ardi says it’s basically the same process to set this up in Inform 7 as in TADS. The difference is that the Inform parser specifically disables the ability to refer to the player other than by “me” - like if you say “Count Fosco is a man” to create him as an NPC, “count” and “fosco” will all be valid ways to refer to him. But if you then say “the player is Count Fosco”, suddenly only X ME will work and X COUNT etc. will fail.

I think the idea is that it can be confusing if you try like X MAN when no one’s around and get the description of the player, maybe? And it’s easy enough to manually re-add the synonyms. But it’s definitely an odd quirk!

5 Likes

Thanks for clarifying, this is indeed the bug I noticed.

4 Likes

I use this:

Conan is a man.
When play begins:
	now the player is Conan;
	now yourself is nowhere;

And this works for me:

>x me
Your muscles ripple beneath your sun-tanned skin.
You are definitely as good-looking as ever.
 
>x myself
Your muscles ripple beneath your sun-tanned skin.
You are definitely as good-looking as ever.

>x conan
Your muscles ripple beneath your sun-tanned skin.
You are definitely as good-looking as ever.

>x man
Your muscles ripple beneath your sun-tanned skin.
You are definitely as good-looking as ever.

Just trying to help… I ran into this problem last year when I wanted the player to switch between multiple characters. But the solution also works for a single character. IMHO the main benefit is that the PC and all NPCs are created in the same way, and we can switch at any time to another one using now the player is <name of NPC>.

edit: This is Onno realising he can still create works of IF for the world at large. By the way how did Aster find out the void features in one of my WIPs I wonder…

7 Likes

*banishes you to the void* :stuck_out_tongue_winking_eye:

edit: this was a riff off of now yourself is nowhere; not me banishing onno to the void

8 Likes

I can manage the void, actually in the process of creating one with special navigation (compass directions make no sense in the void).

Behold a far scarier place in my IFComp game (the room where I store all off-stage things):

>gonear demon
Black Hole
A broad dark stain lies on the floor where the demon died.
The demon has left its outline clearly etched in its blood,
an outline belonging to no being in a sane and normal world.
 
The demon's sinewy muscles ripple with power, each movement
a testament to its formidable strength. From its back, jagged wings,
tattered and torn, stretch out. At the ends of its elongated fingers,
claws gleam like razors, while its bared teeth form a ghastly grin
mirroring its insatiable hunger for chaos.
 
A colossal serpent with a body as thick as a tree trunk,
coils and twists upon itself. Its gaping maw, lined with rows
of razor-sharp teeth, opens wide in a silent hiss.
 
The corpse's flesh is mottled, patches of rot and decay
evident on its body. Tattered clothing hangs loosely from its frame,
and its limbs move with an unnatural stiffness.
 
Several skeletons encircle you and Lydia, forming a grim assembly
of bony figures. Their empty eye sockets seem to glow with malevolence
as they inch closer, their skeletal hands reaching out for you.
 
The skeletal dragon is a nightmarish monstrosity. Composed entirely of
eerie bone fragments, it stands tall and imposing. This skeletal behemoth
radiates an overwhelming aura of dark magic and power.
 
Lydia looks horrified at the demon.
 
Alcaz is studying the environment.
 
You can also see a sword hilt and an axe handle here.
 
You are carrying a bottle of wine (closed) and your loincloth (being worn).
 
> 

And to top it off, only one-way paths leading into this room, and none going out.
Definitely a place with no escape. A good thing the PC can normally never end up here…

4 Likes

Same in Inform. You just modify the library to remove the grammar lines (what ZIL calls “syntax definitions”) that include [things].

The difference is that ZIL generally assumes each game will have its own copy of the library which you edit by hand, whereas Inform wants a single copy of the library in a central shared location, which you modify with “replacing” directives in your code.

For example, here’s an excerpt from the 10.1 library:

Part Six - Grammar

Understand "take [things]" as taking.
Understand "take off [something]" as taking off.
Understand "take [something] off" as taking off.
Understand "take [things inside] from [something]" as removing it from.
Understand "take [things inside] off [something]" as removing it from.
Understand "take inventory" as taking inventory.
Understand the commands "carry" and "hold" as "take".

(With a whole bunch more grammar lines cut for space.)

If you want to make TAKE ALL not work, you just replace the “[things]” tokens with something else:

Understand "take [something]" as taking.
Understand "take off [something]" as taking off.
Understand "take [something] off" as taking off.
Understand "take [something] from [something]" as removing it from.
Understand "take [something] off [something]" as removing it from.
Understand "take inventory" as taking inventory.
Understand the commands "carry" and "hold" as "take".

So far, basically the same as in ZIL.

And then you tell Inform to replace the grammar in the standard library with your version:

Part - Replacement Grammar (in place of Part 6 - Grammar in Standard Rules by Graham Nelson)

Understand "take [something]" as taking.
Understand "take off [something]" as taking off.
Understand "take [something] off" as taking off.
Understand "take [something] from [something]" as removing it from.
Understand "take [something] off [something]" as removing it from.
Understand "take inventory" as taking inventory.
Understand the commands "carry" and "hold" as "take".

And that’ll do it.

(Though of course, if you’re replacing Part 6 - Grammar, you’ll want your replacement to include all the actions, not just taking. I’ve just cut out the others for space.)

4 Likes

Hard Puzzle 4 has a room like that but the player must enter it. That game is based on hacking the code and things happening “out of game”

3 Likes

That’s easier than I saw somewhere! Well, I might try that.

1 Like

Reminds me of @mathbrush’s Ectocomp game from last year, Buggy, which I just happened upon last night and very much enjoyed :smile:

5 Likes