Quote:
Originally Posted by Skyld
I am not certain if you need such a system why you do not just use multidimensional arrays and the for (temp.foo: temp.bar) iterator to go through each of your actions, so that you do not have to restrict yourself like you have currently done.
|
I plan to release my NPC Dialog system for public use when I polish it more as it is complete for the most part. People will have to type the topic responses and conditions in a text file and there is no need to make it more complicated than it already is without a GUI to create the topics, something that I'm not going to waste my time on.
Also I don't really see how I've
restricted myself as you have said. The current format makes it exactly clear how many conditions and scripts exist for each response, and I'm trying to make it as user-friendly as possible when typing it.
The potential complexity of topics is rather large which is why I trying to make it understandable with minimal space.
This is a simple topic that changes it text depending on if you've read the topic or not. Though when its implemented into the world, the response will differ from npc to npc based on a condition of the NPC's name that you're talking to.
PHP Code:
text=Arkland
responsescount=2
random=0
resp0.text=Arkland is a very large kingdom. If you want to get around quickly you're going to have to talk to the <a href=topic:dockcaptain>Dock Captain</a> to get a ride. Here's some gold to help you along.
resp0.choices=0
resp0.isgoodbye=0
resp0.scriptcount=2
resp0.script0=AddItem,50,gold
resp0.script1=AddMsg,6,"You received 50 Gold coins."
resp0.conditionscount=1
resp0.cond0=function,HasReadTopic,"arkland,",<,value,1,0,0
resp0.addtopics=dockcaptain,
resp1.text=I told you to go talk to the <a href=topic:dockcaptain>Dock Captain</a> if ya want a ride.
resp1.choices=0
resp1.isgoodbye=0
resp1.scriptcount=0
resp1.conditionscount=1
resp1.cond0=function,HasReadTopic,"arkland,",>=,value,1,0,0
resp1.addtopics=0
Any comments on this would be appreciated.