I have a bug related to duplicate objects (identical objects, as in the “Early Childhood” examples) where the player tries to perform an action on one of the objects, but the game performs the action on more than one object. So far I haven’t found the source of the problem, and I’m not sure what elements of the code are likely to be at fault. I tried pasting just the relevant parts of the code into a new project to try to isolate the problem, but the new project didn’t have the bug (presumably I’m missing something). So below I’m pasting a transcript and just a few lines of the code.
(This may be a little spoilery if you haven’t played Delphina’s House.)
[spoiler]Trying to put a stone in the basin sometimes puts just one stone in, and sometimes puts several stones in, depending on how you enter the command. I want it to put in only one stone, unless the player explicitly makes it plural. Here’s the transcript:
[code]>i
You are carrying:
five softly glowing stones
a map
some fish crackers
put softly in middle basin
You drop the softly glowing stone into the medium silver basin, watching it sink into the luminous blue light-water, where it remains unchanged. After watching it for a time, you reach into the fountain and pick up the stone once more.
put softly glowing in middle basin
softly glowing stone: You drop the softly glowing stone into the medium silver basin, watching it sink into the luminous blue light-water, where it remains unchanged. After watching it for a time, you reach into the fountain and pick up the stone once more.
softly glowing stone: You drop the softly glowing stone into the medium silver basin, watching it sink into the luminous blue light-water, where it remains unchanged. After watching it for a time, you reach into the fountain and pick up the stone once more.
softly glowing stone: You drop the softly glowing stone into the medium silver basin, watching it sink into the luminous blue light-water, where it remains unchanged. After watching it for a time, you reach into the fountain and pick up the stone once more.
softly glowing stone: You drop the softly glowing stone into the medium silver basin, watching it sink into the luminous blue light-water, where it remains unchanged. After watching it for a time, you reach into the fountain and pick up the stone once more.
softly glowing stone: You drop the softly glowing stone into the medium silver basin, watching it sink into the luminous blue light-water, where it remains unchanged. After watching it for a time, you reach into the fountain and pick up the stone once more.
put softly glowing stone in middle basin
softly glowing stone: You drop the softly glowing stone into the medium silver basin, watching it sink into the luminous blue light-water, where it remains unchanged. After watching it for a time, you reach into the fountain and pick up the stone once more.
softly glowing stone: You drop the softly glowing stone into the medium silver basin, watching it sink into the luminous blue light-water, where it remains unchanged. After watching it for a time, you reach into the fountain and pick up the stone once more.
softly glowing stone: You drop the softly glowing stone into the medium silver basin, watching it sink into the luminous blue light-water, where it remains unchanged. After watching it for a time, you reach into the fountain and pick up the stone once more.
softly glowing stone: You drop the softly glowing stone into the medium silver basin, watching it sink into the luminous blue light-water, where it remains unchanged. After watching it for a time, you reach into the fountain and pick up the stone once more.
softly glowing stone: You drop the softly glowing stone into the medium silver basin, watching it sink into the luminous blue light-water, where it remains unchanged. After watching it for a time, you reach into the fountain and pick up the stone once more.
rules
Rules tracing now switched on. Type “rules off” to switch it off again, or “rules all” to include even rules which do not apply.
[Rule “Before reading a command” applies.]
actions
[Rule “ordinary checking for content rule” applies.]
[Rule “Numbered Disambiguation Choices strip closing parenthesis rule” applies.]
[Rule “avoid odd errors but allow numbers rule” applies.]
[Rule “zap out of world actions for in-hint rule” applies.]
[Rule “t1 to t 1 rule” applies.]
[Rule “declare everything initially unmentioned rule” applies.]
Actions listing on.
[Rule “Before reading a command” applies.]
put softly in middle basin
[Rule “ordinary checking for content rule” applies.]
[Rule “Numbered Disambiguation Choices strip closing parenthesis rule” applies.]
[Rule “avoid odd errors but allow numbers rule” applies.]
[Rule “zap out of world actions for in-hint rule” applies.]
[Rule “t1 to t 1 rule” applies.]
[Rule “declare everything initially unmentioned rule” applies.]
[inserting the softly glowing stone into the medium silver basin]
[Rule “silently announce items from multiple object lists rule” applies.]
[Rule “set pronouns from items from multiple object lists rule” applies.]
[Rule “before stage rule” applies.]
[Rule “instead stage rule” applies.]
[Rule “Instead of inserting a glowing stone ( called GS ) into a bowl ( called B )” applies.]
You drop the softly glowing stone into the medium silver basin, watching it sink into the luminous blue light-water, where it remains unchanged. After watching it for a time, you reach into the fountain and pick up the stone once more.
[inserting the softly glowing stone into the medium silver basin - failed]
[Rule “A first turn sequence rule” applies.]
[Rule “every turn stage rule” applies.]
[Rule “check if we’re in hints rule” applies.]
[Rule “A last turn sequence rule” applies.]
[Rule “notify score changes rule” applies.]
[Rule “Before reading a command” applies.]
put softly glowing stone in middle basin
[Rule “ordinary checking for content rule” applies.]
[Rule “Numbered Disambiguation Choices strip closing parenthesis rule” applies.]
[Rule “avoid odd errors but allow numbers rule” applies.]
[Rule “zap out of world actions for in-hint rule” applies.]
[Rule “t1 to t 1 rule” applies.]
[Rule “declare everything initially unmentioned rule” applies.]
[inserting the softly glowing stone into the medium silver basin]
[Rule “silently announce items from multiple object lists rule” applies.]
softly glowing stone: [Rule “set pronouns from items from multiple object lists rule” applies.]
[Rule “before stage rule” applies.]
[Rule “instead stage rule” applies.]
[Rule “Instead of inserting a glowing stone ( called GS ) into a bowl ( called B )” applies.]
You drop the softly glowing stone into the medium silver basin, watching it sink into the luminous blue light-water, where it remains unchanged. After watching it for a time, you reach into the fountain and pick up the stone once more.
[inserting the softly glowing stone into the medium silver basin - failed]
[inserting the softly glowing stone into the medium silver basin]
[Rule “silently announce items from multiple object lists rule” applies.]
softly glowing stone: [Rule “set pronouns from items from multiple object lists rule” applies.]
[Rule “before stage rule” applies.]
[Rule “instead stage rule” applies.]
[Rule “Instead of inserting a glowing stone ( called GS ) into a bowl ( called B )” applies.]
You drop the softly glowing stone into the medium silver basin, watching it sink into the luminous blue light-water, where it remains unchanged. After watching it for a time, you reach into the fountain and pick up the stone once more.
[inserting the softly glowing stone into the medium silver basin - failed]
[inserting the softly glowing stone into the medium silver basin]
[Rule “silently announce items from multiple object lists rule” applies.]
softly glowing stone: [Rule “set pronouns from items from multiple object lists rule” applies.]
[Rule “before stage rule” applies.]
[Rule “instead stage rule” applies.]
[Rule “Instead of inserting a glowing stone ( called GS ) into a bowl ( called B )” applies.]
You drop the softly glowing stone into the medium silver basin, watching it sink into the luminous blue light-water, where it remains unchanged. After watching it for a time, you reach into the fountain and pick up the stone once more.
[inserting the softly glowing stone into the medium silver basin - failed]
[inserting the softly glowing stone into the medium silver basin]
[Rule “silently announce items from multiple object lists rule” applies.]
softly glowing stone: [Rule “set pronouns from items from multiple object lists rule” applies.]
[Rule “before stage rule” applies.]
[Rule “instead stage rule” applies.]
[Rule “Instead of inserting a glowing stone ( called GS ) into a bowl ( called B )” applies.]
You drop the softly glowing stone into the medium silver basin, watching it sink into the luminous blue light-water, where it remains unchanged. After watching it for a time, you reach into the fountain and pick up the stone once more.
[inserting the softly glowing stone into the medium silver basin - failed]
[inserting the softly glowing stone into the medium silver basin]
[Rule “silently announce items from multiple object lists rule” applies.]
softly glowing stone: [Rule “set pronouns from items from multiple object lists rule” applies.]
[Rule “before stage rule” applies.]
[Rule “instead stage rule” applies.]
[Rule “Instead of inserting a glowing stone ( called GS ) into a bowl ( called B )” applies.]
You drop the softly glowing stone into the medium silver basin, watching it sink into the luminous blue light-water, where it remains unchanged. After watching it for a time, you reach into the fountain and pick up the stone once more.
[inserting the softly glowing stone into the medium silver basin - failed]
[Rule “A first turn sequence rule” applies.]
[Rule “every turn stage rule” applies.]
[Rule “check if we’re in hints rule” applies.]
[Rule “A last turn sequence rule” applies.]
[Rule “notify score changes rule” applies.]
[Rule “Before reading a command” applies.]
[/code]
A few relevant lines of code:
Brightness is a kind of value. The brightnesses are softly, faintly, brightly, and mixed.
A glowing stone is a kind of thing. A glowing stone has a brightness. The brightness of a glowing stone is usually softly. Understand the brightness property as describing a glowing stone.
[/spoiler]
Any ideas? I’m not sure how, or where in the process, Inform decides to apply an action to multiple objects vs. just one.