How to change the default exit list prefix/suffix?

writtenhigh
05 Jan 2016, 18:04
"You can go..." does not fit with the flavor of my game, but I can't find any way to change the default prefix across all rooms.

Also, if you add a suffix (which I already forgot how I did, though I was able to find it in the code), Quest adds a space between the final direction and the suffix, and then adds a period at the end. I don't want a space, I want a comma, and I don't want a period at the end, I was an exclamation point.

This is my first time working with Quest and working on a text adventure, so I'm not super familiar with code structure or layout yet. My initial thought is that I'm going to have to start tinkering with the libraries, but I'm not sure where to begin.

Also, if someone could point me to a resource on changing the room description after the first entrance. My initial descriptions are rather long and flavorful, and I want to pair them down to just the basics for subsequent viewings.

Thanks.

OurJud
05 Jan 2016, 18:41
For a second visit you can either use {once} or 'First time / otherwise'. Not sure how you use the {once}, but the other:

Click 'room' tab on your room >> Change 'Text' to 'Run script' from the dropdown menu >> Click 'Add new script' >> scroll down until you find 'First time...' >> You'll now have a First time / Otherwise script >> Click 'Add new script' for each of these and choose the 'Print' option. You will then have a descrition for first visit, and one for subsequent visits.

As for your first question. The prefix can be turned off in the 'Room descriptions' tab in Game, although I'm not sure how or if the wording can be changed.

writtenhigh
05 Jan 2016, 18:52
Thanks! Definitely fixes my room description problem.

As for the prefixes, I don't really want to turn them off, per se, just print them with my own verbiage. Though, if there's a way I can print available directions, and print a message after every room description, I could turn off the default prefixes and just script my own.

OurJud
05 Jan 2016, 19:33
I presume you mean auto-print available directions?

Not sure how you'd do that, but for what it's worth I have all the auto stuff turned off, and simply include anything relevent (objects, exits, etc) in the description itself.

writtenhigh
05 Jan 2016, 19:37
Yeah, I do mean the auto-print. My game is pretty cerebral, and while it's technically possible to know what directions are available, I'd rather print it in plain english at the end so that it's not left up to guesswork.

OurJud
05 Jan 2016, 21:06
writtenhigh wrote:Yeah, I do mean the auto-print. My game is pretty cerebral, and while it's technically possible to know what directions are available, I'd rather print it in plain english at the end so that it's not left up to guesswork.


Just add them to the description then. It can't be that much work just to stick a few directions in at the end of your description.

i.e

This is the room description. Bla bla bla bla bla.

You can north, east or west.


writtenhigh
05 Jan 2016, 21:10

It can't be that much work just to stick a few directions in at the end of your description.



It is when the room description changes based on the player's status, revealing more or less detail, and having up to 10 unique descriptions per room.

OurJud
05 Jan 2016, 21:28
Ten unique descriptions?? Wow, that's going to be a lot of hard work.

writtenhigh
05 Jan 2016, 21:39
OurJud wrote:Ten unique descriptions?? Wow, that's going to be a lot of hard work.


Yeah. I mean, it depends on the room and its importance to the story as a whole. Some rooms might only have one or two descriptions. But the player's mental status occurs on a scale, and their perception of their surroundings changes as their mental status does. That is, they might notice something in a room at one end of the scale, but not at the other.

I don't take on small projects. Haha.

But hence the need to automate any of the trivial things that I can. :D

OurJud
05 Jan 2016, 21:46
Ah, I see. Good luck :)

writtenhigh
06 Jan 2016, 22:29
I figured it out, finally, now that I know that I can see the library functions within the gui.

Create a copy of the English library and modify the template

<template name="GoListHeader">You can go</template>


to say whatever verbiage you'd like. Then import the library into your game. This will only effect newly created rooms, as this is what it loads into the editor.

To edit the suffix, copy the CoreDescriptions library and modify

if (i = game.autodescription_youcango) {
exits = FormatExitList(game.pov.parent.exitslistprefix, GetExitsList(), Template("Or"), ".")


The "." at the end is how it terminates the exit list, so you can change it to an exclamation point, or whatever you'd like. Then import that library.

Works like a charm, and now my game has exactly the flavor I was looking for.

You could presumably also change "game.pov.parent.exitlistprefix" to whatever you want, and then it would affect existing rooms and well as new rooms, but this option allows the opportunity to make changes on a room by room basis.

HegemonKhan
07 Jan 2016, 01:59
I'm not sure if this applies for what you already did, but you can create your own templates without going into the underlying~internal quest code:

http://docs.textadventures.co.uk/quest/ ... lates.html

I haven't yet studied how to use them decently, yet. So, you'll have to get help from someone else on them, if you need any help with them.

Templates are very useful, as they make it easy to do specific messages where-ever you want (and also makes it easy to change them, such as for the common example of~with~for translating quest into other language, but it can be for your game content too of course, as you don't have to manually do so throughout your entire game if you weren't using templates for specific messages, lol). I need to learn how to use them... at some point, when I get to needing to use them (still trying to do basic character creation stuff, sighs).