Quest 6 - Question/Request - Use of text processor parameters in room descriptions
![](https://i.imgur.com/IupEsRDb.jpg)
Kernog
22 Aug 2021, 12:37I would like to have a room description have a couple variations depending on the POV character's gender. This would mean using the text processor's {pv:}
, {pa:}
, etc. in some occurences.
In this current version of Q6 (0.8), these functions require the use of a msg function to define the parameters it will use (as I understand it).
The issue is that a room's desc must always be a string, so I must use a workaround, such as writing desc
as a function returning a string (which is slightly more cumbersome as I must concatenate player.pronouns.xxxx
), or using the afterEnter
property.
My question/request is (or rather are):
- Is there a way to use the text processors conjugation functions without a parameter, or to define the item by its name instead of a parameter, or even to default to
player
orchar
if there is noitem
property - Is there a possibility in a future version to make the
desc
property a "printOrRun" function, like theexamine
property of items
The Pixie
22 Aug 2021, 20:35One way to do it in the current version would be to pass the string through processText before returning it.
desc:function() {
let s = ''
// ...
return processText(s, params)
}
The reason it wants a string returned is so the text processor can be used, together with settings.roomTemplate
. If the parameters had player built in, would that do what you want? Looking at the code, some directives do that already, so it would be good if the all did.