Reactable Quips

version 10 by Michael Martin

  • Home page
  • Beginning
  • Previous
  • Next



  • Section 1 - Quips

    A quip is a kind of value. The quips are defined by the Table of Quip Texts. The specification of quip is "Represents a line or exchange of dialogue, which may be linked to other quips via followups or linked to ask or tell responses."

    The current quip is a quip that varies. The current quip is quip_null.
    The pertinent quip is a quip that varies. The pertinent quip is quip_null.

    A person has a quip called default ask quip. The default ask quip of a person is usually quip_null.
    A person has a quip called default tell quip. The default tell quip of a person is usually quip_dtell.

    Quipping is an activity. The last for quipping rule (this is the basic quipping rule): say "[quiptext of the current quip][paragraph break]";

    To deliver the (q - quip) quip:
        now the current quip is q;
        carry out the quipping activity;
        let rq_index be 0;
        repeat through Table of Quip Followups:
            if the current quip is the quip entry:
                increase rq_index by 1;
                say "[bracket][rq_index][close bracket] [option entry][line break]";
        if rq_index is not 0:
            now the pertinent quip is the current quip;
            now the number understood is 0;
        otherwise:
            now the pertinent quip is quip_null.

    To nest the (q - quip) quip:
        let x be the current quip;
        now the current quip is q;
        carry out the quipping activity;
        now the current quip is x.

    To decide whether RQ is active:
        If the pertinent quip is quip_null, no;
        yes.

    Requesting a recap is an action out of world applying to nothing. Understand "repeat" or "recap" as requesting a recap when RQ is active.

    Carry out requesting a recap (this is the perform recap rule):
        let rq_index be 0;
        repeat through Table of Quip Followups:
            if the quip entry is the pertinent quip:
                increase rq_index by 1;
                if rq_index is 1, say "[RQ options prologue][paragraph break]";
                say "[bracket][rq_index][close bracket] [option entry][line break]";
        if rq_index is 0, say "[RQ no options][paragraph break]".

    Responding with is an action applying to one number.
    Understand "[number]" or "say [number]" as responding with when RQ is active.

    [This rule Can't Run, as the Understand commands stand..]
    [Carry out responding with when the pertinent quip is quip_null (this is the can't talk out of conversations rule):
    say "[bracket]BUG: Responded despite there being no conversation options available![close bracket]".]

    [Likewise, this test is redundant.]
    Carry out responding with [when the pertinent quip is not quip_null] (this is the perform responding rule):
        let rq_index be 0;
        repeat through Table of Quip Followups:
            if the quip entry is the pertinent quip:
                increase rq_index by 1;
                if rq_index is the number understood:
                    deliver the result entry quip;
                    rule succeeds;
        follow the RQ out of range rules for rq_index.

    Before doing something [other than requesting a recap or responding with] when the pertinent quip is not quip_null (this is the force conversation rule):
        unless the current action is requesting a recap or the current action is responding with:
            say "[RQ reaction demand][paragraph break]";
            stop the action.

    The force conversation rule is listed first in the before rules.

    This is the reaction is instantaneous rule:
        if RQ is active, rule succeeds.

    The reaction is instantaneous rule is listed before the every turn stage rule in the turn sequence rules.