hey! i have a set up where the first time a player enters a room, they get a full description. then on their next visits, they get a briefer one. when they do the “look” command, they get the full one.
problem is, every time you do “move player to whateverroom”, it shows a full description instead of the briefer one you get from moving manually with cardinal directions. how would i go about fixing this? i almost exclusively use move player to in my game, so it kind of renders my whole system useless.
here’s the code i’m using to do this system:
A room can be viewed. A room is usually not viewed.
After looking: now the location is viewed.
Before looking:
if the noun is nothing:
now the location is not viewed.
that doesn’t work with the “look” command. when i use the unvisited property to hide some text to make it brief, when the player does the look command, it’s still hidden. this isn’t very ideal, which is why i tried this system
tried that as well, but it gets rid of the entire description. i want it to be one of my brief descriptions, or for “move player to whateverroom” to act like the player just did “north” or something.
Yes, so you could create a phrase which move the player without printing the description, then test the visited status of the destination room and endlly write and display the correct description - brief or full.
EDIT : it is better if the visited status is checked before moving the player, of course…
i suppose i could, but that’s my last resort. the amount of manual writing out of titles and bolded stuff and line breaks would be a massive pain : (
no, i have custom “brief” descriptions, like so:
The Lobby is a room. "[if not viewed]A well decorated lobby. It's very brown. Blah blah details. [end if]The elevator is to the west."
my problem is that when i do “move player to the lobby”, it shows the full description, even if the player has visited before. otherwise, this works completely fine
same issue as [unvisited] from earlier, unfortunately : ( i need the player to be able to see the inital long description by doing the “look” command.
i’ve tried a few different systems off of here now, and all of them have the same problem. i’m starting to think doing “move player to whateverroom” runs the look command, making my efforts completely impossible. not quite sure though
Well, I don’t know what’s going on now. [unvisited] does work for me. This is the code I used:
The Lobby is a room. "[if unvisited]A well decorated lobby. It's very brown. Blah blah details. [end if]The elevator is to the west."
The Elevator is west of the Lobby.
Instead of jumping:
if the player is not in the Lobby:
move the player to the Lobby;
otherwise:
continue the action.
Test me with "west / jump".
Result:
Lobby
A well decorated lobby. It’s very brown. Blah blah details. The elevator is to the west.
>test me
(Testing.)
>[1] west
Elevator
>[2] jump
Lobby
The elevator is to the west.
Is there something else in your code that could be interfering with “visited”?
A room has a text called the brief description.
The Garden is a room. The description of the Garden is "A garden with lots of flowers.". The brief description of the Garden is "A garden.".
[...]
move the player to the garden, without printing a room description;
say "[brief description of garden]".
Both the LOOK command and moving the player print room descriptions due to the Standard Rules. You can change these if you wish.
Carry out looking (this is the room description body text rule):
[lots of test cases];
print the location's description;
[...]
Report an actor going (this is the describe room gone into rule):
if the player is the actor:
if the action is not silent:
produce a room description with going spacing conventions;
One way to do this is to use the built-in BRIEF logic, except tweak the room description rule so that the description is not actually skipped in BRIEF mode. Instead, we just set a flag that the rooms can use to decide which description to use.
The Kitchen is a room. The description is "You are in the[if fullmode] verbosely described[end if] kitchen."
The Darkroom is east of the Kitchen. The Darkroom is not lighted.
The brief-tweaked room description body text rule response (A) is "[if fullmode]It is pitch dark, and you can't see a thing[else]Dark[end if]."
The Pantry is south of the Kitchen. The description is "You are in the[if fullmode] lovingly described[end if] pantry."
Brief-room-flag is a truth state that varies.
To decide whether fullmode:
if brief-room-flag is false:
decide yes.
This is the brief-tweaked room description body text rule:
now brief-room-flag is false;
if the visibility level count is 0:
if set to abbreviated room descriptions, continue the action;
if set to sometimes abbreviated room descriptions and
abbreviated form allowed is true and
darkness witnessed is true,
now brief-room-flag is true;
begin the printing the description of a dark room activity;
if handling the printing the description of a dark room activity:
now the prior named object is nothing;
say "[It] [are] pitch dark, and [we] [can't see] a thing." (A);
end the printing the description of a dark room activity;
otherwise if the visibility ceiling is the location:
if set to abbreviated room descriptions, continue the action;
if set to sometimes abbreviated room descriptions and abbreviated form
allowed is true and the location is visited, now brief-room-flag is true;
print the location's description;
The brief-tweaked room description body text rule is listed instead of the room description body text rule in the carry out looking rules.
The brief-tweaked room description body text rule is copied straight from the Standard Rules, except I changed two instances of “continue the action” to “now brief-room-flag is true”. (And I set that flag false at the beginning of the rule.)
“Print the location’s description” is only invoked in this one place, so relying on a global flag won’t cause any problems.
I gave Darkness a brief-mode description too, by the way. Although I did it by defining the regular version in the rule and then altering the response (A) for that rule. I guess that was a bit circuitous.
that doesn’t print the room title and such, which is what i was referring to with messing with bold and line breaks and stuff. that syntax does line up with another extension i was having this problem with though, so if i just deal with typing out titles or adding that as another text, it might work.
glad to know that existed, i had no clue what people were talking about when i saw them mention that.
had to make a new project and paste this in + mess around with it to understand it, but it works perfectly! just had to add a Use brief room descriptions. at the top of the story to make it brief by default. it supports user choice too, which is always a plus. thank you so much! : )