adv3Lite: Dials and Parameter

Depending on how you want to count them, I have been having two or three problems with adv3Lite. They can all be illustrated with the code that follows:

[code]gameMain: GameMainDef
initialPlayerChar = me
;

startRoom: Room ‘Bedroom’
"Not the most original setting for an IF work, but a great place
to write one. "
;

  • me: Thing ‘Karona;;; her’
    isFixed = true
    person = 3
    contType = Carrier
    ;

  • speaker: Thing ‘speaker’
    "In case {he me} need{s/ed} a little heavy metal to inspire {him me}. "
    ;

++ dial: NumberedDial 'dial; speaker ’
"This one goes up to 11. "
minSetting = 0
maxSetting = 11
curSetting = ‘0’
makeSetting(val) {
inherited(val);
}
;[/code]
The first unexpected response comes up when the player tries to look at the speaker:

I would like the response to read, “In case she needs a little heavy metal to inspire herself.” I thought there was some weirdness related to the fact that “me” is a pronoun, but changing every instance of “me” to “karona” does nothing to resolve the problem. Changing the class from “Thing” to “Actor” also does not help.

The second unexpected response comes up when the player tries to turn the dial:

I had expected to see a response that ends in a period. Also, even with a period, I do not much care for a response that begins with “Okay,”, but even after looking at the library it is not clear to me how I can modify this message. Could one of you skilled coders give me a hand?

Your wish is my command. The first problem you’re encountering can be solved with a globalParamName, like this:

[code]+ me: Thing ‘Karona;;; her’
isFixed = true
person = 3
contType = Carrier
globalParamName = ‘karona’
;

  • speaker: Thing ‘speaker’
    "In case {he karona} need{s/ed} a little heavy metal to inspire {him karona}. "
    ;[/code]
    The second problem requires use of the global CustomMessages object (see p. 191 of “Learning T3Lite”). I agree – I don’t like Eric’s “Okay” either, and the missing period is simply a bug in the library (about the smallest possible bug). Here’s the fix:

CustomMessages messages = [ Msg(okay set to, '{I} {set} {1} to {2}. ') ] ;
Here’s the output:

Your suggested changes have worked perfectly. Thank you, Jim, for giving me a quick and thorough response as you so often have before! :slight_smile:

I’ve now made this change in the library, so it’ll be in the next version.

Thank you, Eric. I am looking forward to your release of adv3Lite v1.5!