09/20/09 23:51:51 (10 years ago)

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
1 edited


  • trunk/game/scripts/objects/actors.py

    r278 r287  
    242242        self.behaviour.agent.move('run', location, self.behaviour.speed+1) 
    244     def talk(self): 
     244    def talk(self, pc): 
    245245        """ Makes the NPC ready to talk to the PC 
    246246            @return: None""" 
    247         self.state = _AGENT_STATE_TALK 
     247        self.behaviour.state = _AGENT_STATE_TALK 
     248        self.behaviour.pc = pc.behaviour.agent 
    248249        self.behaviour.idle() 
Note: See TracChangeset for help on using the changeset viewer.