Dynamic system messages

Adventuron: can you change a system message during a game? Eg switch ‘you see: (objects)’, to ‘you smell (objects)’ in a specific scene?

Yes, it would be done with referencing a dynamic string from your system message.

IMPORTANT: You’ll need to use the new beta version at https://adventuron.io/beta , because in writing this answer I noticed the tokenizer was not being used for several system messages, and have since resolved.


start_at = lakeside

locations {
   lakeside       : location "You are by the side of a lake.";
   forest         : location "You are in a forest." ;
connections {
   from, direction, to = [
      lakeside, east,  forest, 
objects {
   coins  : object  "some coins" at = "lakeside" ;
   flower : scenery "a flower" at = "forest" ;
strings {
   see_or_smell : dynamic_string {(
      is_at "forest" ? "smell" : "see" 
themes {
   my_theme : theme {
      system_messages {
         ## \s encodes leading or trailing space
         object_list_header         = You {see_or_smell} :\s
         object_list_header_verbose = You {see_or_smell}\s
1 Like

Got it, thanks Chris. I use the beta version by default now, as that seems to be where all the good stuff is.

1 Like