Quote: "Wow, that looks really powerful."
Thanks, hopefully it will become even more as I add to it
.
Quick update, spent the last few days working on npc to npc interaction, and finally finished. This allows NPCs to have conversations back and forth with each other based on various conditions, so they aren't just idly standing around when you aren't talking to them. For example, this script under the NPC Tom's section:
<c=Potions>
<npc=Minerva>
<r=Good>
<say=Tom responds, 'They are going quite good, thanks, <npc.name>.'.>
time.start=1950
time.end=2010
conv.hasFired=Init
conv.timeSinceFired.start=Init`20
</r>
<r=Too Late>
<say=Tom responds, 'It's too late to talk, goodbye.'.>
time.start=2011
conv.hasFired=Init
conv.timeSinceFired.start=Init`20
</r>
<r=Bye>
<say=Tom responds, 'No, that's it, goodbye.'.>
<end>
conv.hasFired=Good
conv.timeSinceFired.start=Good`20
</r>
</c>
And this under Minerva's:
<c=Potions>
<npc=Tom>
script.hasFired=No Talking
my.speaking=0
<r=Init>
<say=Minerva asks, 'How are the potions going, <npc.name>?'.>
<initiate>
</r>
<r=Good>
<say=Minerva responds, 'Good, glad to hear that. Anything else?'.>
conv.hasFired=Good
conv.timeSinceFired.start=Good`20
</r>
<r=Sorry>
<say=Minerva responds, 'Ok, sorry about it being so late.'.>
<end>
conv.hasFired=Too Late
conv.timeSinceFired.start=Too Late`20
</r>
</c>
Would cause Minerva to initiate the conversation with the line:
Minerva asks, 'How are the potions going, <npc.name>?
If the script "No Talking" (defined in a part of the script not shown) had been fired and the npc wasn't already in another conversation. <npc.name> is filled in with whoever she's talking to. Then if the time was between 19:50 and 20:10, Tom would respond with:
Tom responds, 'They are going quite good, thanks, <npc.name>.'.
To which Minerva would reply:
Minerva responds, 'Good, glad to hear that. Anything else?'.
but if the time was past 20:10, Tom would say:
Tom responds, 'It's too late to talk, goodbye.'.
To which Minerva would reply:
Minerva responds, 'Ok, sorry about it being so late.'.
Obviously, the quality, seriousness, and usefulness of this example conversation is basically a joke just to test the functionality and most of the lines are whatever come off the top of my head at the moment I type them. So don't worry, they won't be so stupid and strange in the finished game, haha
. So now my scripting language has 3 main structures:
Dialogue-Allows player to interact with an npc through a "tree" of choices.
Script-Allows npc to initiate interaction with player as well as perform any other events related to that NPC (anything from unlocking a door to teaching a class).
Conversation-Allows an npc to talk to (or act on in some way) another npc with conditional responses and actions.
The disadvantage to all this scripting so far is that I haven't made it MP compatible, which will be a pain, but doable, but I might put that off for now. Not sure what I'll do next, I'll just have to play around and decide
.