Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
@Sendric, The key to this is not to put any conditionals in this, they just don't work with armors and weapons because of the parent/child relationships of magical items (which include masterwork, unfortunately). I scripted everything so that it would work, which I thought I had added somewhere in here. I don't exclude the Shield Bash if the shield isn't equipped, though it could be possible, but I would script it rather than employing the conditionals. The conditionals are so hard to manage with all the timing issues.
You could try assigning the Helper.Shadow tag via script to the Shield Bash based on whether it is equipped or not, but that is the only way I could think to do that at the moment. If you take this route, you'll have to manage the field based on if it is magical, so with a magical (or masterwork) shield you can transition to the shield by checking the container.parent.gIsEquip.value (the parent (shield)/child (iMagxxx) relationship). Did that help any? |
#31 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
Here is the code I was referring to, you should be able to get something out of it, mine was in the Final Phase just to make sure all timing issues with the shield had resolved. I had also forgotten to mention the gizmo part as well.
Code:
~ Work out if we're equipped or, if we're the child of a magic item, ~ if our parent is equipped. var result as number result = field[gIsEquip].value if (container.ishero = 0) then result += container.parent.field[gIsEquip].value endif ~ If shield bash is being used, allow for use of shield and bash. ~ Remove shield AC if equipped, unless Improved Shield Bash exists. if (result <> 0) then var ac as number if (container.ishero = 0) then if (container.parent.gizmo.child[wShldBash].field[gIsEquip].value <> 0) then perform hero.assign[Hero.ShldOffOK] if (#hasfeat[fImpShdBsh] = 0) then ac = container.parent.field[mAC].value + container.parent.field[BonEnhance].value endif elseif (container.parent.gizmo.child[wShldBash].field[wIs2nd].value <> 0) then perform hero.assign[Hero.ShldOffOK] if (#hasfeat[fImpShdBsh] = 0) then ac = container.parent.field[mAC].value + container.parent.field[BonEnhance].value endif endif elseif (hero.child[wShldBash].field[gIsEquip].value <> 0) then perform hero.assign[Hero.ShldOffOK] if (#hasfeat[fImpShdBsh] = 0) then ac = field[mAC].value endif elseif (hero.child[wShldBash].field[wIs2nd].value <> 0) then perform hero.assign[Hero.ShldOffOK] if (#hasfeat[fImpShdBsh] = 0) then ac = field[mAC].value endif endif hero.child[ArmorClass].field[tACShield].value -= ac endif Last edited by Kendall-DM; June 13th, 2014 at 02:35 PM. |
#32 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Thanks, Kendall! I'll check into this as soon as I get a chance. I like the idea of assigning Helper.Shadow in a script. That seems like it should do the trick.
|
#33 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Helper.Shadow is checked for before the phase & priority sequence starts, so there's no timing you can assign it at in order to get something to become shadowed based on a script. You need to assign it as an autotag of the bootstrap, or as part of the item's definition.
You may be able to assign tags that hide it, if it's not supposed to be shown. |
#34 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Quote:
|
|
#35 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
Bugger, I knew there was some reason why I showed all my Shield Bashes if there were multiple shields on a hero. I must have tried this and failed to get it to work, then just resigned myself to the multiple ones showing. I would just show all the Shield Bashes and let it rest at that, unless you can find a way to hide an equipped item.
|
#36 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Looks like there's not a good one for d20 at this time.
|
#37 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Quote:
|
|
#38 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Ok. Took a bit of work, but I got it. I created a new tag and gave it to each shield (if you don't give it to at least one, you can't use it). This tag apparently gets transferred to the custom shield automatically, so all I need to do is delete it if the item isn't equipped:
Code:
if (container.ishero = 0) then if (container.parent.field[gIsEquip].value = 0) then perform container.delete[User.ShldBash] endif endif Code:
fieldval:gIsEquip <> 0 | User.ShldBash |
#39 |
Senior Member
Join Date: Oct 2011
Posts: 865
|
Awesome! Looking forward to it.
Hopefully it wont be too difficult to get the magical "bashing" property of shields to work with your shield bash (unless youve already done that)? |
#40 |
|
|