Where I should place the "treasure_hunt_mode" line?
That's correct. treasure_hunt_mode applies to the whole game.
If you use default mode, it automatically determines the end of the game for you and prints the message in the all_treasures_found_win_game system message.
If you use bespoke mode, you have to determine the end of the game yourself. That's what Adventuron was describing. This is where you get the opportunity to clear the screen and remove the status bar.
Reading back through your thread, it looks like you want to clear the screen when the game is over. It's 2:00 a.m. here, so I haven't got time to solve your problem right now, but Adventuron did describe this in the documentation thread (the one that's now locked). He gave you two methods to do this. Can you please try this and get back to me if it doesn't work. Remember that the code he gave you goes into the on_tick{} block. If it doesn't work, post the whole of your on_tick{} block here.
I've tried as you described. Doesn't work.
on_tick { : set_integer var = "rnd_tick" {(random(count_descs))} ; : if (treasure_deposited() == treasure_total()) { : clear_screen hide_status_bar = "true" ; : print "You remember nothing, just have the feeling that this night was full of fear and adventure."; : win_game ; } }
And the result screen attached. I don't want the red header to be shown.
It looks like as soon as you print something, the status bar comes back. I'm not sure if this is by design or not. Unless Adventuron has a better solution, I think the best way to overcome your problem is to apply a new theme without a status bar before clearing the screen. Here is a complete game based on the treasure hunt example in the tutorial that does what you want.
start_at = treasure_room
treasure_room = treasure_room
start_theme = two
locations {
treasure_room : location "The treasure room";
tomb : location "A tomb";
}
connections {
from, direction, to = [
treasure_room, east, tomb,
]
}
objects {
lamp : object "a lamp" at = "tomb" treasure = "true";
}
game_settings {
treasure_hunt_mode = bespoke
}
on_tick {
: if (treasure_deposited() == treasure_total()) {
: set_theme "my_theme";
: clear_screen;
: print "You remember nothing. You just have the feeling that this night was full of fear and adventure.";
: win_game;
}
}
themes {
my_theme : theme {
extends = two
theme_settings {
layout = D X O
}
}
}