» Mon Mar 14, 2011 8:30 pm
What I mean by quest people is the people placed inside buildings and such for the actual quests. If you go into dungeon of doom doing quest of fame #415, you may be fighting Bob Evilman. Next you may get a quest into the same dungeon of doom later to defeat Joe Evilman. Or kidnap Kid Ransom. These names are not real names...
NPCs relating to a quest specifically will be randomly placed somewhere in the game. As well as the enemies you may face. In taverns, guilds, shops, etc... the shopkeepers and some flavor NPCs will be the same in my game, your game, and Bill's game. Doesn't matter. The same towns and dungeon layouts will be the same always. Only during a quest the people you find may be different, but those NPCs would be placed in that location specifically for a quest you're on. The best example is an early quest that everyone will get.
The Lady Brensia or whatever quest in the beginning. She will be placed in a tavern somewhere, one time she may be in The Sword and Dagger in TownA, a different game she may be in the Musk and Ox in TownB. That's an example of randomly placed NPC. However, in the tavern layout that she is 'spawned' in, she'd always be in the same place for that layout. With this we may conclude that there is a reserved place in layouts for quest NPCs to spawn. This also is in place for dungeons. If you use the [ and ] keys with cheatmode on, you'll teleport to quest locations. Most of the time, your quest target will be in one of those locations, and nowhere else. So the game has places set for important quest people to appear.
Another thing with 'random' spawning. If you leave a dungeon and go back in, there will usually be the same types of NPCs spawning in the same amount, and generally in the same locations. Exceptions can occur. It's not quite random, but back in 1996 it would be quite impressive, for the technology then.
Now, with random quest NPCs. Unless it's a specific quest which will automatically spawn the specific NPC (main quests usually) in a location, it will take the name from a textfile. I forget the exact name of the file, but it takes the first name, and the last name. Every townperson you meet on the streets, including guards, will have names generated in this manner.
So, in the end, for a general dungeon crawl to kill a mad wizard may do this for spawning (not sure on the exact things).
It gets the questfile, and grabs the values from that quest. It knows it needs to be a wizard NPC, so it uses that template of a monster and puts it in the dungeon. The dungeon location is randomly determined by the game, and the wizard is placed in a quest location in that dungeon (veterans of the game can easily find some quest locations). Next, the game generates a name based on the template of the wizard, either male or female I believe. It takes that name and assigns it to that wizard NPC monster. Now, you have the quest to go to the dungeon, and defeat the wizard. I think it has the type of dungeon you may need to hunt in in the quest details, not sure.
The most random elements are treasure piles, which are generated WHEN you examine them. Not sure if monster loot is the same deal here.