When play begins :
repeat with S through streets begin ;
now the description of S is “You are [one of]in a dirty slum[or]in a street[or]in a beautiful and blablabla street[sticky random]” ;
end repeat.[/code]
Of course it doesn’t work : the sticky random thing gives the same description to all the streets.
I tried with “procedural randomness” by aaron reed but it doesn’t seem to change anything - maybe I’m misusing it.
I think a way to do this with Procedural Randomness would be:
When play begins :
repeat with S running through streets begin ;
set seed to S;
now the description of S is "You are [one of]in a dirty slum[or]in a street[or]in a beautiful and blablabla street[with procedural randomness]." ;
end repeat.
I also wonder if you could use substituted forms of texts to do this? Don’t have time to check it now.
When play begins:
repeat with S running through streets begin;
now the description of S is "You are [one of]in a dirty slum[or]in a street[or]in a beautiful and blablabla street[at random]";
now the description of S is "[description of S]";
end repeat.
Setting the description to itself in a text substitution makes it evaluate the one of…at random and assign the result back to the description. Why it works that way is discussed in the “Changes to Inform” book.
That’s where you can use the substituted form, I think:
[code]A street is a kind of room.
First Avenue is a street. Second Avenue is a street, west of First Avenue. Third avenue is a street, west of Second Avenue. Lexington Avenue is a street, west of Third Avenue.
When play begins:
repeat with S running through streets begin;
now the description of S is the substituted form of “You are [one of]in a dirty slum[or]in a street[or]in a beautiful and blablabla street[at random].”;
end repeat.[/code]
Oh. Well, Procedural Randomness works in 6G60. Or you could try this:
[code]A street is a kind of room.
First Avenue is a street. Second Avenue is a street, west of First Avenue. Third avenue is a street, west of Second Avenue. Lexington Avenue is a street, west of Third Avenue.
A street has some indexed text called the indexed description.
When play begins:
repeat with S running through streets begin;
now the indexed description of S is “You are [one of]in a dirty slum[or]in a street[or]in a beautiful and blablabla street[at random].”;
now the description of S is “[indexed description of the item described]”;
end repeat.[/code]
Trying to make this work really made me value the changes in 6L02! (In 6G60 you can’t use any of those temporary variables in text substitutions, which makes things more difficult.)
Ok, in the end I mixed all your exemples of code and finished with that
[code]World is a room.
Jo is a man in World.
Jack is a man in World.
John is a man in World.
Jonatan is a man in World.
A man has an indexed text called blabla.
When play begins:
repeat with S running through men begin ;
now the blabla of S is “[the printed name of S] is [one of]waiting for his man[or]has twenty-six dollars in his hand[or]is up to Lexington[at random]” ;
now the initial appearance of S is “[blabla of the item described]”;
end repeat.[/code]