ID:49859
 
That's right, the answer to the question I've been seeking to solve for the past two or three days has finally been discovered.

Unfortunately, the answer is not life, so if you're looking here for that... well, you're just out of luck.

In fact, the answer I've been seeking is an easy method to handle NPC communication. Well, easy isn't exactly the correct term, but it's far less of a hassle than most other methods I've looked into.

I've been told associative lists, multidimensional lists, XML handlers and selling my soul to the devil. None of these produced what I would like to consider an easy method.

Well, that's a lie, one of them did. But I'll let you decide which one. Because at the moment, I'm a magician, and a good magician never reveals his secrets.

I don't know about the rest of you, but when I dive into something I've never done before, and am unsure as to how well it's going to work. I don't like to develop it straight into my project. I like to simulate my projects environment (using the same methods and practices in the procs I'm going to configure to use this), and make a perfect running simulation. I do this for three reasons: If I screw it up, eh, no harm done. If I succeed, I have a diagram to run with, and give an example to myself exactly how I'm going to integrate it into my project. And finally, if I succeed, I have something to show off.

I succeeded.

On it's own, it's not very flashy. In fact, I bet ten of you can already do it, and two of you already have (oh that's right! My fan-base is above twenty now! Change those numbers to fifteen and five =D).

The key question is: How Tibby, did you make such an immaculate piece of art-work? The answer is simple; over-thinking, over-compensating and probably, using a method 90% of the good programmers in BYOND will find offensive.

Which is why, for the moment, it stays a secret. If my peers found out all my secrets, well, I just wouldn't be very magical any more! (Not to mention: Burned, stabbed, hung, poisoned, shot, impaled, raped and accused of sorcery... Only the last one is cool.)
The key question is: How Tibby, did you make such an immaculate piece of art-work? The answer is simple; over-thinking, over-compensating and probably, using a method 90% of the good programmers in BYOND will find offensive.

I know how that feels, you should see the RScript parser. It makes me shiver just to think about. I'm thinking of delving in to make it object oriented and I've been thinking about how I'll do it for a couple of days. Probably with a second lexer pass or something.
Witchery. Burn him at the stake!
And my method of testing works yet again.

I just gave a few people in Chatters a preview at the first NPC you encounter in the wide world of Isorath.

Which means they have a head start on you all, they know somewhat the history of the land, muahahaha.

Anyway, yeah, developing things in simulated environments is a must. Especially for things you're unsure of. In order to get this to work, it was almost a copy and paste, minus a few additions and whatnot.

I was also considering adding "Action Buttons" in there as well. For instance, if it's an NPC you can attack, you may choose to have something like "Respond Nicely", "Respond Cruelly", "Attack".

Example of what I mean:
http://www.byond.com/members/Tiberath/files/isorath/ actionbutton.PNG