Member
Join Date: Jun 2018
Posts: 83
|
I am trying to create a barbarian-like ability where you can choose three damage types, and when you are raging, you have resistance to them. I think I'm on the right track in terms of coding, but when I test the power, the dropdown has a ton of stuff but not the damage types. Additionally I only see 2 dropdowns. I'm sure it is something simple like having the wrong tag name, but I don't know exactly what to use. Here is the code:
Code:
<thing id="cBerPRDewbInst" name="Dewback's Instinct" description="Choose three damage types other than true damage. While raging, you have resistance to the chosen damage types." compset="CustomSpec" uniqueness="unique"> <fieldval field="usrCandid1" value="component.DamageType & (dType.Acid|dType.Cold|dType.Fire|dType.PRForce|dType.PRIon||dType.Lightning|dType.Necrotic|dType.Poison|dType.Psychic|dType.PRSonic) & !Helper.Helper"/> <fieldval field="usrCandid2" value="component.DamageType & (dType.Acid|dType.Cold|dType.Fire|dType.PRForce|dType.PRIon||dType.Lightning|dType.Necrotic|dType.Poison|dType.Psychic|dType.PRSonic) & !Helper.Helper"/> <fieldval field="usrCandid3" value="component.DamageType & (dType.Acid|dType.Cold|dType.Fire|dType.PRForce|dType.PRIon||dType.Lightning|dType.Necrotic|dType.Poison|dType.Psychic|dType.PRSonic) & !Helper.Helper"/> <tag group="Helper" tag="Primary"/> <tag group="abCategory" tag="BersInstinct"/> <tag group="abRange" tag="Personal"/> <tag group="abDuration" tag="ConstRage"/> <tag group="SpecSource" tag="cHelpBrs"/> <tag group="Helper" tag="Helper"/> <tag group="Helper" tag="Free"/> <eval phase="First" index="3"><![CDATA[ doneif (hero.tagis[Hero.Raging] = 0) doneif (tagis[Helper.Disable] <> 0) ~ If nothing chosen then get out now! doneif (field[usrChosen1].ischosen = 0) doneif (field[usrChosen2].ischosen = 0) doneif (field[usrChosen3].ischosen = 0) ~ Collect selected types of damage and pull the Resistance tags from them. perform field[usrChosen1].chosen.pulltags[DamageRes.?] perform field[usrChosen2].chosen.pulltags[DamageRes.?] perform field[usrChosen3].chosen.pulltags[DamageRes.?] perform forward[DamageRes.?]]]></eval> </thing> |
#1 |
Senior Member
Join Date: Sep 2017
Posts: 600
|
EDIT: Thinking about the third box thing; if all else fails, you can always make a second copy of this feature that just features the third box and bootstrap it to the first copy. It's less elegant, but it works. Found an issue with or have a suggestion for the 5e Community Pack? Please post it here at our GitHub. Feel free to stop by the Lone Wolf Development Subreddit, for discussion of any and all LWD products and community efforts! Last edited by Fenris447; October 27th, 2021 at 02:03 PM. |
#2 |
Member
Join Date: Jun 2018
Posts: 83
|
1. I wasn't sure if that could be done. Your workaround should do it once I get the first two working
2. Changed the formula to Code:
<fieldval field="usrCandid1" value="component.DamageType & (thingid.dtAcid|thingid.dtCold|thingid.dtFire|thingid.dtPRForce|thinid.dtPRIon||thingid.dtLightning|thingid.dtNecrotic|thingid.dtPoison|thingid.dtPsychic|thingid.dtPRSonic) & !Helper.Helper"/> Code:
<eval phase="First" index="3"><![CDATA[ doneif (hero.tagis[Hero.Raging] = 0) doneif (tagis[Helper.Disable] <> 0) ~ If nothing chosen then get out now! doneif (field[usrChosen1].ischosen = 0) doneif (field[usrChosen2].ischosen = 0) doneif (field[usrChosen3].ischosen = 0) ~ Collect selected types of damage and pull the Resistance tags from them. perform field[usrChosen1].chosen.pulltags[DamageRes.?] perform field[usrChosen2].chosen.pulltags[DamageRes.?] perform field[usrChosen3].chosen.pulltags[DamageRes.?] perform hero.pushtags[DamageRes.?]]]></eval> 5. Yes, it's the text editor. The "amp;" doesn't show up in the Editor. Last edited by DeathSheep; October 27th, 2021 at 02:46 PM. Reason: Fixing a tag |
#3 |
Member
Join Date: Jun 2018
Posts: 83
|
1. I wasn't sure if that could be done. Your workaround should do it once I get the first two working
2. Changed the formula to Code:
<fieldval field="usrCandid1" value="component.DamageType & (thingid.dtAcid|thingid.dtCold|thingid.dtFire|thingid.dtPRForce|thinid.dtPRIon||thingid.dtLightning|thingid.dtNecrotic|thingid.dtPoison|thingid.dtPsychic|thingid.dtPRSonic) & !Helper.Helper"/> Code:
<eval phase="First" index="3"><![CDATA[ doneif (hero.tagis[Hero.Raging] = 0) doneif (tagis[Helper.Disable] <> 0) ~ If nothing chosen then get out now! doneif (field[usrChosen1].ischosen = 0) doneif (field[usrChosen2].ischosen = 0) doneif (field[usrChosen3].ischosen = 0) ~ Collect selected types of damage and pull the Resistance tags from them. perform field[usrChosen1].chosen.pulltags[DamageRes.?] perform field[usrChosen2].chosen.pulltags[DamageRes.?] perform field[usrChosen3].chosen.pulltags[DamageRes.?] perform hero.pushtags[DamageRes.?]]]></eval> 5. Yes, it's the text editor. The "amp;" doesn't show up in the Editor. |
#4 |
Member
Join Date: Jun 2018
Posts: 83
|
I see where the "Restrict First List To..." box s, but the "Select From..." box doesn't have damage types as an option.
|
#5 |
Senior Member
Join Date: Sep 2017
Posts: 600
|
Yeah the "select from" is useless 4/5 times, because it has so few things. If "select from" doesn't have what you need, you define your own tag expression in the next box, like you did.
Found an issue with or have a suggestion for the 5e Community Pack? Please post it here at our GitHub. Feel free to stop by the Lone Wolf Development Subreddit, for discussion of any and all LWD products and community efforts! |
#6 |
Member
Join Date: Jun 2018
Posts: 83
|
First off, I REALLY appreciate your advice. I've learned a ton just reading your responses.
That said, that code doesn't seem to be working either. I'm still getting a list of random things that aren't the damage types I specified in the dropdown. I'm really baffled. Here is the code as it stands now: Code:
<thing id="cBerPRDewbInst" name="Dewback's Instinct" description="Choose three damage types other than true damage. While raging, you have resistance to the chosen damage types." compset="CustomSpec" uniqueness="unique"> <fieldval field="usrCandid1" value="component.DamageType & (thingid.dtAcid|thingid.dtCold|thingid.dtFire|thingid.dtPRForce|thinid.dtPRIon||thingid.dtLightning|thingid.dtNecrotic|thingid.dtPoison|thingid.dtPsychic|thingid.dtPRSonic) & !Helper.Helper"/> <fieldval field="usrCandid2" value="component.DamageType & (thingid.dtAcid|thingid.dtCold|thingid.dtFire|thingid.dtPRForce|thinid.dtPRIon||thingid.dtLightning|thingid.dtNecrotic|thingid.dtPoison|thingid.dtPsychic|thingid.dtPRSonic) & !Helper.Helper"/> <fieldval field="usrCandid3" value="component.DamageType & (thingid.dtAcid|thingid.dtCold|thingid.dtFire|thingid.dtPRForce|thinid.dtPRIon||thingid.dtLightning|thingid.dtNecrotic|thingid.dtPoison|thingid.dtPsychic|thingid.dtPRSonic) & !Helper.Helper"/> <tag group="Helper" tag="Primary"/> <tag group="abCategory" tag="BersInstinct"/> <tag group="abRange" tag="Personal"/> <tag group="abDuration" tag="ConstRage"/> <tag group="SpecSource" tag="cHelpBrs"/> <tag group="Helper" tag="Helper"/> <tag group="Helper" tag="Free"/> <eval phase="First" index="3"><![CDATA[ doneif (hero.tagis[Hero.Raging] = 0) doneif (tagis[Helper.Disable] <> 0) ~ If nothing chosen then get out now! doneif (field[usrChosen1].ischosen = 0) doneif (field[usrChosen2].ischosen = 0) doneif (field[usrChosen3].ischosen = 0) ~ Collect selected types of damage and pull the Resistance tags from them. perform field[usrChosen1].chosen.pulltags[DamageRes.?] perform field[usrChosen2].chosen.pulltags[DamageRes.?] perform field[usrChosen3].chosen.pulltags[DamageRes.?] perform hero.pushtags[DamageRes.?]]]></eval> </thing> |
#7 |
Senior Member
Join Date: Sep 2017
Posts: 600
|
Try taking "component.DamageType & " out. I'm assuming that dtPRIon and dtPRSonic are damage types you made?
Found an issue with or have a suggestion for the 5e Community Pack? Please post it here at our GitHub. Feel free to stop by the Lone Wolf Development Subreddit, for discussion of any and all LWD products and community efforts! |
#8 |
Member
Join Date: Jun 2018
Posts: 83
|
Same problem if I take out "component.DamageType & ". Yes, those are new damage types I defined.
|
#9 |
Senior Member
Join Date: Sep 2017
Posts: 600
|
At least in the code you posted, I don't see "ChooseSrc1.Thing". Make sure you have that:
Code:
<tag group="ChooseSrc1" tag="Thing"/> <tag group="ChooseSrc2" tag="Thing"/> <tag group="ChooseSrc3" tag="Thing"/> Found an issue with or have a suggestion for the 5e Community Pack? Please post it here at our GitHub. Feel free to stop by the Lone Wolf Development Subreddit, for discussion of any and all LWD products and community efforts! |
#10 |
|
|