• 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

Activated Feats and Special Abilities

This is the whole code:

~ If we're not activated, just get out now
doneif (field[abilActive2].value = 0)
~ Add +4 to all Knowledge Skills
foreach pick in hero from BaseSkill where "Helper.SkCatKnow"
eachpick.field[Bonus].value += 4
nexteach

The error message is as follows:

Syntax error in 'eval' script for Thing 'rcDArchive' (eval Script '#2') on line 2
-> Invalid id specified for field

The code does work when it reads (field[abilActive].value = 0 just not with the added '2'.
 
Last edited:
2 Quick questions

1. What timing are you using?
2. Why Racial Custom Special and not Racial Special? Is this on purpose, or just don't know the difference?
 
ok so I told you wrong. It is abilAct2, not abilActive2....

Code:
Post-levels/10000
~ If we're not activated, just get out now
doneif (field[abilAct2].value = 0)
~ Add +4 to all Knowledge Skills
foreach pick in hero from BaseSkill where "Helper.SkCatKnow"
    eachpick.field[Bonus].value += 4
nexteach
 
Thanks for that...I was using pre-levels/10000

I am also using racial custom special because the abilities are tied to a configurable.
 
That timing would probably work. I just set it later because I wasn't sure what all you were doing.

Just wanted to make sure that you weren't using the wrong one. Have fun.
 
ok so I told you wrong. It is abilAct2, not abilActive2....

Code:
Post-levels/10000
~ If we're not activated, just get out now
doneif (field[abilAct2].value = 0)
~ Add +4 to all Knowledge Skills
foreach pick in hero from BaseSkill where "Helper.SkCatKnow"
    eachpick.field[Bonus].value += 4
nexteach
So keep in mind a "foreach" loop is very CPU intensive and as we have to worry about running on iPads now we want to use the best method. So instead you can simply add to the "AllKnowledge" thing.

Code:
~ Set abVlalue 2 so that a outside Thing can adjust this value
field[abValue2].value += 4
~ If we're not 2nd activated then add to knowledge
If (field[abilAct2].value <> 0) Then
   ~ Add +4 to all Knowledge Skills 
   hero.child[AllKnow].field[Bonus].value += field[abValue2].value
Endif

So I also added the logic of using the abValue fields as its a good habit to form now. The reason is that the only way to adjust the value from the outside is to change the abValue2.

So this allows say a "feat" to increase the value very easily:
Code:
#value2[rcDArchive] += 2
 
Another question involving cybernetics

Here is another question, similar to those I have asked in the past regarding cybernetis. I am creating a cybernetic implant that increases the reach of a character without increasing the character's size. I am not sure how to do that. Specifically, the implant allows a reach increase from 5' to 10'.
 
Take a look at the fields on the Hero. Do you see anything that look like it holds the "Reach" value of a hero?

To see fields/tags go to "Tools->Enable data file debugging". Then select "Tools->Show Fields->Hero Fields. I am not near HL so the wording may not be exact for the menu's but should get you their.
 
Back
Top