intfiction.org

The Interactive Fiction Community Forum
It is currently Mon Dec 10, 2018 2:44 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 165 posts ]  Go to page Previous  1 ... 13, 14, 15, 16, 17  Next
Author Message
PostPosted: Fri Feb 23, 2018 6:55 pm 
Offline
User avatar

Joined: Wed Oct 14, 2009 4:02 am
Posts: 2568
I expect the rtrue makes the library think it did print a description of the box, so the next object gets "also".

You should use the "concealed" or "scenery" attributes rather than messing around manually with the room descriptions.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sat Feb 24, 2018 8:14 am 
Offline

Joined: Mon Dec 30, 2013 4:55 am
Posts: 109
In DM4:
Quote:
A sometimes useful trick is to print nothing in this routine (describe) and return true, which makes an object ‘invisible’.
It's probably what "invisible" means : there is another object in the room but you can not see it. And with "also", the player can know that.
Ok, thanks; everything is fine.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sat Feb 24, 2018 11:34 am 
Offline

Joined: Mon Dec 30, 2013 4:55 am
Posts: 109
The global variable "consult_words" and "consult_from" are not reset to 0 (initial value) after each turns; it would be nice to do it.

In my grammar:
Code:
grammar:
Verb 'parler'   
   * 'a'/'avec' creature                       -> Tell
   * 'a'/'avec' creature 'de'/'du'/'des' topic -> Tell;   

Object Boby "Boby"
with
   name 'boby',
   life [;
      Tell:
         if(consult_words == 0) "Grammar line 1";
         else "Grammar line 2";
   ],
has animate;
It will be easier to distinguish a verbal form of an other one. But Ican't, the previous values ​​are kept.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Wed Feb 28, 2018 9:38 am 
Offline

Joined: Mon Dec 30, 2013 4:55 am
Posts: 109
In english.h, LanguageLM: Quit:
Code:
1:  print "Please answer yes or no.";
A line break after the point is missing here or in verblib.h in YesOrNo() : L__M(##Quit, 1); print "> ";
Quote:
Release 1 / Serial number 180228 / Inform v6.34 Library v6.12.2-pre
Somewhere
Here!

>quit

Are you sure you want to quit?
Please answer yes or no.>
Please answer yes or no.>


Top
 Profile Send private message  
Reply with quote  
PostPosted: Wed Feb 28, 2018 9:46 am 
Offline

Joined: Sat Jan 23, 2010 4:56 pm
Posts: 5832
That prompt has always had that form, so that it does not look like a regular command prompt. It's slightly awkward that the first yes/no prompt looks different from the repeat prompt, but that's better than printing ">" on a line by itself. (If you do that, people will try "quit" again or some other command.)


Top
 Profile Send private message  
Reply with quote  
PostPosted: Thu Mar 01, 2018 2:30 pm 
Offline

Joined: Mon Dec 30, 2013 4:55 am
Posts: 109
Not even a space between the punctution point and the prompt?

Is it possible to put the brackets of the score message, not in parser.h : NotifyTheScore(), but in english.h : LanguageLM: Miscellany: 50.
I can change Miscellany: 50 message with Object LibraryMessages in my game , but I can't remove brackets.
Code:
[ NotifyTheScore;
    #Ifdef TARGET_GLULX;
    glk_set_style(style_Note);
    #Endif; ! TARGET_GLULX
    print "^[";  L__M(##Miscellany, 50, score-last_score);  print ".]^";
    #Ifdef TARGET_GLULX;
    glk_set_style(style_Normal);
    #Endif; ! TARGET_GLULX
];
Code:
Miscellany:  50: print "The score has just gone ";
            if (x1 > 0) print "up"; else { x1 = -x1; print "down"; }
            print " by ", (number) x1, " point";
            if (x1 > 1) print "s";


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sun Mar 04, 2018 11:26 pm 
Offline
User avatar

Joined: Mon Dec 12, 2011 7:03 pm
Posts: 557
Location: Washington
auraes wrote:
Not even a space between the punctution point and the prompt?

Is it possible to put the brackets of the score message, not in parser.h : NotifyTheScore(), but in english.h : LanguageLM: Miscellany: 50.
I can change Miscellany: 50 message with Object LibraryMessages in my game , but I can't remove brackets.
Code:
[ NotifyTheScore;
    #Ifdef TARGET_GLULX;
    glk_set_style(style_Note);
    #Endif; ! TARGET_GLULX
    print "^[";  L__M(##Miscellany, 50, score-last_score);  print ".]^";
    #Ifdef TARGET_GLULX;
    glk_set_style(style_Normal);
    #Endif; ! TARGET_GLULX
];
Code:
Miscellany:  50: print "The score has just gone ";
            if (x1 > 0) print "up"; else { x1 = -x1; print "down"; }
            print " by ", (number) x1, " point";
            if (x1 > 1) print "s";


The easiest way to fix this would be to do
Code:
replace NotifyTheScore;
early in your program followed by your own customized version of that function.

_________________
David Griffith


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Sep 04, 2018 2:11 am 
Offline

Joined: Mon Dec 30, 2013 4:55 am
Posts: 109
When I throw the ball, he tries to throw the ball at the ball. Is something wrong? (I know grammar line requires a second word, but...) :
Quote:
Release 1 / Serial number 180904 / Inform v6.34 Library v6.12.2pre

Here or anywhere
You are somewhere.

You can see a ball here.

>throw ball
(at the ball)
(first taking the ball)
Futile.

>
And he tries to throw the ball before trying to take it?
Code:
Include "parser";
Include "verblib";

Object here "Here or anywhere"
   with description "You are somewhere.",
   has light;

object ball "ball" here
   with name 'ball';

[ Initialise; location = here; ];
Include "grammar";
Code:
Verb 'throw'
    * held 'at'/'against'/'on'/'onto' noun      -> ThrowAt;


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Sep 04, 2018 6:20 am 
Offline
User avatar

Joined: Mon Dec 12, 2011 7:03 pm
Posts: 557
Location: Washington
auraes wrote:
When I throw the ball, he tries to throw the ball at the ball. Is something wrong? (I know grammar line requires a second word, but...) :
Quote:
Release 1 / Serial number 180904 / Inform v6.34 Library v6.12.2pre

Here or anywhere
You are somewhere.

You can see a ball here.

>throw ball
(at the ball)
(first taking the ball)
Futile.

>
And he tries to throw the ball before trying to take it?
Code:
Include "parser";
Include "verblib";

Object here "Here or anywhere"
   with description "You are somewhere.",
   has light;

object ball "ball" here
   with name 'ball';

[ Initialise; location = here; ];
Include "grammar";
Code:
Verb 'throw'
    * held 'at'/'against'/'on'/'onto' noun      -> ThrowAt;


That "held" keyword indicates that the ball must first be picked up before it can be thrown. If I add a line to the grammar like this:
Code:
Verb 'throw'
    * held               -> ThrowAt
    * held 'at'/'against'/'on'/'onto' noun      -> ThrowAt;


And this to ThrowAtSub():
Code:
if (second == nothing) return L__M(##ThrowAt, 1, noun);


The result is this:

Quote:
Release 1 / Serial number 180904 / Inform v6.34 Library v6.12.3pre S

Here or anywhere
You are somewhere.

You can see a ball here.

>throw ball
(first taking the ball)
Futile.

>


How does that work for you?

By the way, please clone the inform6lib repo (https://gitlab.com/DavidGriffith/inform6lib/) again. I had to rebase it just now because I discovered that I marked it as 6.12.2pre instead of 6.12.3pre. 6.12.2 is already released, so going back to 6.12.2pre makes no sense.

_________________
David Griffith


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Sep 04, 2018 7:40 am 
Offline

Joined: Mon Dec 30, 2013 4:55 am
Posts: 109
It works fine for me, thanks.


Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 165 posts ]  Go to page Previous  1 ... 13, 14, 15, 16, 17  Next

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: Majestic-12 [Bot] and 16 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group