Changeset 680


Ignore:
Timestamp:
12/04/10 03:47:13 (9 years ago)
Author:
technomage
Message:

Patch by Technomage

  • Updated/wrote code documentation for the core dialogue subsystem modules dialogue.py, dialogueengine.py, dialogueactions.py, and dialogueparsers.py.
  • Updated/created flowcharts and UML diagrams explaining the new DialogueEngine? and how it functions.
  • Made a few minor changes to the dialoguegui.py module to make the class logger less visible.
  • Removed the "this is a sample dialogue file" crud from the old_man.yaml test dialogue file.
Location:
trunk/game
Files:
2 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/game/design/DialogueEngine_DataStructures_Techdemo2.graphml

    r668 r680  
    3939          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="21.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="69.0" x="28.5" y="3.0">Dialogue</y:NodeLabel> 
    4040          <y:UML clipContent="true" constraint="" omitDetails="false" stereotype="" use3DEffect="true"> 
    41             <y:AttributeLabel>npc_id 
     41            <y:AttributeLabel>npc_name 
    4242avatar_path 
    4343start_node_id</y:AttributeLabel> 
     
    5050      <data key="d3"> 
    5151        <y:ShapeNode> 
    52           <y:Geometry height="34.0" width="63.0" x="-60.0" y="98.0"/> 
     52          <y:Geometry height="34.0" width="36.05901639344262" x="-60.0" y="98.0"/> 
    5353          <y:Fill color="#FFCC00" transparent="false"/> 
    5454          <y:BorderStyle color="#000000" type="line" width="1.0"/> 
    55           <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="53.0" x="5.0" y="7.5">node_id</y:NodeLabel> 
     55          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="15.0" x="10.52950819672131" y="7.5">id</y:NodeLabel> 
    5656          <y:Shape type="rectangle3d"/> 
    5757        </y:ShapeNode> 
     
    6363      <data key="d3"> 
    6464        <y:UMLClassNode> 
    65           <y:Geometry height="126.0" width="221.33333333333326" x="484.8300546448088" y="-108.9803278688525"/> 
     65          <y:Geometry height="61.261475409836066" width="188.40546448087423" x="484.83005464480885" y="-76.61106557377053"/> 
    6666          <y:Fill color="#FFCC00" transparent="false"/> 
    6767          <y:BorderStyle color="#000000" type="line" width="1.0"/> 
    68           <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="21.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="115.0" x="53.16666666666663" y="27.0">DialogueAction</y:NodeLabel> 
     68          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="21.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="115.0" x="36.702732240437115" y="27.0">DialogueAction</y:NodeLabel> 
    6969          <y:UML clipContent="true" constraint="" omitDetails="false" stereotype="abstract" use3DEffect="true"> 
    70             <y:AttributeLabel>keyword</y:AttributeLabel> 
    71             <y:MethodLabel>__init__(self, *args, **kwargs) 
    72 __call__(self, game_state)</y:MethodLabel> 
     70            <y:AttributeLabel/> 
     71            <y:MethodLabel/> 
    7372          </y:UML> 
    7473        </y:UMLClassNode> 
     
    8584          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="21.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="123.0" x="1.5" y="3.0">DialogueSection</y:NodeLabel> 
    8685          <y:UML clipContent="true" constraint="" omitDetails="false" stereotype="" use3DEffect="true"> 
    87             <y:AttributeLabel/> 
     86            <y:AttributeLabel>id</y:AttributeLabel> 
    8887            <y:MethodLabel/> 
    8988          </y:UML> 
     
    9695      <data key="d3"> 
    9796        <y:UMLClassNode> 
    98           <y:Geometry height="82.0" width="120.0" x="235.47465088038848" y="-86.9803278688525"/> 
     97          <y:Geometry height="67.0" width="120.0" x="235.47465088038848" y="-79.4803278688525"/> 
    9998          <y:Fill color="#FFCC00" transparent="false"/> 
    10099          <y:BorderStyle color="#000000" type="line" width="1.0"/> 
    101100          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="21.0" modelName="internal" modelPosition="b" textColor="#000000" visible="true" width="108.0" x="6.0" y="3.0">DialogueNode</y:NodeLabel> 
    102101          <y:UML clipContent="true" constraint="" omitDetails="false" stereotype="" use3DEffect="true"> 
    103             <y:AttributeLabel>id 
    104 text</y:AttributeLabel> 
     102            <y:AttributeLabel>text</y:AttributeLabel> 
    105103            <y:MethodLabel/> 
    106104          </y:UML> 
     
    111109      <data key="d7"> 
    112110        <y:PolyLineEdge> 
    113           <y:Path sx="-63.0" sy="-0.0" tx="31.5" ty="-0.0"/> 
     111          <y:Path sx="-63.0" sy="-0.0" tx="18.02950819672131" ty="-0.0"/> 
    114112          <y:LineStyle color="#000000" type="line" width="1.0"/> 
    115113          <y:Arrows source="none" target="white_diamond"/> 
    116           <y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="six_pos" modelPosition="ttail" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="57.0" x="-98.848388671875" y="2.0">sections</y:EdgeLabel> 
    117           <y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="six_pos" modelPosition="thead" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="26.0" x="-98.848388671875" y="-21.0">1..*</y:EdgeLabel> 
     114          <y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="six_pos" modelPosition="ttail" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="57.0" x="-125.78279574034644" y="2.0">sections</y:EdgeLabel> 
     115          <y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="six_pos" modelPosition="thead" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="26.0" x="-125.78279574034644" y="-21.0">1..*</y:EdgeLabel> 
    118116          <y:BendStyle smoothed="false"/> 
    119117        </y:PolyLineEdge> 
     
    133131    </edge> 
    134132    <edge id="e2" source="n4" target="n5"> 
    135       <data key="d6"/> 
    136133      <data key="d7"> 
    137134        <y:PolyLineEdge> 
     
    148145    </edge> 
    149146    <edge id="e3" source="n0" target="n5"> 
    150       <data key="d6"/> 
    151147      <data key="d7"> 
    152148        <y:PolyLineEdge> 
     
    163159    </edge> 
    164160    <edge id="e4" source="n3" target="n5"> 
    165       <data key="d6"/> 
    166161      <data key="d7"> 
    167162        <y:PolyLineEdge> 
     
    169164          <y:LineStyle color="#000000" type="line" width="1.0"/> 
    170165          <y:Arrows source="none" target="white_diamond"/> 
    171           <y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="six_pos" modelPosition="ttail" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="50.0" x="-119.25661132664277" y="1.9999997373486735">actions</y:EdgeLabel> 
    172           <y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="six_pos" modelPosition="thead" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="10.0" x="-119.25661132664277" y="-21.000000262651326">*</y:EdgeLabel> 
     166          <y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="six_pos" modelPosition="ttail" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="50.0" x="-119.24837158054902" y="1.9999997373486735">actions</y:EdgeLabel> 
     167          <y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="six_pos" modelPosition="thead" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="10.0" x="-119.24837158054902" y="-21.000000262651326">*</y:EdgeLabel> 
    173168          <y:BendStyle smoothed="false"/> 
    174169        </y:PolyLineEdge> 
  • trunk/game/design/DialogueEngine_Techdemo2.graphml

    r668 r680  
    1414  <graph edgedefault="directed" id="G"> 
    1515    <node id="n0" yfiles.foldertype="group"> 
     16      <data key="d1"/> 
     17      <data key="d3"> 
     18        <y:ProxyAutoBoundsNode> 
     19          <y:Realizers active="0"> 
     20            <y:GroupNode> 
     21              <y:Geometry height="1440.1195796724764" width="1201.8111384344897" x="-196.89291093233533" y="242.02677595628438"/> 
     22              <y:Fill color="#F5F5F5" transparent="false"/> 
     23              <y:BorderStyle color="#000000" type="dashed" width="1.0"/> 
     24              <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="22.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="1201.8111384344897" x="0.0" y="0.0">     DialogueEngine</y:NodeLabel> 
     25              <y:Shape type="roundrectangle"/> 
     26              <y:State closed="false" innerGraphDisplayEnabled="false"/> 
     27              <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/> 
     28              <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.279739625508455" top="0" topF="0.0"/> 
     29            </y:GroupNode> 
     30            <y:GroupNode> 
     31              <y:Geometry height="50.0" width="50.0" x="546.0" y="220.52677595628438"/> 
     32              <y:Fill color="#F5F5F5" transparent="false"/> 
     33              <y:BorderStyle color="#000000" type="dashed" width="1.0"/> 
     34              <y:NodeLabel alignment="right" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="22.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="50.0" x="0.0" y="0.0">1</y:NodeLabel> 
     35              <y:Shape type="roundrectangle"/> 
     36              <y:State closed="false" innerGraphDisplayEnabled="false"/> 
     37              <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/> 
     38              <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/> 
     39            </y:GroupNode> 
     40          </y:Realizers> 
     41        </y:ProxyAutoBoundsNode> 
     42      </data> 
     43      <graph edgedefault="directed" id="n0:"> 
     44        <node id="n0::n0" yfiles.foldertype="group"> 
     45          <data key="d1"/> 
     46          <data key="d3"> 
     47            <y:ProxyAutoBoundsNode> 
     48              <y:Realizers active="0"> 
     49                <y:GroupNode> 
     50                  <y:Geometry height="631.1011982179715" width="442.29106996183054" x="541.656908852535" y="636.0000000000001"/> 
     51                  <y:Fill color="#F5F5F5" transparent="false"/> 
     52                  <y:BorderStyle color="#000000" type="dashed" width="1.0"/> 
     53                  <y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="22.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="442.29106996183054" x="0.0" y="0.0">evaluateResponseConditions()</y:NodeLabel> 
     54                  <y:Shape type="roundrectangle"/> 
     55                  <y:State closed="false" innerGraphDisplayEnabled="false"/> 
     56                  <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/> 
     57                  <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/> 
     58                </y:GroupNode> 
     59                <y:GroupNode> 
     60                  <y:Geometry height="50.0" width="50.0" x="513.3057377049181" y="1059.1728641609989"/> 
     61                  <y:Fill color="#F5F5F5" transparent="false"/> 
     62                  <y:BorderStyle color="#000000" type="dashed" width="1.0"/> 
     63                  <y:NodeLabel alignment="right" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="22.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="50.0" x="0.0" y="0.0">1</y:NodeLabel> 
     64                  <y:Shape type="roundrectangle"/> 
     65                  <y:State closed="false" innerGraphDisplayEnabled="false"/> 
     66                  <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/> 
     67                  <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/> 
     68                </y:GroupNode> 
     69              </y:Realizers> 
     70            </y:ProxyAutoBoundsNode> 
     71          </data> 
     72          <graph edgedefault="directed" id="n0::n0:"> 
     73            <node id="n0::n0::n0"> 
     74              <data key="d3"> 
     75                <y:GenericNode configuration="com.yworks.flowchart.decision"> 
     76                  <y:Geometry height="148.95686603665195" width="172.42520491803282" x="784.2353763553492" y="1044.5884934317683"/> 
     77                  <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
     78                  <y:BorderStyle color="#000000" type="line" width="1.0"/> 
     79                  <y:NodeLabel alignment="center" autoSizePolicy="content" borderDistance="0.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="34.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="134.0" x="19.212602459016352" y="57.478433018326086">more 
     80DialogueResponses?</y:NodeLabel> 
     81                </y:GenericNode> 
     82              </data> 
     83            </node> 
     84            <node id="n0::n0::n1"> 
     85              <data key="d3"> 
     86                <y:GenericNode configuration="com.yworks.flowchart.process"> 
     87                  <y:Geometry height="40.0" width="183.73360655737713" x="778.581175535677" y="682.9697859970292"/> 
     88                  <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
     89                  <y:BorderStyle color="#000000" type="line" width="1.0"/> 
     90                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="34.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="177.0" x="3.3668032786886215" y="3.0">get next DialogueResponse 
     91from the DialogueSection</y:NodeLabel> 
     92                </y:GenericNode> 
     93              </data> 
     94            </node> 
     95            <node id="n0::n0::n2"> 
     96              <data key="d3"> 
     97                <y:GenericNode configuration="com.yworks.flowchart.decision"> 
     98                  <y:Geometry height="171.44455008944465" width="197.0" x="771.9479788143656" y="772.643943342324"/> 
     99                  <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
     100                  <y:BorderStyle color="#000000" type="line" width="1.0"/> 
     101                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="183.0" x="7.0" y="76.22227504472232">DialogueResponse.condition</y:NodeLabel> 
     102                </y:GenericNode> 
     103              </data> 
     104            </node> 
     105            <node id="n0::n0::n3"> 
     106              <data key="d3"> 
     107                <y:GenericNode configuration="com.yworks.flowchart.process"> 
     108                  <y:Geometry height="40.0" width="157.87310791232562" x="613.9932203734244" y="944.0884934317688"/> 
     109                  <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
     110                  <y:BorderStyle color="#000000" type="line" width="1.0"/> 
     111                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="34.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="149.0" x="4.436553956162811" y="3.0">add DialogueResponse 
     112to valid_responses</y:NodeLabel> 
     113                </y:GenericNode> 
     114              </data> 
     115            </node> 
     116            <node id="n0::n0::n4"> 
     117              <data key="d3"> 
     118                <y:GenericNode configuration="com.yworks.flowchart.internalStorage"> 
     119                  <y:Geometry height="40.0" width="157.87310791232562" x="613.9932203734244" y="1014.0884934317688"/> 
     120                  <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
     121                  <y:BorderStyle color="#000000" type="line" width="1.0"/> 
     122                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="104.0" x="26.93655395616281" y="10.499999999999886">valid_responses</y:NodeLabel> 
     123                </y:GenericNode> 
     124              </data> 
     125            </node> 
     126            <node id="n0::n0::n5"> 
     127              <data key="d3"> 
     128                <y:GenericNode configuration="com.yworks.flowchart.data"> 
     129                  <y:Geometry height="40.0" width="171.2995058282437" x="556.656908852535" y="1212.1011982179716"/> 
     130                  <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
     131                  <y:BorderStyle color="#000000" type="line" width="1.0"/> 
     132                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="147.0" x="12.149752914121791" y="10.5">return valid_responses</y:NodeLabel> 
     133                </y:GenericNode> 
     134              </data> 
     135            </node> 
     136            <node id="n0::n0::n6"> 
     137              <data key="d3"> 
     138                <y:GenericNode configuration="com.yworks.flowchart.data"> 
     139                  <y:Geometry height="40.0" width="157.87310791232562" x="558.2007750234868" y="673.0000000000001"/> 
     140                  <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
     141                  <y:BorderStyle color="#000000" type="line" width="1.0"/> 
     142                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="142.0" x="7.936553956162811" y="10.5">input DialogueSection</y:NodeLabel> 
     143                </y:GenericNode> 
     144              </data> 
     145            </node> 
     146            <node id="n0::n0::n7"> 
     147              <data key="d3"> 
     148                <y:GenericNode configuration="com.yworks.flowchart.internalStorage"> 
     149                  <y:Geometry height="40.0" width="157.87310791232562" x="563.370107810494" y="1142.1011982179716"/> 
     150                  <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
     151                  <y:BorderStyle color="#000000" type="line" width="1.0"/> 
     152                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="104.0" x="26.93655395616281" y="10.5">valid_responses</y:NodeLabel> 
     153                </y:GenericNode> 
     154              </data> 
     155            </node> 
     156          </graph> 
     157        </node> 
     158        <node id="n0::n1" yfiles.foldertype="group"> 
     159          <data key="d1"/> 
     160          <data key="d3"> 
     161            <y:ProxyAutoBoundsNode> 
     162              <y:Realizers active="0"> 
     163                <y:GroupNode> 
     164                  <y:Geometry height="340.1384364456885" width="441.5951839795774" x="542.0730552092798" y="1327.0079191830723"/> 
     165                  <y:Fill color="#F5F5F5" transparent="false"/> 
     166                  <y:BorderStyle color="#000000" type="dashed" width="1.0"/> 
     167                  <y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="22.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="441.5951839795774" x="0.0" y="0.0">runDialogueActions()</y:NodeLabel> 
     168                  <y:Shape type="roundrectangle"/> 
     169                  <y:State closed="false" innerGraphDisplayEnabled="false"/> 
     170                  <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/> 
     171                  <y:BorderInsets bottom="7" bottomF="6.537627066712048" left="0" leftF="0.0" right="12" rightF="11.660757750069251" top="0" topF="0.0"/> 
     172                </y:GroupNode> 
     173                <y:GroupNode> 
     174                  <y:Geometry height="50.0" width="50.0" x="462.92133936759" y="652.3193989071042"/> 
     175                  <y:Fill color="#F5F5F5" transparent="false"/> 
     176                  <y:BorderStyle color="#000000" type="dashed" width="1.0"/> 
     177                  <y:NodeLabel alignment="right" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="22.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="50.0" x="0.0" y="0.0">1</y:NodeLabel> 
     178                  <y:Shape type="roundrectangle"/> 
     179                  <y:State closed="false" innerGraphDisplayEnabled="false"/> 
     180                  <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/> 
     181                  <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/> 
     182                </y:GroupNode> 
     183              </y:Realizers> 
     184            </y:ProxyAutoBoundsNode> 
     185          </data> 
     186          <graph edgedefault="directed" id="n0::n1:"> 
     187            <node id="n0::n1::n0"> 
     188              <data key="d3"> 
     189                <y:GenericNode configuration="com.yworks.flowchart.process"> 
     190                  <y:Geometry height="40.0" width="170.46721311475414" x="786.5402683240338" y="1364.0079191830723"/> 
     191                  <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
     192                  <y:BorderStyle color="#000000" type="line" width="1.0"/> 
     193                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="34.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="154.0" x="8.233606557377016" y="3.0">get next DialogueAction 
     194from DialogueNode</y:NodeLabel> 
     195                </y:GenericNode> 
     196              </data> 
     197            </node> 
     198            <node id="n0::n1::n1"> 
     199              <data key="d3"> 
     200                <y:GenericNode configuration="com.yworks.flowchart.process"> 
     201                  <y:Geometry height="40.0" width="133.35245901639348" x="805.0976453732143" y="1439.8298908542347"/> 
     202                  <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
     203                  <y:BorderStyle color="#000000" type="line" width="1.0"/> 
     204                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="123.0" x="5.176229508196798" y="10.5">run DialogueAction</y:NodeLabel> 
     205                </y:GenericNode> 
     206              </data> 
     207            </node> 
     208            <node id="n0::n1::n2"> 
     209              <data key="d3"> 
     210                <y:GenericNode configuration="com.yworks.flowchart.decision"> 
     211                  <y:Geometry height="129.95686603665195" width="147.85040983606564" x="797.8486699633783" y="1515.6518625253968"/> 
     212                  <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
     213                  <y:BorderStyle color="#000000" type="line" width="1.0"/> 
     214                  <y:NodeLabel alignment="center" autoSizePolicy="content" borderDistance="0.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="34.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="111.0" x="18.42520491803282" y="47.97843301832586">more 
     215DialogueActions?</y:NodeLabel> 
     216                </y:GenericNode> 
     217              </data> 
     218            </node> 
     219            <node id="n0::n1::n3"> 
     220              <data key="d3"> 
     221                <y:GenericNode configuration="com.yworks.flowchart.data"> 
     222                  <y:Geometry height="40.0" width="170.46721311475414" x="557.0730552092798" y="1364.0079191830723"/> 
     223                  <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
     224                  <y:BorderStyle color="#000000" type="line" width="1.0"/> 
     225                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="128.0" x="21.233606557377016" y="10.5">input DialogueNode</y:NodeLabel> 
     226                </y:GenericNode> 
     227              </data> 
     228            </node> 
     229          </graph> 
     230        </node> 
     231        <node id="n0::n2" yfiles.foldertype="group"> 
     232          <data key="d1"/> 
     233          <data key="d3"> 
     234            <y:ProxyAutoBoundsNode> 
     235              <y:Realizers active="0"> 
     236                <y:GroupNode> 
     237                  <y:Geometry height="403.58278447750104" width="682.8929109323353" x="-181.89291093233533" y="1263.5635711512598"/> 
     238                  <y:Fill color="#F5F5F5" transparent="false"/> 
     239                  <y:BorderStyle color="#000000" type="dashed" width="1.0"/> 
     240                  <y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="22.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="682.8929109323353" x="0.0" y="0.0">reply(dialogue_response)</y:NodeLabel> 
     241                  <y:Shape type="roundrectangle"/> 
     242                  <y:State closed="false" innerGraphDisplayEnabled="false"/> 
     243                  <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/> 
     244                  <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/> 
     245                </y:GroupNode> 
     246                <y:GroupNode> 
     247                  <y:Geometry height="50.0" width="50.0" x="-364.7863468090128" y="678.5576522760241"/> 
     248                  <y:Fill color="#F5F5F5" transparent="false"/> 
     249                  <y:BorderStyle color="#000000" type="dashed" width="1.0"/> 
     250                  <y:NodeLabel alignment="right" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="22.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="50.0" x="0.0" y="0.0">1</y:NodeLabel> 
     251                  <y:Shape type="roundrectangle"/> 
     252                  <y:State closed="true" innerGraphDisplayEnabled="false"/> 
     253                  <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/> 
     254                  <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/> 
     255                </y:GroupNode> 
     256              </y:Realizers> 
     257            </y:ProxyAutoBoundsNode> 
     258          </data> 
     259          <graph edgedefault="directed" id="n0::n2:"> 
     260            <node id="n0::n2::n0"> 
     261              <data key="d3"> 
     262                <y:GenericNode configuration="com.yworks.flowchart.internalStorage"> 
     263                  <y:Geometry height="40.0" width="145.0" x="258.44042240099805" y="1300.5635711512598"/> 
     264                  <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
     265                  <y:BorderStyle color="#000000" type="line" width="1.0"/> 
     266                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="123.0" x="11.0" y="10.5">dialogue_response</y:NodeLabel> 
     267                </y:GenericNode> 
     268              </data> 
     269            </node> 
     270            <node id="n0::n2::n1"> 
     271              <data key="d3"> 
     272                <y:GenericNode configuration="com.yworks.flowchart.data"> 
     273                  <y:Geometry height="40.0" width="184.56627453956702" x="238.65728513121456" y="1370.5635711512598"/> 
     274                  <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
     275                  <y:BorderStyle color="#000000" type="line" width="1.0"/> 
     276                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="157.0" x="13.78313726978351" y="10.5">input DialogueResponse</y:NodeLabel> 
     277                </y:GenericNode> 
     278              </data> 
     279            </node> 
     280            <node id="n0::n2::n2"> 
     281              <data key="d3"> 
     282                <y:GenericNode configuration="com.yworks.flowchart.decision"> 
     283                  <y:Geometry height="125.0" width="145.0" x="258.44042240099805" y="1440.5635711512598"/> 
     284                  <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
     285                  <y:BorderStyle color="#000000" type="line" width="1.0"/> 
     286                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="34.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="123.0" x="11.0" y="45.5">dialogue_response 
     287.goto_section</y:NodeLabel> 
     288                </y:GenericNode> 
     289              </data> 
     290            </node> 
     291            <node id="n0::n2::n3"> 
     292              <data key="d3"> 
     293                <y:GenericNode configuration="com.yworks.flowchart.process"> 
     294                  <y:Geometry height="40.0" width="156.0" x="11.440422400998045" y="1483.0635711512598"/> 
     295                  <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
     296                  <y:BorderStyle color="#000000" type="line" width="1.0"/> 
     297                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="34.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="149.0" x="3.5" y="3.0">pop DialogueSection 
     298off the top of the stack</y:NodeLabel> 
     299                </y:GenericNode> 
     300              </data> 
     301            </node> 
     302            <node id="n0::n2::n4"> 
     303              <data key="d3"> 
     304                <y:GenericNode configuration="com.yworks.flowchart.process"> 
     305                  <y:Geometry height="40.0" width="123.0" x="363.0" y="1612.1463556287608"/> 
     306                  <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
     307                  <y:BorderStyle color="#000000" type="line" width="1.0"/> 
     308                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="114.0" x="4.5" y="10.5">cls.endDialogue()</y:NodeLabel> 
     309                </y:GenericNode> 
     310              </data> 
     311            </node> 
     312            <node id="n0::n2::n5"> 
     313              <data key="d3"> 
     314                <y:GenericNode configuration="com.yworks.flowchart.internalStorage"> 
     315                  <y:Geometry height="40.0" width="195.17704918032786" x="-97.73662677932981" y="1413.0635711512598"/> 
     316                  <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
     317                  <y:BorderStyle color="#000000" type="line" width="1.0"/> 
     318                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="171.0" x="12.088524590163928" y="10.5">cls.dialogue_section_stack</y:NodeLabel> 
     319                </y:GenericNode> 
     320              </data> 
     321            </node> 
     322            <node id="n0::n2::n6"> 
     323              <data key="d3"> 
     324                <y:GenericNode configuration="com.yworks.flowchart.process"> 
     325                  <y:Geometry height="40.0" width="156.0" x="0.4404224009980453" y="1612.1463556287608"/> 
     326                  <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
     327                  <y:BorderStyle color="#000000" type="line" width="1.0"/> 
     328                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="34.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="158.0" x="-1.0" y="3.0">append DialogueSection 
     329to stack</y:NodeLabel> 
     330                </y:GenericNode> 
     331              </data> 
     332            </node> 
     333            <node id="n0::n2::n7"> 
     334              <data key="d3"> 
     335                <y:GenericNode configuration="com.yworks.flowchart.internalStorage"> 
     336                  <y:Geometry height="40.0" width="195.17704918032786" x="88.44042240099805" y="1542.1463556287608"/> 
     337                  <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
     338                  <y:BorderStyle color="#000000" type="line" width="1.0"/> 
     339                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="171.0" x="12.088524590163928" y="10.5">cls.dialogue_section_stack</y:NodeLabel> 
     340                </y:GenericNode> 
     341              </data> 
     342            </node> 
     343            <node id="n0::n2::n8"> 
     344              <data key="d3"> 
     345                <y:GenericNode configuration="com.yworks.flowchart.internalStorage"> 
     346                  <y:Geometry height="40.0" width="228.33333333333337" x="-166.89291093233533" y="1542.1463556287608"/> 
     347                  <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
     348                  <y:BorderStyle color="#000000" type="line" width="1.0"/> 
     349                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="188.0" x="20.166666666666686" y="10.5">cls.current_dialogue.sections</y:NodeLabel> 
     350                </y:GenericNode> 
     351              </data> 
     352            </node> 
     353          </graph> 
     354        </node> 
     355        <node id="n0::n3" yfiles.foldertype="group"> 
     356          <data key="d1"/> 
     357          <data key="d3"> 
     358            <y:ProxyAutoBoundsNode> 
     359              <y:Realizers active="0"> 
     360                <y:GroupNode> 
     361                  <y:Geometry height="313.172131147541" width="710.3676390034009" x="279.2708488732451" y="279.0267759562844"/> 
     362                  <y:Fill color="#F5F5F5" transparent="false"/> 
     363                  <y:BorderStyle color="#000000" type="dashed" width="1.0"/> 
     364                  <y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="22.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="710.3676390034009" x="0.0" y="0.0">initiateDialogue(dialogue, game_state)</y:NodeLabel> 
     365                  <y:Shape type="roundrectangle"/> 
     366                  <y:State closed="false" innerGraphDisplayEnabled="false"/> 
     367                  <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/> 
     368                  <y:BorderInsets bottom="0" bottomF="0.0" left="56" leftF="56.39087124685648" right="0" rightF="0.0" top="0" topF="0.0"/> 
     369                </y:GroupNode> 
     370                <y:GroupNode> 
     371                  <y:Geometry height="50.0" width="50.0" x="65.0" y="73.49000000000001"/> 
     372                  <y:Fill color="#F5F5F5" transparent="false"/> 
     373                  <y:BorderStyle color="#000000" type="dashed" width="1.0"/> 
     374                  <y:NodeLabel alignment="right" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="22.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="50.0" x="0.0" y="0.0">1</y:NodeLabel> 
     375                  <y:Shape type="roundrectangle"/> 
     376                  <y:State closed="false" innerGraphDisplayEnabled="false"/> 
     377                  <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/> 
     378                  <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/> 
     379                </y:GroupNode> 
     380              </y:Realizers> 
     381            </y:ProxyAutoBoundsNode> 
     382          </data> 
     383          <graph edgedefault="directed" id="n0::n3:"> 
     384            <node id="n0::n3::n0"> 
     385              <data key="d3"> 
     386                <y:GenericNode configuration="com.yworks.flowchart.data"> 
     387                  <y:Geometry height="40.0" width="197.0" x="350.66172012010156" y="386.0267759562844"/> 
     388                  <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
     389                  <y:BorderStyle color="#000000" type="line" width="1.0"/> 
     390                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="34.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="143.0" x="27.0" y="3.0">Get Dialogue Instance 
     391for NPC</y:NodeLabel> 
     392                </y:GenericNode> 
     393              </data> 
     394            </node> 
     395            <node id="n0::n3::n1"> 
     396              <data key="d3"> 
     397                <y:GenericNode configuration="com.yworks.flowchart.data"> 
     398                  <y:Geometry height="40.0" width="197.0" x="350.66172012010156" y="537.1989071038254"/> 
     399                  <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
     400                  <y:BorderStyle color="#000000" type="line" width="1.0"/> 
     401                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="122.0" x="37.5" y="10.5">Define Game State</y:NodeLabel> 
     402                </y:GenericNode> 
     403              </data> 
     404            </node> 
     405            <node id="n0::n3::n2"> 
     406              <data key="d3"> 
     407                <y:GenericNode configuration="com.yworks.flowchart.internalStorage"> 
     408                  <y:Geometry height="40.0" width="129.17512354293922" x="384.57415834863195" y="467.1989071038254"/> 
     409                  <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
     410                  <y:BorderStyle color="#000000" type="line" width="1.0"/> 
     411                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="99.0" x="15.087561771469609" y="10.5">cls.game_state</y:NodeLabel> 
     412                </y:GenericNode> 
     413              </data> 
     414            </node> 
     415            <node id="n0::n3::n3"> 
     416              <data key="d3"> 
     417                <y:GenericNode configuration="com.yworks.flowchart.process"> 
     418                  <y:Geometry height="40.0" width="186.6803278688525" x="669.2154528531129" y="459.6989071038254"/> 
     419                  <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
     420                  <y:BorderStyle color="#000000" type="line" width="1.0"/> 
     421                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="34.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="176.0" x="5.340163934426187" y="3.0">Push Start DialogueSection 
     422Onto the Stack</y:NodeLabel> 
     423                </y:GenericNode> 
     424              </data> 
     425            </node> 
     426            <node id="n0::n3::n4"> 
     427              <data key="d3"> 
     428                <y:GenericNode configuration="com.yworks.flowchart.internalStorage"> 
     429                  <y:Geometry height="40.0" width="197.0" x="777.638487876646" y="389.6989071038254"/> 
     430                  <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
     431                  <y:BorderStyle color="#000000" type="line" width="1.0"/> 
     432                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="171.0" x="13.0" y="10.5">cls.dialogue_section_stack</y:NodeLabel> 
     433                </y:GenericNode> 
     434              </data> 
     435            </node> 
     436            <node id="n0::n3::n5"> 
     437              <data key="d3"> 
     438                <y:GenericNode configuration="com.yworks.flowchart.internalStorage"> 
     439                  <y:Geometry height="40.0" width="153.99999999999994" x="467.8443051797409" y="316.0267759562844"/> 
     440                  <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
     441                  <y:BorderStyle color="#000000" type="line" width="1.0"/> 
     442                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="r" textColor="#000000" visible="true" width="131.0" x="18.999999999999943" y="10.5">cls.current_dialogue</y:NodeLabel> 
     443                </y:GenericNode> 
     444              </data> 
     445            </node> 
     446            <node id="n0::n3::n6"> 
     447              <data key="d3"> 
     448                <y:GenericNode configuration="com.yworks.flowchart.internalStorage"> 
     449                  <y:Geometry height="40.0" width="153.99999999999994" x="593.638487876646" y="389.6989071038254"/> 
     450                  <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
     451                  <y:BorderStyle color="#000000" type="line" width="1.0"/> 
     452                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="r" textColor="#000000" visible="true" width="131.0" x="19.0" y="10.5">cls.current_dialogue</y:NodeLabel> 
     453                </y:GenericNode> 
     454              </data> 
     455            </node> 
     456          </graph> 
     457        </node> 
     458        <node id="n0::n4" yfiles.foldertype="group"> 
     459          <data key="d1"/> 
     460          <data key="d3"> 
     461            <y:ProxyAutoBoundsNode> 
     462              <y:Realizers active="0"> 
     463                <y:GroupNode> 
     464                  <y:Geometry height="234.8592959909936" width="439.37840413503284" x="57.71480438959537" y="636.0000000000001"/> 
     465                  <y:Fill color="#F5F5F5" transparent="false"/> 
     466                  <y:BorderStyle color="#000000" type="dashed" width="1.0"/> 
     467                  <y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="22.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="439.37840413503284" x="0.0" y="0.0">continueDialogue()</y:NodeLabel> 
     468                  <y:Shape type="roundrectangle"/> 
     469                  <y:State closed="false" innerGraphDisplayEnabled="false"/> 
     470                  <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/> 
     471                  <y:BorderInsets bottom="3" bottomF="2.859295990993701" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/> 
     472                </y:GroupNode> 
     473                <y:GroupNode> 
     474                  <y:Geometry height="50.0" width="50.0" x="311.5760186871752" y="568.672131147541"/> 
     475                  <y:Fill color="#F5F5F5" transparent="false"/> 
     476                  <y:BorderStyle color="#000000" type="dashed" width="1.0"/> 
     477                  <y:NodeLabel alignment="right" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="22.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="50.0" x="0.0" y="0.0">1</y:NodeLabel> 
     478                  <y:Shape type="roundrectangle"/> 
     479                  <y:State closed="true" innerGraphDisplayEnabled="false"/> 
     480                  <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/> 
     481                  <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/> 
     482                </y:GroupNode> 
     483              </y:Realizers> 
     484            </y:ProxyAutoBoundsNode> 
     485          </data> 
     486          <graph edgedefault="directed" id="n0::n4:"> 
     487            <node id="n0::n4::n0"> 
     488              <data key="d3"> 
     489                <y:GenericNode configuration="com.yworks.flowchart.internalStorage"> 
     490                  <y:Geometry height="40.0" width="197.0" x="121.74074950823473" y="673.0000000000001"/> 
     491                  <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
     492                  <y:BorderStyle color="#000000" type="line" width="1.0"/> 
     493                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="171.0" x="13.0" y="10.5">cls.dialogue_section_stack</y:NodeLabel> 
     494                </y:GenericNode> 
     495              </data> 
     496            </node> 
     497            <node id="n0::n4::n1"> 
     498              <data key="d3"> 
     499                <y:GenericNode configuration="com.yworks.flowchart.internalStorage"> 
     500                  <y:Geometry height="40.0" width="133.35245901639348" x="348.7407495082347" y="673.0000000000001"/> 
     501                  <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
     502                  <y:BorderStyle color="#000000" type="line" width="1.0"/> 
     503                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="110.0" x="11.67622950819674" y="10.5">dialogue_section</y:NodeLabel> 
     504                </y:GenericNode> 
     505              </data> 
     506            </node> 
     507            <node id="n0::n4::n2"> 
     508              <data key="d3"> 
     509                <y:GenericNode configuration="com.yworks.flowchart.process"> 
     510                  <y:Geometry height="40.0" width="245.9520424275383" x="207.9644011872289" y="743.0000000000001"/> 
     511                  <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
     512                  <y:BorderStyle color="#000000" type="line" width="1.0"/> 
     513                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="205.0" x="20.476021213769144" y="10.5">cls.getCurrentDialogueSection()</y:NodeLabel> 
     514                </y:GenericNode> 
     515              </data> 
     516            </node> 
     517            <node id="n0::n4::n3"> 
     518              <data key="d3"> 
     519                <y:GenericNode configuration="com.yworks.flowchart.data"> 
     520                  <y:Geometry height="40.0" width="173.67748028847393" x="72.71480438959537" y="813.0"/> 
     521                  <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
     522                  <y:BorderStyle color="#000000" type="line" width="1.0"/> 
     523                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="147.0" x="13.338740144236965" y="10.5">return valid_responses</y:NodeLabel> 
     524                </y:GenericNode> 
     525              </data> 
     526            </node> 
     527          </graph> 
     528        </node> 
     529        <node id="n0::n5"> 
     530          <data key="d3"> 
     531            <y:GenericNode configuration="com.yworks.flowchart.manualInput"> 
     532              <y:Geometry height="56.25166548606899" width="178.3540983606557" x="-116.17704918032786" y="1192.8741672569654"/> 
     533              <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
     534              <y:BorderStyle color="#000000" type="line" width="1.0"/> 
     535              <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="34.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="162.0" x="8.177049180327856" y="11.125832743034607">player chooses response 
     536from valid_responses</y:NodeLabel> 
     537            </y:GenericNode> 
     538          </data> 
     539        </node> 
     540      </graph> 
     541    </node> 
     542    <node id="n1" yfiles.foldertype="group"> 
    16543      <data key="d1"/> 
    17544      <data key="d3"> 
     
    41568        </y:ProxyAutoBoundsNode> 
    42569      </data> 
    43       <graph edgedefault="directed" id="n0:"> 
    44         <node id="n0::n0" yfiles.foldertype="group"> 
     570      <graph edgedefault="directed" id="n1:"> 
     571        <node id="n1::n0" yfiles.foldertype="group"> 
    45572          <data key="d1"/> 
    46573          <data key="d3"> 
     
    70597            </y:ProxyAutoBoundsNode> 
    71598          </data> 
    72           <graph edgedefault="directed" id="n0::n0:"> 
    73             <node id="n0::n0::n0"> 
     599          <graph edgedefault="directed" id="n1::n0:"> 
     600            <node id="n1::n0::n0"> 
    74601              <data key="d3"> 
    75602                <y:GenericNode configuration="com.yworks.flowchart.internalStorage"> 
     
    81608              </data> 
    82609            </node> 
    83             <node id="n0::n0::n1"> 
     610            <node id="n1::n0::n1"> 
    84611              <data key="d3"> 
    85612                <y:GenericNode configuration="com.yworks.flowchart.data"> 
     
    91618              </data> 
    92619            </node> 
    93             <node id="n0::n0::n2"> 
     620            <node id="n1::n0::n2"> 
    94621              <data key="d3"> 
    95622                <y:GenericNode configuration="com.yworks.flowchart.internalStorage"> 
     
    101628              </data> 
    102629            </node> 
    103             <node id="n0::n0::n3"> 
     630            <node id="n1::n0::n3"> 
    104631              <data key="d3"> 
    105632                <y:GenericNode configuration="com.yworks.flowchart.internalStorage"> 
     
    111638              </data> 
    112639            </node> 
    113             <node id="n0::n0::n4"> 
     640            <node id="n1::n0::n4"> 
    114641              <data key="d3"> 
    115642                <y:GenericNode configuration="com.yworks.flowchart.internalStorage"> 
     
    121648              </data> 
    122649            </node> 
    123             <node id="n0::n0::n5"> 
     650            <node id="n1::n0::n5"> 
    124651              <data key="d3"> 
    125652                <y:GenericNode configuration="com.yworks.flowchart.process"> 
     
    131658              </data> 
    132659            </node> 
    133             <node id="n0::n0::n6"> 
     660            <node id="n1::n0::n6"> 
    134661              <data key="d3"> 
    135662                <y:GenericNode configuration="com.yworks.flowchart.data"> 
     
    141668              </data> 
    142669            </node> 
    143             <node id="n0::n0::n7"> 
     670            <node id="n1::n0::n7"> 
    144671              <data key="d3"> 
    145672                <y:GenericNode configuration="com.yworks.flowchart.process"> 
     
    153680          </graph> 
    154681        </node> 
    155         <node id="n0::n1"> 
     682        <node id="n1::n1"> 
    156683          <data key="d3"> 
    157684            <y:GenericNode configuration="com.yworks.flowchart.directData"> 
     
    163690          </data> 
    164691        </node> 
    165         <node id="n0::n2"> 
     692        <node id="n1::n2"> 
    166693          <data key="d3"> 
    167694            <y:GenericNode configuration="com.yworks.flowchart.internalStorage"> 
     
    173700          </data> 
    174701        </node> 
    175         <node id="n0::n3"> 
     702        <node id="n1::n3"> 
    176703          <data key="d3"> 
    177704            <y:GenericNode configuration="com.yworks.flowchart.process"> 
     
    181708              <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="34.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="182.0" x="0.09771781171411931" y="3.0">open stream with 
    182709yaml-encoded dialogue data</y:NodeLabel> 
    183             </y:GenericNode> 
    184           </data> 
    185         </node> 
    186       </graph> 
    187     </node> 
    188     <node id="n1" yfiles.foldertype="group"> 
    189       <data key="d1"/> 
    190       <data key="d3"> 
    191         <y:ProxyAutoBoundsNode> 
    192           <y:Realizers active="0"> 
    193             <y:GroupNode> 
    194               <y:Geometry height="1440.1195796724764" width="1201.8111384344897" x="-196.89291093233533" y="242.02677595628438"/> 
    195               <y:Fill color="#F5F5F5" transparent="false"/> 
    196               <y:BorderStyle color="#000000" type="dashed" width="1.0"/> 
    197               <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="22.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="1201.8111384344897" x="0.0" y="0.0">     DialogueEngine</y:NodeLabel> 
    198               <y:Shape type="roundrectangle"/> 
    199               <y:State closed="false" innerGraphDisplayEnabled="false"/> 
    200               <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/> 
    201               <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.279739625508455" top="0" topF="0.0"/> 
    202             </y:GroupNode> 
    203             <y:GroupNode> 
    204               <y:Geometry height="50.0" width="50.0" x="546.0" y="220.52677595628438"/> 
    205               <y:Fill color="#F5F5F5" transparent="false"/> 
    206               <y:BorderStyle color="#000000" type="dashed" width="1.0"/> 
    207               <y:NodeLabel alignment="right" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="22.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="50.0" x="0.0" y="0.0">1</y:NodeLabel> 
    208               <y:Shape type="roundrectangle"/> 
    209               <y:State closed="false" innerGraphDisplayEnabled="false"/> 
    210               <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/> 
    211               <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/> 
    212             </y:GroupNode> 
    213           </y:Realizers> 
    214         </y:ProxyAutoBoundsNode> 
    215       </data> 
    216       <graph edgedefault="directed" id="n1:"> 
    217         <node id="n1::n0" yfiles.foldertype="group"> 
    218           <data key="d1"/> 
    219           <data key="d3"> 
    220             <y:ProxyAutoBoundsNode> 
    221               <y:Realizers active="0"> 
    222                 <y:GroupNode> 
    223                   <y:Geometry height="234.8592959909936" width="439.37840413503284" x="57.71480438959537" y="636.0000000000001"/> 
    224                   <y:Fill color="#F5F5F5" transparent="false"/> 
    225                   <y:BorderStyle color="#000000" type="dashed" width="1.0"/> 
    226                   <y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="22.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="439.37840413503284" x="0.0" y="0.0">continueDialogue()</y:NodeLabel> 
    227                   <y:Shape type="roundrectangle"/> 
    228                   <y:State closed="false" innerGraphDisplayEnabled="false"/> 
    229                   <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/> 
    230                   <y:BorderInsets bottom="3" bottomF="2.859295990993701" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/> 
    231                 </y:GroupNode> 
    232                 <y:GroupNode> 
    233                   <y:Geometry height="50.0" width="50.0" x="311.5760186871752" y="568.672131147541"/> 
    234                   <y:Fill color="#F5F5F5" transparent="false"/> 
    235                   <y:BorderStyle color="#000000" type="dashed" width="1.0"/> 
    236                   <y:NodeLabel alignment="right" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="22.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="50.0" x="0.0" y="0.0">1</y:NodeLabel> 
    237                   <y:Shape type="roundrectangle"/> 
    238                   <y:State closed="true" innerGraphDisplayEnabled="false"/> 
    239                   <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/> 
    240                   <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/> 
    241                 </y:GroupNode> 
    242               </y:Realizers> 
    243             </y:ProxyAutoBoundsNode> 
    244           </data> 
    245           <graph edgedefault="directed" id="n1::n0:"> 
    246             <node id="n1::n0::n0"> 
    247               <data key="d3"> 
    248                 <y:GenericNode configuration="com.yworks.flowchart.internalStorage"> 
    249                   <y:Geometry height="40.0" width="197.0" x="121.74074950823473" y="673.0000000000001"/> 
    250                   <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
    251                   <y:BorderStyle color="#000000" type="line" width="1.0"/> 
    252                   <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="171.0" x="13.0" y="10.5">cls.dialogue_section_stack</y:NodeLabel> 
    253                 </y:GenericNode> 
    254               </data> 
    255             </node> 
    256             <node id="n1::n0::n1"> 
    257               <data key="d3"> 
    258                 <y:GenericNode configuration="com.yworks.flowchart.internalStorage"> 
    259                   <y:Geometry height="40.0" width="133.35245901639348" x="348.7407495082347" y="673.0000000000001"/> 
    260                   <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
    261                   <y:BorderStyle color="#000000" type="line" width="1.0"/> 
    262                   <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="110.0" x="11.67622950819674" y="10.5">dialogue_section</y:NodeLabel> 
    263                 </y:GenericNode> 
    264               </data> 
    265             </node> 
    266             <node id="n1::n0::n2"> 
    267               <data key="d2"/> 
    268               <data key="d3"> 
    269                 <y:GenericNode configuration="com.yworks.flowchart.process"> 
    270                   <y:Geometry height="40.0" width="245.9520424275383" x="207.9644011872289" y="743.0000000000001"/> 
    271                   <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
    272                   <y:BorderStyle color="#000000" type="line" width="1.0"/> 
    273                   <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="205.0" x="20.476021213769144" y="10.5">cls.getCurrentDialogueSection()</y:NodeLabel> 
    274                 </y:GenericNode> 
    275               </data> 
    276             </node> 
    277             <node id="n1::n0::n3"> 
    278               <data key="d2"/> 
    279               <data key="d3"> 
    280                 <y:GenericNode configuration="com.yworks.flowchart.data"> 
    281                   <y:Geometry height="40.0" width="173.67748028847393" x="72.71480438959537" y="813.0"/> 
    282                   <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
    283                   <y:BorderStyle color="#000000" type="line" width="1.0"/> 
    284                   <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="147.0" x="13.338740144236965" y="10.5">return valid_responses</y:NodeLabel> 
    285                 </y:GenericNode> 
    286               </data> 
    287             </node> 
    288           </graph> 
    289         </node> 
    290         <node id="n1::n1" yfiles.foldertype="group"> 
    291           <data key="d1"/> 
    292           <data key="d3"> 
    293             <y:ProxyAutoBoundsNode> 
    294               <y:Realizers active="0"> 
    295                 <y:GroupNode> 
    296                   <y:Geometry height="313.172131147541" width="710.3676390034009" x="279.2708488732451" y="279.0267759562844"/> 
    297                   <y:Fill color="#F5F5F5" transparent="false"/> 
    298                   <y:BorderStyle color="#000000" type="dashed" width="1.0"/> 
    299                   <y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="22.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="710.3676390034009" x="0.0" y="0.0">initiateDialogue(dialogue, game_state)</y:NodeLabel> 
    300                   <y:Shape type="roundrectangle"/> 
    301                   <y:State closed="false" innerGraphDisplayEnabled="false"/> 
    302                   <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/> 
    303                   <y:BorderInsets bottom="0" bottomF="0.0" left="56" leftF="56.39087124685648" right="0" rightF="0.0" top="0" topF="0.0"/> 
    304                 </y:GroupNode> 
    305                 <y:GroupNode> 
    306                   <y:Geometry height="50.0" width="50.0" x="65.0" y="73.49000000000001"/> 
    307                   <y:Fill color="#F5F5F5" transparent="false"/> 
    308                   <y:BorderStyle color="#000000" type="dashed" width="1.0"/> 
    309                   <y:NodeLabel alignment="right" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="22.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="50.0" x="0.0" y="0.0">1</y:NodeLabel> 
    310                   <y:Shape type="roundrectangle"/> 
    311                   <y:State closed="false" innerGraphDisplayEnabled="false"/> 
    312                   <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/> 
    313                   <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/> 
    314                 </y:GroupNode> 
    315               </y:Realizers> 
    316             </y:ProxyAutoBoundsNode> 
    317           </data> 
    318           <graph edgedefault="directed" id="n1::n1:"> 
    319             <node id="n1::n1::n0"> 
    320               <data key="d3"> 
    321                 <y:GenericNode configuration="com.yworks.flowchart.data"> 
    322                   <y:Geometry height="40.0" width="197.0" x="350.66172012010156" y="386.0267759562844"/> 
    323                   <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
    324                   <y:BorderStyle color="#000000" type="line" width="1.0"/> 
    325                   <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="34.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="143.0" x="27.0" y="3.0">Get Dialogue Instance 
    326 for NPC</y:NodeLabel> 
    327                 </y:GenericNode> 
    328               </data> 
    329             </node> 
    330             <node id="n1::n1::n1"> 
    331               <data key="d3"> 
    332                 <y:GenericNode configuration="com.yworks.flowchart.data"> 
    333                   <y:Geometry height="40.0" width="197.0" x="350.66172012010156" y="537.1989071038254"/> 
    334                   <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
    335                   <y:BorderStyle color="#000000" type="line" width="1.0"/> 
    336                   <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="122.0" x="37.5" y="10.5">Define Game State</y:NodeLabel> 
    337                 </y:GenericNode> 
    338               </data> 
    339             </node> 
    340             <node id="n1::n1::n2"> 
    341               <data key="d3"> 
    342                 <y:GenericNode configuration="com.yworks.flowchart.internalStorage"> 
    343                   <y:Geometry height="40.0" width="129.17512354293922" x="384.57415834863195" y="467.1989071038254"/> 
    344                   <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
    345                   <y:BorderStyle color="#000000" type="line" width="1.0"/> 
    346                   <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="99.0" x="15.087561771469609" y="10.5">cls.game_state</y:NodeLabel> 
    347                 </y:GenericNode> 
    348               </data> 
    349             </node> 
    350             <node id="n1::n1::n3"> 
    351               <data key="d3"> 
    352                 <y:GenericNode configuration="com.yworks.flowchart.process"> 
    353                   <y:Geometry height="40.0" width="186.6803278688525" x="669.2154528531129" y="459.6989071038254"/> 
    354                   <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
    355                   <y:BorderStyle color="#000000" type="line" width="1.0"/> 
    356                   <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="34.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="176.0" x="5.340163934426187" y="3.0">Push Start DialogueSection 
    357 Onto the Stack</y:NodeLabel> 
    358                 </y:GenericNode> 
    359               </data> 
    360             </node> 
    361             <node id="n1::n1::n4"> 
    362               <data key="d3"> 
    363                 <y:GenericNode configuration="com.yworks.flowchart.internalStorage"> 
    364                   <y:Geometry height="40.0" width="197.0" x="777.638487876646" y="389.6989071038254"/> 
    365                   <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
    366                   <y:BorderStyle color="#000000" type="line" width="1.0"/> 
    367                   <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="171.0" x="13.0" y="10.5">cls.dialogue_section_stack</y:NodeLabel> 
    368                 </y:GenericNode> 
    369               </data> 
    370             </node> 
    371             <node id="n1::n1::n5"> 
    372               <data key="d3"> 
    373                 <y:GenericNode configuration="com.yworks.flowchart.internalStorage"> 
    374                   <y:Geometry height="40.0" width="153.99999999999994" x="467.8443051797409" y="316.0267759562844"/> 
    375                   <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
    376                   <y:BorderStyle color="#000000" type="line" width="1.0"/> 
    377                   <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="r" textColor="#000000" visible="true" width="131.0" x="18.999999999999943" y="10.5">cls.current_dialogue</y:NodeLabel> 
    378                 </y:GenericNode> 
    379               </data> 
    380             </node> 
    381             <node id="n1::n1::n6"> 
    382               <data key="d3"> 
    383                 <y:GenericNode configuration="com.yworks.flowchart.internalStorage"> 
    384                   <y:Geometry height="40.0" width="153.99999999999994" x="593.638487876646" y="389.6989071038254"/> 
    385                   <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
    386                   <y:BorderStyle color="#000000" type="line" width="1.0"/> 
    387                   <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="r" textColor="#000000" visible="true" width="131.0" x="19.0" y="10.5">cls.current_dialogue</y:NodeLabel> 
    388                 </y:GenericNode> 
    389               </data> 
    390             </node> 
    391           </graph> 
    392         </node> 
    393         <node id="n1::n2" yfiles.foldertype="group"> 
    394           <data key="d1"/> 
    395           <data key="d3"> 
    396             <y:ProxyAutoBoundsNode> 
    397               <y:Realizers active="0"> 
    398                 <y:GroupNode> 
    399                   <y:Geometry height="403.58278447750104" width="682.8929109323353" x="-181.89291093233533" y="1263.5635711512598"/> 
    400                   <y:Fill color="#F5F5F5" transparent="false"/> 
    401                   <y:BorderStyle color="#000000" type="dashed" width="1.0"/> 
    402                   <y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="22.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="682.8929109323353" x="0.0" y="0.0">reply(dialogue_response)</y:NodeLabel> 
    403                   <y:Shape type="roundrectangle"/> 
    404                   <y:State closed="false" innerGraphDisplayEnabled="false"/> 
    405                   <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/> 
    406                   <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/> 
    407                 </y:GroupNode> 
    408                 <y:GroupNode> 
    409                   <y:Geometry height="50.0" width="50.0" x="-364.7863468090128" y="678.5576522760241"/> 
    410                   <y:Fill color="#F5F5F5" transparent="false"/> 
    411                   <y:BorderStyle color="#000000" type="dashed" width="1.0"/> 
    412                   <y:NodeLabel alignment="right" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="22.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="50.0" x="0.0" y="0.0">1</y:NodeLabel> 
    413                   <y:Shape type="roundrectangle"/> 
    414                   <y:State closed="true" innerGraphDisplayEnabled="false"/> 
    415                   <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/> 
    416                   <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/> 
    417                 </y:GroupNode> 
    418               </y:Realizers> 
    419             </y:ProxyAutoBoundsNode> 
    420           </data> 
    421           <graph edgedefault="directed" id="n1::n2:"> 
    422             <node id="n1::n2::n0"> 
    423               <data key="d3"> 
    424                 <y:GenericNode configuration="com.yworks.flowchart.internalStorage"> 
    425                   <y:Geometry height="40.0" width="145.0" x="258.44042240099805" y="1300.5635711512598"/> 
    426                   <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
    427                   <y:BorderStyle color="#000000" type="line" width="1.0"/> 
    428                   <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="123.0" x="11.0" y="10.5">dialogue_response</y:NodeLabel> 
    429                 </y:GenericNode> 
    430               </data> 
    431             </node> 
    432             <node id="n1::n2::n1"> 
    433               <data key="d3"> 
    434                 <y:GenericNode configuration="com.yworks.flowchart.data"> 
    435                   <y:Geometry height="40.0" width="184.56627453956702" x="238.65728513121456" y="1370.5635711512598"/> 
    436                   <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
    437                   <y:BorderStyle color="#000000" type="line" width="1.0"/> 
    438                   <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="157.0" x="13.78313726978351" y="10.5">input DialogueResponse</y:NodeLabel> 
    439                 </y:GenericNode> 
    440               </data> 
    441             </node> 
    442             <node id="n1::n2::n2"> 
    443               <data key="d3"> 
    444                 <y:GenericNode configuration="com.yworks.flowchart.decision"> 
    445                   <y:Geometry height="125.0" width="145.0" x="258.44042240099805" y="1440.5635711512598"/> 
    446                   <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
    447                   <y:BorderStyle color="#000000" type="line" width="1.0"/> 
    448                   <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="34.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="123.0" x="11.0" y="45.5">dialogue_response 
    449 .goto_section</y:NodeLabel> 
    450                 </y:GenericNode> 
    451               </data> 
    452             </node> 
    453             <node id="n1::n2::n3"> 
    454               <data key="d3"> 
    455                 <y:GenericNode configuration="com.yworks.flowchart.process"> 
    456                   <y:Geometry height="40.0" width="156.0" x="11.440422400998045" y="1483.0635711512598"/> 
    457                   <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
    458                   <y:BorderStyle color="#000000" type="line" width="1.0"/> 
    459                   <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="34.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="149.0" x="3.5" y="3.0">pop DialogueSection 
    460 off the top of the stack</y:NodeLabel> 
    461                 </y:GenericNode> 
    462               </data> 
    463             </node> 
    464             <node id="n1::n2::n4"> 
    465               <data key="d3"> 
    466                 <y:GenericNode configuration="com.yworks.flowchart.process"> 
    467                   <y:Geometry height="40.0" width="123.0" x="363.0" y="1612.1463556287608"/> 
    468                   <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
    469                   <y:BorderStyle color="#000000" type="line" width="1.0"/> 
    470                   <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="114.0" x="4.5" y="10.5">cls.endDialogue()</y:NodeLabel> 
    471                 </y:GenericNode> 
    472               </data> 
    473             </node> 
    474             <node id="n1::n2::n5"> 
    475               <data key="d3"> 
    476                 <y:GenericNode configuration="com.yworks.flowchart.internalStorage"> 
    477                   <y:Geometry height="40.0" width="195.17704918032786" x="-97.73662677932981" y="1413.0635711512598"/> 
    478                   <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
    479                   <y:BorderStyle color="#000000" type="line" width="1.0"/> 
    480                   <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="171.0" x="12.088524590163928" y="10.5">cls.dialogue_section_stack</y:NodeLabel> 
    481                 </y:GenericNode> 
    482               </data> 
    483             </node> 
    484             <node id="n1::n2::n6"> 
    485               <data key="d3"> 
    486                 <y:GenericNode configuration="com.yworks.flowchart.process"> 
    487                   <y:Geometry height="40.0" width="156.0" x="0.4404224009980453" y="1612.1463556287608"/> 
    488                   <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
    489                   <y:BorderStyle color="#000000" type="line" width="1.0"/> 
    490                   <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="34.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="158.0" x="-1.0" y="3.0">append DialogueSection 
    491 to stack</y:NodeLabel> 
    492                 </y:GenericNode> 
    493               </data> 
    494             </node> 
    495             <node id="n1::n2::n7"> 
    496               <data key="d3"> 
    497                 <y:GenericNode configuration="com.yworks.flowchart.internalStorage"> 
    498                   <y:Geometry height="40.0" width="195.17704918032786" x="88.44042240099805" y="1542.1463556287608"/> 
    499                   <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
    500                   <y:BorderStyle color="#000000" type="line" width="1.0"/> 
    501                   <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="171.0" x="12.088524590163928" y="10.5">cls.dialogue_section_stack</y:NodeLabel> 
    502                 </y:GenericNode> 
    503               </data> 
    504             </node> 
    505             <node id="n1::n2::n8"> 
    506               <data key="d3"> 
    507                 <y:GenericNode configuration="com.yworks.flowchart.internalStorage"> 
    508                   <y:Geometry height="40.0" width="228.33333333333337" x="-166.89291093233533" y="1542.1463556287608"/> 
    509                   <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
    510                   <y:BorderStyle color="#000000" type="line" width="1.0"/> 
    511                   <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="188.0" x="20.166666666666686" y="10.5">cls.current_dialogue.sections</y:NodeLabel> 
    512                 </y:GenericNode> 
    513               </data> 
    514             </node> 
    515           </graph> 
    516         </node> 
    517         <node id="n1::n3" yfiles.foldertype="group"> 
    518           <data key="d1"/> 
    519           <data key="d3"> 
    520             <y:ProxyAutoBoundsNode> 
    521               <y:Realizers active="0"> 
    522                 <y:GroupNode> 
    523                   <y:Geometry height="340.1384364456885" width="441.5951839795774" x="542.0730552092798" y="1327.0079191830723"/> 
    524                   <y:Fill color="#F5F5F5" transparent="false"/> 
    525                   <y:BorderStyle color="#000000" type="dashed" width="1.0"/> 
    526                   <y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="22.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="441.5951839795774" x="0.0" y="0.0">runDialogueActions()</y:NodeLabel> 
    527                   <y:Shape type="roundrectangle"/> 
    528                   <y:State closed="false" innerGraphDisplayEnabled="false"/> 
    529                   <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/> 
    530                   <y:BorderInsets bottom="7" bottomF="6.537627066712048" left="0" leftF="0.0" right="12" rightF="11.660757750069251" top="0" topF="0.0"/> 
    531                 </y:GroupNode> 
    532                 <y:GroupNode> 
    533                   <y:Geometry height="50.0" width="50.0" x="462.92133936759" y="652.3193989071042"/> 
    534                   <y:Fill color="#F5F5F5" transparent="false"/> 
    535                   <y:BorderStyle color="#000000" type="dashed" width="1.0"/> 
    536                   <y:NodeLabel alignment="right" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="22.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="50.0" x="0.0" y="0.0">1</y:NodeLabel> 
    537                   <y:Shape type="roundrectangle"/> 
    538                   <y:State closed="false" innerGraphDisplayEnabled="false"/> 
    539                   <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/> 
    540                   <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/> 
    541                 </y:GroupNode> 
    542               </y:Realizers> 
    543             </y:ProxyAutoBoundsNode> 
    544           </data> 
    545           <graph edgedefault="directed" id="n1::n3:"> 
    546             <node id="n1::n3::n0"> 
    547               <data key="d3"> 
    548                 <y:GenericNode configuration="com.yworks.flowchart.process"> 
    549                   <y:Geometry height="40.0" width="170.46721311475414" x="786.5402683240338" y="1364.0079191830723"/> 
    550                   <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
    551                   <y:BorderStyle color="#000000" type="line" width="1.0"/> 
    552                   <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="34.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="154.0" x="8.233606557377016" y="3.0">get next DialogueAction 
    553 from DialogueSection</y:NodeLabel> 
    554                 </y:GenericNode> 
    555               </data> 
    556             </node> 
    557             <node id="n1::n3::n1"> 
    558               <data key="d3"> 
    559                 <y:GenericNode configuration="com.yworks.flowchart.process"> 
    560                   <y:Geometry height="40.0" width="133.35245901639348" x="805.0976453732143" y="1439.8298908542347"/> 
    561                   <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
    562                   <y:BorderStyle color="#000000" type="line" width="1.0"/> 
    563                   <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="123.0" x="5.176229508196798" y="10.5">run DialogueAction</y:NodeLabel> 
    564                 </y:GenericNode> 
    565               </data> 
    566             </node> 
    567             <node id="n1::n3::n2"> 
    568               <data key="d3"> 
    569                 <y:GenericNode configuration="com.yworks.flowchart.decision"> 
    570                   <y:Geometry height="129.95686603665195" width="147.85040983606564" x="797.8486699633783" y="1515.6518625253968"/> 
    571                   <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
    572                   <y:BorderStyle color="#000000" type="line" width="1.0"/> 
    573                   <y:NodeLabel alignment="center" autoSizePolicy="content" borderDistance="0.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="34.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="111.0" x="18.42520491803282" y="47.97843301832586">more 
    574 DialogueActions?</y:NodeLabel> 
    575                 </y:GenericNode> 
    576               </data> 
    577             </node> 
    578             <node id="n1::n3::n3"> 
    579               <data key="d3"> 
    580                 <y:GenericNode configuration="com.yworks.flowchart.data"> 
    581                   <y:Geometry height="40.0" width="170.46721311475414" x="557.0730552092798" y="1364.0079191830723"/> 
    582                   <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
    583                   <y:BorderStyle color="#000000" type="line" width="1.0"/> 
    584                   <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="142.0" x="14.233606557377016" y="10.5">input DialogueSection</y:NodeLabel> 
    585                 </y:GenericNode> 
    586               </data> 
    587             </node> 
    588           </graph> 
    589         </node> 
    590         <node id="n1::n4" yfiles.foldertype="group"> 
    591           <data key="d1"/> 
    592           <data key="d3"> 
    593             <y:ProxyAutoBoundsNode> 
    594               <y:Realizers active="0"> 
    595                 <y:GroupNode> 
    596                   <y:Geometry height="631.1011982179715" width="442.29106996183054" x="541.656908852535" y="636.0000000000001"/> 
    597                   <y:Fill color="#F5F5F5" transparent="false"/> 
    598                   <y:BorderStyle color="#000000" type="dashed" width="1.0"/> 
    599                   <y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="22.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="442.29106996183054" x="0.0" y="0.0">evaluateResponseConditions()</y:NodeLabel> 
    600                   <y:Shape type="roundrectangle"/> 
    601                   <y:State closed="false" innerGraphDisplayEnabled="false"/> 
    602                   <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/> 
    603                   <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/> 
    604                 </y:GroupNode> 
    605                 <y:GroupNode> 
    606                   <y:Geometry height="50.0" width="50.0" x="513.3057377049181" y="1059.1728641609989"/> 
    607                   <y:Fill color="#F5F5F5" transparent="false"/> 
    608                   <y:BorderStyle color="#000000" type="dashed" width="1.0"/> 
    609                   <y:NodeLabel alignment="right" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="22.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="50.0" x="0.0" y="0.0">1</y:NodeLabel> 
    610                   <y:Shape type="roundrectangle"/> 
    611                   <y:State closed="false" innerGraphDisplayEnabled="false"/> 
    612                   <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/> 
    613                   <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/> 
    614                 </y:GroupNode> 
    615               </y:Realizers> 
    616             </y:ProxyAutoBoundsNode> 
    617           </data> 
    618           <graph edgedefault="directed" id="n1::n4:"> 
    619             <node id="n1::n4::n0"> 
    620               <data key="d3"> 
    621                 <y:GenericNode configuration="com.yworks.flowchart.decision"> 
    622                   <y:Geometry height="148.95686603665195" width="172.42520491803282" x="784.2353763553492" y="1044.5884934317683"/> 
    623                   <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
    624                   <y:BorderStyle color="#000000" type="line" width="1.0"/> 
    625                   <y:NodeLabel alignment="center" autoSizePolicy="content" borderDistance="0.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="34.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="134.0" x="19.212602459016352" y="57.478433018326086">more 
    626 DialogueResponses?</y:NodeLabel> 
    627                 </y:GenericNode> 
    628               </data> 
    629             </node> 
    630             <node id="n1::n4::n1"> 
    631               <data key="d3"> 
    632                 <y:GenericNode configuration="com.yworks.flowchart.process"> 
    633                   <y:Geometry height="40.0" width="183.73360655737713" x="778.581175535677" y="682.9697859970292"/> 
    634                   <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
    635                   <y:BorderStyle color="#000000" type="line" width="1.0"/> 
    636                   <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="34.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="177.0" x="3.3668032786886215" y="3.0">get next DialogueResponse 
    637 from the DialogueSection</y:NodeLabel> 
    638                 </y:GenericNode> 
    639               </data> 
    640             </node> 
    641             <node id="n1::n4::n2"> 
    642               <data key="d3"> 
    643                 <y:GenericNode configuration="com.yworks.flowchart.decision"> 
    644                   <y:Geometry height="171.44455008944465" width="197.0" x="771.9479788143656" y="772.643943342324"/> 
    645                   <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
    646                   <y:BorderStyle color="#000000" type="line" width="1.0"/> 
    647                   <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="183.0" x="7.0" y="76.22227504472232">DialogueResponse.condition</y:NodeLabel> 
    648                 </y:GenericNode> 
    649               </data> 
    650             </node> 
    651             <node id="n1::n4::n3"> 
    652               <data key="d3"> 
    653                 <y:GenericNode configuration="com.yworks.flowchart.process"> 
    654                   <y:Geometry height="40.0" width="157.87310791232562" x="613.9932203734244" y="944.0884934317688"/> 
    655                   <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
    656                   <y:BorderStyle color="#000000" type="line" width="1.0"/> 
    657                   <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="34.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="149.0" x="4.436553956162811" y="3.0">add DialogueResponse 
    658 to valid_responses</y:NodeLabel> 
    659                 </y:GenericNode> 
    660               </data> 
    661             </node> 
    662             <node id="n1::n4::n4"> 
    663               <data key="d3"> 
    664                 <y:GenericNode configuration="com.yworks.flowchart.internalStorage"> 
    665                   <y:Geometry height="40.0" width="157.87310791232562" x="613.9932203734244" y="1014.0884934317688"/> 
    666                   <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
    667                   <y:BorderStyle color="#000000" type="line" width="1.0"/> 
    668                   <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="104.0" x="26.93655395616281" y="10.499999999999886">valid_responses</y:NodeLabel> 
    669                 </y:GenericNode> 
    670               </data> 
    671             </node> 
    672             <node id="n1::n4::n5"> 
    673               <data key="d3"> 
    674                 <y:GenericNode configuration="com.yworks.flowchart.data"> 
    675                   <y:Geometry height="40.0" width="171.2995058282437" x="556.656908852535" y="1212.1011982179716"/> 
    676                   <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
    677                   <y:BorderStyle color="#000000" type="line" width="1.0"/> 
    678                   <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="147.0" x="12.149752914121791" y="10.5">return valid_responses</y:NodeLabel> 
    679                 </y:GenericNode> 
    680               </data> 
    681             </node> 
    682             <node id="n1::n4::n6"> 
    683               <data key="d3"> 
    684                 <y:GenericNode configuration="com.yworks.flowchart.data"> 
    685                   <y:Geometry height="40.0" width="157.87310791232562" x="558.2007750234868" y="673.0000000000001"/> 
    686                   <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
    687                   <y:BorderStyle color="#000000" type="line" width="1.0"/> 
    688                   <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="142.0" x="7.936553956162811" y="10.5">input DialogueSection</y:NodeLabel> 
    689                 </y:GenericNode> 
    690               </data> 
    691             </node> 
    692             <node id="n1::n4::n7"> 
    693               <data key="d3"> 
    694                 <y:GenericNode configuration="com.yworks.flowchart.internalStorage"> 
    695                   <y:Geometry height="40.0" width="157.87310791232562" x="563.370107810494" y="1142.1011982179716"/> 
    696                   <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
    697                   <y:BorderStyle color="#000000" type="line" width="1.0"/> 
    698                   <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="104.0" x="26.93655395616281" y="10.5">valid_responses</y:NodeLabel> 
    699                 </y:GenericNode> 
    700               </data> 
    701             </node> 
    702           </graph> 
    703         </node> 
    704         <node id="n1::n5"> 
    705           <data key="d3"> 
    706             <y:GenericNode configuration="com.yworks.flowchart.manualInput"> 
    707               <y:Geometry height="56.25166548606899" width="178.3540983606557" x="-116.17704918032786" y="1192.8741672569654"/> 
    708               <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/> 
    709               <y:BorderStyle color="#000000" type="line" width="1.0"/> 
    710               <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="34.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="162.0" x="8.177049180327856" y="11.125832743034607">player chooses response 
    711 from valid_responses</y:NodeLabel> 
    712710            </y:GenericNode> 
    713711          </data> 
     
    772770    </node> 
    773771    <node id="n7"> 
    774       <data key="d2"/> 
    775772      <data key="d3"> 
    776773        <y:GenericNode configuration="com.yworks.flowchart.start1"> 
     
    782779      </data> 
    783780    </node> 
    784     <edge id="e0" source="n3" target="n1::n1::n0"> 
     781    <edge id="e0" source="n3" target="n0::n3::n0"> 
    785782      <data key="d7"> 
    786783        <y:PolyLineEdge> 
     
    795792      </data> 
    796793    </edge> 
    797     <edge id="e1" source="n3" target="n1::n1::n1"> 
     794    <edge id="e1" source="n3" target="n0::n3::n1"> 
    798795      <data key="d7"> 
    799796        <y:PolyLineEdge> 
     
    808805      </data> 
    809806    </edge> 
    810     <edge id="n1::n1::e0" source="n1::n1::n1" target="n1::n1::n2"> 
    811       <data key="d7"> 
    812         <y:PolyLineEdge> 
    813           <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
    814           <y:LineStyle color="#000000" type="line" width="1.0"/> 
    815           <y:Arrows source="none" target="standard"/> 
    816           <y:BendStyle smoothed="false"/> 
    817         </y:PolyLineEdge> 
    818       </data> 
    819     </edge> 
    820     <edge id="n1::n1::e1" source="n1::n1::n0" target="n1::n1::n3"> 
     807    <edge id="n0::n3::e0" source="n0::n3::n1" target="n0::n3::n2"> 
     808      <data key="d7"> 
     809        <y:PolyLineEdge> 
     810          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
     811          <y:LineStyle color="#000000" type="line" width="1.0"/> 
     812          <y:Arrows source="none" target="standard"/> 
     813          <y:BendStyle smoothed="false"/> 
     814        </y:PolyLineEdge> 
     815      </data> 
     816    </edge> 
     817    <edge id="n0::n3::e1" source="n0::n3::n0" target="n0::n3::n3"> 
    821818      <data key="d7"> 
    822819        <y:PolyLineEdge> 
     
    831828      </data> 
    832829    </edge> 
    833     <edge id="n1::n1::e2" source="n1::n1::n1" target="n1::n1::n3"> 
     830    <edge id="n0::n3::e2" source="n0::n3::n1" target="n0::n3::n3"> 
    834831      <data key="d7"> 
    835832        <y:PolyLineEdge> 
     
    844841      </data> 
    845842    </edge> 
    846     <edge id="n1::e0" source="n1::n5" target="n1::n2::n1"> 
     843    <edge id="n0::e0" source="n0::n5" target="n0::n2::n1"> 
    847844      <data key="d7"> 
    848845        <y:PolyLineEdge> 
     
    856853      </data> 
    857854    </edge> 
    858     <edge id="n1::n3::e0" source="n1::n3::n0" target="n1::n3::n1"> 
    859       <data key="d7"> 
    860         <y:PolyLineEdge> 
    861           <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
    862           <y:LineStyle color="#000000" type="line" width="1.0"/> 
    863           <y:Arrows source="none" target="standard"/> 
    864           <y:BendStyle smoothed="false"/> 
    865         </y:PolyLineEdge> 
    866       </data> 
    867     </edge> 
    868     <edge id="n1::n1::e3" source="n1::n1::n3" target="n1::n1::n4"> 
    869       <data key="d7"> 
    870         <y:PolyLineEdge> 
    871           <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
    872           <y:LineStyle color="#000000" type="line" width="1.0"/> 
    873           <y:Arrows source="none" target="standard"/> 
    874           <y:BendStyle smoothed="false"/> 
    875         </y:PolyLineEdge> 
    876       </data> 
    877     </edge> 
    878     <edge id="n1::n1::e4" source="n1::n1::n0" target="n1::n1::n5"> 
    879       <data key="d7"> 
    880         <y:PolyLineEdge> 
    881           <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
    882           <y:LineStyle color="#000000" type="line" width="1.0"/> 
    883           <y:Arrows source="none" target="standard"/> 
    884           <y:BendStyle smoothed="false"/> 
    885         </y:PolyLineEdge> 
    886       </data> 
    887     </edge> 
    888     <edge id="n0::n0::e0" source="n0::n0::n5" target="n0::n0::n7"> 
    889       <data key="d7"> 
    890         <y:PolyLineEdge> 
    891           <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
    892           <y:LineStyle color="#000000" type="line" width="1.0"/> 
    893           <y:Arrows source="none" target="standard"/> 
    894           <y:BendStyle smoothed="false"/> 
    895         </y:PolyLineEdge> 
    896       </data> 
    897     </edge> 
    898     <edge id="n0::n0::e1" source="n0::n0::n7" target="n0::n0::n1"> 
    899       <data key="d7"> 
    900         <y:PolyLineEdge> 
    901           <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
    902           <y:LineStyle color="#000000" type="line" width="1.0"/> 
    903           <y:Arrows source="none" target="standard"/> 
    904           <y:BendStyle smoothed="false"/> 
    905         </y:PolyLineEdge> 
    906       </data> 
    907     </edge> 
    908     <edge id="e2" source="n0::n0::n1" target="n1::n1::n0"> 
     855    <edge id="n0::n1::e0" source="n0::n1::n0" target="n0::n1::n1"> 
     856      <data key="d7"> 
     857        <y:PolyLineEdge> 
     858          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
     859          <y:LineStyle color="#000000" type="line" width="1.0"/> 
     860          <y:Arrows source="none" target="standard"/> 
     861          <y:BendStyle smoothed="false"/> 
     862        </y:PolyLineEdge> 
     863      </data> 
     864    </edge> 
     865    <edge id="n0::n3::e3" source="n0::n3::n3" target="n0::n3::n4"> 
     866      <data key="d7"> 
     867        <y:PolyLineEdge> 
     868          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
     869          <y:LineStyle color="#000000" type="line" width="1.0"/> 
     870          <y:Arrows source="none" target="standard"/> 
     871          <y:BendStyle smoothed="false"/> 
     872        </y:PolyLineEdge> 
     873      </data> 
     874    </edge> 
     875    <edge id="n0::n3::e4" source="n0::n3::n0" target="n0::n3::n5"> 
     876      <data key="d7"> 
     877        <y:PolyLineEdge> 
     878          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
     879          <y:LineStyle color="#000000" type="line" width="1.0"/> 
     880          <y:Arrows source="none" target="standard"/> 
     881          <y:BendStyle smoothed="false"/> 
     882        </y:PolyLineEdge> 
     883      </data> 
     884    </edge> 
     885    <edge id="n1::n0::e0" source="n1::n0::n5" target="n1::n0::n7"> 
     886      <data key="d7"> 
     887        <y:PolyLineEdge> 
     888          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
     889          <y:LineStyle color="#000000" type="line" width="1.0"/> 
     890          <y:Arrows source="none" target="standard"/> 
     891          <y:BendStyle smoothed="false"/> 
     892        </y:PolyLineEdge> 
     893      </data> 
     894    </edge> 
     895    <edge id="n1::n0::e1" source="n1::n0::n7" target="n1::n0::n1"> 
     896      <data key="d7"> 
     897        <y:PolyLineEdge> 
     898          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
     899          <y:LineStyle color="#000000" type="line" width="1.0"/> 
     900          <y:Arrows source="none" target="standard"/> 
     901          <y:BendStyle smoothed="false"/> 
     902        </y:PolyLineEdge> 
     903      </data> 
     904    </edge> 
     905    <edge id="e2" source="n1::n0::n1" target="n0::n3::n0"> 
    909906      <data key="d7"> 
    910907        <y:PolyLineEdge> 
     
    918915      </data> 
    919916    </edge> 
    920     <edge id="n0::n0::e2" source="n0::n0::n0" target="n0::n0::n5"> 
    921       <data key="d7"> 
    922         <y:PolyLineEdge> 
    923           <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
    924           <y:LineStyle color="#000000" type="line" width="1.0"/> 
    925           <y:Arrows source="none" target="standard"/> 
    926           <y:BendStyle smoothed="false"/> 
    927         </y:PolyLineEdge> 
    928       </data> 
    929     </edge> 
    930     <edge id="n0::n0::e3" source="n0::n0::n3" target="n0::n0::n7"> 
    931       <data key="d7"> 
    932         <y:PolyLineEdge> 
    933           <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
    934           <y:LineStyle color="#000000" type="line" width="1.0"/> 
    935           <y:Arrows source="none" target="standard"/> 
    936           <y:BendStyle smoothed="false"/> 
    937         </y:PolyLineEdge> 
    938       </data> 
    939     </edge> 
    940     <edge id="n0::n0::e4" source="n0::n0::n7" target="n0::n0::n4"> 
    941       <data key="d7"> 
    942         <y:PolyLineEdge> 
    943           <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
    944           <y:LineStyle color="#000000" type="line" width="1.0"/> 
    945           <y:Arrows source="none" target="standard"/> 
    946           <y:BendStyle smoothed="false"/> 
    947         </y:PolyLineEdge> 
    948       </data> 
    949     </edge> 
    950     <edge id="n1::n1::e5" source="n1::n1::n6" target="n1::n1::n3"> 
    951       <data key="d7"> 
    952         <y:PolyLineEdge> 
    953           <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
    954           <y:LineStyle color="#000000" type="line" width="1.0"/> 
    955           <y:Arrows source="none" target="standard"/> 
    956           <y:BendStyle smoothed="false"/> 
    957         </y:PolyLineEdge> 
    958       </data> 
    959     </edge> 
    960     <edge id="n1::n3::e1" source="n1::n3::n1" target="n1::n3::n2"> 
    961       <data key="d7"> 
    962         <y:PolyLineEdge> 
    963           <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
    964           <y:LineStyle color="#000000" type="line" width="1.0"/> 
    965           <y:Arrows source="none" target="standard"/> 
    966           <y:BendStyle smoothed="false"/> 
    967         </y:PolyLineEdge> 
    968       </data> 
    969     </edge> 
    970     <edge id="n1::n3::e2" source="n1::n3::n2" target="n1::n3::n0"> 
     917    <edge id="n1::n0::e2" source="n1::n0::n0" target="n1::n0::n5"> 
     918      <data key="d7"> 
     919        <y:PolyLineEdge> 
     920          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
     921          <y:LineStyle color="#000000" type="line" width="1.0"/> 
     922          <y:Arrows source="none" target="standard"/> 
     923          <y:BendStyle smoothed="false"/> 
     924        </y:PolyLineEdge> 
     925      </data> 
     926    </edge> 
     927    <edge id="n1::n0::e3" source="n1::n0::n3" target="n1::n0::n7"> 
     928      <data key="d7"> 
     929        <y:PolyLineEdge> 
     930          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
     931          <y:LineStyle color="#000000" type="line" width="1.0"/> 
     932          <y:Arrows source="none" target="standard"/> 
     933          <y:BendStyle smoothed="false"/> 
     934        </y:PolyLineEdge> 
     935      </data> 
     936    </edge> 
     937    <edge id="n1::n0::e4" source="n1::n0::n7" target="n1::n0::n4"> 
     938      <data key="d7"> 
     939        <y:PolyLineEdge> 
     940          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
     941          <y:LineStyle color="#000000" type="line" width="1.0"/> 
     942          <y:Arrows source="none" target="standard"/> 
     943          <y:BendStyle smoothed="false"/> 
     944        </y:PolyLineEdge> 
     945      </data> 
     946    </edge> 
     947    <edge id="n0::n3::e5" source="n0::n3::n6" target="n0::n3::n3"> 
     948      <data key="d7"> 
     949        <y:PolyLineEdge> 
     950          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
     951          <y:LineStyle color="#000000" type="line" width="1.0"/> 
     952          <y:Arrows source="none" target="standard"/> 
     953          <y:BendStyle smoothed="false"/> 
     954        </y:PolyLineEdge> 
     955      </data> 
     956    </edge> 
     957    <edge id="n0::n1::e1" source="n0::n1::n1" target="n0::n1::n2"> 
     958      <data key="d7"> 
     959        <y:PolyLineEdge> 
     960          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
     961          <y:LineStyle color="#000000" type="line" width="1.0"/> 
     962          <y:Arrows source="none" target="standard"/> 
     963          <y:BendStyle smoothed="false"/> 
     964        </y:PolyLineEdge> 
     965      </data> 
     966    </edge> 
     967    <edge id="n0::n1::e2" source="n0::n1::n2" target="n0::n1::n0"> 
    971968      <data key="d7"> 
    972969        <y:PolyLineEdge> 
     
    982979      </data> 
    983980    </edge> 
    984     <edge id="n1::n4::e0" source="n1::n4::n0" target="n1::n4::n1"> 
     981    <edge id="n0::n0::e0" source="n0::n0::n0" target="n0::n0::n1"> 
    985982      <data key="d7"> 
    986983        <y:PolyLineEdge> 
     
    998995      </data> 
    999996    </edge> 
    1000     <edge id="n1::n4::e1" source="n1::n4::n1" target="n1::n4::n2"> 
    1001       <data key="d7"> 
    1002         <y:PolyLineEdge> 
    1003           <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
    1004           <y:LineStyle color="#000000" type="line" width="1.0"/> 
    1005           <y:Arrows source="none" target="standard"/> 
    1006           <y:BendStyle smoothed="false"/> 
    1007         </y:PolyLineEdge> 
    1008       </data> 
    1009     </edge> 
    1010     <edge id="n1::n4::e2" source="n1::n4::n2" target="n1::n4::n3"> 
     997    <edge id="n0::n0::e1" source="n0::n0::n1" target="n0::n0::n2"> 
     998      <data key="d7"> 
     999        <y:PolyLineEdge> 
     1000          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
     1001          <y:LineStyle color="#000000" type="line" width="1.0"/> 
     1002          <y:Arrows source="none" target="standard"/> 
     1003          <y:BendStyle smoothed="false"/> 
     1004        </y:PolyLineEdge> 
     1005      </data> 
     1006    </edge> 
     1007    <edge id="n0::n0::e2" source="n0::n0::n2" target="n0::n0::n3"> 
    10111008      <data key="d7"> 
    10121009        <y:PolyLineEdge> 
     
    10211018      </data> 
    10221019    </edge> 
    1023     <edge id="n1::n4::e3" source="n1::n4::n3" target="n1::n4::n4"> 
    1024       <data key="d7"> 
    1025         <y:PolyLineEdge> 
    1026           <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
    1027           <y:LineStyle color="#000000" type="line" width="1.0"/> 
    1028           <y:Arrows source="none" target="standard"/> 
    1029           <y:BendStyle smoothed="false"/> 
    1030         </y:PolyLineEdge> 
    1031       </data> 
    1032     </edge> 
    1033     <edge id="n1::n4::e4" source="n1::n4::n3" target="n1::n4::n0"> 
     1020    <edge id="n0::n0::e3" source="n0::n0::n3" target="n0::n0::n4"> 
     1021      <data key="d7"> 
     1022        <y:PolyLineEdge> 
     1023          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
     1024          <y:LineStyle color="#000000" type="line" width="1.0"/> 
     1025          <y:Arrows source="none" target="standard"/> 
     1026          <y:BendStyle smoothed="false"/> 
     1027        </y:PolyLineEdge> 
     1028      </data> 
     1029    </edge> 
     1030    <edge id="n0::n0::e4" source="n0::n0::n3" target="n0::n0::n0"> 
    10341031      <data key="d7"> 
    10351032        <y:PolyLineEdge> 
     
    10431040      </data> 
    10441041    </edge> 
    1045     <edge id="n1::n4::e5" source="n1::n4::n2" target="n1::n4::n0"> 
     1042    <edge id="n0::n0::e5" source="n0::n0::n2" target="n0::n0::n0"> 
    10461043      <data key="d7"> 
    10471044        <y:PolyLineEdge> 
     
    10541051      </data> 
    10551052    </edge> 
    1056     <edge id="n1::n4::e6" source="n1::n4::n0" target="n1::n4::n5"> 
     1053    <edge id="n0::n0::e6" source="n0::n0::n0" target="n0::n0::n5"> 
    10571054      <data key="d7"> 
    10581055        <y:PolyLineEdge> 
     
    10871084      </data> 
    10881085    </edge> 
    1089     <edge id="n0::n0::e5" source="n0::n0::n6" target="n0::n0::n5"> 
    1090       <data key="d7"> 
    1091         <y:PolyLineEdge> 
    1092           <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
    1093           <y:LineStyle color="#000000" type="line" width="1.0"/> 
    1094           <y:Arrows source="none" target="standard"/> 
    1095           <y:BendStyle smoothed="false"/> 
    1096         </y:PolyLineEdge> 
    1097       </data> 
    1098     </edge> 
    1099     <edge id="n0::n0::e6" source="n0::n0::n6" target="n0::n0::n2"> 
    1100       <data key="d7"> 
    1101         <y:PolyLineEdge> 
    1102           <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
    1103           <y:LineStyle color="#000000" type="line" width="1.0"/> 
    1104           <y:Arrows source="none" target="standard"/> 
    1105           <y:BendStyle smoothed="false"/> 
    1106         </y:PolyLineEdge> 
    1107       </data> 
    1108     </edge> 
    1109     <edge id="n0::e0" source="n0::n1" target="n0::n3"> 
    1110       <data key="d7"> 
    1111         <y:PolyLineEdge> 
    1112           <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
    1113           <y:LineStyle color="#000000" type="line" width="1.0"/> 
    1114           <y:Arrows source="none" target="standard"/> 
    1115           <y:BendStyle smoothed="false"/> 
    1116         </y:PolyLineEdge> 
    1117       </data> 
    1118     </edge> 
    1119     <edge id="n0::e1" source="n0::n3" target="n0::n2"> 
    1120       <data key="d7"> 
    1121         <y:PolyLineEdge> 
    1122           <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
    1123           <y:LineStyle color="#000000" type="line" width="1.0"/> 
    1124           <y:Arrows source="none" target="standard"/> 
    1125           <y:BendStyle smoothed="false"/> 
    1126         </y:PolyLineEdge> 
    1127       </data> 
    1128     </edge> 
    1129     <edge id="n0::e2" source="n0::n3" target="n0::n0::n6"> 
     1086    <edge id="n1::n0::e5" source="n1::n0::n6" target="n1::n0::n5"> 
     1087      <data key="d7"> 
     1088        <y:PolyLineEdge> 
     1089          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
     1090          <y:LineStyle color="#000000" type="line" width="1.0"/> 
     1091          <y:Arrows source="none" target="standard"/> 
     1092          <y:BendStyle smoothed="false"/> 
     1093        </y:PolyLineEdge> 
     1094      </data> 
     1095    </edge> 
     1096    <edge id="n1::n0::e6" source="n1::n0::n6" target="n1::n0::n2"> 
     1097      <data key="d7"> 
     1098        <y:PolyLineEdge> 
     1099          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
     1100          <y:LineStyle color="#000000" type="line" width="1.0"/> 
     1101          <y:Arrows source="none" target="standard"/> 
     1102          <y:BendStyle smoothed="false"/> 
     1103        </y:PolyLineEdge> 
     1104      </data> 
     1105    </edge> 
     1106    <edge id="n1::e0" source="n1::n1" target="n1::n3"> 
     1107      <data key="d7"> 
     1108        <y:PolyLineEdge> 
     1109          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
     1110          <y:LineStyle color="#000000" type="line" width="1.0"/> 
     1111          <y:Arrows source="none" target="standard"/> 
     1112          <y:BendStyle smoothed="false"/> 
     1113        </y:PolyLineEdge> 
     1114      </data> 
     1115    </edge> 
     1116    <edge id="n1::e1" source="n1::n3" target="n1::n2"> 
     1117      <data key="d7"> 
     1118        <y:PolyLineEdge> 
     1119          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
     1120          <y:LineStyle color="#000000" type="line" width="1.0"/> 
     1121          <y:Arrows source="none" target="standard"/> 
     1122          <y:BendStyle smoothed="false"/> 
     1123        </y:PolyLineEdge> 
     1124      </data> 
     1125    </edge> 
     1126    <edge id="n1::e2" source="n1::n3" target="n1::n0::n6"> 
    11301127      <data key="d7"> 
    11311128        <y:PolyLineEdge> 
     
    11471144      </data> 
    11481145    </edge> 
    1149     <edge id="e6" source="n2" target="n0::n3"> 
    1150       <data key="d7"> 
    1151         <y:PolyLineEdge> 
    1152           <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
    1153           <y:LineStyle color="#000000" type="line" width="1.0"/> 
    1154           <y:Arrows source="none" target="standard"/> 
    1155           <y:BendStyle smoothed="false"/> 
    1156         </y:PolyLineEdge> 
    1157       </data> 
    1158     </edge> 
    1159     <edge id="e7" source="n6" target="n1::n5"> 
    1160       <data key="d7"> 
    1161         <y:PolyLineEdge> 
    1162           <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
    1163           <y:LineStyle color="#000000" type="line" width="1.0"/> 
    1164           <y:Arrows source="none" target="standard"/> 
    1165           <y:BendStyle smoothed="false"/> 
    1166         </y:PolyLineEdge> 
    1167       </data> 
    1168     </edge> 
    1169     <edge id="n1::n2::e0" source="n1::n2::n1" target="n1::n2::n0"> 
    1170       <data key="d7"> 
    1171         <y:PolyLineEdge> 
    1172           <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
    1173           <y:LineStyle color="#000000" type="line" width="1.0"/> 
    1174           <y:Arrows source="none" target="standard"/> 
    1175           <y:BendStyle smoothed="false"/> 
    1176         </y:PolyLineEdge> 
    1177       </data> 
    1178     </edge> 
    1179     <edge id="n1::n4::e7" source="n1::n4::n6" target="n1::n4::n1"> 
     1146    <edge id="e6" source="n2" target="n1::n3"> 
     1147      <data key="d7"> 
     1148        <y:PolyLineEdge> 
     1149          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
     1150          <y:LineStyle color="#000000" type="line" width="1.0"/> 
     1151          <y:Arrows source="none" target="standard"/> 
     1152          <y:BendStyle smoothed="false"/> 
     1153        </y:PolyLineEdge> 
     1154      </data> 
     1155    </edge> 
     1156    <edge id="e7" source="n6" target="n0::n5"> 
     1157      <data key="d7"> 
     1158        <y:PolyLineEdge> 
     1159          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
     1160          <y:LineStyle color="#000000" type="line" width="1.0"/> 
     1161          <y:Arrows source="none" target="standard"/> 
     1162          <y:BendStyle smoothed="false"/> 
     1163        </y:PolyLineEdge> 
     1164      </data> 
     1165    </edge> 
     1166    <edge id="n0::n2::e0" source="n0::n2::n1" target="n0::n2::n0"> 
     1167      <data key="d7"> 
     1168        <y:PolyLineEdge> 
     1169          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
     1170          <y:LineStyle color="#000000" type="line" width="1.0"/> 
     1171          <y:Arrows source="none" target="standard"/> 
     1172          <y:BendStyle smoothed="false"/> 
     1173        </y:PolyLineEdge> 
     1174      </data> 
     1175    </edge> 
     1176    <edge id="n0::n0::e7" source="n0::n0::n6" target="n0::n0::n1"> 
    11801177      <data key="d7"> 
    11811178        <y:PolyLineEdge> 
     
    11871184      </data> 
    11881185    </edge> 
    1189     <edge id="n1::n3::e3" source="n1::n3::n3" target="n1::n3::n0"> 
     1186    <edge id="n0::n1::e3" source="n0::n1::n3" target="n0::n1::n0"> 
    11901187      <data key="d7"> 
    11911188        <y:PolyLineEdge> 
     
    11971194      </data> 
    11981195    </edge> 
    1199     <edge id="n1::n4::e8" source="n1::n4::n7" target="n1::n4::n5"> 
    1200       <data key="d7"> 
    1201         <y:PolyLineEdge> 
    1202           <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
    1203           <y:LineStyle color="#000000" type="line" width="1.0"/> 
    1204           <y:Arrows source="none" target="standard"/> 
    1205           <y:BendStyle smoothed="false"/> 
    1206         </y:PolyLineEdge> 
    1207       </data> 
    1208     </edge> 
    1209     <edge id="n1::e1" source="n1::n2::n1" target="n1::n3::n3"> 
     1196    <edge id="n0::n0::e8" source="n0::n0::n7" target="n0::n0::n5"> 
     1197      <data key="d7"> 
     1198        <y:PolyLineEdge> 
     1199          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
     1200          <y:LineStyle color="#000000" type="line" width="1.0"/> 
     1201          <y:Arrows source="none" target="standard"/> 
     1202          <y:BendStyle smoothed="false"/> 
     1203        </y:PolyLineEdge> 
     1204      </data> 
     1205    </edge> 
     1206    <edge id="n0::e1" source="n0::n2::n1" target="n0::n1::n3"> 
    12101207      <data key="d7"> 
    12111208        <y:PolyLineEdge> 
     
    12271224      </data> 
    12281225    </edge> 
    1229     <edge id="n1::n2::e1" source="n1::n2::n1" target="n1::n2::n2"> 
    1230       <data key="d7"> 
    1231         <y:PolyLineEdge> 
    1232           <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
    1233           <y:LineStyle color="#000000" type="line" width="1.0"/> 
    1234           <y:Arrows source="none" target="standard"/> 
    1235           <y:BendStyle smoothed="false"/> 
    1236         </y:PolyLineEdge> 
    1237       </data> 
    1238     </edge> 
    1239     <edge id="n1::n2::e2" source="n1::n2::n2" target="n1::n2::n3"> 
     1226    <edge id="n0::n2::e1" source="n0::n2::n1" target="n0::n2::n2"> 
     1227      <data key="d7"> 
     1228        <y:PolyLineEdge> 
     1229          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
     1230          <y:LineStyle color="#000000" type="line" width="1.0"/> 
     1231          <y:Arrows source="none" target="standard"/> 
     1232          <y:BendStyle smoothed="false"/> 
     1233        </y:PolyLineEdge> 
     1234      </data> 
     1235    </edge> 
     1236    <edge id="n0::n2::e2" source="n0::n2::n2" target="n0::n2::n3"> 
    12401237      <data key="d7"> 
    12411238        <y:PolyLineEdge> 
     
    12481245      </data> 
    12491246    </edge> 
    1250     <edge id="n1::n2::e3" source="n1::n2::n2" target="n1::n2::n4"> 
     1247    <edge id="n0::n2::e3" source="n0::n2::n2" target="n0::n2::n4"> 
    12511248      <data key="d7"> 
    12521249        <y:PolyLineEdge> 
     
    12611258      </data> 
    12621259    </edge> 
    1263     <edge id="n1::n2::e4" source="n1::n2::n3" target="n1::n2::n5"> 
    1264       <data key="d7"> 
    1265         <y:PolyLineEdge> 
    1266           <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
    1267           <y:LineStyle color="#000000" type="line" width="1.0"/> 
    1268           <y:Arrows source="none" target="standard"/> 
    1269           <y:BendStyle smoothed="false"/> 
    1270         </y:PolyLineEdge> 
    1271       </data> 
    1272     </edge> 
    1273     <edge id="n1::n2::e5" source="n1::n2::n2" target="n1::n2::n6"> 
     1260    <edge id="n0::n2::e4" source="n0::n2::n3" target="n0::n2::n5"> 
     1261      <data key="d7"> 
     1262        <y:PolyLineEdge> 
     1263          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
     1264          <y:LineStyle color="#000000" type="line" width="1.0"/> 
     1265          <y:Arrows source="none" target="standard"/> 
     1266          <y:BendStyle smoothed="false"/> 
     1267        </y:PolyLineEdge> 
     1268      </data> 
     1269    </edge> 
     1270    <edge id="n0::n2::e5" source="n0::n2::n2" target="n0::n2::n6"> 
    12741271      <data key="d7"> 
    12751272        <y:PolyLineEdge> 
     
    12841281      </data> 
    12851282    </edge> 
    1286     <edge id="n1::n2::e6" source="n1::n2::n6" target="n1::n2::n7"> 
    1287       <data key="d7"> 
    1288         <y:PolyLineEdge> 
    1289           <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
    1290           <y:LineStyle color="#000000" type="line" width="1.0"/> 
    1291           <y:Arrows source="none" target="standard"/> 
    1292           <y:BendStyle smoothed="false"/> 
    1293         </y:PolyLineEdge> 
    1294       </data> 
    1295     </edge> 
    1296     <edge id="n1::n2::e7" source="n1::n2::n8" target="n1::n2::n6"> 
    1297       <data key="d7"> 
    1298         <y:PolyLineEdge> 
    1299           <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
    1300           <y:LineStyle color="#000000" type="line" width="1.0"/> 
    1301           <y:Arrows source="none" target="standard"/> 
    1302           <y:BendStyle smoothed="false"/> 
    1303         </y:PolyLineEdge> 
    1304       </data> 
    1305     </edge> 
    1306     <edge id="n1::n0::e0" source="n1::n0::n0" target="n1::n0::n2"> 
    1307       <data key="d7"> 
    1308         <y:PolyLineEdge> 
    1309           <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
    1310           <y:LineStyle color="#000000" type="line" width="1.0"/> 
    1311           <y:Arrows source="none" target="standard"/> 
    1312           <y:BendStyle smoothed="false"/> 
    1313         </y:PolyLineEdge> 
    1314       </data> 
    1315     </edge> 
    1316     <edge id="n1::n0::e1" source="n1::n0::n2" target="n1::n0::n1"> 
    1317       <data key="d7"> 
    1318         <y:PolyLineEdge> 
    1319           <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
    1320           <y:LineStyle color="#000000" type="line" width="1.0"/> 
    1321           <y:Arrows source="none" target="standard"/> 
    1322           <y:BendStyle smoothed="false"/> 
    1323         </y:PolyLineEdge> 
    1324       </data> 
    1325     </edge> 
    1326     <edge id="n1::e2" source="n1::n0::n2" target="n1::n3::n3"> 
     1283    <edge id="n0::n2::e6" source="n0::n2::n6" target="n0::n2::n7"> 
     1284      <data key="d7"> 
     1285        <y:PolyLineEdge> 
     1286          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
     1287          <y:LineStyle color="#000000" type="line" width="1.0"/> 
     1288          <y:Arrows source="none" target="standard"/> 
     1289          <y:BendStyle smoothed="false"/> 
     1290        </y:PolyLineEdge> 
     1291      </data> 
     1292    </edge> 
     1293    <edge id="n0::n2::e7" source="n0::n2::n8" target="n0::n2::n6"> 
     1294      <data key="d7"> 
     1295        <y:PolyLineEdge> 
     1296          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
     1297          <y:LineStyle color="#000000" type="line" width="1.0"/> 
     1298          <y:Arrows source="none" target="standard"/> 
     1299          <y:BendStyle smoothed="false"/> 
     1300        </y:PolyLineEdge> 
     1301      </data> 
     1302    </edge> 
     1303    <edge id="n0::n4::e0" source="n0::n4::n0" target="n0::n4::n2"> 
     1304      <data key="d7"> 
     1305        <y:PolyLineEdge> 
     1306          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
     1307          <y:LineStyle color="#000000" type="line" width="1.0"/> 
     1308          <y:Arrows source="none" target="standard"/> 
     1309          <y:BendStyle smoothed="false"/> 
     1310        </y:PolyLineEdge> 
     1311      </data> 
     1312    </edge> 
     1313    <edge id="n0::n4::e1" source="n0::n4::n2" target="n0::n4::n1"> 
     1314      <data key="d7"> 
     1315        <y:PolyLineEdge> 
     1316          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
     1317          <y:LineStyle color="#000000" type="line" width="1.0"/> 
     1318          <y:Arrows source="none" target="standard"/> 
     1319          <y:BendStyle smoothed="false"/> 
     1320        </y:PolyLineEdge> 
     1321      </data> 
     1322    </edge> 
     1323    <edge id="n0::e2" source="n0::n4::n2" target="n0::n1::n3"> 
    13271324      <data key="d7"> 
    13281325        <y:PolyLineEdge> 
     
    13381335      </data> 
    13391336    </edge> 
    1340     <edge id="n1::e3" source="n1::n0::n2" target="n1::n4::n6"> 
     1337    <edge id="n0::e3" source="n0::n4::n2" target="n0::n0::n6"> 
    13411338      <data key="d7"> 
    13421339        <y:PolyLineEdge> 
     
    13521349      </data> 
    13531350    </edge> 
    1354     <edge id="n1::e4" source="n1::n4::n5" target="n1::n0::n3"> 
     1351    <edge id="n0::e4" source="n0::n0::n5" target="n0::n4::n3"> 
    13551352      <data key="d7"> 
    13561353        <y:PolyLineEdge> 
     
    13641361      </data> 
    13651362    </edge> 
    1366     <edge id="e9" source="n4" target="n1::n0::n2"> 
    1367       <data key="d7"> 
    1368         <y:PolyLineEdge> 
    1369           <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
    1370           <y:LineStyle color="#000000" type="line" width="1.0"/> 
    1371           <y:Arrows source="none" target="standard"/> 
    1372           <y:BendStyle smoothed="false"/> 
    1373         </y:PolyLineEdge> 
    1374       </data> 
    1375     </edge> 
    1376     <edge id="n1::e5" source="n1::n0::n3" target="n1::n5"> 
     1363    <edge id="e9" source="n4" target="n0::n4::n2"> 
     1364      <data key="d7"> 
     1365        <y:PolyLineEdge> 
     1366          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> 
     1367          <y:LineStyle color="#000000" type="line" width="1.0"/> 
     1368          <y:Arrows source="none" target="standard"/> 
     1369          <y:BendStyle smoothed="false"/> 
     1370        </y:PolyLineEdge> 
     1371      </data> 
     1372    </edge> 
     1373    <edge id="n0::e5" source="n0::n4::n3" target="n0::n5"> 
    13771374      <data key="d7"> 
    13781375        <y:PolyLineEdge> 
     
    13861383      </data> 
    13871384    </edge> 
    1388     <edge id="e10" source="n1::n2::n4" target="n7"> 
     1385    <edge id="e10" source="n0::n2::n4" target="n7"> 
    13891386      <data key="d7"> 
    13901387        <y:PolyLineEdge> 
  • trunk/game/dialogue/old_man.yaml

    r668 r680  
    1313#   You should have received a copy of the GNU General Public License 
    1414#   along with PARPG.  If not, see <http://www.gnu.org/licenses/>. 
    15  
    16 #   NOTE:  This is not a "real" dialogue file, it is meant to be a template for 
    17 #   Any generic fortified mall (techdemo location) denizen 
    1815--- 
    1916NPC_NAME: Old Man 
  • trunk/game/scripts/dialogue.py

    r668 r680  
    11#!/usr/bin/env python 
    2  
     2# 
    33#   This file is part of PARPG. 
    4  
     4# 
    55#   PARPG is free software: you can redistribute it and/or modify 
    66#   it under the terms of the GNU General Public License as published by 
    77#   the Free Software Foundation, either version 3 of the License, or 
    88#   (at your option) any later version. 
    9  
     9# 
    1010#   PARPG is distributed in the hope that it will be useful, 
    1111#   but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1212#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1313#   GNU General Public License for more details. 
    14  
     14# 
    1515#   You should have received a copy of the GNU General Public License 
    1616#   along with PARPG.  If not, see <http://www.gnu.org/licenses/>. 
     17""" 
     18Provides classes used to contain and organize dialogue data for use within 
     19in-game dialogues between the player character and NPCs. 
     20""" 
    1721try: 
    1822    from collections import OrderedDict 
     
    2226 
    2327class Dialogue(object): 
     28    """ 
     29    Represents a complete dialogue and acts as a container for the dialogue 
     30    data belonging to a particular NPC. 
     31    """ 
    2432    __slots__ = ['npc_name', 'avatar_path', 'start_section_id', 'sections'] 
    2533     
    2634    def __init__(self, npc_name, avatar_path, start_section_id, 
    2735                 dialogue_sections=None): 
     36        """ 
     37        Initialize a new L{Dialogue} instance. 
     38         
     39        @param npc_name: name displayed for the NPC in the dialogue. 
     40        @type npc_name: basestring 
     41        @param avatar_path: path to the image that should be displayed as the 
     42            NPC's avatar. 
     43        @type avatar_path: basestring 
     44        @param start_section_id: ID of the L{DialogueSection} that should be 
     45            displayed when the dialogue is first initiated. 
     46        @type start_section_id: basestring 
     47        @param dialogue_sections: sections of dialogue that make up this 
     48            L{Dialogue} instance. 
     49        @type dialogue_sections: list of L{DialogueSections<DialogueSection>} 
     50        """ 
    2851        self.npc_name = npc_name 
    2952        self.avatar_path = avatar_path 
     
    3457                self.sections[section.id] = section 
    3558     
    36     def __repr__(self): 
     59    def __str__(self): 
     60        """Return the string representation of a L{Dialogue} instance.""" 
    3761        string_representation = ( 
    3862            ('Dialogue(npc_id={0.npc_name}, avatar_path={0.avatar_path}, ' 
     
    4367 
    4468class DialogueNode(object): 
    45     """Abstract base class that represents a node or related group of 
    46        attributes within a Dialogue.""" 
     69    """ 
     70    Abstract base class that represents a node or related group of attributes 
     71    within a Dialogue. 
     72    """ 
    4773    def __init__(self, text, actions=None): 
     74        """ 
     75        Initialize a new L{DialogueNode} instance. 
     76         
     77        @param text: textual content of the L{DialogueNode}. 
     78        @type text: basestring 
     79        @param actions: dialogue actions associated with the L{DialogueNode}. 
     80        @type actions: list of L{DialogueActions<DialogueAction>} 
     81        """ 
    4882        self.text = text 
    4983        self.actions = actions or [] 
     
    5589     
    5690    def __init__(self, id, text, responses=None, actions=None): 
     91        """ 
     92        Initialize a new L{DialogueSection} instance. 
     93         
     94        @param id: named used to uniquely identify the L{DialogueSection} 
     95            within a L{Dialogue}. 
     96        @type id: basestring 
     97        @param text: text displayed as the NPC's part of the L{Dialogue}. 
     98        @type text: basestring 
     99        @param responses: possible responses that the player can choose from. 
     100        @type responses: list of L{DialogueResponses<DialogueResponse>} 
     101        @param actions: dialogue actions that should be executed when the 
     102            L{DialogueSection} is reached. 
     103        @type actions: list of L{DialogueActions<DialogueAction>} 
     104        """ 
    57105        DialogueNode.__init__(self, text=text, actions=actions) 
    58106        self.id = id 
     
    62110 
    63111class DialogueResponse(DialogueNode): 
    64     """DialogueNode that represents one possible response to a particular 
    65        DialogueSection.""" 
    66     __slots__ = ['id', 'text', 'actions', 'condition', 'goto_section_id'] 
     112    """ 
     113    L{DialogueNode} that represents one possible player response to a 
     114    particular L{DialogueSection}. 
     115    """ 
     116    __slots__ = ['text', 'actions', 'condition', 'next_section_id'] 
    67117     
    68118    def __init__(self, text, next_section_id, actions=None, 
    69119                 condition=None): 
     120        """ 
     121        Initialize a new L{DialogueResponse} instance. 
     122         
     123        @param text: text displayed as the content of the player's response. 
     124        @type text: basestring 
     125        @param next_section_id: ID of the L{DialogueSection} that should be 
     126            jumped to if this response is chosen by the player. 
     127        @type next_section_id: basestring 
     128        @param actions: dialogue actions that should be executed if this 
     129            response is chosen by the player. 
     130        @type actions: list of L{DialogueActions} 
     131        @param condition: Python expression that when evaluated determines 
     132            whether the L{DialogueResponse} should be displayed to the player 
     133            as a valid response. 
     134        @type condition: basestring 
     135        """ 
    70136        DialogueNode.__init__(self, text=text, actions=actions) 
    71137        self.condition = condition 
  • trunk/game/scripts/dialogueactions.py

    r673 r680  
    11#!/usr/bin/env python 
    2  
     2# 
    33#   This file is part of PARPG. 
    4  
     4# 
    55#   PARPG is free software: you can redistribute it and/or modify 
    66#   it under the terms of the GNU General Public License as published by 
    77#   the Free Software Foundation, either version 3 of the License, or 
    88#   (at your option) any later version. 
    9  
     9# 
    1010#   PARPG is distributed in the hope that it will be useful, 
    1111#   but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1212#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1313#   GNU General Public License for more details. 
    14  
     14# 
    1515#   You should have received a copy of the GNU General Public License 
    1616#   along with PARPG.  If not, see <http://www.gnu.org/licenses/>. 
     17""" 
     18Provides classes used to implement dialogue logic and allow dialogues to have 
     19external effects on the game state. 
     20""" 
    1721import logging 
    1822 
    1923def setup_logging(): 
     24    """Set various logging parameters for this module.""" 
    2025    module_logger = logging.getLogger('dialogueaction') 
    2126    if __debug__: 
     
    2429 
    2530class DialogueAction(object): 
    26     """Abstract base class for subclasses that represent dialogue actions  
    27        embedded within a DialogueSection or DialogueResponse. 
    28         
    29        Subclasses must define the keyword class variable and implement both 
    30        the __init__ and __call__ methods. 
    31        @cvar keyword: keyword used by the DialogueParser to recognize the 
    32            DialogueAction in serialized @ref Dialogue "Dialogues". 
    33        @type keyword: basestring""" 
     31    """ 
     32    Abstract base class for subclasses that represent dialogue actions embedded 
     33    within a DialogueSection or DialogueResponse. 
     34     
     35    Subclasses must define the keyword class variable and implement both the 
     36    __init__ and __call__ methods. 
     37     
     38    @cvar keyword: keyword used by the L{DialogueParser} to recognize the 
     39        L{DialogueAction} in serialized L{Dialogues<Dialogues>}. 
     40    @type keyword: basestring 
     41    """ 
    3442    logger = logging.getLogger('dialogueaction.DialogueAction') 
    3543    registered_actions = {} 
     
    3745    @classmethod 
    3846    def registerAction(cls, dialogue_action_type): 
    39         """Register a DialogueAction subclass for easy reference. 
    40            @param dialogue_action_type: DialogueAction subclass to register 
    41            """ 
     47        """ 
     48        Register a L{DialogueAction} subclass for easy reference. 
     49         
     50        @param dialogue_action_type: dialogue action to register. 
     51        @type dialogue_action_type: L{DialogueAction} subclass 
     52        """ 
    4253        cls.registered_actions[dialogue_action_type.keyword] = \ 
    4354            dialogue_action_type 
    4455     
    4556    def __init__(self, *args, **kwargs): 
    46         """Initialize a new DialogueAction instance. 
    47            @param args: list of positional arguments passed by the 
    48                DialogueParser after reading a serialized Dialogue 
    49            @param kwargs: dictionary of keyword arguments passed by the 
    50                DialogueParser after reading a serialized Dialogue""" 
     57        """ 
     58        Initialize a new L{DialogueAction} instance. 
     59         
     60        @param args: positional arguments passed by the L{DialogueParser} after 
     61            reading a serialized L{Dialogue}. 
     62        @type args: list of objects 
     63        @param kwargs: keyword arguments passed by the L{DialogueParser} after 
     64            reading a serialized L{Dialogue}. 
     65        @type kwargs: dict of objects 
     66        """ 
    5167        if (not hasattr(type(self), 'keyword')): 
    5268            raise AttributeError('DialogueAction subclasses must define the ' 
     
    5571     
    5672    def __call__(self, game_state): 
    57         """Execute the DialogueAction. 
    58            @param game_state: dictionary of variables and functions that make 
    59                up the current game state 
    60            @type game_state: MutableMapping""" 
     73        """ 
     74        Execute the L{DialogueAction}. 
     75         
     76        @param game_state: variables and functions that make up the current 
     77            game state. 
     78        @type game_state: dict of objects 
     79        """ 
    6180        raise NotImplementedError('subclasses of DialogueAction must ' 
    6281                                  'override __call__') 
     
    6483 
    6584class MeetAction(DialogueAction): 
    66     """DialogueAction used when a player initiates a dialogue with an NPC 
    67        for the first time.""" 
     85    """ 
     86    L{DialogueAction} that adds an NPC to the list of NPCs known by the player. 
     87    """ 
    6888    keyword = 'meet' 
    6989     
    7090    def __init__(self, *args, **kwargs): 
    71         """Initialize a new MeetAction instance. 
    72            @param args: list of positional arguments 
    73            @param npc_id: identifier of the NPC that the player has met 
    74            @type npc_id: str 
    75            @param kwargs: dictionary of keyword arguments (not used)""" 
     91        """ 
     92        Initialize a new L{MeetAction} instance. 
     93         
     94        @param args: positional arguments. 
     95        @type args: list of objects 
     96        @param npc_id: identifier of the NPC that the player has met. 
     97        @type npc_id: basestring 
     98        @param kwargs: keyword arguments (not used). 
     99        @type kwargs: dict of objects 
     100        """ 
    76101        DialogueAction.__init__(self, *args, **kwargs) 
    77102        self.npc_id = args[0] 
    78103     
    79104    def __call__(self, game_state): 
    80         """Meet an NPC for the first time. 
    81            @param game_state: dictionary of variables and functions that make 
    82                up the current game state 
    83            @type game_state: MutableMapping""" 
     105        """ 
     106        Add an NPC to the list of NPCs known by the player. 
     107         
     108        @param game_state: variables and functions that make up the current 
     109            game state. 
     110        @type game_state: dict of objects 
     111        """ 
    84112        npc_id = self.npc_id 
    85113        # NOTE Technomage 2010-11-13: This print statement seems overly 
     
    90118DialogueAction.registerAction(MeetAction) 
    91119 
     120 
    92121class InventoryAction(DialogueAction): 
    93     """Abstract base class for @ref DialogueAction "DialogueActions" used to 
    94        manipulate the NPC's and the player's inventory.""" 
    95     def __init__(self, *args, **kwargs): 
    96         """Initialize a new InventoryAction instance. 
    97            @param args: list of positional arguments 
    98            @param item_types: list of item types that should be manipulated 
    99            @type item_types: basestring 
    100            @param kwargs: dictionary of keyword arguments""" 
     122    """ 
     123    Abstract base class for L{DialogueActions<DialogueAction>} used to 
     124    manipulate the NPC's and the player's inventory. 
     125    """ 
     126    def __init__(self, *args, **kwargs): 
     127        """ 
     128        Initialize a new L{InventoryAction} instance. 
     129         
     130        @param args: positional arguments. 
     131        @type args: list of objects 
     132        @param item_types: item types that should be manipulated. 
     133        @type item_types: list of basestrings 
     134        @param kwargs: keyword arguments. 
     135        @type kwargs: dict of objects 
     136        """ 
    101137        DialogueAction.__init__(self, *args, **kwargs) 
    102138        self.item_types = args 
     
    104140 
    105141class TakeStuffAction(InventoryAction): 
    106     """InventoryAction used to move items from the NPC's inventory to the 
    107        player's inventory.""" 
     142    """ 
     143    L{InventoryAction} used to move items from the NPC's inventory to the 
     144    player's inventory. 
     145    """ 
    108146    keyword = 'take_stuff' 
    109147     
    110148    def __call__(self, game_state): 
    111         """Move items from the NPC's inventory to the player's inventory. 
    112            @param game_state: dictionary of variables and functions that make 
    113                up the current game state 
    114            @type game_state: MutableMapping""" 
     149        """ 
     150        Move items from the NPC's inventory to the player's inventory. 
     151         
     152        @param game_state: variables and functions that make up the current 
     153            game state. 
     154        @type game_state: dict of objects 
     155        """ 
    115156        item_types = self.item_types 
    116157        for item_type in item_types: 
    117             item = game_state['npc'].inventory.findItem(item_type = item_type) 
     158            item = game_state['npc'].inventory.findItem(item_type=item_type) 
    118159            if (item): 
    119160                game_state['npc'].give(item, game_state['pc']) 
     
    127168 
    128169class GiveStuffAction(InventoryAction): 
    129     """InventoryAction used to move items from the player's inventory to 
    130        NPC's inventory.""" 
     170    """ 
     171    L{InventoryAction} used to move items from the player's inventory to the 
     172    NPC's inventory. 
     173    """ 
    131174    keyword = 'give_stuff' 
    132175     
    133176    def __call__(self, game_state): 
    134         """Move items from the player's inventory to the NPC's inventory. 
    135            @param game_state: dictionary of variables and functions that make 
    136                up the current game state 
    137            @type game_state: MutableMapping""" 
     177        """ 
     178        Move items from the player's inventory to the NPC's inventory. 
     179         
     180        @param game_state: variables and functions that make up the current 
     181            game state. 
     182        @type game_state: dict of objects 
     183        """ 
    138184        item_types = self.item_types 
    139185        for item_type in item_types: 
     
    149195 
    150196class QuestAction(DialogueAction): 
    151     """Abstract base class for quest-related @ref DialogueAction 
    152        "DialogueActions".""" 
    153     def __init__(self, *args, **kwargs): 
    154         """Initialize a new QuestAction instance. 
    155            @param args: list of positional arguments; the first element should 
    156                be a valid quest identifier 
    157            @param kwargs: dictionary of keyword arguments (not used)""" 
     197    """ 
     198    Abstract base class for quest-related L{DialogueActions<DialogueAction>}. 
     199    """ 
     200    def __init__(self, *args, **kwargs): 
     201        """ 
     202        Initialize a new L{QuestAction} instance. 
     203         
     204        @param args: positional arguments. 
     205        @type args: list of objects 
     206        @param quest_id: ID of the quest to manipulate. 
     207        @type quest_id: basestring 
     208        @param kwargs: keyword arguments (not used). 
     209        @type kwargs: dict of objects 
     210        """ 
    158211        DialogueAction.__init__(self, *args, **kwargs) 
    159212        self.quest_id = kwargs['quest'] if 'quest' in kwargs else args[0] 
     
    161214 
    162215class StartQuestAction(QuestAction): 
    163     """QuestAction used to activate a quest.""" 
     216    """L{QuestAction} used to activate a quest.""" 
    164217    keyword = 'start_quest' 
    165218     
    166219    def __call__(self, game_state): 
    167         """Activate a quest. 
    168            @param game_state: dictionary of variables and functions that make 
    169                up the current game state 
    170            @type game_state: MutableMapping""" 
     220        """ 
     221        Activate a quest. 
     222         
     223        @param game_state: variables and functions that make up the current 
     224            game state. 
     225        @type game_state: dict of objects 
     226        """ 
    171227        quest_id = self.quest_id 
    172228        print("You've picked up the \"{0}\" quest!".format(quest_id)) 
     
    176232 
    177233class CompleteQuestAction(QuestAction): 
    178     """QuestAction used to finish/complete an active quest.""" 
     234    """ 
     235    L{QuestAction} used to mark a quest as successfully finished/completed. 
     236    """ 
    179237    keyword = 'complete_quest' 
    180238     
    181239    def __call__(self, game_state): 
    182         """Finish a quest. 
    183            @param game_state: dictionary of variables and functions that make 
    184                up the current game state 
    185            @type game_state: MutableMapping""" 
     240        """ 
     241        Successfully complete a quest. 
     242         
     243        @param game_state: variables and functions that make up the current 
     244            game state. 
     245        @type game_state: dict of objects 
     246        """ 
    186247        quest_id = self.quest_id 
    187248        print("You've finished the \"{0}\" quest".format(quest_id)) 
     
    191252 
    192253class FailQuestAction(QuestAction): 
    193     """QuestAction used to fail an active quest.""" 
     254    """L{QuestAction} used to fail an active quest.""" 
    194255    keyword = 'fail_quest' 
    195256     
    196257    def __call__(self, game_state): 
    197         """Fail an active quest. 
    198            @param game_state: dictionary of variables and functions that make 
    199                up the current game state 
    200            @type game_state: MutableMapping""" 
     258        """ 
     259        Fail an active quest. 
     260         
     261        @param game_state: variables and functions that make up the current 
     262            game state. 
     263        @type game_state: dict of objects 
     264        """ 
    201265        quest_id = self.quest_id 
    202266        print("You've failed the \"{0}\" quest".format(quest_id)) 
     
    206270 
    207271class RestartQuestAction(QuestAction): 
    208     """QuestAction used to restart an active quest.""" 
     272    """L{QuestAction} used to restart an active quest.""" 
    209273    keyword = 'restart_quest' 
    210274     
    211275    def __call__(self, game_state): 
    212         """Restart an active quest. 
    213            @param game_state: dictionary of variables and functions that make 
    214                up the current game state 
    215            @type game_state: MutableMapping""" 
     276        """ 
     277        Restart an active quest. 
     278         
     279        @param game_state: variables and functions that make up the current 
     280            game state. 
     281        @type game_state: dict of objects 
     282        """ 
    216283        quest_id = self.quest_id 
    217284        print("You've restarted the \"{0}\" quest".format(quest_id)) 
     
    221288 
    222289class QuestVariableAction(QuestAction): 
    223     """Base class for @ref QuestAction "QuestActions" that modify quest variables.""" 
    224      
    225     def __init__(self, *args, **kwargs): 
    226         """Initialize a new QuestVariableAction instance. 
    227            @param args: list of positional arguments (not used) 
    228            @param kwargs: dictionary of keyword arguments 
    229            @keyword quest: quest identifier for the quest that should be 
    230                modified 
    231            @keyword variable: name of the quest variable to modify 
    232            @keyword value: new value that should be used to modify the quest 
    233                variable""" 
     290    """ 
     291    Base class for L{QuestActions<QuestAction>} that modify quest 
     292    variables. 
     293    """ 
     294    def __init__(self, *args, **kwargs): 
     295        """ 
     296        Initialize a new L{QuestVariableAction} instance. 
     297         
     298        @param args: positional arguments (not used). 
     299        @type args: list of objects 
     300        @param kwargs: keyword arguments. 
     301        @type kwargs: dict of objects 
     302        @keyword quest: ID of the quest whose variable should be modified. 
     303        @type quest: basestring 
     304        @keyword variable: name of the quest variable to modify. 
     305        @type variable: basestring 
     306        @keyword value: new value that should be used to modify the quest 
     307            variable. 
     308        @type value: object 
     309        """ 
    234310        QuestAction.__init__(self, *args, **kwargs) 
    235311        self.variable_name = kwargs['variable'] 
     
    237313 
    238314 
    239 class IncreaseQuestValueAction(QuestVariableAction): 
    240     """QuestVariableAction used to increase the value of a quest variable 
    241        by a set amount.""" 
    242     keyword = 'increase_quest_value' 
    243      
    244     def __call__(self, game_state): 
    245         """Increase a quest variable by a set amount. 
    246            @param game_state: dictionary of variables and functions that make 
    247                up the current game state 
    248            @type game_state: MutableMapping""" 
     315class IncreaseQuestVariableAction(QuestVariableAction): 
     316    """ 
     317    L{QuestVariableAction} used to increase the value of a quest variable by a 
     318    set amount. 
     319    """ 
     320    keyword = 'increase_quest_variable' 
     321     
     322    def __call__(self, game_state): 
     323        """ 
     324        Increase a quest variable by a set amount. 
     325         
     326        @param game_state: variables and functions that make up the current 
     327            game state. 
     328        @type game_state: dict of objects 
     329        """ 
    249330        quest_id = self.quest_id 
    250331        variable_name = self.variable_name 
     
    252333        print('Increased {0} by {1}'.format(variable_name, value)) 
    253334        game_state['quest'][quest_id].increaseValue(variable_name, value) 
    254 DialogueAction.registerAction(IncreaseQuestValueAction) 
    255  
    256  
    257 class DecreaseQuestValueAction(QuestVariableAction): 
    258     """QuestVariableAction used to decrease the value of a quest variable 
    259        by a set amount.""" 
    260     keyword = 'decrease_quest_value' 
    261      
    262     def __call__(self, game_state): 
    263         """Decrease a quest variable by a set amount. 
    264            @param game_state: dictionary of variables and functions that make 
    265                up the current game state 
    266            @type game_state: MutableMapping""" 
     335DialogueAction.registerAction(IncreaseQuestVariableAction) 
     336 
     337 
     338class DecreaseQuestVariableAction(QuestVariableAction): 
     339    """ 
     340    L{QuestVariableAction} used to decrease the value of a quest variable by a 
     341    set amount. 
     342    """ 
     343    keyword = 'decrease_quest_variable' 
     344     
     345    def __call__(self, game_state): 
     346        """ 
     347        Decrease a quest variable by a set amount. 
     348         
     349        @param game_state: variables and functions that make up the current 
     350            game state. 
     351        @type game_state: dict of objects 
     352        """ 
    267353        quest_id = self.quest_id 
    268354        variable_name = self.variable_name 
     
    270356        print('Decreased {0} by {1}'.format(variable_name, value)) 
    271357        game_state['quest'][quest_id].decreaseValue(variable_name, value) 
    272 DialogueAction.registerAction(DecreaseQuestValueAction) 
    273  
    274  
    275 class SetQuestValueAction(QuestVariableAction): 
    276     """QuestVariableAction used to set the value of a quest variable.""" 
    277     keyword = 'set_quest_value' 
    278      
    279     def __call__(self, game_state): 
    280         """Set the value of a quest variable. 
    281            @param game_state: dictionary of variables and functions that make 
    282                up the current game state 
    283            @type game_state: MutableMapping""" 
     358DialogueAction.registerAction(DecreaseQuestVariableAction) 
     359 
     360 
     361class SetQuestVariableAction(QuestVariableAction): 
     362    """ 
     363    L{QuestVariableAction} used to set the value of a quest variable. 
     364    """ 
     365    keyword = 'set_quest_variable' 
     366     
     367    def __call__(self, game_state): 
     368        """ 
     369        Set the value of a quest variable. 
     370         
     371        @param game_state: variables and functions that make up the current 
     372            game state. 
     373        @type game_state: dict of objects 
     374        """ 
    284375        quest_id = self.quest_id 
    285376        variable_name = self.variable_name 
     
    287378        print('Set {0} to {1}'.format(variable_name, value)) 
    288379        game_state['quest'][quest_id].setValue(variable_name, value) 
    289 DialogueAction.registerAction(SetQuestValueAction) 
     380DialogueAction.registerAction(SetQuestVariableAction) 
  • trunk/game/scripts/dialogueengine.py

    r668 r680  
    11#!/usr/bin/env python 
    2  
     2# 
    33#   This file is part of PARPG. 
    4  
     4# 
    55#   PARPG is free software: you can redistribute it and/or modify 
    66#   it under the terms of the GNU General Public License as published by 
    77#   the Free Software Foundation, either version 3 of the License, or 
    88#   (at your option) any later version. 
    9  
     9# 
    1010#   PARPG is distributed in the hope that it will be useful, 
    1111#   but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1212#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1313#   GNU General Public License for more details. 
    14  
     14# 
    1515#   You should have received a copy of the GNU General Public License 
    1616#   along with PARPG.  If not, see <http://www.gnu.org/licenses/>. 
     17""" 
     18Provides the core interface to the dialogue subsystem used to process player 
     19L{Dialogues<Dialogue>} with NPCs. 
    1720 
     21@author: or1andov (original design) 
     22@author: M. George Hansen <technopolitica@gmail.com> (redesign and current 
     23    maintainer) 
     24""" 
    1825import logging 
    1926 
     
    2532setup_logging() 
    2633 
    27 class EndException(Exception): 
    28     """EndException is used to bail out from a deeply nested 
    29        runSection/continueWithResponse call stack and end the 
    30        conversation""" 
    31     pass 
    32  
    33 class ResponseException(Exception): 
    34     """ResponseException is used to bail out from a deeply nested 
    35        runSection/continueWithResponse call stack and allow the user to 
    36        specify a response""" 
    37     pass 
    38  
    39 class BackException(Exception): 
    40     """BackException is used to bail out from a deeply nested 
    41        runSection/continueWithResponse call stack and rewind the section 
    42        stack""" 
    43     pass 
    44  
    4534class DialogueEngine(object): 
    46     logger = logging.getLogger('dialogueengine.DialogueEngine') 
    47     game_state = {} 
     35    """ 
     36    Primary interface to the dialogue subsystem used to initiate and process a 
     37    L{Dialogue} with an NPC. 
     38     
     39    The L{DialogueEngine} is a singleton class that exposes the interface to 
     40    the dialogue subsystem via class methods and attributes, and so should not 
     41    be instantiated. 
     42     
     43    To begin a dialogue with an NPC the L{DialogueEngine} must first be 
     44    initialized with a L{Dialogue} defining the dialogue data to process and a 
     45    dictionary of Python objects defining the game state for testing of 
     46    response conditionals. Once the L{DialogueEngine} is initialized processing 
     47    of L{DialogueSections<DialogueSection>} and 
     48    L{DialogueResponses<DialogueResponse>} can be initiated via the 
     49    L{continueDialogue} and L{reply} class methods. 
     50     
     51    The state of dialogue processing is stored via the 
     52    L{dialogue_section_stack} class attribute, which stores a list of 
     53    L{DialogueSections<DialogueSection>} that have been or are currently being 
     54    processed. Each time L{reply} is called with a L{DialogueResponse} its 
     55    next_section_id attribute is used to select a new L{DialogueSection} from 
     56    the L{current_dialogue}. The selected L{DialogueSection} is then pushed 
     57    onto the end of the L{dialogue_section_stack}, ready to be processed via 
     58    L{continueDialogue}. The exception to this rule occurs when L{reply} is 
     59    called with a L{DialogueResponse} whose next_section_id attribute is "end" 
     60    or "back". "end" terminates the dialogue as described below, while "back" 
     61    removes the last L{DialogueSection} on the L{dialogue_section_stack} 
     62    effectively going back to the previous section of dialogue. 
     63     
     64    The L{DialogueEngine} terminates dialogue processing once L{reply} is 
     65    called with a L{DialogueResponse} whose next_section_id == 'end'. 
     66    Processing can also be manually terminated by calling the L{endDialogue} 
     67    class method. 
     68     
     69    @note: See the dialogue_demo.py script for a complete example of how the 
     70        L{DialogueEngine} can be used. 
     71     
     72    @cvar current_dialogue: dialogue data currently being processed. 
     73    @type current_dialogue: L{Dialogue} 
     74    @cvar dialogue_section_stack: sections of dialogue that have been or are 
     75        currently being processed. 
     76    @type dialogue_section_stack: list of L{DialogueSections<DialogueSection>} 
     77    @cvar game_state: objects defining the game state that should be made 
     78        available for testing L{DialogueResponse} conditionals. 
     79    @type game_state: dict of Python objects 
     80    @cvar in_dialogue: whether a dialogue has been initiated. 
     81    @type in_dialogue: Bool 
     82     
     83    Usage: 
     84    >>> game_state = {'pc': player_character, 'quest': quest_engine} 
     85    >>> DialogueEngine.initiateDialogue(dialogue, game_state) 
     86    >>> while DialogueEngine.in_dialogue: 
     87    ...     valid_responses = DialogueEngine.continueDialogue() 
     88    ...     response = choose_response(valid_responses) 
     89    ...     DialogueEngine.reply(response) 
     90    """ 
    4891    current_dialogue = None 
    4992    dialogue_section_stack = [] 
     93    game_state = {} 
    5094    in_dialogue = False 
     95    _logger = logging.getLogger('dialogueengine.DialogueEngine') 
     96     
     97    def __init__(self): 
     98        raise TypeError('DialogueEngine cannot be instantiated') 
    5199     
    52100    @classmethod 
    53101    def initiateDialogue(cls, dialogue, game_state): 
    54         """Walk through a @ref Dialogue "Dialogue's" @ref DialogueSection 
    55            "DialogueSections" and @ref DialogueResponse "DialogueResponses", 
    56            running any @ref DialogueAction "DialogueActions". 
    57            @param dialogue: Dialogue to walk through.""" 
     102        """Initialize the L{DialogueEngine} with a L{Dialogue} to process. 
     103         
     104        If the DialogueEngine has already been initialized and is currently 
     105        processing a L{Dialogue} then L{endDialogue} will be called to 
     106        terminate processing before re-initializing the L{DialogueEngine} with 
     107        the new L{Dialogue}. 
     108         
     109        @param dialogue: dialogue data to process. 
     110        @type dialogue: L{Dialogue} 
     111        @param game_state: objects defining the game state that should be made 
     112            available for testing L{DialogueResponse} conditions. 
     113        @type game_state: dict of objects 
     114        """ 
     115        if (cls.in_dialogue): 
     116            # DialogueEngine has already been initialized, so end the current 
     117            # dialogue processing before (re-)initialization. 
     118            cls.endDialogue() 
    58119        cls.current_dialogue = dialogue 
    59120        cls.game_state = game_state 
    60121        cls.in_dialogue = True 
    61         cls.logger.info( 
     122        cls._logger.info( 
    62123            'initiated dialogue {0}'.format(dialogue) 
    63124        ) 
     
    65126            start_section_id = dialogue.start_section_id 
    66127        except AttributeError, KeyError: 
    67             cls.logger.error(('unable to determine start DialogueSection for ' 
     128            cls._logger.error(('unable to determine start DialogueSection for ' 
    68129                              '{0}').format(dialogue)) 
    69130            cls.endDialogue() 
     
    76137    @classmethod 
    77138    def continueDialogue(cls): 
    78         """Process the DialogueSection at the top of the 
    79            dialogue_section_stack, run any @ref DialogueAction 
    80            "DialogueActions" it contains and return a list of valid 
    81            @ref DialogueResponse "DialogueResponses" after evaluating any 
    82            response conditionals. 
    83             
    84            @returns: list of valid @ref DialogueResponse \"DialogueResponses\" 
    85            """ 
     139        """ 
     140        Process the L{DialogueSection} at the top of the 
     141        L{dialogue_section_stack}, run any L{DialogueActions<DialogueActions>} 
     142        it contains and return a list of valid 
     143        L{DialogueResponses<DialogueResponses> after evaluating any response 
     144        conditionals. 
     145         
     146        @returns: valid responses. 
     147        @rtype: list of L{DialogueResponses<DialogueResponse>} 
     148        """ 
    86149        current_dialogue_section = cls.getCurrentDialogueSection() 
    87150        cls.runDialogueActions(current_dialogue_section) 
     
    92155    @classmethod 
    93156    def getCurrentDialogueSection(cls): 
     157        """ 
     158        Return the L{DialogueSection} at the top of the 
     159        L{dialogue_section_stack}. 
     160         
     161        @returns: section of dialogue currently being processed. 
     162        @rtype: L{DialogueSection} 
     163        """ 
    94164        try: 
    95165            current_dialogue_section = cls.dialogue_section_stack[-1] 
    96166        except IndexError: 
    97             cls.logger.error( 
     167            cls._logger.error( 
    98168                'no DialogueSections are in the stack: either an error ' 
    99169                'occurred or DialogueEngine.initiateDialogue was not called ' 
     
    105175    @classmethod 
    106176    def runDialogueActions(cls, dialogue_node): 
    107         """Execute all @ref DialogueAction "DialogueActions" contained by a 
    108            DialogueNode.""" 
    109         cls.logger.info('processing commands for {0}'.format(dialogue_node)) 
     177        """ 
     178        Execute all L{DialogueActions<DialogueActions>} contained by a 
     179        L{DialogueSection} or L{DialogueResponse}. 
     180         
     181        @param dialogue_node: section of dialogue or response containing the 
     182            L{DialogueActions<DialogueAction>} to execute. 
     183        @type dialogue_node: L{DialogueNode} 
     184        """ 
     185        cls._logger.info('processing commands for {0}'.format(dialogue_node)) 
    110186        for command in dialogue_node.actions: 
    111187            try: 
    112188                command(cls.game_state) 
    113189            except Exception as error: 
    114                 cls.logger.error('failed to execute DialogueAction {0}: {1}' 
     190                cls._logger.error('failed to execute DialogueAction {0}: {1}' 
    115191                                 .format(command.keyword, error)) 
    116             else: 
    117                 cls.logger.debug('ran {0} with arguments {1}' 
     192                # TODO Technomage 2010-11-18: Undo previous actions when an 
     193                #     action fails to execute. 
     194                return 
     195            else: 
     196                cls._logger.debug('ran {0} with arguments {1}' 
    118197                                 .format(getattr(type(command), '__name__'), 
    119198                                                 command.arguments)) 
     
    121200    @classmethod 
    122201    def getValidResponses(cls, dialogue_section): 
    123         """Evaluate all DialogueResponse conditions for a DialogueSection 
    124            and return a list of valid responses. 
    125             
    126            @return: list of @ref DialogueResponse "DialogueResponses" whose 
    127                conditions were met""" 
     202        """ 
     203        Evaluate all L{DialogueResponse} conditions for a L{DialogueSection} 
     204        and return a list of valid responses. 
     205         
     206        @param dialogue_section: section of dialogue containing the 
     207            L{DialogueResponses<DialogueResponse>} to process. 
     208        @type dialogue_section: L{DialogueSection} 
     209         
     210        @return: responses whose conditions were met. 
     211        @rtype: list of L{DialogueResponses<DialogueResponse>} 
     212        """ 
    128213        if (dialogue_section is None): 
    129214            # die nicely when the dialogue_section doesn't exist 
     
    136221                                eval(condition, cls.game_state) 
    137222            except Exception as error: 
    138                 cls.logger.error( 
     223                cls._logger.error( 
    139224                    ('evaluation of condition "{0}" for {1} failed with ' 
    140225                     'error: {2}').format(dialogue_response.condition, 
     
    142227                ) 
    143228            else: 
    144                 cls.logger.debug( 
     229                cls._logger.debug( 
    145230                    'condition "{0}" for {1} evaluated to {2}' 
    146231                    .format(dialogue_response.condition, dialogue_response, 
     
    154239    @classmethod 
    155240    def reply(cls, dialogue_response): 
    156         """""" 
    157         cls.logger.info('replied with {0}'.format(dialogue_response)) 
     241        """ 
     242        Reply with a L{DialogueResponse}, execute the 
     243        L{DialogueActions<DialogueAction>} it contains and push the next 
     244        L{DialogueSection} onto the L{dialogue_section_stack}. 
     245         
     246        @param dialogue_response: response to reply with. 
     247        @type dialogue_response: L{DialogueReponse} 
     248        """ 
     249        cls._logger.info('replied with {0}'.format(dialogue_response)) 
    158250        cls.runDialogueActions(dialogue_response) 
    159251        next_section_id = dialogue_response.next_section_id 
    160252        if (next_section_id == 'back'): 
    161253            if (len(cls.dialogue_section_stack) == 1): 
    162                 cls.logger.error('attempted to run goto: back action but ' 
     254                cls._logger.error('attempted to run goto: back action but ' 
    163255                                 'stack does not contain a previous ' 
    164256                                 'DialogueSection') 
     
    167259                    cls.dialogue_section_stack.pop() 
    168260                except IndexError: 
    169                     cls.logger.error('attempted to run goto: back action but ' 
     261                    cls._logger.error('attempted to run goto: back action but ' 
    170262                                     'the stack was empty: most likely ' 
    171263                                     'DialogueEngine.initiateDialogue was not ' 
    172264                                     'called first') 
    173265                else: 
    174                     cls.logger.debug( 
     266                    cls._logger.debug( 
    175267                        'ran goto: back action, restored last DialogueSection' 
    176268                    ) 
    177269        elif (next_section_id == 'end'): 
    178270            cls.endDialogue() 
    179             cls.logger.debug('ran goto: end action, ended dialogue') 
     271            cls._logger.debug('ran goto: end action, ended dialogue') 
    180272        else: 
    181273            # get a n 
     
    184276                    cls.current_dialogue.sections[next_section_id] 
    185277            except KeyError: 
    186                 cls.logger.error(('"{0}" is not a recognized goto: action or ' 
     278                cls._logger.error(('"{0}" is not a recognized goto: action or ' 
    187279                                  'DialogueSection identifier') 
    188280                                 .format(next_section_id)) 
     
    192284    @classmethod 
    193285    def endDialogue(cls): 
    194         """End an initiated dialogue and clean up any resources in use by 
    195            the DialogueEngine.""" 
     286        """ 
     287        End the current dialogue and clean up any resources in use by the 
     288        L{DialogueEngine}. 
     289        """ 
    196290        cls.dialogue_stack = [] 
    197291        cls.current_dialogue = None 
  • trunk/game/scripts/dialogueparsers.py

    r673 r680  
    11#!/usr/bin/env python 
     2# 
    23#   This file is part of PARPG. 
    3  
     4# 
    45#   PARPG is free software: you can redistribute it and/or modify 
    56#   it under the terms of the GNU General Public License as published by 
    67#   the Free Software Foundation, either version 3 of the License, or 
    78#   (at your option) any later version. 
    8  
     9# 
    910#   PARPG is distributed in the hope that it will be useful, 
    1011#   but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1112#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1213#   GNU General Public License for more details. 
    13  
     14# 
    1415#   You should have received a copy of the GNU General Public License 
    1516#   along with PARPG.  If not, see <http://www.gnu.org/licenses/>. 
    16 """Contains classes for parsing and validating L{Dialogue} "Dialogues" and 
    17    other dialogue-related data. 
    18  
    19    @TODO Technomage 2010-11-13: Exception handling + validation needs work. 
    20        Currently YAML files are only crudely validated - the code assumes that 
    21        the file contains valid dialogue data, and if that assumption is 
    22        violated and causes the code to raise any TypeErrors, AttributeErrors or 
    23        ValueErrors the code then raises a DialogueFormatError with the 
    24        original (and mostly unhelpful) error message. 
    25    @TODO Technomage 2010-11-13: Support reading and writing unicode.""" 
     17""" 
     18Contains classes for parsing and validating L{Dialogues<Dialogue>} and other 
     19dialogue-related data. 
     20 
     21@TODO Technomage 2010-11-13: Exception handling + validation needs work. 
     22    Currently YAML files are only crudely validated - the code assumes that 
     23    the file contains valid dialogue data, and if that assumption is 
     24    violated and causes the code to raise any TypeErrors, AttributeErrors or 
     25    ValueErrors the code then raises a DialogueFormatError with the 
     26    original (and mostly unhelpful) error message. 
     27@TODO Technomage 2010-11-13: Support reading and writing unicode. 
     28""" 
    2629import logging 
    2730try: 
     
    5659 
    5760class AbstractDialogueParser(object): 
    58     """Abstract base class defining the interface for parsers responsible for 
    59        constructing a Dialogue from its serialized representation.""" 
     61    """ 
     62    Abstract base class defining the interface for parsers responsible for 
     63    constructing a L{Dialogue} from its serialized representation. 
     64    """ 
    6065    def load(self, stream): 
    61         """Parse a stream and attempt to construct a new Dialogue instance 
    62            from its serialized representation. 
    63            @param stream: stream containing the serialized representation of a 
    64                Dialogue 
    65            @type stream: BufferType""" 
     66        """ 
     67        Parse a stream and attempt to construct a new L{Dialogue} instance from 
     68        its serialized representation. 
     69         
     70        @param stream: open stream containing the serialized representation of 
     71            a Dialogue. 
     72        @type stream: BufferType 
     73        """ 
    6674        raise NotImplementedError('AbstractDialogueParser subclasses must ' 
    67                                   'override the parse method.') 
     75                                  'override the load method.') 
     76     
     77    def dump(self, dialogue, stream): 
     78        """ 
     79        Serialize a L{Dialogue} instance and dump it to an open stream. 
     80         
     81        @param dialogue: dialogue to serialize. 
     82        @type dialogue: L{Dialogue} 
     83        @param stream: open stream into which the serialized L{Dialogue} should 
     84            be dumped. 
     85        @type stream: BufferType 
     86        """ 
     87        raise NotImplementedError('AbstractDialogueParser subclasses must ' 
     88                                  'override the dump method.') 
    6889     
    6990    def validate(self, stream): 
    70         """Parse a stream and verify that it contains a valid serialization of 
    71            a Dialogue instance. 
    72            @param stream: stream containing the serialized representation of a 
    73                Dialogue 
    74            @type stream: BufferType""" 
     91        """ 
     92        Parse a stream and verify that it contains a valid serialization of a 
     93        L{Dialogue instance}. 
     94         
     95        @param stream: stream containing the serialized representation of a 
     96            L{Dialogue} 
     97        @type stream: BufferType 
     98        """ 
    7599        raise NotImplementedError('AbstractDialogueParser subclasses must ' 
    76100                                  'override the validate method.') 
     
    78102 
    79103class YamlDialogueParser(AbstractDialogueParser): 
     104    """ 
     105    L{AbstractDialogueParser} subclass responsible for parsing dialogues 
     106    serialized in YAML. 
     107    """ 
    80108    logger = logging.getLogger('dialogueparser.OldYamlDialogueParser') 
    81109     
    82110    def load(self, stream, loader_class=yaml.Loader): 
    83         """Parse a YAML stream and attempt to construct a new Dialogue 
    84            instance. 
    85            @param stream: stream containing the YAML representation of a 
    86                Dialogue 
    87            @type stream: BufferType""" 
     111        """ 
     112        Parse a YAML stream and attempt to construct a new L{Dialogue} 
     113        instance. 
     114         
     115        @param stream: stream containing the serialized YAML representation of 
     116            a L{Dialogue}. 
     117        @type stream: BufferType 
     118        @param loader_class: PyYAML loader class to use for reading the 
     119            serialization. 
     120        @type loader_class: yaml.BaseLoader subclass 
     121        """ 
    88122        loader = loader_class(stream) 
    89         dialogue = self.constructDialogue(loader, loader.get_single_node()) 
     123        dialogue = self._constructDialogue(loader, loader.get_single_node()) 
    90124        return dialogue 
    91125     
    92126    def dump(self, dialogue, output_stream, dumper_class=yaml.Dumper): 
     127        """ 
     128        Serialize a L{Dialogue} instance as YAML and dump it to an open stream. 
     129         
     130        @param dialogue: dialogue to serialize. 
     131        @type dialogue: L{Dialogue} 
     132        @param stream: open stream into which the serialized L{Dialogue} should 
     133            be dumped. 
     134        @type stream: BufferType 
     135        @param dumper_class: PyYAML dumper class to use for formatting the 
     136            serialization. 
     137        @type dumper_class: yaml.BaseDumper subclass 
     138        """ 
    93139        intermediate_stream = StringIO() 
    94140        # KLUDE Technomage 2010-11-16: The "width" argument seems to be broken, 
     
    99145                              allow_unicode=True, explicit_start=True, 
    100146                              explicit_end=True, tags=False) 
    101         dialogue_node = self.representDialogue(dumper, dialogue) 
     147        dialogue_node = self._representDialogue(dumper, dialogue) 
    102148        dumper.open() 
    103149        dumper.serialize(dialogue_node) 
     
    135181         
    136182     
    137     def representDialogue(self, dumper, dialogue): 
     183    def _representDialogue(self, dumper, dialogue): 
    138184        dialogue_node = dumper.represent_dict({}) 
    139185        dialogue_dict = OrderedDict() 
     
    147193        sections_list = sections_list_node.value 
    148194        for section in dialogue.sections.values(): 
    149             section_node = self.representDialogueSection(dumper, section) 
     195            section_node = self._representDialogueSection(dumper, section) 
    150196            sections_list.append(section_node) 
    151197        dialogue_dict['SECTIONS'] = sections_list_node 
     
    163209        return dialogue_node 
    164210     
    165     def representDialogueSection(self, dumper, dialogue_section): 
     211    def _representDialogueSection(self, dumper, dialogue_section): 
    166212        section_node = dumper.represent_dict({}) 
    167213        section_dict = OrderedDict() # OrderedDict is required to preserve 
     
    176222        actions_list = actions_list_node.value 
    177223        for action in dialogue_section.actions: 
    178             action_node = self.representDialogueAction(dumper, action) 
     224            action_node = self._representDialogueAction(dumper, action) 
    179225            actions_list.append(action_node) 
    180226        if (actions_list): 
     
    183229        responses_list = responses_list_node.value 
    184230        for response in dialogue_section.responses: 
    185             response_node = self.representDialogueResponse(dumper, response) 
     231            response_node = self._representDialogueResponse(dumper, response) 
    186232            responses_list.append(response_node) 
    187233        section_dict['RESPONSES'] = responses_list_node 
     
    199245        return section_node 
    200246     
    201     def representDialogueResponse(self, dumper, dialogue_response): 
     247    def _representDialogueResponse(self, dumper, dialogue_response): 
    202248        response_node = dumper.represent_dict({}) 
    203249        response_dict = OrderedDict() 
     
    217263        actions_list = actions_list_node.value 
    218264        for action in dialogue_response.actions: 
    219             action_node = self.representDialogueAction(dumper, action) 
     265            action_node = self._representDialogueAction(dumper, action) 
    220266            actions_list.append(action_node) 
    221267        if (actions_list): 
     
    235281        return response_node 
    236282     
    237     def representDialogueAction(self, dumper, dialogue_action): 
     283    def _representDialogueAction(self, dumper, dialogue_action): 
    238284        action_node = dumper.represent_dict({}) 
    239285        action_dict = OrderedDict() 
     
    259305        return action_node 
    260306     
    261     def constructDialogue(self, loader, yaml_node): 
     307    def _constructDialogue(self, loader, yaml_node): 
    262308        npc_name = None 
    263309        avatar_path = None 
     
    276322                elif (key == u'SECTIONS'): 
    277323                    for section_node in value_node.value: 
    278                         dialogue_section = self.constructDialogueSection( 
     324                        dialogue_section = self._constructDialogueSection( 
    279325                            loader, 
    280326                            section_node 
     
    289335        return dialogue 
    290336     
    291     def constructDialogueSection(self, loader, section_node): 
     337    def _constructDialogueSection(self, loader, section_node): 
    292338        id = None 
    293339        text = None 
     
    305351                elif (key == u'RESPONSES'): 
    306352                    for response_node in value_node.value: 
    307                         dialogue_response = self.constructDialogueResponse( 
     353                        dialogue_response = self._constructDialogueResponse( 
    308354                            loader, 
    309355                            response_node 
     
    312358                elif (key == u'ACTIONS'): 
    313359                    for action_node in value_node.value: 
    314                         action = self.constructDialogueAction(loader, 
     360                        action = self._constructDialogueAction(loader, 
    315361                                                             action_node) 
    316362                        actions.append(action) 
     
    324370        return dialogue_section 
    325371     
    326     def constructDialogueResponse(self, loader, response_node): 
     372    def _constructDialogueResponse(self, loader, response_node): 
    327373        text = None 
    328374        next_section_id = None 
     
    337383                elif (key == u'ACTIONS'): 
    338384                    for action_node in value_node.value: 
    339                         action = self.constructDialogueAction(loader, 
     385                        action = self._constructDialogueAction(loader, 
    340386                                                             action_node) 
    341387                        actions.append(action) 
     
    353399        return dialogue_response 
    354400     
    355     def constructDialogueAction(self, loader, action_node): 
     401    def _constructDialogueAction(self, loader, action_node): 
    356402        mapping = loader.construct_mapping(action_node, deep=True) 
    357403        keyword, arguments = mapping.items()[0] 
     
    387433 
    388434class OldYamlDialogueParser(YamlDialogueParser): 
     435    """ 
     436    L{YAMLDialogueParser} that can read and write dialogues in the old 
     437    Techdemo1 dialogue file format. 
     438     
     439    @warning: This class is deprecated and likely to be removed in a future 
     440        version. 
     441    """ 
    389442    logger = logging.getLogger('dialogueparser.OldYamlDialogueParser') 
    390443     
     
    403456        return dialogue 
    404457     
    405     def constructDialogue(self, loader, yaml_node): 
     458    def _constructDialogue(self, loader, yaml_node): 
    406459        npc_name = None 
    407460        avatar_path = None 
     
    420473                elif (key == u'SECTIONS'): 
    421474                    for id_node, section_node in value_node.value: 
    422                         dialogue_section = self.constructDialogueSection( 
     475                        dialogue_section = self._constructDialogueSection( 
    423476                            loader, 
    424477                            id_node, 
     
    434487        return dialogue 
    435488     
    436     def constructDialogueSection(self, loader, id_node, section_node): 
     489    def _constructDialogueSection(self, loader, id_node, section_node): 
    437490        id = loader.construct_object(id_node) 
    438491        text = None 
     
    448501                    text = loader.construct_object(value_node) 
    449502                elif (key == u'meet'): 
    450                     action = self.constructDialogueAction(loader, node) 
     503                    action = self._constructDialogueAction(loader, node) 
    451504                    actions.append(action) 
    452505                elif (key in [u'start_quest', u'complete_quest', u'fail_quest', 
     
    454507                              u'decrease_value', u'increase_value', 
    455508                              u'give_stuff', u'get_stuff']): 
    456                     action = self.constructDialogueAction(loader, node) 
     509                    action = self._constructDialogueAction(loader, node) 
    457510                    if (id not in self.response_actions.keys()): 
    458511                        self.response_actions[id] = [] 
     
    460513                elif (key == u'responses'): 
    461514                    for response_node in value_node.value: 
    462                         dialogue_response = self.constructDialogueResponse( 
     515                        dialogue_response = self._constructDialogueResponse( 
    463516                            loader, 
    464517                            response_node 
     
    474527        return dialogue_section 
    475528     
    476     def constructDialogueResponse(self, loader, response_node): 
     529    def _constructDialogueResponse(self, loader, response_node): 
    477530        text = None 
    478531        next_section_id = None 
     
    494547        return dialogue_response 
    495548     
    496     def constructDialogueAction(self, loader, action_node): 
     549    def _constructDialogueAction(self, loader, action_node): 
    497550        mapping = loader.construct_mapping(action_node, deep=True) 
    498551        keyword, arguments = mapping.items()[0] 
  • trunk/game/scripts/gui/dialoguegui.py

    r670 r680  
    3131 
    3232class DialogueGUI(object): 
    33     """Window that handles the dialogues""" 
    34     logger = logging.getLogger('dialoguegui.DialogueGUI') 
     33    """Window that handles the dialogues.""" 
     34    _logger = logging.getLogger('dialoguegui.DialogueGUI') 
    3535     
    3636    def __init__(self, controller, npc, quest_engine, player_character): 
     
    7171        #speech.text = speech.text + "\n-----\n" + unicode(say) 
    7272        speech.text = text 
    73         self.logger.debug('set dialogue text to "{0}"'.format(text)) 
     73        self._logger.debug('set dialogue text to "{0}"'.format(text)) 
    7474     
    7575    def continueDialogue(self): 
     
    121121         
    122122        self.dialogue_gui.title = name 
    123         self.logger.debug('set NPC name to "{0}"'.format(name)) 
     123        self._logger.debug('set NPC name to "{0}"'.format(name)) 
    124124     
    125125    def setAvatarImage(self, image_path): 
     
    160160            choices_list.addChild(button) 
    161161            self.dialogue_gui.adaptLayout(True) 
    162             self.logger.debug( 
     162            self._logger.debug( 
    163163                'added {0} to response choice list'.format(response) 
    164164            ) 
Note: See TracChangeset for help on using the changeset viewer.