   dialogue & inventory system links plzz
  Hi,I need to implement a dialogue system and an inventory system for an adventure style game. I want some information on how to give a start to these. I would appreciate if someone can shed me some links for some basic theory on implementing these.Thanks.   
  What exactly do you want from your dialogue system? Do you want multi-choice answers or a command based text entry system?If you want a multi-choice system then look into finite state machines. If you want a text entry system look at natural language parsers.An inventory system is easily acheived with something like and stl vector of objects.   ;  I don't know much about programming these but dialogue trees are by far more common than parser-based input for dialoge. Well, actually, I don't know how a lot  of text adventures/IF do it if that's what you're asking. Most are pretty dialogue-lite. Another alternative would be a one-word keyword input thing like Ultima 4 and 5 had. Pretty unrobust but it still works fairly well. If you're doing it with a more traditional text adventure parser you could have a phrase like "Ask NPC about Keyword."   ;Quote:Original post by aayudhHi,I need to implement a dialogue system and an inventory system for an adventure style game. I want some information on how to give a start to these. I would appreciate if someone can shed me some links for some basic theory on implementing these.Thanks.I recently implemented a fairly robust multiple choice dialogue system (I think) in my journal. Unfortunately it is written in an uncommon language. If you are using C# however, I will see about making it usable by any .NET language by making a wrapper about it.   ;  well actually I am looking at implementing it in java for mobile (j2me)...But a parallel implemetation in C++ like language would be good if the source is available  :)   ;  Anyway, another thing I don't know how to program properly off the top of my head, but the idea is that you're going to want some sort of Item super-class from which you derive sub-classes, and given the virtual on_use() functions so that they behave differently. So you'd have class Item, from which you could derive class Potion, class Weapon, class Food, etc. You'd then have some sort of way of counting how many of each item a player had. I think you could do it likeenum Items {RED_POTION,TORCH,BACON};use those as key values to a map which had integer keys and the... member/data side (what's the second variable you feed in call?) would be pointers to integers, so that when you got an item you could do something like:*item_map[RED_POTION]++; or something. I'm still not too sure how map syntax works, but I think you can do something like that. Whether this is actually efficient, I have no idea, but if it works how I *think* it does it should be fairly easy to maintain and have fairly clean usage syntax.I also had a question about this which I'm going to ask here since I think the original poster would find it relevant:If you want objects to be permanent, so that when you drop them somewhere -- let's use a text adventure as an example as they have well defined rooms -- they don't disappear, what's a good way to do this?My current line of thought is to have either an array or vector of item IDs, which change depending on what's dropped and taken. Is it also necessary to have a location variable on each Item object that contains the room ID? Also, what about a 2D array of Item IDs mapped to room IDs? With this setup, each room knows what it contains, each item knows where it is, and there's an overall GPS of where all of your items currently are. Would this be too redundant?   