What's the best method for assigning attributes to NPC?


Hi I am working on an adventure/text based/visual novel style game project and looking for some help on assigning randomly chosen attributes to NPCs.

I want the player to be in charge of a team and send them on different missions but each team member has a randomly chosen set of attributes; searching, hunting, gathering. Their "skill level" determines the outcome of their mission. For example, I send Bob on a searching mission to find a new location. He has a 4/5 searching attribute. This converts into a percentage that he has a 55% chance of finding location A (best), 30% chance of finding location B (okay), 15% chance of finding location C (worst). After he is sent on the mission, the game uses those percentages to return a location, A, B or C. Therefore allowing the story to branch off in potentially three directions.

I have done some of Shaun Spalding's tutorials and The Friendly Cosmonaut. The direction that I want to take this game in is different to the top down RPG games or 2D platformers. I have tried searching online but not really found any definitive answers.

I could keep their attributes predetermined but for the sake of replay-ability I would like to have it randomised.

All help is very welcomed.



When the player selects the option to start a new game, generate a series of random values and assign them to each of the characters. This seems like a pretty basic question.