source: trunk/game/gui/dialogue.xml @ 287

Revision 287, 754 bytes checked in by orlandov, 10 years ago (diff)

Ticket #74: Patch by or1andov, Integrate dialogue GUI and engine into game.

It should now be possible to engage in a conversation with NPC characters by
selecting talk from their context menu. fixes[s:trac, t:74]

Known Issues:


  • the GUI is terrible. instead of a dialog window, we could use a better looking background image and fixed position widgets
  • requires PyYAML to be installed sudo apt-get install python-yaml easy_install PyYAML
  • we have to create a simple state model for the PC can remember tasks
  • need to make NPC's be able to remember things - need a model in NPCs for this
  • no way currently to give or take items from npc's; again, more model work. this could be done by adding another callback similar to start_quest. may be necessary for npc's to have an inventory for this
  • The dialogue engine is not hooked up to specific NPC's... it currently always loads dialogue/sample.yaml - need to have the dialogue looked up from some XML attribute
  • dialogue is not broken off if the PC moves away from the NPC
  • npc image is hardcoded, it should use the image specified in the yaml file
Line 
1<Window title="NPC NAME" position_technique="center:center" min_size="500,400">
2    <HBox>
3        <VBox>
4            <Icon image="gui/icons/npc.png" size="200,200" />
5            <Label name="stats_label" />
6        </VBox>
7        <ScrollArea size="400,200" min_size="400,200">
8            <Label name="speech" wrap_text="1" max_size="360,500000" text="hi"/>
9        </ScrollArea>
10    </HBox>
11    <ScrollArea min_size="100,100" horizontal_scrollbar="0">
12        <VBox name="choices_list" hexpand="1" margins="0,0"
13            foreground_color="255,255,0">
14            <Label text="dummy label" />
15        </VBox>
16    </ScrollArea>
17    <Button name="end_button" border_size="0" base_color="128,0,0" text="End Conversation" min_size="250,10"/>
18</Window>
Note: See TracBrowser for help on using the repository browser.