creating object links without using the object alias?

Doug Egan
23 Nov 2018, 01:21

I'm getting pretty far into my first game, and using a lot of object links in my text {object:objname}.

But this format can only print a link with the alias of the object. Suppose I want to print a link to objname, with its associated verbs, but use an alternate printed name for the object? This would be so simple to do for a html hypertext link, but I can't find any documentation to do the same thing with Quest object links.

Is there a way to do this, short of writing a script to change the alias of the object, print the link, then change the alias back to the original name, which seems wildly impractical.

Thanks to all at this forum for the great help so far.


Curt A. P.
23 Nov 2018, 02:31

You can also put expressions inside. Don't use the alias.
Create object hyperlinks like this: {object:" + object.name + "}


Edit: Objects must be reachable for the player to become hyperlinked.
Reachable are all items...

  • ...in the same room as the player,
  • ...items in the inventory,
  • ...items inside containers which are open (unlocked is not the same as open).

The Pixie
23 Nov 2018, 07:51

Suppose I want to print a link to objname, with its associated verbs, but use an alternate printed name for the object?

That is generally what the alias is.

Can you give an example of what you are trying to do?


mrangel
23 Nov 2018, 11:00

{object:objectname:the alias you want to display}


Doug Egan
23 Nov 2018, 12:12

mrangel, That works perfectly!

to Pixie's question, for scenery objects in particular, which are embedded in a room description and not listed at the bottom as "you can see" I find it easier to read and edit the room descriptions if I can use the room description to force how the object will print itself. I know it's not very object-oriented of me, but this is a case where I don't want to be.


Doug Egan
23 Nov 2018, 12:13

mrangel, That works perfectly!

to Pixie's question, for scenery objects in particular, which are embedded in a room description and not listed at the bottom as "you can see" I find it easier to read and edit the room descriptions if I can use the room description to force how the object will print itself. I know it's not very object-oriented of me, but this is a case where I don't want to be.


Curt A. P.
23 Nov 2018, 21:36

mrangel
Oh, neat... Didn't know this a thing too.