Junior Member
Join Date: Aug 2007
Posts: 29
|
I am trying to code an adjustment that gives +2 to all Perform skill checks. I've got how to do for just one but is there a Perform that adds to all?
|
#1 |
Senior Member
Lone Wolf Staff
Join Date: Dec 2008
Posts: 4,690
|
Beowulfe wrote:
> > > I am trying to code an adjustment that gives +2 to all Perform skill > checks. I've got how to do for just one but is there a Perform that adds > to all? The following piece of code should do the trick: hero.child[AllPerf].field[Bonus].value += 2 You can also use "AllKnow" (all knowledge skills), "AllProf" (all profession skills) and "AllCraft" (all craft skills), as well as "AllSkills" for all skills. Hope this helps, -- Colen McAlister (colen@wolflair.com) Chief Engineer, Lone Wolf Development http://www.wolflair.com/ |
#2 |
Junior Member
Join Date: Aug 2007
Posts: 29
|
Nope, it did not like that
Here's what I've got for the other skills #skillbonus[kSenseMot] += 2 |
#3 |
Senior Member
Lone Wolf Staff
Join Date: Dec 2008
Posts: 4,690
|
Beowulfe wrote:
> > > Nope, it did not like that > Here's what I've got for the other skills > #skillbonus[kSenseMot] += 2 I'm sorry, it should have been "AllPerform", not "AllPerf". Try this: #skillbonus[AllPerform] += 2 -- Colen McAlister (colen@wolflair.com) Chief Engineer, Lone Wolf Development http://www.wolflair.com/ |
#4 |
Junior Member
Join Date: Aug 2007
Posts: 29
|
That worked. Thanks.
|
#5 |
Senior Member
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321
|
As kind of a related thing, is there a similar thing to use to do a bonus to say all STR or CHA based skills?
Thomas Working on - |
#6 |
Senior Member
Lone Wolf Staff
Join Date: Dec 2008
Posts: 4,690
|
TCArknight wrote:
> > > As kind of a related thing, is there a similar thing to use to do a > bonus to say all STR or CHA based skills? There is, but it's more complex. You'd create a script that does this: ~ For each skill... foreach pick in hero where "component.BaseSkill" ~ If this skill has a linked attribute, and the attribute is ~ strength (i.e. this is a strength-based skill), add +1 to it if (each.islinkage[skillattr] <> 0) then if (each.linkage[skillattr].tagis[IsAttr.aSTR] <> 0) then each.field[Bonus].value += 1 endif endif ~ Go on to the next skill nexteach Replace "STR" with the appropriate attribute abbreviation for your attribute. -- Colen McAlister (colen@wolflair.com) Chief Engineer, Lone Wolf Development http://www.wolflair.com/ |
#7 |
|
|