I’m hoping that someone can help me out with Brief Mode.
I have my game in lookmode = 1; But none of my rooms will go brief. They all print long descriptions.
I’ve found this in the verblib.h. It looks like it deals with the room description.
! The room description (if visible)
if (lookmode < 3 && visibility_ceiling == location) {
if ((allow_abbrev ~= 1) || (lookmode == 2) || (location hasnt visited)) {
if (location.&describe) RunRoutines(location, describe);
else {
if (location.description == 0) RunTimeError(11, location, description);
else PrintOrRun(location, description);
}
}
}
So I’ve even tried: has visited; in one of the rooms, but I can’t get it to drop the decription.
Does anybody know what I’m missing here? Or how visited works?
BTW, the game does go into superbrief. I’m using the 6.12.5 library set.
Change the default BRIEF lookmode into SUPERBRIEF or VERBOSE
Normally, an Inform game will set BRIEF as the default look mode, which gives long descriptions of places never before visited and short descriptions otherwise. You can change this by setting the variable lookmode to a suitable value:
lookmode = 1; ! BRIEF mode.
lookmode = 2; ! VERBOSE mode (always long descriptions).
lookmode = 3; ! SUPERBRIEF mode (always short descriptions).
First visit should give you long description. Subsequent visits should give you short description. Is this not so?
I think you should post a short illustration code to show the problem, maybe 2 rooms, so people can help. I don’t see anything wrong with your approach. Lookmode=1 should be the default.
RoomObj -> firstRoomObj "room"
with name 'room',
description [;
<<Look firstRoom>>;
],
I’m pretty sure this is the problem.
Look firstRoom; (command)
Will always give long description. Try putting in temporary text and see what happens. If not this, then maybe someone else who is more well versed with the library can help.
Oh, well. I tried. Hopefully somebody smarter than me can help. Maybe it’s the way you structure your Room and RoomObj (and class declaration and instantiation), but that kind of manipulation is beyond me. Sorry.
You usually don’t do it that way. The use of PlayerTo is considered advanced usage. I think there’s a second form of PlayerTo(Room,2) where it changes description behavior. Please consult DM4 manual for details.
the north and downwards to south, pale white like shark’s
teeth in the diffused light from the sodium lamp above.",
ne_to Shrine, n_to Canyon_N, u_to Canyon_N,
s_to Canyon_S, d_to Canyon_S,
is commonly done. From DM4.
I don’t think you should split room description on each separate files either.
Really, I think DM4 is the go to document for Inform6.
But why? What is being set? It has something to do with “location hanst visited” in the code above.
Is there any way to set visited?
Doing something like s_to secondRoom, wouldn’t work. I’m doing that for a reason. If I could set visited and stop it from printing the room description, it would help.
Visited should be set automatically. That’s why I suggested doing it the standard way. If that doesn’t work, then there may be a bug.
Fixing it will involve deep dive into the library, and that’s not something I do. Sorry.
If you want to hack it, I’d just replace the description with a routine (not a command) that returns appropriate text depending on has visited. But even that is too much for me. I usually just ignore the problem. If it’s library bug, then it will automatically be resolved … eventually.
Yeah. I’ve been digging in the library, and I can see visited is being set. So now I think it might have something to do with allow_abbrev. I need to see where that’s changed.
You seem to be working against the library rather than with it. This is bound to get you into trouble.
A routine in an exit property (like s_to) should never move the player. It should either print a message saying why you can’t go there and return true, return 0 if the player just can’t go there, or return the room or door they’ll get to of going that direction.
Just like the description property of a room should just print the description text, not invoke a Look action.
You should set lookmode = 1 in your Initialise routine. There’s no need to muck about with it anywhere else, except perhaps for testing it.
As @fredrik said, don’t use PlayerTo() in your n_to, etc. routines and when you do use it, use the optional flag with a value of 2 to have it behave the same as lookmode = 1, i.e. PlayerTo(room, 2).