Weather Effects

version 3/080508 by Mikael Segercrantz

  • Home page
  • Beginning
  • Previous



  • Example: * A Night in the Woods - Showing how to use the scenes created by this extension in conjunction with Atmospheric Effects.

        "A Night in the Woods"
        
        Include Version 3 of Weather Effects by Mikael Segercrantz.

        The Forest is a room with printed name "In the Forest". The description is "[if it is day]Lush green trees and brushes surround you, as you slowly walk the long and wide path through this forest[otherwise]A darkness seems to surround you, with the trees seeming to lean toward you, as you walk along this narrow path through the forest[end if]."


    Consider the scene changing rule is needed in the following to set up the time-based scenes correctly, as the current version of I7 forbids the use of "The Month is 7. The Day is 20. The Time of Day is 8:25 PM." in the source code, as they're set in a similar manner in the Weather extension.

        When play begins:
            Now the Month is 7;
            Now the Day is 20;
            Now the Time of Day is 8:25 PM;
            Consider the scene changing rules.

        When play begins, change the right hand status line to "[month]/[day] [time of day]".

        When play begins, follow the every turn rules.

        At 8:40 PM: end the game in victory.

        Table of Atmospheric Definition (continued)
      loci  ignoring  subtable  
      The Forest  do not ignore  Table of Forest Definition  


        Table of Forest Definition
      during  initch  latch  aftcnt  curcnt  sctype  runtype  frtype  igtype  subtable  
      During Day  100  100  0  0  random  run forever  default  do not ignore  Table of Day Messages  
      During Night  100  100  0  0  random  run forever  default  do not ignore  Table of Night Messages  


        Table of Day Messages
      used  message  
      0  "The birds chirp happily up in the trees."  
      0  "You can hear a soft rustle from the brushes."  
      0  "A rabbit bounces merrily across the path in front of you."  


        Table of Night Messages
      used  message  
      0  "Wolves howl, not that far away."  
      0  "You feel a pair of eyes watching you."  
      0  "Did that shadow move!? You guess not, but..."  


        Test me with " z / z / z / l / z / z / z / z / z / l / z / z /z / z / z / z ".