• 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

Detecting abilities linked to skills

frumple

Well-known member
I am trying to implement the various insanities as adjustments. Some of them require a penalty to all skills with a certain base attribute, CHA for example. Is there a way to pick out all skills that are linked to specific attribute?
 
Doh... found a way to do it in another thread... here is the code I used (for CHA skills)

Code:
foreach pick in hero from BaseSkill
  if (eachpick.tagis[SkillOver.aCHA] <> 0) then
      eachpick.field[Bonus].value -= 4
  elseif (eachpick.islinkage[skillattr] <> 0) then
    if (eachpick.linkage[skillattr].tagis[thingid.aCHA] <> 0) then
       eachpick.field[Bonus].value -= 4
    endif
  endif
nexteach
 
Doh... found a way to do it in another thread... here is the code I used (for CHA skills)
Just as a FYI I think you could simplify the above code a little to:
Code:
~ loop through all the skills on the hero
foreach pick in hero from BaseSkill
  ~ If we are a Charisma based skill give a -4 Penalty
  If (eachpick.tagis[SkillOver.aCHA] + eachpick.linkage[skillattr].tagis[thingid.aCHA] <> 0) then
       eachpick.field[Penalty].value += -4
  Endif
nexteach
Guess the only difference I am not 100% sure about is if the "eachpick.islinkage[skillattr]" really needs to be checked.

Also just an FYI but if giving a penalty you should use the Penalty field not Bonus. Mathematically it works out the same but if you wanted to know if a skill has a penalty checking field[Penalty].value would give 0 even though you actually had given it a -4 penalty.
 
I'd say do use islinkage[] - you don't know if some 3PP thing down the road will add a skill that doesn't have an associated attribute, and HL's editor will allow you to create skills without attribute linkages. Using linkage[skillattr] will give errors if it's not connected to anything, which is what islinkage[skillattr] tests.
 
I'd say do use islinkage[] - you don't know if some 3PP thing down the road will add a skill that doesn't have an associated attribute, and HL's editor will allow you to create skills without attribute linkages. Using linkage[skillattr] will give errors if it's not connected to anything, which is what islinkage[skillattr] tests.
Ahh. Thanks Mathias.

I actually have skills in my game actually that are NOT linked to a attribute. I was hoping though that HL would just return 0 if no linkage existed. :)
 
Frumple, I think we're working on the same book in the council of thieves AP. Maybe we need to collaborate otherwise duplicate data is going to arise. :D
 
Actaully this was for the various types of insanity. I needed to implement paranoia for Serpent's Skull.

For CoT I have done all the monsters from Bestiary (though I still cannot get the False Divinity ability of the Advodaza Devil working... ). Right now I am working on Legacy of Fire.
 
Actaully this was for the various types of insanity. I needed to implement paranoia for Serpent's Skull.

For CoT I have done all the monsters from Bestiary (though I still cannot get the False Divinity ability of the Advodaza Devil working... ). Right now I am working on Legacy of Fire.

Ahh, that explains a lot, Paranoia also appears in the Council of Thieves. I too can't get the Advodaza Devil divine ability working, it's an all or nothing solution ATM.

If I read correctly you've done ALL the monsters from CoT? Including the ones previously entered? :confused:
 
I have been doing them my own as a way of teaching myself the scripting language.... I am not submitting them to the community to avoid overlap except to for the ones I am explicitly doing for the community (such as Serpent's Skull which I just submitted to SC).
 
Back
Top