• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Setting skills to use a different Ability modifier!

bodrin

Well-known member
I have a template that changes a number of the skills to other modifiers for example Charisma for all Wisdom based skills.

How do I switch out the original ability modifier to the new one?

Thanks in advance! Bodrin:confused:
 
No idea.

I haven't had cause to try it until now!

I've looked through the manual at the Skills section and have seen this kAttrValue, the manual itself is helpful regarding macros to add bonuses to skills but I just want to swap out the base ability used to determine the skills, not to add a bonus.
 
Use a foreach statement and then it gets a little strange.

foreach pick on hero from Baseskill

will iterate through each skill on the hero. Unfortunately, the skills don't have their associated stat as a tag on them. You will have to look through the linkage to see what skill is there.

For an example look at the Circlet of Persuasion for the linkage code. Take that and modify it to an "If the linkage is this, then assign whatever tag" form.
 
Okay, i've cobbled together a test script to alter the ability used to determine a skill.

I've chosen Charisma to replace Constitution. However the script seems to work but not in the way I thought it would.

When I alter the Charisma score all the skills get altered instead of Concentration. Weird!!!

I recall somewhere that an exclamation mark ! means something in programming speak but I can't remember where it was.

Whats wrong with this script?? Screenshot of test character attached with and without charisma modifier.

Code:
~ Make the Concentration skill use the Charisma Ability modifier instead of Constitution

        foreach pick in hero from BaseSkill where "!thingid.kConcent"
        perform eachpick.assign[SkillOver.aCHA]
        nexteach
 

Attachments

  • Test Charisma template.jpg
    Test Charisma template.jpg
    203.5 KB · Views: 1
Never mind this script works when Charisma is modified but it still shows "Constitution" on the Hover info on the Concentration skill no big deal the modifier works that's the important bit!:)

Code:
~ Make the Concentration skill use the Charisma Ability modifier instead of Constitution

        foreach pick in hero from BaseSkill where "thingid.kConcent"
        perform eachpick.assign[SkillOver.aCHA]
        nexteach
 
Last edited:
You don't need the full foreach if you know the single, specific thing you want to find:

Code:
perform hero.childfound[kConcent].assign[SkillOver.aCHA]

The fact that SkillOver doesn't change the name in the display is something I've noticed before but haven't gotten around to changing yet.
 
Last edited:
You don't need the full foreach if you know the single, specific thing you want to find:

Code:
perform hero.childfound[kConent].assign[SkillOver.aCHA]

The fact that SkillOver doesn't change the name in the display is something I've noticed before but haven't gotten around to changing yet.

Thank you for the tidier script, it's neater than the original one and easier to understand too!
 
Back
Top