Welcome, Guest. Please login or register.

Pages: 1 2 [3]
Print
Author Topic: Reconciling Inventoy / Dialog / Quest engine  (Read 16487 times)
maximinus
Community member

Posts: 694



View Profile Email
« Reply #30 on: January 26, 2010, 03:20:21 PM »

Her is an example of what I mean. In YAML, the start dialog with the drunkard:

main_dialog:
    - say: "Hey there, back up... no need to gang up on a poor guy!"
    - responses:
        -
          - "Gang up?  There's only one of me!"
          - first_impression
          - not pc.met('bart')
        -
          - "Glad to see you're feeling better."
          - gratitude
          - pc.met('bart') and quest.hasFinishedQuest('beer')
        -
          - "Same old Bart,  I see."
          - old_pals
          - pc.met('bart') and not quest['fedex'].isGoalValue('accused_of_murder')
        -
          - "See you later, Killer."
          - end
          - pc.met('bart') and quest['fedex'].isGoalValue('accused_of_murder')
        -
          - "Ha, you better sleep it off, buddy."
          - end


And here in my python code (so far):

main_dialog=["Hey there, back up... no need to gang up on a poor guy!",[
            ["Gang up?  There's only one of me!",
             "first_impression",
             lambda: engine.metPC('bart')],
            ["Glad to see you're feeling better.",
             "gratitude",
             lambda: engine.metPC('bart') and questComplete('beer')],
            ["Same old Bart,  I see.",
             "old_pals",
             lambda: pc.met('bart') and not quest['fedex'].isGoalValue('accused_of_murder')],
            ["See you later, Killer.",
             "end",
             lambda: pc.met('bart') and quest['fedex'].isGoalValue('accused_of_murder')],
            ["Ha, you better sleep it off, buddy.",
             "end",None]],
          # any values to set? quests to start or end? not here!
          None,None]


Mmm.. YAML looks nicer but in my text editor the colour coding is better for the python code.
Logged

Science is open-source religion
zenbitz
Community member

Posts: 1164



View Profile
« Reply #31 on: January 27, 2010, 01:34:18 AM »

I would like to point out for the record that from the BEGINNING I suggested using pure python, and was shouted down.
I will now do the "I was right" dance, and drop the subject.

Logged

We are not denying them an ending...
We are denying them a DISNEY ending - Icelus
maximinus
Community member

Posts: 694



View Profile Email
« Reply #32 on: January 27, 2010, 02:36:48 AM »

You'll be glad to know that I've managed to write a script that can convert all of your current dialogs into python  Grin
Logged

Science is open-source religion
maximinus
Community member

Posts: 694



View Profile Email
« Reply #33 on: January 27, 2010, 05:35:19 AM »

I would like to point out for the record that from the BEGINNING I suggested using pure python, and was shouted down.
I will now do the "I was right" dance, and drop the subject.

I can spot mediocrity a mile away; genius take longer to figure out  Cheesy
Logged

Science is open-source religion
b0rland
Community member

Posts: 105



View Profile Email
« Reply #34 on: March 17, 2010, 09:41:24 AM »

I'm currently going over the fedex quest and will be patching things that are currently not operational.
Logged
zenbitz
Community member

Posts: 1164



View Profile
« Reply #35 on: March 17, 2010, 10:34:26 PM »

b0rland - let me know if you have any questions.
Logged

We are not denying them an ending...
We are denying them a DISNEY ending - Icelus
b0rland
Community member

Posts: 105



View Profile Email
« Reply #36 on: March 19, 2010, 02:13:50 AM »

A note about my progress.
I managed to fix dialog - inventory interaction, so now Jennie does give player a box and it turns up in inventory. On the downside, I had to hardcode a box object into all NPCs inventories, but that's a small price to pay Smiley.

I also made a ticket to allow NPCs inventory customization from map files. http://parpg-trac.cvsdude.com/parpg/ticket/254 . Any volunteers?

Tomorrow I'll try to play further through the fedex quest. Next week I'll be out for skiing holiday, so trying to finish maximum by then.
Logged
b0rland
Community member

Posts: 105



View Profile Email
« Reply #37 on: March 19, 2010, 09:08:03 AM »

So I take it that there's currently no way of finding pekko, is there? Except for setting this goal to 1 via console?
Logged
mvBarracuda
Admin
Community member

Posts: 1308



View Profile Email
« Reply #38 on: March 19, 2010, 02:10:15 PM »

A note about my progress.
I managed to fix dialog - inventory interaction, so now Jennie does give player a box and it turns up in inventory. On the downside, I had to hardcode a box object into all NPCs inventories, but that's a small price to pay Smiley.
Good work b0rland :-)

I've replaced the container box with the gift box from trac ticket #157. Furthermore we should consider to rather use separate background image for the inventory, so you could replace it later if the need arises, e.g. when artists decide to redesign the GUI. Check the commit logs for details:
http://parpg-trac.cvsdude.com/parpg/changeset/533
http://parpg-trac.cvsdude.com/parpg/changeset/534

The easiest option for us would be if all inventory objects would be 3d models that reside in SVN. This way we can easily rerender them if the need arises.
Logged
b0rland
Community member

Posts: 105



View Profile Email
« Reply #39 on: March 19, 2010, 09:10:08 PM »

Agree. Created http://parpg-trac.cvsdude.com/parpg/ticket/257 for this.

One question, by the way. I know that big issue trackers (like Jira or even Mantis) allow to customize additional fields for issues. Do you know if Trac allows to do that? I couldn't immediately find how to do that.
What I'd like to do is create a way for us to mark tickets as suitable for newbies. We can of course just add some special tag in the subject or special keyword. But a separate checkbox will probably be more intuitive.
Logged
Pages: 1 2 [3]
Print
Jump to: