Advertisement
Guest User

Untitled

a guest
Jun 21st, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.52 KB | None | 0 0
  1. [Bracketed text prior to the command sequence denotes a comment.]
  2. ((priority 8))
  3. >explain syntax
  4. Note that backslashes (\\) must be used to escape special characters, including themselves, but only if said special characters would otherwise have a meaning at the position they're used.
  5. Lines with any number of dashes by themselves break up sections. Each section is of the following form:
  6. \\ optional square-bracketed text not preceded with >: comments
  7. \\ all but last line of non bracketed text preceded with >: preconditions
  8. \\ one last line of non bracketed text preceded with >: trigger
  9. \\ parenthesized or square-bracketed text preceded with >: post-conditions -- pseudo-triggers to add into the satisfied precondition log before or after the trigger proper, respectively
  10. \\ flavor text
  11. Wildcards (\*) can be used in preconditions and triggers, named wildcards (\*:x for any x) can be used anywhere so long as the first occurrence in the section for any given x is in a precondition or trigger, and negation (!) can be used in preconditions and post-conditions. A wildcard matches any log entry of the form given. Non-named wildcards are each unique, but named wildcards with the same name must refer to equivalent substrings (spanning only within the section). A precondition negation only matches wherever the affirmative counterpart would not match, and a post-condition negation is logged into the satisfied precondition log at the position appropriate to the type of bracket used, but will eclipse all preceding instances matching its affirmative counterpart, including the trigger if the trigger matches and square brackets are used for the negative post-condition in question. If no flavor text is given, or the flavor text has named wildcards, then the preconditions and post-conditions given (as well as the flavor text, if applicable) also apply to any other section with a trigger matching the donor section's trigger, prior to the respective elements of the recipient section.
  12. The trigger and post-conditions, including those received from out-of-section under the above clause, are only committed to the satisfied precondition log if all preconditions, including those received from out-of-section under the above clause, are met.
  13. Only one section with flavor text that contains no wildcards will be run. Which section is run is decided first by most precedent priority (specified with the "priority" directive, defaults to special value "infinity," also supports special value "disable" which effectively comments out the whole section), second by highest number of preconditions, and third by highest number of wildcards, counting only the first occurrence of any specific named wildcard.
  14. Priority is also used to decide execution order for donor sections.
  15. -----
  16. >go *:dest
  17. >(! in *)
  18. >[in *:dest]
  19. -----
  20. [As an alternative to the format described above, sections may also be simply lists of pattern equivalencies. Wildcards may be used here as well, but not negation. Preconditions, however, may also apply to these, and can include negation as so applied. The preconditions must be parenthesized. Note that an input string need not match patterns exactly; the verbatim sections of the pattern need only include words of the input string at that position in the proper order, with none in between, and need not also be the other way around. However, if ambiguity is created by this policy of loose interpretation, the player will be asked to disambiguate, rather than simply all matching sections being run at once.]
  21. look at = look = examine = x = check
  22. get = take = grab
  23. (>in gross smelly swamp)
  24. monster = loch ness monster
  25. -----
  26. [Besides being its own section, a pattern equivalency list can also be the header of a normal section, in which case it applies only in the course of that section. This is called an assumption.]
  27. hand it over = give Mike the notebook
  28. >in hallway
  29. >have notebook
  30. >give Mike the notebook
  31. >[! have notebook]
  32. He nods appreciatively.
  33. -----
  34. [Assumptions can be reified by giving them their own section but giving that section a name with a "when" directive. This is called a context. The section then does NOT apply globally, unlike an unnamed pattern equivalency list in its own section, but is VISIBLE globally, and can be made to apply to a section by referring to the name using an "assume" directive. Assume directives can also be added to when directives, to make a context imply another context.]
  35. ((when the moon is full))
  36. transform = be werewolf
  37. -----
  38. >in hallway
  39. ((assume the moon is full))
  40. >be werewolf
  41. You are now a werewolf.
  42. -----
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement