Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - D&D 5th Edition SRD (http://forums.wolflair.com/forumdisplay.php?f=89)
-   -   Getting at a hero's natural weapon in the editor (http://forums.wolflair.com/showthread.php?t=55825)

CNYGamer May 15th, 2016 09:45 AM

Getting at a hero's natural weapon in the editor
 
I'm trying to implement the wereraven from Curse of Strahd. I have a beak attack set up as a natural weapon. Depending on which form the wereraven is in, it may get its Dexterity bonus to damage on the beak attack.

So basically, in the wereraven's shapechanger racial special, I have the following script:

Code:

if (field[abilActive].value <> 0) then
  perform assign[Helper.ChgDisab2]
endif
if (field[abilAct2].value <> 0) then
  perform assign[Helper.ChgDisab1]
endif

This is ensuring that only one shapechange form can be selected at a time. abilActive is the hybrid form and abilAct2 is the raven form.

The beak natural weapon is wBeak. The tag on wBeak that I want to change is DamageOver. If in the hybrid form, DamageOver should be set to aDEX. If in the raven form, it's value should be cleared out completely.

In pseudocode, I'm trying to basically do the following (pseudocode in red):

Code:

if (field[abilActive].value <> 0) then
  <Set the value of wBeak.DamageOver to aDEX>
  perform assign[Helper.ChgDisab2]
endif
if (field[abilAct2].value <> 0) then
  <Clear out the value of wBeak.DamageOver>
  perform assign[Helper.ChgDisab1]
endif

I haven't really gotten the hang of getting at the various data structures in Hero Lab. Would anyone be able to show me the real code I need in place of the pseudocode above?

Thanks!
CNYGamer

CNYGamer May 15th, 2016 03:32 PM

Okay, so I retract the question. I did some reading on tags this afternoon and I see now that I was conceptualizing them wrong. They aren't things you set various values to, they are things you set on other things. So I solved my issue with the following syntax:

Code:

if (field[abilActive].value <> 0) then
  perform assign[Helper.ChgDisab2]
  perform hero.child[wBeak].assign[DamageOver.aDEX]
endif
if (field[abilAct2].value <> 0) then
  perform assign[Helper.ChgDisab1]
  perform hero.child[wBeak].delete[DamageOver.aDEX]
endif


Aaron May 16th, 2016 04:42 PM

Nice! Good job!

CNYGamer May 17th, 2016 03:29 PM

I'm wondering, though, if there is a way to get the Beak attack to disappear from the character sheet altogether if the character is in human form. So something like (pseudocode in red):

Code:

if (field[abilActive].value = 0) then
  if (field[abilAct2].value = 0) then
      <Remove Beak from visibility in the weapon section>
  endif
endif


ShadowChemosh May 17th, 2016 03:44 PM

Quote:

Originally Posted by CNYGamer (Post 229859)
I'm wondering, though, if there is a way to get the Beak attack to disappear from the character sheet altogether if the character is in human form. So something like (pseudocode in red):

Code:

if (field[abilActive].value = 0) then
  if (field[abilAct2].value = 0) then
      <Remove Beak from visibility in the weapon section>
  endif
endif


Try assigning the tag "Hide.Weapon" to the wBeak Pick. Assuming that logic came over from Pathfinder that will hide the weapon from display UI and the printed character sheet.

CNYGamer May 17th, 2016 04:10 PM

Quote:

Originally Posted by ShadowChemosh (Post 229862)
Try assigning the tag "Hide.Weapon" to the wBeak Pick. Assuming that logic came over from Pathfinder that will hide the weapon from display UI and the printed character sheet.

Perfect! That worked nicely. Thanks much.


All times are GMT -8. The time now is 07:20 AM.

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