Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old June 13th, 2014, 02:25 PM
@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?
Kendall-DM is offline   #31 Reply With Quote
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old June 13th, 2014, 02:29 PM
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.
Kendall-DM is offline   #32 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old June 13th, 2014, 05:53 PM
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.
Sendric is offline   #33 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old June 13th, 2014, 08:56 PM
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.
Mathias is offline   #34 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old June 14th, 2014, 07:06 AM
Quote:
Originally Posted by Mathias View Post
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.
Ok, thanks. Is there a tag to hide a weapon if we don't want it shown?
Sendric is offline   #35 Reply With Quote
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old June 14th, 2014, 07:58 AM
Quote:
Originally Posted by Mathias View Post
Helper.Shadow is checked for before the phase & priority sequence starts...
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.
Kendall-DM is offline   #36 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old June 14th, 2014, 07:59 AM
Looks like there's not a good one for d20 at this time.
Mathias is offline   #37 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old June 14th, 2014, 03:16 PM
Quote:
Originally Posted by Kendall-DM View Post
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.
The other option would be to modify the gIsEquip field. I tried that, but to my knowledge it requires the trustme command which is somewhat volatile. Perhaps if there is some other field on the shield that we could modify, but that wouldn't otherwise be used, that might work. I'll have to give it some thought.
Sendric is offline   #38 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old June 19th, 2014, 07:16 AM
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
I then created the following bootstrap condition:

Code:
fieldval:gIsEquip <> 0 | User.ShldBash
So, I think I'm all set with this now. It will be in the next release. Thanks for all the help, everyone!
Sendric is offline   #39 Reply With Quote
mirtos
Senior Member
 
Join Date: Oct 2011
Posts: 865

Old June 19th, 2014, 12:28 PM
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)?
mirtos is offline   #40 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 02:27 AM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.