Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ORKnowledgetopic documentation?

1 view
Skip to first unread message

Jay Bruckner

unread,
Feb 5, 2004, 12:48:05 AM2/5/04
to
Hello, I'm new here though I've been lurking for the past month or so.
I'm working on my first game and I'm using the Onyx Ring modules for
lotsa stuff. My question here is specifically about the NPC-related
modules. I read in the OR developer's manual "In the future, expect
additional documentation to surface describing more customized
implementations of ORKnowledgeTopic."

So, has any additional documentation surfaced? Where can I find it?
Are there any example games that utilize these modules more
extensively than is described in the DM?

thanks,

Jay

OnyxRing com@nospam.com Jim Fisher

unread,
Feb 5, 2004, 2:25:47 AM2/5/04
to
"Jay Bruckner" wrote:

Hmmm... Once upon a time, I was told that the lack of documentation for the
ORLibrary was one of its biggest weaknesses. I've been working for the last
couple of years to remedy that. Hopefully I've made some progress here, at
least with the conversation modules.

Concerning the documentation in general:

The manual is still a work-in-progress and it changes frequently. I try to
compile the articles into a PDF file regularly, but PDFs still have a
tendency to grow stale. I'm not sure what version you're looking through,
but the most recent version of the articles can always be found on-line at
the following URL:

http://www.onyxring.com/ORLibDocToc.aspx

Now the NPC/Conversation modules specifically:

The "additional documentation to surface describing more customized
implementations of ORKnowledgeTopic" was a reference to the ORKnowledgeWeb
class. That documentation is now around ten days old. It can be found by
way of the above link, or directly at:

http://www.onyxring.com/VariousArticles.aspx?article=165

Conversation and actions through menus is next on my agenda (and a brief
code example for ORNPC_moods, too).

For a conversation example, the Medusa source is probably the most detailed:

http://www.onyxring.com/downloads/ORLib%20Examples/medusa.inf

It was intended to accompany the theory article ("NPC Conversations:
Ask/Tell Theory"):

http://www.onyxring.com/InformGuide.aspx?article=74

There are references in the ORLib manual about advanced or seldom-used
features of the classes that were left out of the documentation in favor of
simplicity. These have not been officially documented for the ORLibrary,
but the NPC classes were derived from a series of articles in OnyxRing's
"Inform Developer's Guide"" articles entitled "Advance NPC Creation":

http://www.onyxring.com/InformGuide.aspx?article=20

Although the source code examples won't line up exactly (these articles are
not really over the ORLibrary), most of the advanced, or seldom-needed
features can be found there.

I hope this helps. If you have comments on the documentation, or
suggestions about how it could be improved, don't hesitate to offer up.


--
--
Jim (AT) OnyxRing (DOT) com
Visit "An Inform Developer's Guide" or browse the
"ORLibrary" extensions to the standard library at
www.OnyxRing.com
----------------------
Some days you eat the code; some days the code eats you.

Sam Denton

unread,
Feb 5, 2004, 9:05:41 AM2/5/04
to
jay...@msn.com (Jay Bruckner) wrote in message news:<2a906f0b.04020...@posting.google.com>...

This is only marginally related to your question, but I've been
working on a simple game that has one interesting feature that I've
not seen elsewhere: Things known to more than one but less than all
NPCs.

First, I've taken Graham Nelson's observation that any game with more
than 15 keys is likely to be unplayable, and extended it to NPC
conversations. I'm giving each distinct NPC an id number from 1 to
15, and each topic a bitmask that indicates who knows it. (And by
"distinct NPC", I recognize that a single NPC might be represented by
multiple objects. In that case, those objects would have the same id
number.) Right now, all the player can do is wander around and ask
questions, but my next phases will be to (1) allow NPCs to gossip
among themselves, tracking who told them what, (2) have NPCs who are
motivated to lie about things, and (3) have NPCs that draw conclusions
based on what they know. Here's what I'm aiming for (and yes, the
facts are pretty simple right now):

>ask Col. Mustard about Rev. Green
"I think Rev. Green did it. He had a motive, means, and opportunity."

>ask Col. Mustard about Rev. Green's motive
"Miss Scarlet told me that Rev. Green had a motive."

>ask Col. Mustard about Rev. Green's means
"Miss Scarlet told me that Rev. Green had the means."

>ask Col. Mustard about Rev. Green's opportunity
"I know that Rev. Green had the opportunity."

>ask Col. Mustard about Miss Scarlet's motive
"I know that Miss Scarlet had a motive."

>ask Col. Mustard about Miss Scarlet's means
"I don't know if Miss Scarlet had the means."

>ask Col. Mustard about Miss Scarlet's opportunity
"I don't know if Miss Scarlet had the opportunity."

Has anyone else done anything like this?

OnyxRing com@nospam.com Jim Fisher

unread,
Feb 5, 2004, 7:36:57 PM2/5/04
to
"Sam Denton" wrote:

> Things known to more than one but less than all NPCs.

This is supported in ORKnowledgeTopic. By default, the "knownby" property
lists all characters that know the topic:

ORKnowledgeTopic hello_halfling_t "hello"
with knownby ted sam dave
, name 'hello'
, TopicInformation[to from;
print "~Hello!~ says ",(the)from," to ",(the)to,".";
;

> but my next phases will be to (1) allow NPCs to gossip
> among themselves, tracking who told them what, (2) have NPCs who are
> motivated to lie about things, and (3) have NPCs that draw conclusions
> based on what they know. Here's what I'm aiming for (and yes, the
> facts are pretty simple right now):

[snip]

> Has anyone else done anything like this?

In a strange coincidence, Yes. The ORLibrary documentation began as
tutorial which built a Clue-like game ("Who-Dunnit?"). The "suspect" NPCs
did all of the things that you describe except remembering who "taught: them
which topics. The goal of the game was to solve the mystery before the
"inspector" NPC (your nemesis) solved it.

I put the story on the back-burners, before finishing it, because it came
across as "unbalanced" in the tutorial.

OnyxRing com@nospam.com Jim Fisher

unread,
Feb 5, 2004, 7:45:01 PM2/5/04
to
Jay,

As I was discussing my original ORLib Manual efforts with Sam, I ran across
this older article on ORKnowledgeTopic. I don't think any of the material
covered in the article is outdated, but its seemed too detailed for the
average user. When I yanked out the WhoDunnit example from the
documentation, I left many of the details out. This might be of more use to
you:

http://www.onyxring.com/InformGuide.aspx?article=121

Jay Bruckner

unread,
Feb 6, 2004, 4:53:00 PM2/6/04
to
"Jim Fisher" <Jim (At) OnyxRing (Dot) c...@nospam.com> wrote in message news:<gsBUb.33918$ay1.26310@okepread05>...

> Jay,
>
> As I was discussing my original ORLib Manual efforts with Sam, I ran across
> this older article on ORKnowledgeTopic. I don't think any of the material
> covered in the article is outdated, but its seemed too detailed for the
> average user. When I yanked out the WhoDunnit example from the
> documentation, I left many of the details out. This might be of more use to
> you:
>
>
>
> http://www.onyxring.com/InformGuide.aspx?article=121
>
>
> --

thanks jim, both this and medusa are very helpful to me. the
processdialog stuff seems very deep, but also very useful. is there
any documentation about that?

one other question, i don't know much about this community being a
newb and all; is it considered cheesy to implement somebody else's
code like this? i mean, my programming skills are abysmal at best, but
these libraries enable me to make a nice-looking polished game without
endless nested if-elses. like, if i were to implement the conversation
system of medusa in my own game, would that lose me brownie points
with reviewers?

and a totally unrelated question, at what point of development do you
usually start soliciting beta-testers? my game is maybe 1/4 done.
should i do it now, or should i wait till the end, or sometime in
between?

jay

Sam Denton

unread,
Feb 6, 2004, 11:05:14 PM2/6/04
to
jay...@msn.com (Jay Bruckner) wrote in message news:<2a906f0b.0402...@posting.google.com>...

> one other question, i don't know much about this community being a
> newb and all; is it considered cheesy to implement somebody else's
> code like this? i mean, my programming skills are abysmal at best, but
> these libraries enable me to make a nice-looking polished game without
> endless nested if-elses. like, if i were to implement the conversation
> system of medusa in my own game, would that lose me brownie points
> with reviewers?

Is it considered cheesy to illustrate someone else's words like some
of these books do?
http://www.ala.org/ala/alsc/awardsscholarships/literaryawds/caldecottmedal/caldecotthonors/caldecottmedal.htm
At a quick glance I see that books titled "There Was an Old Lady Who
Swallowed a Fly", "Puss in Boots", "Little Red Riding Hood", and
"Hansel and Gretel" have all won awards.

In the case of "picture books", the ALA recognizes the difference
between authorship and illustration, and frequently honors people who
illustrate "classic" stories. Likewise, IF has two aspects:
authorship and coding. Jim has written "classic" code, and has
indicated that he doesn't mind others using it for their own works.
Authorship is hard enough in its own right, no one expects you to be
equally good at both. On the other hand, just re-implementing Medusa
won't get you any more brownie points than rewriting "Gone With the
Wind" will with book reviewers. "The Wind Done Gone" had to fight
harder for recognition than a lot of other Civil War romance novels
did. So, yes, you can use the Medusa code, but if so you should
either have something totally different or else come up with "Medusa
Done Gone" ;-)

> and a totally unrelated question, at what point of development do you
> usually start soliciting beta-testers? my game is maybe 1/4 done.
> should i do it now, or should i wait till the end, or sometime in
> between?

I'm wondering that myself. I'm writing my first game since ~1980 and
have something that's usable now, but I want to roughly double the
"hidden" portions before I go looking. I think I've got all of the
rooms and about 2/3rds of the NPCs defined, but I want to add a lot of
inanimate props and such, and I'm thinking about adding a verb,
CONTEMPLATE, which will allow me to use a lot of text that I can't
figure out what to do with.

OnyxRing com@nospam.com Jim Fisher

unread,
Feb 7, 2004, 12:24:55 AM2/7/04
to
"Jay Bruckner" wrote

> thanks jim, both this and medusa are very helpful to me. the
> processdialog stuff seems very deep, but also very useful. is there
> any documentation about that?

Sadly, the documentation I have on that functionality is limited to the
"discontinued" ORLibrary manual and the "Advanced NPCs" article series where
it is described from a non-ORLibrary perspective (links given previously).
In an alternate reality, where I can do anything and time is never an issue,
I'm writing a manual named "Building High-Powered NPCs with the ORLibrary".
In the real world, I just dream about doing that as I write documentation
more akin to "Building Doors with ORLibrary". It's on my TODO list, though.


> one other question, i don't know much about this community being a
> newb and all; is it considered cheesy to implement somebody else's
> code like this? i mean, my programming skills are abysmal at best, but
> these libraries enable me to make a nice-looking polished game without
> endless nested if-elses. like, if i were to implement the conversation
> system of medusa in my own game, would that lose me brownie points
> with reviewers?

I'd be astounded if it did. The IF Archive is filled with dozens of
extensions and many authors use them; it's encouraged, although it is
expected - and in some cases required - that you give credit to the author
for extensions used in your game.

Some of the most respected IF authors use extensions in their work. Emily
Short credits the authors for eight different extensions in "Savoir-Faire".
I doubt she lost any brownie points.

> and a totally unrelated question, at what point of development do you
> usually start soliciting beta-testers? my game is maybe 1/4 done.
> should i do it now, or should i wait till the end, or sometime in
> between?

It's different for different authors, I think. It seems like a good idea to
me to wait until a game is at least winnable. It might be missing some
scenery objects, perhaps, but at nothing that would stop the beta-tester
from completing the game.

That's just my suggestion, though. Others opinions will vary, I'm sure.

0 new messages