X-Git-Url: https://jxself.org/git/?p=inform-resources.git;a=blobdiff_plain;f=informqr%2Finformqr.md;fp=informqr%2Finformqr.md;h=490805c78ad3b363cad486536ac0a46135c637e5;hp=40a9fadb490523c262f647afef6d9aaa6b836287;hb=35c3c337689ee792b9f708c5d3ace5d133736cf1;hpb=582be378714b41937fb2cc99c4d6f8e96c76a910 diff --git a/informqr/informqr.md b/informqr/informqr.md index 40a9fad..490805c 100644 --- a/informqr/informqr.md +++ b/informqr/informqr.md @@ -520,4 +520,61 @@ To assign to one of 32 'low string' variables: string N "string"; Lowstring string_var "string"; - string N string_var; \ No newline at end of file + string N string_var; + +Verbs and Actions +----------------- + +To specify a new verb: + + Verb 'verb ' 'verb ' ... 'verb ' + * token token ... token -> action + * token token ... token -> action + ... + * token token ... token -> action; + +where instead "`Verb`" can be "`Verb meta`", "*action*" can be +"`action reverse`"; *tokens* are optional and each is one of: + + ----------------- ---------------------------------------------- + 'word' that literal word + 'w1'/'w2'/... any one of those literal words + attribute an object with that attribute + creature an object with `animate` attribute + held an object held by the player + noun an object in scope + noun=`routine` an object for which *routine* returns `true` + scope=`routine` an object in this re-definition of scope + multiheld one or more objects held by the player + multi one or more objects in scope + multiexcept as multi, omitting the specified object + multiinside as multi, omitting those in specified object + topic any text + number any number + routine a general parsing routine + ----------------- ---------------------------------------------- + +To add synonyms to an existing verb: + + Verb 'verb ' 'verb ' ... = 'existing_verb'; + +To modify an existing verb: + + Extend 'existing_verb ' last + * token token ... token –> action + * token token ... token –> action + ... + * token token ... token –> action ; + +where instead "`Extend`" can be "`Extend only`" and "`last`" can be +omitted, or changed to "`first`" or "`replace`" + +To explicitly trigger a defined action (both *noun* and *second* are +optional, depending on the action): + + ; + +To explicitly trigger a defined action, then return `true` from the +current routine: + + <>; \ No newline at end of file