trinity icon indicating copy to clipboard operation
trinity copied to clipboard

You can't ask the bird woman about the grass or the boy

Open eriktorbjorn opened this issue 5 years ago • 1 comments
trafficstars

There are two subjects in BWOMAN-SUBJECTS that she won't respond to:

	 <PTABLE BOY
"Lots o' boys around here, dearie">
	 <PTABLE GRASS
"Humph!\" she sniffs. \"Never touch the stuff">

In the official release, you can ask the woman about the boy, but not the glass. In the ZILF-compiled one, she won't respond to either.

For the grass, it's simple. You can just change the table to refer to GGRASS instead, since that's the global object.

For the boy, there is - as far as I know - no such global object, so the object will be located with FIND-NOT-HERE, which uses MOBY-FIND to loop through all non-room objects. If it only finds one, there's no problem. If it finds several, it will call the GENERIC routine in the first object and trust that one to do the disambiguation. The game thinks it can do that by having a GENERIC-KID for both the BOY and the GIANT and always return BOY if you're in the Kensington Gardens.

Unfortunately, there are two other objects that match "BOY": PAN and PHOTO. In this case the first object it found was PHOTO, which has its own GENERIC routine that always returns the photo.

So the correct fix is probably to adjust that routine. Perhaps something like this:

<ROUTINE GENERIC-PHOTO-F (TABLE (OBJ <>))
	 <COND (<SET OBJ <GENERIC-KID-F .TABLE>>
		<RETURN .OBJ>)
	       (T
		<RETURN ,PHOTO>)>>

Unless it's a problem that this routine can then return GIANT as well, so maybe make the check more specific? A similar GENERIC routine should probably be added to PAN as well, in case future versions of ZILF generate that object with a lower number?

eriktorbjorn avatar Sep 07 '20 14:09 eriktorbjorn

Maybe something like this?

diff --git a/people.zil b/people.zil
index f857e94..eb3c861 100644
--- a/people.zil
+++ b/people.zil
@@ -325,7 +325,7 @@ D ,BAG " and a " D ,SCOIN " for you." CR>
 "All prams lead to Kensington Gardens, they say">
         <PTABLE BOY
 "Lots o' boys around here, dearie">
-        <PTABLE GRASS
+        <PTABLE GGRASS
 "Humph!\" she sniffs. \"Never touch the stuff">
         <PTABLE CRANE
 "Tidy bit o' foldin', that">
diff --git a/things.zil b/things.zil
index f6039d1..2f45897 100644
--- a/things.zil
+++ b/things.zil
@@ -3354,6 +3354,7 @@ D ,PARASOL ", you bravely close your eyes and pinch your nose shut" ,PCR>
        (FDESC "A charming statue stands nearby.")
        (SYNONYM STATUE SCULPTURE PETER PAN BOY PIPE PIPES)
        (ADJECTIVE CHARMING PETER)
+       (GENERIC GENERIC-KID-F)
        (ACTION PAN-F)>
 
 <ROUTINE PAN-F ()
@@ -16278,7 +16279,10 @@ D ,SDRIVER " rolls out from underneath and lands on your foot. Ouch!" CR>
        (ACTION PHOTO-F)>
 
 <ROUTINE GENERIC-PHOTO-F (TABLE)
-        <RETURN ,PHOTO>>
+        <COND (<IS? ,HERE ,WINDY>
+               <RETURN ,BOY>)
+              (T
+               <RETURN ,PHOTO>)>>
 
 <ROUTINE PHOTO-F ("OPTIONAL" (CONTEXT <>))
         <COND (<OR <NOUN-USED? ,W?BOY ,W?CHILD ,W?KID>

eriktorbjorn avatar Sep 08 '20 06:09 eriktorbjorn