FIRST ARTICLE:
The hardest thing that RPG makers face nowadays is the object system. The object system is everything from a soda can to the guy who sells magazines behind the counter in the dirty book store (yeah, we all know you put one in your game, don't be shy ;)). Anyways, I see awful examples of such an object system every day of my life. I see NPC's that just sit there...and don't do anything. I see NPC's that are incapable of nothing more than a random movement and message. I see objects that are limited to their original script. I see many things that are horrible and should be eliminated from each and every engine on this planet.
The first thing that a person should do if they want to make a complete RPG is make a complete and totally functional object system. A functional and complete object system will allow NPC's to walk through doors, activate scripts, be controlled, hold items, talk, and drop items. Instead of having one character and other "npcs" which are controlled through some other routine, we should put all of the objects and the character on the same exact level. Here's an example.
SUB UpdateNPCS FOR uNF=1 to ActiveNPCS SELECT CASE uNF CASE CurrentlyControlledCharacter(End of psuedo code)
MoveNPC uNF, Keyboardismovinghorizontal, Keyboardismovingvertical CASE ELSE SELECT CASE ObjectData(uNF) CASE RandomlyMoves MoveNPC uNF, RandomPlaceX, RandomPlaceY CASE IsMovingToAPoint MoveNPC uNF, ObjectPointToMoveTo(uNf,0), ObjectPointToMoveTo(uNF,1) CASE IsStandingStill AnimateNPC uNF END SELECT END SELECT NEXT END SUB SUB MoveNPC Number,MoveToX,MoveToY Test=Map(MoveToX,MoveToY) select CASE TEST case Walkable ObjectLocation(Number,0)=MoveToX:ObjectLocation(number,1)=MoveToY case IsAScriptTile ActivateScript END SELECT END SUB
Not so hard, eh? I bet you didn't think that a totally efficient and active object system would be so short. Now that you have this out of the way, you can add things like an items list for each NPC (watch your RAM usage!!). Then, you could possibly trade and sell items to every NPC.
By QbProgger