• 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

Monkey God

Well-known member
I am creating several cybernetic implants that grant various bonuses when in use. I have these bonuses show up in activated abilities because I want them to be disabled if the cybernetic implant gets damaged or stops functioning. Skill and Attribute bonuses work like a dream. My problem occurs when I try to incorporate feats and special abilities into the mix. For example, the implant Biofunction Regulator allows the character to function as if he had the feat Endurance. I can bootstrap Endurance on permanently but I would like to have it an activated ability so if the implant is damaged, the ability can be unchecked and the feat disappears.

Here is how I am creating all of my cybernetic implants:
I am creating them as Racial Specials because they are tied to a configurable tab that opens up when you take the cybernetics feat.
I have checked the "show in activated abilities list" and given the activation name that describes the bonus.
I create an eval script that defines the bonus that is activated.

In creating the script for adding the Endurance feat I cobbled together various pieces from different sources and came up with this.

~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)
~ If we're not activated, just get out now
if (field[abilActive].value = 0)then
perform assign[fInclude.fEndure]
endif

The script compiles ok, I don’t get any errors, but nothing happens when I check the activation button. I have tried a multitude of different timings and nothing seems to work. I don’t know if I am missing something or if the script itself is way off base (I think this is more likely). If anyone understands what I am trying to do and could point me in the right direction, I would praise you greatly.

Thanks
Scotti
 
~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)
~ If we're not activated, just get out now
if (field[abilActive].value = 0)then
perform assign[fInclude.fEndure]
endif

The only thing that you are doing with the perform assign portion is assigning the tag, not the feat. You cannot add feats in a script, they have to be bootstrapped.

What you can do is on the ability, assign a custom tag that you create, lets call it Custom.MGCybernet (MG being your initials for Monkey God). Those two characters are important to prevent conflicts with anything else.

So then, once you create the tag, you can assign it to the hero if the ability is active.
Code:
 First/250

~ If we're not activated, just get out now
      if (field[abilActive].value = 0)then
        perform assign[Custom.MGCybernet]
      endif

Then bootstrap the feat Endurance (fEndurance) to the ability, and on the Condition button of the bootstrap, you can set the custom tag as a requirement.

Code:
First/500

Custom.MGCybernet

You will then need to re-load (Ctrl-R), and NOT Test Now.

P.S. Also on the code you posted, you are using the shut-down code for a feat. If this was an ability, you would not use that one. (Note that there is NOT a shut-down code on the one I gave you above. That is important)

Code:
~ If we're disabled, do nothing
      doneif (tagis[Helper.FtDisable] <> 0)
 
Last edited:
I kind of figured it was the script...in that I steal my stuff from other areas and frankenstein it into what I am doing.

With that being said, I have never had the opportunity to define a custom tag, please explain.

P.S. Thanks for the rquick reply, it is much apreciated.
 
On the bottom right side of the editor, just above the button for Sources, there is a button for User Tags. If you hit edit, it will pull up a list. The first option on the list is -New Tag-. Click that and hit ok.

This will pull up a new window. The first section is the ID where you would put the id for your tag. In the above example, it would be MGCybernet. The next section is where you can put the description. Like Has Cybernetic Feat. Then hit ok.

At this point, you will need to save and test now. (You will notice that nothing is showing in the User Tag area as being marked.) You then need to go back into the tag area, and you will see that your tag is selected. Hit ok again, redo the Test Now, and now you will see that there is a x1 by the tag section. Then you can add the code above, and begin using reload, NOT test now.
 
Is the feat given when you take the racial special or you get the feat when you activate the implant? What Umarian is telling is for activation.

If you just want to give the feat when you take the racial special/implant then just bootstrap the feat. No scripting needed.
 
I am trying to get to activate...Bootstrapping would work but I find I would like it better to be able to de-activate the ability should the implant be damaged or non-functional.

Umarian: I have tried imputing it as you have suggested but the feat still does not show up when the ability is activated. :(
 
Sorry about that. I just used your code and made a couple of changes without testing it. Below is code that I actually did test, and it is working.

Code:
  <thing id="raMGCybern" name="Test" compset="RaceSpec">
    <fieldval field="actName" value="Test"/>
    <tag group="User" tag="Activation"/>
    <tag group="Helper" tag="ShowSpec"/>
    <tag group="Custom" tag="MGCybernet" name="Has Cybernetics"/>
    <bootstrap thing="fEndure">
      <containerreq phase="First" priority="400">Custom.MGCybernet</containerreq>
      </bootstrap>
    <eval phase="First" priority="200"><![CDATA[~ If we're not activated, just get out now
      if (field[abilActive].value <> 0)then
        perform hero.assign[Custom.MGCybernet]
      endif]]></eval>
    </thing>

So what does all mean? After we create the tag (as shown above,) let's start with assigning the tag.

Code:
First/200
~ If we're not activated, just get out now
      if (field[abilActive].value <> 0)then
        perform hero.assign[Custom.MGCybernet]
      endif

The code that you had written before was assigning the tag if the box was not checked. So we changed it from field[abilActive].value = 0 to field[abilActive].value <> 0. This means if the field abilActive is NOT 0 (Off is 0, on is 1) then assign the tag.

Then we bootstrap the feat to the Racial Special. We need to change the timing on that one from First/500 to First/400.

That should get it working for you.
 
Correct. Also worth mentioning....The line below....

Code:
perform hero.assign[Custom.MGCybernet]

Note that we are assigning the tag to the hero, not to the feat. Just doing perform assign will not get you the results you are after.
 
Perfect!! Thank you. This will work for other abilities like fly as well will it not?
xFly is a slightly different as xFly is already bootstrapped to EVERY hero. Same with all the Damage Reduction things.

So to get xFly to show up you simply add to its "abValue" before post-attributes/9000. This way you don't have to get into bootstrap condtions
Code:
~ If not active get out now!
doneif(field[abilActive].value <> 1) 

~ Set 30ft fly speed
#value[xFly] += 30
~ set maneuverability tag
perform hero.child[xFly].assign[Maneuver.Perfect]
The different Maneuverability tags are:
Maneuver.Perfect
Maneuver.Good
Maneuver.Average
Maneuver.Poor
Maneuver.Clumsy
 
Thanks for the help guys, it was much apreciated. By the way, I had to change the end of line 2 in the code from .value <> 1 to .value = 0. It kept giving me an error the other way. Once I changed it, it worked perfectly.

P.S. I am curious as to why I had to Ctrl-R instead of testing the item. It still wouldn't work even after I quick reloaded until after I tested anyway?

Again, thanks for the assist.
 
I have now run into another issue now. An implant gives a character all knowledge skills as class skills. I can make each skill a class skill individually but that is kind of a pain. However, when I substitute the [AllKnow] tag nothing happens: the exact scpript is this:

~ If we're not activated, just get out now
doneif (field[abilActive].value = 0)
#makeclassskill[AllKnow]

I'm sure it is probably me using the wrong script again.
Thanks for you time
 
You have to build a foreach loop to go through each Knowledge Skill. Then manually set the "Helper.ClassSkill" tag.

So I will help with the foreach loop part but the key is you only want to get each "Knowledge" skill. Timing is Pre-Levels/10000
Code:
~ make all knoweldge skills class skills
foreach pick in hero from BaseSkill where "XXXXXXXXXXXXXXXXXX"
   eachpick.assign[Helper.ClassSkill]
nexteach

The fun here is you have to find the right tag to fill into the "XXXXXXXXXXXXXXX" section. The "" are needed but the XXXX needs to change to a Group.Tag ID. One that identifies a skill as a Knowledge Skill.

So how do you do that? Great question. :D

Go to "Develop" menu inside HL and make sure that "Enable Data File Debugging" is turned on. If so then add a Knowledge skill to your character. It does not mater which. Then right click on the "?" and click on "Show Debug Tags". Then on the new window see which tag would identify the skill as a knowledge skill. Take that and fill it into the "XXXXXXXXXXXXXXXX". The value you want will be on the "Tag ID" column of the debug window.
 
I think I have found it. The tag ID would be Helper.SkCatKnow correct? However, I am getting a syntax error on line 3: unspecified error parsing script.

Additionally, I have noticed the "Activation #2 name" and am thinking I might have an implant that has more than one activation. is there a way to tie a script to the second activation name separate from the first?

As always, thanks for your imput.
 
Instead of "eachpick.assign[Helper.ClassSkill]" it should be "perform eachpick.assign[Helper.ClassSkill]". That should clear up your error.
 
Thanks for that...that did it! Now to the second question in the above post.

I have noticed the "Activation #2 name" and am thinking I might have an implant that has more than one activation. is there a way to tie a script to the second activation name separate from the first?
 
Activation # 1 puts a value into AbilActive field when it is used. (0 = not on, 1 = on)

Activation # 2 puts a value into AbilActive2, and so on. So if you want it to work when it is on, you would code it to look in one of those fields. (Power Attack is an example you can look at.)
 
Bad Shadow! Being busy with GenCon and all, leaving off an important part of the code. Shame shame! LOL
Yep damn having fun at GenCon!!:D

Actually I forget the perform allot as it just seems like a waste. The action assign should be enough for HL to know what to do.
 
Hmmm. I see where values are put into the two different areas in power attack, but that is not quite what I am looking for. Much like this code

~ If we're not activated, just get out now
doneif (field[abilActive].value = 0)

Determines whether or not the check box in Activation Name is marked or not, I was looking for something like

~ If we're not activated, just get out now
doneif (field[abilActive2].value = 0)

which would determine whether the check box in Activation #2 Name was marked or not, but that code does not work.


P.S. Glad you are having a great time at Gen Con (color me jealous). I have always wanted to go, but living way out west makes the cost prohibitive. Knock em dead, I can't wait for Real Works.
 
Back
Top