Senior Member
Join Date: Jun 2010
Location: Florida
Posts: 235
|
So back into coding things for Beats & Barbarians to name a few.
Have an Edge that should apply a +2 bonus to 2 specific Knowledge Skills. So I have some code, but it only ever applies the bonus to ONE of them. I am a bit code rusty so I am probably just missing something obvious: Set at Pre-Traits 5000, with Calc trtFinal in apparopriate spot. Code:
if (field[abilActive].value <> 0) then ~go through all knowledge skills and find an "Arcana" one foreach pick in hero where "thingid.skKnow" if (compare(lowercase(eachpick.field[domDomain].text),"arcana") = 0) then perform #traitprof[skKnow,+,2,"Demon Hunter"] endif if (compare(lowercase(eachpick.field[domDomain].text),"religion") = 0) then perform #traitprof[skKnow,+,2,"Demon Hunter"] endif nexteach endif Even when I separated these into 2 separate Eval scripts same results. |
#1 |
Senior Member
Join Date: Nov 2010
Location: Metairie, LA, USA
Posts: 1,819
|
By separating you mean something like this?
Code:
if (field[abilActive].value <> 0) then ~go through all knowledge skills and find an "Arcana" one foreach pick in hero where "thingid.skKnow" if (compare(lowercase(eachpick.field[domDomain].text),"arcana") = 0) then perform #traitprof[skKnow,+,2,"Demon Hunter"] endif nexteach foreach pick in hero where "thingid.skKnow" if (compare(lowercase(eachpick.field[domDomain].text),"religion") = 0) then perform #traitprof[skKnow,+,2,"Demon Hunter"] endif nexteach endif Lenny Zimmermann Metairie, LA, USA Data files authored (please let me know if you see any issues with any of these if you have/use them): Official (In the downloader) 50 Fathoms, Deadlands: Hell On Earth, Deadlands: Noir, East Texas University, Necessary Evil (requires Super Powers Companion), Pirates of the Spanish Main, Space 1889 (original file by Erich), Tour of Darkness, Weird War II, Weird Wars: Rome Coming Eventually Evernight (LWD has completed their review but I have some fixes to make first... although Pinnacle mentioned this might get an overhaul to SWADE so I may just wait for that first. If you just HAVE to have this now, though, just PM me) |
#2 |
Senior Member
Join Date: Jun 2010
Location: Florida
Posts: 235
|
Zarlor,
I hear you, 2 years plus away from working in Hero Lab and zero gaming so I am way rusty as well. Your version of the code is like mine, it only applies the bonus to one of the Knowledge skills, never both. It will apply it to whichever you choose first. Go figure. I am just trying to finish up Beasts and Barbarians and move onto their Jalizar book and some others. I don't get to game anymore but still own the books and felt like working in Hero Lab again... I will keep plugging away at this until someone with more recent experience than you and I has a better suggestion |
#3 |
Senior Member
Volunteer Data File Contributor
Join Date: Aug 2009
Posts: 1,550
|
Ah...
It's the PERFORM. It's operating against the first skKnow it finds. It needs to address the eachpick. Not sure how to code that right off-hand (not at my home computer at the moment). I don't know if you can use the #traitprof, you may need to use: Code:
eachpick.field[trtRoll].value += 2 _ Currently In Development: Savage Pathfinder, SWADE Fantasy Companion Future Development: SWADE Super Powers Companion, SWADE Sci-Fi Companion _ Currently Running: Savage Unity Inc. (homebrew multiverse theme) Setting Files Supported: Deadlands: Reloaded, Flash Gordon, Gaslight, Hellfrost, Interface Zero 2.0, Seven Worlds, Slipstream, Solomon Kane Future Setting Files: Savage Judge Dredd |
#4 |
Senior Member
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321
|
Try this to mimic the #traitprof:
Code:
perform eachpick.field[trtNoStack].modify[+,2,"Demon Hunter"] Working on - |
#5 |
Senior Member
Volunteer Data File Contributor
Join Date: Aug 2009
Posts: 1,550
|
Oops, right - that should be trtNoStack, not trtRoll.
_ Currently In Development: Savage Pathfinder, SWADE Fantasy Companion Future Development: SWADE Super Powers Companion, SWADE Sci-Fi Companion _ Currently Running: Savage Unity Inc. (homebrew multiverse theme) Setting Files Supported: Deadlands: Reloaded, Flash Gordon, Gaslight, Hellfrost, Interface Zero 2.0, Seven Worlds, Slipstream, Solomon Kane Future Setting Files: Savage Judge Dredd |
#6 |
Senior Member
Join Date: Jun 2010
Location: Florida
Posts: 235
|
For some closure for others who might encounter this problem. The solution posted by
TCArknight solved the problem. Thank you very much to all who chime in with solutions. Cheers! |
#7 |
|
|