• 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

Weapon/Armor Special abilities.

TobyFox2002

Well-known member
Trying to create a bootstrap that will add the special qualities granted by an item power to the heroes special list.

Proof against transmutation:

Code:
      if (container.parent.field[gIsEquip].value <> 0) then
         container.parent.field[hTotal].value = 1
        endif

Bootstrap condition:
Code:
container.parent.fieldval:hTotal = 1

This doesn't work is there a way to do this? Or is it a lost cause.

Also is there way to connect item powers or special materials to magic weapons and armors so I don't have to code them each individually.
 
This thread here will tell you everything you need to know about bootstrap conditions. I highly recommend it. I reference it often. There are also a couple other useful threads, all linked from this one. These are, of course, directed towards the Pathfinder editor, but Pathfinder was built on the d20 system, so a lot of it still applies.

That said, you can't set a condition against a field in the parent thing. Also, I don't think you can bootstrap something to an item power and have it show up in the hero's specials tab. If you could, my recommendation would be to have the item power create a new tag that it sets on itself if the parent field hTotal = 1, then have the bootstrap condition look for the tag. You would need to set the timing on the script earlier than the bootstrap condition which, in turn, needs to be earlier than any script run on the thing being bootstrapped.

As for your second question, I don't actually understand what you are trying to do. Can you elaborate?
 
Example:

One Thousand Broken Dreams is a magic weapon, it is equivalent to a +3 Holy Drow Bane longsword.

Is there a way to connect the item power Holy and Bane to it so I wouldn't need to script it out. For one or two weapons, its not a problem but when you are dealing with many. It would be more simple if you could just link the abilities to the magic weapon.
 
No, I don't think you can connect the item powers to it. However, Item Powers don't really do anything other than add to the name, which you don't want to do anyway. In this case, I would use the gizmo button to attach the longsword, then just cut and paste the Holy and Bane descriptions in, editing as needed. Not really ideal, though.
 
No, I don't think you can connect the item powers to it. However, Item Powers don't really do anything other than add to the name, which you don't want to do anyway. In this case, I would use the gizmo button to attach the longsword, then just cut and paste the Holy and Bane descriptions in, editing as needed. Not really ideal, though.

No but some of them have scripts, which is the point. But anyways, I'll just copy and paste as needed i guess.

I know this is slightly, unrelated.

but is there any example that shows how I can take the base attack of a creature and move that bonus to deflection.

Code:
~ A telthor looses its natural armor bonus but gains a deflection equal to what its natural armor was.

var armorBon as number
armorBon = hero.child[ArmorClass].field[tACNatural].value

hero.child[ArmorClass].field[tACDeflect].value = maximum(hero.child[ArmorClass].field[tACDeflect].value, armorBon)
doesnt seem to work. When checking the floating selection fields for ArmorClass the deflection reads "1" no matter what the base creature's natural armor is.
 
No but some of them have scripts, which is the point. But anyways, I'll just copy and paste as needed i guess.

Sorry. All I can suggest is to just copy and paste the scripts. I don't know of any other way to handle it.

I know this is slightly, unrelated.

but is there any example that shows how I can take the base attack of a creature and move that bonus to deflection.

Code:
~ A telthor looses its natural armor bonus but gains a deflection equal to what its natural armor was.

var armorBon as number
armorBon = hero.child[ArmorClass].field[tACNatural].value

hero.child[ArmorClass].field[tACDeflect].value = maximum(hero.child[ArmorClass].field[tACDeflect].value, armorBon)
doesnt seem to work. When checking the floating selection fields for ArmorClass the deflection reads "1" no matter what the base creature's natural armor is.

The code looks fine to me, so its probably a timing issue. Most likely the deflection bonus is getting set by something else later than your script is running. Try running it in Final Phase or even Render. Another thing that you can do is look at the timing on various things in your portfolio much the same as you look at fields. Use "Show Selection Tasks" and pick ArmorClass. It might give you an idea of when something is setting the Deflection Bonus. I find this to be useful about 50% of the time.
 
The code looks fine to me, so its probably a timing issue. Most likely the deflection bonus is getting set by something else later than your script is running. Try running it in Final Phase or even Render. Another thing that you can do is look at the timing on various things in your portfolio much the same as you look at fields. Use "Show Selection Tasks" and pick ArmorClass. It might give you an idea of when something is setting the Deflection Bonus. I find this to be useful about 50% of the time.

Got some sleep, took a look a the code, apparently most of the scripting I did was redundant because it was already in the incorporeal subtype I added, now I just need to find a way to override the CHA to deflection most incorporeals get, and replace it with Nat armor to Deflection
 
Back
Top