View Single Post
Old 02-16-2010, 12:14 AM   #1 (permalink)
nefus
The Contributor
 
nefus's Avatar
 
Join Date: Nov 2007
Location: Nashville, TN
Posts: 66
Thanks: 20
nefus is on a distinguished road
Help rq character generator functions

Hey gang, I tried to ask this question probably two months ago but I know for a fact that my question probably made no sense at all. So here I go again for try number 2.

I'd like to build a basic character generator that allows players to make a few selections and build a character or npc for their runequest game. For those who care, I'm using the MRQ2 edition.

As a person with limited programming ability I'd like to build functions for things like Common Skill Bonuses. Let me give you two examples from the book.

Barbarian: +30% to Culture(Own) and Lore(Regional). +10% to Athletics and Resilience. +5% to Brawn, Perception, Ride and Stealth.

Now... that seems pretty straight forward until you look at one of the other common skill selections like this one from Nomads: 10% to either Brawn, Drive, Ride or Swim.

Like Barbarians, the Nomads have a few free skill bonuses and then you are forced to make a selection to top it off.

As a neophyte programmer I might try something like this for the Barbarian.

Code:
function barbarian_skills_one(){
    $background = array("Culture(Own)"=>'30', "Lore(Regional)"=>'30', 
    "Resilience"=>'10', "Athletics"=>'10', "Brawn"=>'5', "Perception"=>'5', 
    "Stealth"=>'5', "Ride"=>'5');
    return $background;
        }
How would I add the selection to the function? Should I add a special variable in the function that I look for to see if there is a second function that has selections in it? Should I wave a dead chicken over my keyboard and hope for some fancy voodoo?
__________________
I am not a programmer, nor do I play one on tv.
nefus is offline  
Reply With Quote