Garry's suggestion is good.
I documented a different workaround here, which will let you dynamically include (or exclude) choices based on the state of the game. It's a bit wordy, but it should work fine in 8-bit compatibility mode.
start_at = hut
locations {
hut : location "You are in a hut.";
// The location is just for displaying choices.
// As these are all dynamic, there is no location text.
choice_dialog_1 : location "";
}
objects {
// The breadcrumb is used as a marker for the location to return to (at the end of choices)
breadcrumb : object "a breadcrumb" ;
man : scenery "a man" start_at = "hut" ;
}
integers {
// Used to track how many choices are available.
// Always add a failsafe choice to return to the breadcrumb
num_choices_displayed : integer "0" ;
}
booleans {
display_choice_rhino : boolean "true" ;
display_choice_aardvark : boolean "true" ;
display_choice_sorcerer : boolean "true" ;
}
on_describe {
// To let the 'player' how to select choices.
// You can trigger choices however you like in your
// own game.
: if (is_present "man") {
: print "Type CHOICES says the man." ;
}
// If at the choice dummy location 'choice_dialog_1'
// Then show the context of the question, and the choices
// available.
: if (is_at "choice_dialog_1") {
: set_integer var = "num_choices_displayed" value = "0" ;
: print "The man says ... make your choices ...";
: if (display_choice_rhino) {
: increment "num_choices_displayed";
: print "Type 'rhino' to do something.";
}
: if (display_choice_aardvark) {
: increment "num_choices_displayed";
: print "Type 'aardvark' to do something.";
}
: if (display_choice_sorcerer) {
: increment "num_choices_displayed";
: print "Type 'sorcerer' to do something.";
}
// Always add a failsafe choice to return to the breadcrumb
: if (num_choices_displayed == 0) {
: print "No more choices remain. Type 'return' to leave the choice selection dialog.";
}
}
}
on_command {
: match "choices _" {
// Creates the breadcrumb object in the current location.
: create "breadcrumb" ;
: goto "choice_dialog_1" ;
: redescribe;
}
// NOTE: You can't put an 'if' directly underneath 'on_command'
// in 8-bit compatibility mode.
// All choices need to be placed at top level of the on_command block
// This isn't perfect, but it is all that is available for now.
// I'll work on local on_command handlers at location level which should tidy this up a bit.
: match "rhino _" {
// Always have to duplicate the logic
// from the choice display section (on_describe)
: if (is_at "choice_dialog_1" && display_choice_rhino) {
: set_false "display_choice_rhino" ; // Removes the choice dynamically
: print "You chose rhino (rhino will no longer be a choice)." ;
: press_any_key ;
: gosub "return_to_breadcrumb" ;
}
}
: match "aardvark _" {
: if (is_at "choice_dialog_1" && display_choice_aardvark) {
: set_false "display_choice_aardvark" ; // Removes the choice dynamically
: print "You chose aardvark (aardvark will no longer be a choice).";
: press_any_key ;
: gosub "return_to_breadcrumb" ;
}
}
: match "sorcerer _" {
: if (is_at "choice_dialog_1" && display_choice_sorcerer) {
: set_false "display_choice_sorcerer" ; // Removes the choice dynamically
: print "You chose sorcerer (sorcerer will no longer be a choice)." ;
: press_any_key ;
: gosub "return_to_breadcrumb" ;
}
}
: match "return _" {
// Always add a failsafe choice to return to the breadcrumb
: if (is_at "choice_dialog_1" && num_choices_displayed == 0) {
: gosub "return_to_breadcrumb";
}
}
}
subroutines {
return_to_breadcrumb : subroutine {
: goto "breadcrumb" ;
: destroy "breadcrumb" ;
: redescribe;
}
}