Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
So taking the foreach loop from VS feat. Code:
~ Loop through all weapons on the hero except Touch Attacks ~ and any Ammunition. foreach pick in hero from BaseWep where "!(thingid.wRay|wCategory.Ammunition|thingid.wTouch|wCategory.AmmoCart)" nexteach We need to add logic so that we only find weapons that have the Foe-Biter ability: Code:
~ Loop through all weapons that have Foe-Biter ability foreach pick in hero from BaseWep where "HasAbility.laFoeBite" nexteach This should cause your logic to now run on any Foe-Biter weapon on your character. Hero Lab Resources: Pathfinder - d20pfsrd and Pathfinder Pack Setup 3.5 D&D (d20) - Community Server Setup 5E D&D - Community Server Setup Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources. Created by the community for the community - Realm Works kickstarter backer (Alpha Wolf) and Beta tester.- d20 HL package volunteer editor. |
|
#11 |
Member
Join Date: Jan 2015
Location: Wellington, NZ
Posts: 91
|
I have changed it all around to use that logic - and now it does not do anything at all!
I cannot figure out why not - as far as i can see and am able to check this should work, unless it is because of the timing (it is Render phase, Priority 200,000) Here is the current code Code:
doneif (field[abilActive].value = 0) var iX as number iX=1 ~ Loop through all weapons that have Foe-Biter ability foreach pick in hero from BaseWep where "HasAbility.laFoeBite" ~ Assume one handed damage iX = 0 ~ If two handed weapon set to two-handed damage If (eachpick.tagis[wClass.TwoHanded] <> 0) Then iX = 1 ~ If one handed and used in two hands then damage is two-handed ElseIf (eachpick.tagis[wClass.OneHanded] + eachpick.tagis[Hero.MainHand] + eachpick.tagis[Hero.OffHand] = 3) Then iX = 1 ~ If used in off-hand ElseIf (eachpick.tagis[Hero.OffHand] - eachpick.tagis[Hero.MainHand] = 1) Then iX = 4 Endif ~checks if the weapons are legendary and equipped if (eachpick.field[gIsLegend].value <> 0 ) then if (eachpick.field[gIsEquip].value <> 0) then ~Changes the damage shown eachpick.field[wFixDamage].text = "(" & eachpick.field[wDamageTbl].arraytext[iX] & ") x2" eachpick.field[wDamExtra].text = "" endif endif nexteach |
#12 |
Member
Join Date: Jan 2015
Location: Wellington, NZ
Posts: 91
|
Sorted it out - IaFoeBite needed to be replace with the ID of my version.
|
#13 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
I try and never ever use the Replace Thing ID as it always comes back to bit me later. So I "assumed" this was on a Mechanic script that would be looking to Modify Foe-Bite weapons. Hero Lab Resources: Pathfinder - d20pfsrd and Pathfinder Pack Setup 3.5 D&D (d20) - Community Server Setup 5E D&D - Community Server Setup Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources. Created by the community for the community - Realm Works kickstarter backer (Alpha Wolf) and Beta tester.- d20 HL package volunteer editor. |
|
#14 |
Member
Join Date: Jan 2015
Location: Wellington, NZ
Posts: 91
|
I have never tried that, or even known it was possible. how do you do it as a mechanic?
|
#15 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
This lets you setup or run "global" scripts for all characters. I have one of these setup for each and Every community Pack actually. In addition I use this as a place to define any "global" dynamic tags as a mechanic always loads and becomes live so those "Tags" then are always around and in a central place. One step further on this logic is to not make new scripts ON the mechanic itself and instead make a "Simple" Thing to hold the script logic. Then I bootstrap the Simple Thing to the Mechanic Thing and the Simple Thing comes along and will also be "live" on all characters. What makes this so nice is you can then put a Source to the "Simple" thing and only when that "Source" is turned on does your Script execute now. HERE is a link to the Simple Thing used in the Campaign Pack to hide all non-Eberron Deities. Its source marked to a option called "Hide Non-Eberron Deities". If you look up further in that link you will see the Campaign Mechanic with different Simple Helper Things attached to it. Guess that maybe more info than you wanted but hopefully it helps... Hero Lab Resources: Pathfinder - d20pfsrd and Pathfinder Pack Setup 3.5 D&D (d20) - Community Server Setup 5E D&D - Community Server Setup Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources. Created by the community for the community - Realm Works kickstarter backer (Alpha Wolf) and Beta tester.- d20 HL package volunteer editor. |
|
#16 |
Member
Join Date: Jan 2015
Location: Wellington, NZ
Posts: 91
|
Hi Shadow,
I have tried putting it into a mechanic, but of course, i want this to be an activatable acitivity, and I am not sure how to get an activation checkbox to appear using the mechanic method. When you talked about making that simple "Thing", where do you do that in the editor? I like the idea, but I have no experience of this sort of methodolgoy, though I am keen enough to lean! |
#17 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,207
|
|
#18 |
Thread Tools | |
Display Modes | |
|
|