Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000987I6 LibraryGeneralpublic2012-08-08 20:242015-05-10 17:47
Assigned ToDavidG 
PrioritynormalSeveritymildReproducibilityhave not tried
PlatformOSOS Version
Product Version6/12 
Target VersionFixed in Version6/12 
Summary0000987: Orders involving creature and special token cause subsequent orders to be treated as answering
Description2. If the same NPC is ordered to perform an action that requires the
creature or special tokens, the order may be treated as mere conversation.

  >paul, kiss me
If you think that'll help.

  >paul, kiss lamp
There is no reply.

Minimal Source Text To Reproduce
Include "Parser";
Include "VerbLib";

Object Room "Room"
	with description "Description.",
	e_to AnotherRoom,
	has light;

Object -> Paul "Paul"
	with name 'paul',
	with orders [;
		"If you think that will help.";
	with life [; rfalse; ],
	has proper animate;

Object -> Chest "chest"
	with name 'chest';

Object -> Lamp "lamp"
	with name 'lamp';

Object AnotherRoom "Another Room"
	with description "Another Description.",
	w_to Room,
	has light;

[ Initialise;
	location = Room;

Include "Grammar";
Additional InformationAlso taken from [^]
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
DavidG (developer)
2014-06-03 01:52
edited on: 2014-06-03 03:41

Clarification: The first bug described in the referenced posting does not appear to exist anymore. That one received tracking number 986.

DavidG (developer)
2014-07-12 15:09

Notes by Nathan Schwartzman:

This turned out to be simpler than I expected -- now I wish I hadn't spent months avoiding it out of dread. Giving the order PAUL, KISS LAMP with trace=3 active shows that the token fails with etype 11, which is ANIMA_PE. It fails because NounDomain correctly returned the lamp, but the lamp fails CreatureTest() so etype is set to 11. Changing Grammar.h avoids this:

Verb 'kiss' 'embrace' 'hug'
    * noun                                  -> Kiss;

So you just swap out creature token for noun token.

But, this means that when players type "kiss lamp" they no longer receive the message "You can only do that to something animate." Personally, I always thought that was a silly message anyway. But an alternative solution would be to have CreatureTest allow this only when the player is giving an order, by testing for actor ~= player.

Something like this:

[ CreatureTest obj;
    if (actor ~= player) rtrue;
    if (obj has animate) rtrue;
    if (obj hasnt talkable) rfalse;
    if (action_to_be == ##Ask or ##Answer or ##Tell or ##AskFor) rtrue;

This allows PAUL, KISS LAMP to reach Paul's orders property, while preserving the "You can only..." message when the player tries to kiss the lamp.
DavidG (developer)
2014-07-12 16:04

Fixed [^]

Thanks Nathan!
jmcgrew (administrator)
2015-05-10 17:47

Closing all resolved issues from 2014 and earlier.

- Issue History
Date Modified Username Field Change
2012-08-08 20:24 EmacsUser New Issue
2012-08-10 16:56 EmacsUser Steps to Reproduce Updated View Revisions
2012-10-07 18:14 DavidG Assigned To => DavidG
2012-10-07 18:14 DavidG Status new => assigned
2014-06-03 01:50 DavidG Steps to Reproduce Updated View Revisions
2014-06-03 01:52 DavidG Note Added: 0002863
2014-06-03 03:34 DavidG Note Added: 0002864
2014-06-03 03:41 DavidG Note Edited: 0002863 View Revisions
2014-06-03 03:48 DavidG Note Deleted: 0002864
2014-07-12 15:09 DavidG Note Added: 0002932
2014-07-12 16:04 DavidG Note Added: 0002933
2014-07-12 16:05 DavidG Status assigned => resolved
2014-07-12 16:05 DavidG Fixed in Version => 6/12
2014-07-12 16:05 DavidG Resolution open => fixed
2015-05-10 17:47 jmcgrew Note Added: 0003606
2015-05-10 17:47 jmcgrew Status resolved => closed

Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker