• 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

Add Custom special activation effects

bodrin

Well-known member
Hi,

I'm either suffering a brain melt down or I just can't grasp this at the moment.

I have a randomly determined set of qualities which i'd like to bootstrap and add to a Skeleton template via an activated Racial Custom Special here's an example
"Missing one arm. The skeleton only gets one claw attack or weapon attack and can't use two-handed weapons."

So I've created the template, Custom Special got it to show on the specials tab after reactivating the special ability, which the skeleton template deactivates by default.

Now i'm trying to delete the Claws x 2 and just have a Claw attack, next i'll need to make two handed weapons invalid, but i'm concentrating on deleting one claw attack first.

Here's the script on the Template

First 100

Code:
~find the copy of missing one arm added by our decrepit skeleton template renable and show it
      var searchexpr as string
      searchexpr = "SpecSource.tmB0MFSSkD & thingid.xB0DMFSBoS"
      perform hero.findchild[Ability,searchexpr].delete[Helper.SpcDisable]
      perform hero.findchild[Ability,searchexpr].assign[Helper.ShowSpec]

Here's the script, i'm using, on the Special

Final Phase 50000

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

~ We only get one claw attack.
perform hero.findchild[BaseNatWep,"IsWeapon.wClaw"].assign[Helper.NatPrimary]
perform hero.findchild[BaseNatWep,"IsWeapon.wClaw"].delete[Target2.wClaw]

It compiles but doesn't delete one claw attack???

Screenshot should be attached

Any thoughts
 
I believe skeletons have their claws set up to have a number of attacks = the hero's number of hands. Look through the hero fields, and use the filter to find "hand" - you should be able to subtract from that, which will reduce the number of claws, and keep the skeleton from using two-handed weapons.
 
I've ploughed through this problem and got the activation / script to work.

Finished Code for Reference. (There are other scripts that run on the main bootstraps)

First 100

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

~ We only get one claw attack.
perform hero.findchild[BaseNatWep,"IsWeapon.wClaw"].delete[Helper.RaceHands]
However I now have a problem with another ability altering the BASE SPEED of the creature once activated

"Missing one or both legs." It takes a - 4 penalty to Dexterity and its speed is reduced to 5 feet. It cannot take a 5-foot step.

I've coded the Dexterity penalty and it works as expected but I can't figure out how to set the speed to 5, I can modify the speed with penalty and bonuses but it doesn't set the speed to 5 only.

For example

Code:
~ Add a +10 foot Enhancement Bonus to our speed
hero.child[Speed].field[BonEnhance].value = maximum(hero.child[Speed].field[BonEnhance].value, 10)
I've tried tSpeedMod but it just adds to the total speed.

Script i'm currently testing,
First 100

Code:
~and we reduce our speed to 5 feet
hero.child[Speed].field[tSpeed].value += field[tSpeed].value
Error meesage
Attempt to access field 'tSpeed' that does not exist for thing 'rcB0DMFSOL'

Also tried

Code:
~and we reduce our speed to 5 feet
hero.child[Speed].field[aNormForce].value = 5

Error Message

Attempt to access field 'aNormForce' that does not exist for thing 'Speed'

I've also looked at the feat "Fleet" for ideas.

Any thoughts?

Thanks in advance.
 
Last edited:
Maybe set the focus to any race currently on the hero, and set the rSpeed field to 5, very early. Like First 500 or so.
 
Done and Done!!

Working Scripts for reference.

Script 1

Apply a -4 penalty to Dexterity when activated.

First 100

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

~ We apply a -4 penalty to dexterity
hero.child[aDEX].field[Penalty].value = hero.child[aDEX].field[Penalty].value - 4

Script 2

Reduce our speed to 5 feet when activated.

First 100

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

  ~set our focus to the hero's base race
   perform hero.findchild[BaseRace].setfocus
   doneif (state.isfocus = 0)
      ~ then set the speed to 5
        focus.field[rSpeed].value =5

I really like the warm fuzzy feeling when something goes to plan after all the toil and frustratingly difficult testing on coding.

Thanks to everyone that's helped with suggestions.

:D:)
 
Back
Top