My question is how do you tackle handling NPCs that give players unique options? I'm actually creating a game that's more like a website, where you collect things using earned abilities and spells, etc. I want all the NPCs to have several options for a player to choose from (if you have x then do y for me and I'll give you z). Right now I'm using Ruby on Rails for this, just to learn the framework and all that, but how would I handle this sort of thing? How would you do it in php? Will I need a controller/model for each NPC or can I do it through the database some how? Maybe AJAX? (City map, click the building, up pops up character list, click character, up pops their choices?) Just curious.