Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - D&D 5th Edition SRD

Notices

Reply
 
Thread Tools Display Modes
spannclann
Member
 
Join Date: Aug 2018
Location: Texas
Posts: 87

Old November 15th, 2020, 09:57 AM
I am trying to create an Amulet of Protection from Good where the character gets +1 to AC when fighting enemies with a good alignment. I can get the +1 added easily BUT I need to know how to make it conditional vs good.
spannclann is offline   #1 Reply With Quote
dungeonguru
Senior Member
 
Join Date: May 2016
Posts: 608

Old November 16th, 2020, 09:47 AM
I'm not sure how you're wanting to see the conditional work, generally speaking, trying to check alignments of other "entities" in the portfolio is complex. I've not seen any code examples aside from stuff that affects minions.

You can give the player the option to turn the AC bonus on/off manually on the in-play tab by using the abilActive field. To make an item use this field you need to make sure the checkmark next to Show in Activated Abilities List? is checked.

Here's a script example of how you might do this (generally running post-attributes 10000 timing but you may need to play with timing):

Code:
~ leave script if not equipped
doneif (field[gIsEquip].value = 0)
~ leave script if not attuned
doneif (field[gIsAttuned].value = 0)
~ leave script of not activated
doneif (field[abilActive].value = 0) 
~ otherwise add 1 to the AC bonuses
hero.childfound[ArmorClass].field[Bonus].value += 1
If you're looking to add the situational text and an asterisk by armor class, you can try something like

Code:
#situational[hero.childfound[ArmorClass],"Bonus to AC vs good creatures",field[thingname].text]
but I don't think the Armor Class field supports that consistently or at all.
dungeonguru is offline   #2 Reply With Quote
spannclann
Member
 
Join Date: Aug 2018
Location: Texas
Posts: 87

Old November 16th, 2020, 09:53 AM
Quote:
Originally Posted by dungeonguru View Post
I'm not sure how you're wanting to see the conditional work, generally speaking, trying to check alignments of other "entities" in the portfolio is complex. I've not seen any code examples aside from stuff that affects minions.

You can give the player the option to turn the AC bonus on/off manually on the in-play tab by using the abilActive field. To make an item use this field you need to make sure the checkmark next to Show in Activated Abilities List? is checked.

Here's a script example of how you might do this (generally running post-attributes 10000 timing but you may need to play with timing):

Code:
~ leave script if not equipped
doneif (field[gIsEquip].value = 0)
~ leave script if not attuned
doneif (field[gIsAttuned].value = 0)
~ leave script of not activated
doneif (field[abilActive].value = 0) 
~ otherwise add 1 to the AC bonuses
hero.childfound[ArmorClass].field[Bonus].value += 1
If you're looking to add the situational text and an asterisk by armor class, you can try something like

Code:
#situational[hero.childfound[ArmorClass],"Bonus to AC vs good creatures",field[thingname].text]
but I don't think the Armor Class field supports that consistently or at all.

I guess I should have specified what I wanted exactly. However, I was looking the situational text and an asterisk by armor class. I will give this a shot and see what happens.
spannclann is offline   #3 Reply With Quote
spannclann
Member
 
Join Date: Aug 2018
Location: Texas
Posts: 87

Old November 16th, 2020, 02:02 PM
It does not show the asterisk by Armor Class
spannclann is offline   #4 Reply With Quote
Reply

Thread Tools
Display Modes

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 10:29 PM.


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