Senior Member
Volunteer Data File Contributor
Join Date: Mar 2007
Posts: 1,245
|
If I made them all cross class skills, then they would cost 2 skill points per rank, which is not what I am going for. The point of the ability is to buy any skills you want, but not be able to put many ranks in any of them. Jack of all trades, master of none, as they say.
|
#51 |
Senior Member
Lone Wolf Staff
Join Date: Dec 2008
Posts: 4,690
|
Lawful_g wrote:
> > > Wow, thanks, that is just about exactly what I was trying to do. Now a > second question, about a related ability. The other subrace of this > people gain an ability called "Jack of all trades, which makes all > skills class skills for all classes, but limits the maximum ranks taken > in any skill as though they were cross class (level + 3 then divided by > 2). Is there a way to script such a cap on skill ranks taken? Ah, I like the hard ones So there are two things that need to be done here: 1) Make all skills class skills 2) Enforce a maximum rank limit on each skill We'll tackle 1) first, since we obey the laws of numbers on these forums. Each skill has a tag that indicates to the hero that it's a class skill. So we need to iterate through all skills, and tell them to forward their tags to the hero. ------ ~ Loop through all skills var result as number foreach pick in hero where "component.BaseSkill" ~ Tell each skill to forward its class skill tag to the hero result = each.forward[ClassSkill.?] nexteach ------ Do this during the First phase and voila, each skill is now a class skill. Now we need to enforce a maximum rank limit on each skill. To do this, we'll add an "eval rule" to the ability. We can't directly set the maximum rank of the skills themselves, but we can cause an error if any of them go too high. Add an eval rule with the message "Skill rank too high", any time during the Validation phase. The rule should loop through all the skills, making sure that each of them abides by some sort of limit. If it finds one that has more ranks than the limit, it sets the error message appropriately and ends. ------- ~ Loop through all skills var result as number foreach pick in hero where "component.BaseSkill" ~ If this skill has more than 5 ranks, that's a problem if (each.field[kUserRanks].value > 5) then ~ Change the error message to refer to this skill @message = "Skill " & each.field[name].text & " has too many ranks!" ~ We've found an invalid skill, so we don't need to go on. done endif nexteach ------- Those should do the trick for you. -- Colen McAlister, colen@wolflair.com Chief Engineer, Lone Wolf Development |
#52 |
|
|