• 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

Adding a bonus to multiple skills at once...

jat470

Member
...more specifically, I'm trying add two custom items to do one of the following:

item 1) add ranks equal to a character's level to each knowledge;

item 2) add a specific skill bonus to each knowledge skill.

If it helps I've added their respective eval scripts thus far. This is the first item:

if (field[gIsEquip].value <> 0) then
#enhancementbonus[hero.child[aINT], 6]
#enhancementbonus[hero.child[aWIS], 6]
#enhancementbonus[hero.child[aCHA], 6]
#enhancementbonus[hero.child[aSTR], 6]
#enhancementbonus[hero.child[aDEX], 6]
#enhancementbonus[hero.child[aCON], 6]

~add to our languages known
herofield[tLangsSpk].value += 3

~add points to a chosen skill, to a max of our HD
if (field[usrChosen1].ischosen <> 0) then
var bonus as number
~count the number of hit dice we have, then subract any ranks that have already been applied to the chosen skill
~and don't let the value go below 0
bonus = maximum(hero.tagcount[Hero.HitDice] - field[usrChosen1].chosen.field[skUser].value - field[usrChosen1].chosen.field[skExtRanks].value - field[usrChosen1].chosen.field[skInnate].value,0)

~now, we'll add innate ranks to that skill
field[usrChosen1].chosen.field[skInnate].value += bonus

~and since innate ranks count towards the total ranks spent by a character,
~we'll add the same amount to the max skill points
#resmax[resSkill] += bonus
endif

if (field[usrChosen2].ischosen <> 0) then
var bonus as number
~count the number of hit dice we have, then subract any ranks that have already been applied to the chosen skill
~and don't let the value go below 0
bonus = maximum(hero.tagcount[Hero.HitDice] - field[usrChosen2].chosen.field[skUser].value - field[usrChosen2].chosen.field[skExtRanks].value - field[usrChosen2].chosen.field[skInnate].value,0)

~now, we'll add innate ranks to that skill
field[usrChosen2].chosen.field[skInnate].value += bonus

~and since innate ranks count towards the total ranks spent by a character,
~we'll add the same amount to the max skill points
#resmax[resSkill] += bonus
endif
endif

I want to add this rank bonus to every knowledge skill.

This is the second item:

~ Are we equipped?
if (field[gIsEquip].value <> 0) then
if (field[usrChosen1].ischosen <> 0) then
#competencebonus[field[usrChosen1].chosen, 4]
endif
endif

I want add this bonus to every knowledge skill, specifically.

Thank you in advance!
 
jat470;66188 [B said:
I want to add this rank bonus to every knowledge skill.[/B]

This is the second item:

~ Are we equipped?
if (field[gIsEquip].value <> 0) then
if (field[usrChosen1].ischosen <> 0) then
#competencebonus[field[usrChosen1].chosen, 4]
endif
endif

I want add this bonus to every knowledge skill, specifically.
Use this code about like Pre-Levels 10,000
Code:
~ Apply a +4 Competence Bonus to all knowledge skills
#applybonus[BonComp,hero.child[AllKnow],4]

How did I find this? Good question. See THIS video about 4 minutes in it goes over how to see the different Fields/Value on any Thing that is on a Hero (ie character) which is VERY helpful in finding answers.

Hope that helps.
 
Hope that helps.

It does indeed! Thank you very much for that and the video!:D So that took care of the second item...

Still having trouble with determining which fields I need to readjust for the first item. Want to go beyond just adding ranks to three chosen skills (where it's currently set) to adding ranks to just all the knowledge skills.
 
Last edited:
I still have not been able to resolve this issue on my own, unfortunately.:confused:

To reiterate: I want to be able to add character level as ranks to all Knowledge skills at once (beyond just the three currently adjusted) through this custom item.

Thank you!
 
To reiterate: I want to be able to add character level as ranks to all Knowledge skills at once (beyond just the three currently adjusted) through this custom item.
You do a "foreach" loop to loop through all the BaseSkill looking for the Tag on the Knowledge Skill that tells you its a Knowledge Skill.

To find the tag go to "Develop->Enable Data File Debugging".

Then add a knowledge skill and Right Click on the "?" and left click on "Show Debug Tags For...." and you will get a new window showing the tags on the Thing. I have included a screen shot.

Then using that found tag write the below script at Pre-Levels 10,000:
Code:
~ Loop through all the Base Skills specifically for the Skill Category Knowledge
foreach pick in hero from BaseSkill where "Helper.SkCatKnow"
    eachpick.field[Bonus].value += X
nexteach
Replace "X" with what ever variable or bonus you want to add.
 

Attachments

  • Image1.jpg
    Image1.jpg
    95.9 KB · Views: 23
Where is exactly is the tag? Enable Data File Debugging is checked off, but I'm not clear on where exactly to look for the tag.
 
Back
Top