Modify

Ticket #121 (closed enhancement: fixed)

Opened 9 years ago

Last modified 9 years ago

Dialogue Engine & Quest Engine

Reported by: zenbitz Owned by: parpg
Priority: major Milestone: Techdemo 1
Component: scripts Version: trunk
Keywords: dialogue dialog quests Cc:
Blocked By: Blocking:
Department:

Description

The Dialogue engine needs a few tweaks to make it possibly to add the tech demo quests. A GUI suggestion will be added in a separate ticket.

1) The "start" screen needs to have a python precondition. We can work around this with a generic opening statement, but this is suboptimal.

2) No mechanism is provided (that I can understand) to "set" gamestate values. I suppose it might be possible to craft the "post" conditionals in such a way to call cleverly constructed callbacks, but this is not transparent. For example, npc's need to:

a) give the PC things (inventory managment) b) take things from the PC c) set quest states and substates

3) And this is probably outside the scope of this ticket - we need to define a fuller Quest/PC/gamestate API so that the conditionals in the dialogues can be written easily.

Attachments

fguard.yaml (9.3 KB) - added by zenbitz 9 years ago.
sample dialogue file
zenbitz_dialoge.patch (15.6 KB) - added by zenbitz 9 years ago.
Patch for dialogue demo

Change History

Changed 9 years ago by zenbitz

sample dialogue file

Changed 9 years ago by zenbitz

Patch for dialogue demo

comment:1 Changed 9 years ago by zenbitz

PATCH:

I hacked up the dialogue-demo.py script so that I could test my fguard.yaml file. There were lots of bugs! I had to add several callbacks and functions to the dummy objects in the demo script. I also modified it so that it will use a .yaml file as the first command line argument instead of hard-coded dialogues/sample.yaml (still the default).

To get this to work, I also had to "register" some callbacks in scripts/dialogue.py.

Finally, I changed a few #! lines to use /usr/bin/env instead of /usr/bin/python, which I feel is slightly more agnostic to 'nix version.

The patch includes a new, much improved syntactically, version of fguard.yaml.

comment:2 Changed 9 years ago by zenbitz

  • Type changed from task to enhancement
  • Summary changed from Dialogue Engine to Dialogue Engine & Quest Engine

Since this bug is still open, I noticed that I can no longer access quest variables in the quest engine when the quest is finished.

This is logical, but it turns out that I need to store the quality of the beer even after the quest is "Finished". Well, need is probably a strong word, but some dialog I have written depends on it.

For example, this snippet from new farmer.yaml:

            - 
              - "Hey, that wheat you gave me really made the brew work."
              - gratitude
              - quest.hasFinishedQuest('beer') and quest['beer'].getValue('beer_quality') >= 3

The conditional here is always false. I could remove the bit about the quest being finished, but then this dialog option would drop after the quest is "FINISHED" (i.e beer goes back to Bart).

comment:3 Changed 9 years ago by zenbitz

closing this ticket... only remaining item has been attached to 229

comment:4 Changed 9 years ago by zenbitz

  • Status changed from new to closed
  • Resolution set to fixed
View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.