• 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

Help with a feat

RavenX

Well-known member
I am trying to add the Education feat from the Forgotten Realms Setting into the editor for a campaign I am running.

I am struggling a bit with the eval script that lets the user pick two knowledge skills and apply a +1 bonus to them.

Phase pre-levels, priority 10000
Code:
~Add +1 bonus to two knowledge skills chosen by player
if (field[usrChosen1].ischosen <> 0) then
  #skillbonus[field[usrChosen1].chosen] += 1
  endif

I have done this a multitude of ways and still can't get it working. Any help would be appreciated.
 
Going by the script your just missing the 2nd knowledge skill correct? So make sure you have setup the "2nd Custom Expression" to be like the "Custom Expression" on the feat.

Then do the following changes in the eval script:
Phase pre-levels, priority 10000
Code:
~Add +1 bonus to knowledge skill one
if (field[usrChosen1].ischosen <> 0) then
  field[usrChosen1].chosen.field[Bonus].value += 1
endif

~Add +1 bonus to knowledge skill two
if (field[usrChosen2].ischosen <> 0) then
  field[usrChosen2].chosen.field[Bonus].value += 1
endif
I removed the #skillbonus[] macro as I have never tried to use it with a chosen thing before and not 100% sure that works. I know the above works.
 
I think this expression, looking for "All Picks on Hero" should get you all the knowledge skills currently added to the hero

component.BaseSkill & Helper.SkCatKnow
 
Ok, now that I have that working, I just need to know 3 more things.

1. How do I get hero lab to report an error if the character takes the same skill twice,
and
2. How do I get hero lab to make all the knowledge skills into class skills.
3. Is there a way to restrict a feat to character creation / 1st level?
 
1 - You can look at Skill Focus for something similar. Basically, you want to have each feat assign a tag (for example "Custom.KnowStuff") to the chosen skill. Then check in an Evalrule if that skill has 2 or more of the assigned tag on it. Report an error if there are multiple Custom.KnowStuff tags on the chosen skill.

2 - I believe this should be as simple as assigning the ClassSkill.Knowledge tag to the hero.

3 - There are several feats that have this prereq, for example you can copy and look at "Fey Foundling"
 
Thank you for the help, here are the details on the feat along with what I need it to do:

This feat can only be taken once at level one. It gives the user all Knowledge skills as class skills and a +1 bonus on two knowledge skills of the player's choice. Education, Forgotten Realms Campaign Setting.

I just need it to report error if the same skill is picked twice between usrChosen1 and usrChosen2 on the pull down menus.

Thanks to your help I have been able to get the rest of it working. I finally decided to just add this one because one of my players constantly hounds me about using it in the campaigns I run.
 
Last edited:
I dug this out of the Skill Focus feat, I think it is what you were referencing, but how can I get this to work in terms of usrChosen1 and usrChosen2?
The feat I am working with involves these choices of knowledge skills from the same feat, not different feats like skill focus.

Code:
~ Assign a tag so we know we've taken skill focus
      perform focus.assign[Helper.SkillFocus]
 
I dug this out of the Skill Focus feat, I think it is what you were referencing, but how can I get this to work in terms of usrChosen1 and usrChosen2?
The feat I am working with involves these choices of knowledge skills from the same feat, not different feats like skill focus.

Code:
~ Assign a tag so we know we've taken skill focus
      perform focus.assign[Helper.SkillFocus]

The idea is the same, you want to mark each selection with a tag so you can know which skills were selected. Then check to make sure it isn't picked twice. For example, you could modify the code you posted above like this to mark them with the HasFeat tag for your feat. In this example I am assuming the unique ID of the feat is "fEducation"

Code:
~Add +1 bonus to knowledge skill one
if (field[usrChosen1].ischosen <> 0) then
  field[usrChosen1].chosen.field[Bonus].value += 1

  ~ Now mark the chosen skill for the 1st chooser
  perform field[usrChosen1].chosen.assign[HasFeat.fEducation]
  endif

~Add +1 bonus to knowledge skill two
if (field[usrChosen2].ischosen <> 0) then
  field[usrChosen2].chosen.field[Bonus].value += 1

  ~ Now mark the chosen skill for the 2nd chooser
  perform field[usrChosen2].chosen.assign[HasFeat.fEducation]
  endif

Now that it is marked, we have to check it. We'll do this in an Eval Rule like this (the timing can be any time after the script above runs):

Code:
~ We start of valid
@valid = 1

~ If the first chosen skill has been picked twice, it will have 2 tags and we aren't valid.
if (field[usrChosen1].chosen.tagcount[HasFeat.fEducation] >= 2) then
  @valid = 0
  endif

~ Same for the second
if (field[usrChosen2].chosen.tagcount[HasFeat.fEducation] >= 2) then
  @valid = 0
  endif
 
I am coding up another feat, this one lets the user pick one of their "Non-Class" Skills and make it into a Class skill. Since I was able to get the last feat working with pull downs, this should somewhat similar, I just need to know how to have hero lab only display skills that are not class skills for the current character to get this feat working.
 
Skills which are class skills have the Helper.ClassSkill tag on them, so your expression wants to look for base skills, on the hero, that lack that skill.

You can do this by "Restrict First List to..." to "All picks on hero". Then put in "component.BaseSkill & !Helper.ClassSkill" for the candidate expression.
 
ok so the ! tells hero lab to look in the other subset of data instead of the class skills. Cool. Thank you for that.
 
The "!" means "Not" so:

"component.BaseSkill & !Helper.ClassSkill" means "Has the BaseSkill Component and not the Helper.ClassSkill tag"
 
Alright that makes sense to me.

Came across another feat I need help on. This time the prerequisite is Wisdom 13+, which I know how to code, but once the feat is taken the character suffers a permanent drain of 2 Wisdom. I need a way to code this so that the character still retains the benefits of the feat, even if the wisdom drops below the 13 threshold from taking it.

Also how would I switch hit points over from Con mod to Int mod? I found a wizard feat that does this for 1st level and I am a bit perplexed as to how to approach this one.
 
Last edited:
So far this is what I was able to come up with. I could not get this code working but I think it is a start to what needs to be done...

post levels 10000
Code:
if (hero.child[Totals].field[cLvlIndex].value = 1) then

var chi as number
chi = hero.child[aCON].field[aModBonus].value
container.child[Totals].field[tHP].value -= chi

var phi as number
phi = hero.child[aINT].field[aModBonus].value
container.child[Totals].field[tHP].value += phi
endif
 
Also I had another question,

Regarding Ethinicities, where in the editor do those go? And can they be made available to races other than human?
 
You go to races, I made one for elfs called Elvenkind and then used this script

~if we have the HRs source enabled, we have special abilities
if (hero.tagis[source.HousRules] <> 0) then
~we get one ethnicity pick
field[rGiveSpec].value = 1
endif

you have to change the source and the HRs ( stands for house Rules) and then go to R cust Specials and make your race such as wood elf, Grey elf etc. and pick the creature sub type such as Mine is elvenkind. there might be an easier way but it worked for me.
I made humans with an uncivilized and civilized humans. Works great.

I can sent you my house Rules file if you like to see what I have done and maybe you might find out a better way to do it.
 
Last edited:
I am trying to figure this out as a way to deal with Starting Regions in Faerûn. I am thinking if I do something like Ethnicities I could easily incorporate starting regions and the benefits that these give to the player.
 
Back
Top