<command name="fight_command">
<pattern>fight #text#</pattern>
<script>
fight_function (game.pov,text)
</script>
</command>
<object name="Study">
<inherit name="editor_room" />
<exit alias="west" to="Kitchen">
<inherit name="westdirection" />
</exit>
<object name="Letter to Mr Jones">
<inherit name="editor_object" />
<alias>Letter to Mr Jones</alias>
<alt type="stringlist">
<value>Letter</value>
</alt>
<take />
</object>
</object>
<object name="Kitchen">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
<exit alias="east" to="Study">
<inherit name="eastdirection" />
</exit>
<object name="Letter to Mr Smith">
<inherit name="editor_object" />
<alias>Letter to Mr Smith</alias>
<alt type="stringlist">
<value>Letter</value>
</alt>
<take />
</object>
</object>
<!--Saved by Quest 5.3.4762.29157-->
<asl version="530">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="Testing Game Stuff">
<gameid>d83ba5bb-2e3c-4f31-80c9-3e88a2dc082c</gameid>
<version>1.0</version>
</game>
<object name="Study">
<inherit name="editor_room" />
<exit alias="west" to="Kitchen">
<inherit name="westdirection" />
</exit>
<object name="Letter to Mr Jones">
<inherit name="editor_object" />
<alias>Letter to Mr Jones</alias>
<alt type="list">Letter</alt>
<take />
</object>
</object>
<object name="Kitchen">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
<exit alias="east" to="Study">
<inherit name="eastdirection" />
</exit>
<object name="Letter to Mr Smith">
<inherit name="editor_object" />
<alias>Letter to Mr Smith</alias>
<alt type="list">Letter</alt>
<take />
</object>
</object>
</asl><asl version="540">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="Testing Game Stuff">
<gameid>d83ba5bb-2e3c-4f31-80c9-3e88a2dc082c</gameid>
<version>1.0</version>
</game>
<object name="Study">
<inherit name="editor_room" />
<exit alias="west" to="Kitchen">
<inherit name="westdirection" />
</exit>
<object name="Letter to Mr Jones">
<inherit name="editor_object" />
<alias>Letter to Mr Jones</alias>
<alt type="simplestringlist">Letter</alt>
<take />
</object>
</object>
<object name="Kitchen">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
<exit alias="east" to="Study">
<inherit name="eastdirection" />
</exit>
<object name="Letter to Mr Smith">
<inherit name="editor_object" />
<alias>Letter to Mr Smith</alias>
<alt type="simplestringlist">Letter</alt>
<take />
</object>
</object>
</asl><asl version="540">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="Testing Game Stuff">
<gameid>d83ba5bb-2e3c-4f31-80c9-3e88a2dc082c</gameid>
<version>1.0</version>
</game>
<object name="Study">
<inherit name="editor_room" />
<exit alias="west" to="Kitchen">
<inherit name="westdirection" />
</exit>
<object name="Letter to Mr Jones">
<inherit name="editor_object" />
<alias>Letter to Mr Jones</alias>
<alt type="list">
<value>Letter</value>
</alt>
<take />
</object>
</object>
<object name="Kitchen">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
<exit alias="east" to="Study">
<inherit name="eastdirection" />
</exit>
<object name="Letter to Mr Smith">
<inherit name="editor_object" />
<alias>Letter to Mr Smith</alias>
<alt type="list">
<value>Letter</value>
</alt>
<take />
</object>
</object>
</asl> <function name="CompareNames" parameters="name, value, obj, fullmatches, partialmatches">
if (name = value) {
if (not ListContains(fullmatches, obj) and not ListContains(partialmatches, obj)) {
list add (fullmatches, obj)
}
}
else {
if (StartsWith(name, value)) {
if (not ListContains(fullmatches, obj) and not ListContains(partialmatches, obj)) {
list add (partialmatches, obj)
}
}
else {
// check if input matches the start of any word in the name
if (Instr(name, " " + value) > 0) {
if (not ListContains(fullmatches, obj) and not ListContains(partialmatches, obj)) {
list add (partialmatches, obj)
}
}
}
}
</function>
sonic102 wrote:This is actually a Quest mistake.
Inform would have said "which letter, to Jones or to Mr smith?" which is idiotic since you are holding the Jones letter.
TADS is smarter, it would pick up the Smith letter.
jaynabonne wrote:Add this replacement function into your game file:<function name="CompareNames" parameters="name, value, obj, fullmatches, partialmatches">
if (name = value) {
if (not ListContains(fullmatches, obj) and not ListContains(partialmatches, obj)) {
list add (fullmatches, obj)
}
}
else {
if (StartsWith(name, value)) {
if (not ListContains(fullmatches, obj) and not ListContains(partialmatches, obj)) {
list add (partialmatches, obj)
}
}
else {
// check if input matches the start of any word in the name
if (Instr(name, " " + value) > 0) {
if (not ListContains(fullmatches, obj) and not ListContains(partialmatches, obj)) {
list add (partialmatches, obj)
}
}
}
}
</function>
I don't see a way in 5.4 to disable partial matches. If you don't want them, then just delete the primary "else" in the above, which is what implements partial matches.