|
Member
Join Date: Nov 2014
Posts: 90
|
Okay, thinking about how to add the expanded spell list for the UA Class Variants, I tried to use ExtendThing which was less than ideal. I decided to see how other options did it.
Enter the Stone Magic Sorcerous Origin from UA. It adds a bunch of non-sorcerer spells. So following its lead I added this code: Code:
<document signature="Hero Lab Data"> <thing id="cElmSpSCM" name="Elemental Spell" description="When you cast a spell that deals a type of damage from the following list, you can spend 1 sorcery point to change that damage type to one of the other listed types: acid, cold, fire, lightning, thunder. If a wild sorc, roll d20. If 5 or below, determine dmg type randomly. If affected by Tides of Chaos, always randomly determine dmg type." compset="CustomSpec" summary="Spend 1 sorc. pt.: Choose dmg type from 5 elements." uniqueness="unique"> <usesource source="p5eSorUACVAP"/> <tag group="Helper" tag="Secondary" name="Secondary" abbrev="Secondary"/> <tag group="SpecSource" tag="cHelpSor" name="Sorcerer" abbrev="Sorcerer"/> <tag group="abAction" tag="Free" name="Free" abbrev="Free"/> <tag group="abCategory" tag="SorMetamag" name="Sorcerer Metamagic Ability" abbrev="Sorcerer Metamagic Ability"/> <tag group="abDuration" tag="Instant" name="Instantaneous" abbrev="inst"/> <tag group="abRange" tag="Personal" name="Personal" abbrev="pers"/> <bootstrap thing="cUAExSpLt"> <autotag group="ClSpecWhen" tag="1"/> </bootstrap> </thing> <thing id="cUAExSpLt" name="Expanded Spell List" description="You must otherwise obey all the restrictions for selecting the spell, and it becomes a sorcerer spell for you.\n\n" compset="ClSpecial"> <usesource source="p5eSorUACVAP"/> <eval phase="Final" priority="21000"><![CDATA[doneif (tagis[Helper.ShowSpec] = 0) doneif (tagis[Helper.Disable] <> 0) ~these vars will hold the tag expressions for spells and cantrips var cantrip as string var spell as string var known as string var first as string var second as string var third as string var fourth as string var sixth as string var eigth as string var ninth as string ~ fetch spell expressions spell = hero.childfound[cHelpSor].field[cSpKnoExpr].text known = hero.childfound[cHelpSor].field[cSpellExpr].text ~ these receive the extra spells for each circle cantrip = " | thingid.sp5CXGEPrS " first = " | thingid.spGrease | thingid.spProtGoEv " second = " | thingid.spFlamBlad | thingid.spFlamSphe " third = " | thingid.spVampTouc " fourth = " | thingid.spFireShie " sixth = " | thingid.spFlesSton " eigth = " | thingid.spDemiplan " ninth = " | thingid.spForesigh " hero.childfound[cHelpSor].field[cCnKnoExpr].text &= cantrip spell &= cantrip if (#levelcount[Sorcerer] >= 1) then spell &= first known &= first if (#levelcount[Sorcerer] >= 3) then spell &= second known &= second if (#levelcount[Sorcerer] >= 5) then spell &= third known &= third if (#levelcount[Sorcerer] >= 7) then spell &= fourth known &= fourth if (#levelcount[Sorcerer] >= 11) then spell &= sixth known &= sixth endif endif endif endif endif if (#levelcount[Sorcerer] >= 15) then spell &= eigth known &= eigth if (#levelcount[Sorcerer] >= 17) then spell &= ninth known &= ninth endif endif hero.childfound[cHelpSor].field[cSpKnoExpr].text = spell hero.childfound[cHelpSor].field[cSpellExpr].text = known hero.childfound[cHelpSor].field[cSplBkExpr].text = known]]></eval> </thing> </document> There appears to be a limit to nested if statements, so that's why the last two spell levels are checked in a separate if statement. But I think I have it!!!! Last edited by wynlyndd; February 16th, 2020 at 04:47 PM. Reason: solved it |
#1 |
Member
Join Date: Nov 2014
Posts: 90
|
Fixed in my second bit of code below. Last edited by wynlyndd; February 19th, 2020 at 11:57 AM. |
#2 |
Member
Join Date: Nov 2014
Posts: 90
|
Actually, it's even easier than that.
Code:
<?xml version="1.0" encoding="UTF-8"?> <document signature="Hero Lab Data"> <thing id="cElmSpSCM" name="Elemental Spell" description="When you cast a spell that deals a type of damage from the following list, you can spend 1 sorcery point to change that damage type to one of the other listed types: acid, cold, fire, lightning, thunder. If a wild sorc, roll d20. If 5 or below, determine dmg type randomly. If affected by Tides of Chaos, always randomly determine dmg type." compset="CustomSpec" summary="Spend 1 sorc. pt.: Choose dmg type from 5 elements." uniqueness="unique"> <usesource source="p5eSorUACVAP"/> <tag group="Helper" tag="Secondary" name="Secondary" abbrev="Secondary"/> <tag group="SpecSource" tag="cHelpSor" name="Sorcerer" abbrev="Sorcerer"/> <tag group="abAction" tag="Free" name="Free" abbrev="Free"/> <tag group="abCategory" tag="SorMetamag" name="Sorcerer Metamagic Ability" abbrev="Sorcerer Metamagic Ability"/> <tag group="abDuration" tag="Instant" name="Instantaneous" abbrev="inst"/> <tag group="abRange" tag="Personal" name="Personal" abbrev="pers"/> <bootstrap thing="cUAExSpLt"> <autotag group="ClSpecWhen" tag="1"/> </bootstrap> </thing> <thing id="cUAExSpLt" name="Expanded Spell List" description="You must otherwise obey all the restrictions for selecting the spell, and it becomes a sorcerer spell for you.\n\n" compset="ClSpecial"> <usesource source="p5eSorUACVAP"/> <eval phase="Final" priority="21000"><![CDATA[doneif (tagis[Helper.ShowSpec] = 0) doneif (tagis[Helper.Disable] <> 0) ~these vars will hold the tag expressions for spells and cantrips var cantrip as string var spell as string var known as string var first as string var second as string var third as string var fourth as string var sixth as string var eigth as string var ninth as string ~ fetch spell expressions spell = hero.childfound[cHelpSor].field[cSpKnoExpr].text known = hero.childfound[cHelpSor].field[cSpellExpr].text ~ these receive the extra spells for each circle cantrip = " | thingid.sp5CXGEPrS " first = " | thingid.spGrease | thingid.spProtGoEv " second = " | thingid.spFlamBlad | thingid.spFlamSphe " third = " | thingid.spVampTouc " fourth = " | thingid.spFireShie " sixth = " | thingid.spFlesSton " eigth = " | thingid.spDemiplan " ninth = " | thingid.spForesigh " hero.childfound[cHelpSor].field[cCnKnoExpr].text &= cantrip spell &= first known &= first spell &= second known &= second spell &= third known &= third spell &= fourth known &= fourth spell &= sixth known &= sixth spell &= eigth known &= eigth spell &= ninth known &= ninth hero.childfound[cHelpSor].field[cSpKnoExpr].text = spell hero.childfound[cHelpSor].field[cSpellExpr].text = known hero.childfound[cHelpSor].field[cSplBkExpr].text = known]]></eval> </thing> </document> Last edited by wynlyndd; February 17th, 2020 at 08:42 AM. |
#3 |
Senior Member
Join Date: Sep 2017
Posts: 600
|
Awesome work so far! I haven't had a chance to put it into HL and play around with it, but I think you've got this covered!
I've been messing with ways to get the variant features in. I've landed on a working solution for many of the options. Players will need to select an adjustment for their class. The adjustment calls up a configurable for that class's features. Users can select any or all of their available variant features from a list. The problems will come in whether or not those individual abilities can do what they're supposed to, especially when they're replacing existing features. But we'll have to take those on a case-by-case basis. The other things, like new Warlock Invocations, Fighting Styles, etc. will all be available as long as the user has selected the Class Feature Variant source. They'll just show up as new options for those features, and can be ignored if necessary. 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! |
#4 |
Member
Join Date: Nov 2014
Posts: 90
|
Quote:
It's when the feature replaces that I was going to try and figure out next. Was going to look into conditional bootstraps but I haven't had the time yet. |
|
#5 |
Senior Member
Join Date: May 2016
Posts: 608
|
This is truly awesome coding, you've got a pretty good glimpse at playing with spells there.
I have a suggestion for the Community Pack - like Eldritch Knights are supposed to only be able to pick abjuration/evocation spells initially (at least till level 8). You could add something like the following to enforce that by modifying the code you posted: Code:
doneif (tagis[Helper.ShowSpec] = 0) doneif (tagis[Helper.Disable] <> 0) ~ Once we're 8th level and above we can remove the restriction on spells ~ We could probably do some counting of the sSchool tags to enforce ~ that at most we have 4 non Abjuration/Evocation spells but doneif (#levelcount[Fighter] > 7) ~ Otherwise we modify the spell lists. var spell as string var known as string ~ fetch spell expressions from the initial lists spell = "((" & hero.childfound[cHelpFtr].field[cSpKnoExpr].text & ")" known = "((" & hero.childfound[cHelpFtr].field[cSpellExpr].text & ")" ~ Narrow down to abjuration and evocation only spell &= " & (sSchool.Abjur|sSchool.Evocation))" known &= " & (sSchool.Abjur|sSchool.Evocation))" ~ push out the new lists hero.childfound[cHelpFtr].field[cSpKnoExpr].text = spell hero.childfound[cHelpFtr].field[cSpellExpr].text = known hero.childfound[cHelpFtr].field[cSplBkExpr].text = known |
#6 |
Member
Join Date: Nov 2014
Posts: 90
|
May I see?
Quote:
|
|
#7 |
Senior Member
Join Date: Oct 2011
Location: Portland
Posts: 313
|
this is awesome work!
|
#8 |
Senior Member
Join Date: Sep 2017
Posts: 600
|
Here's the relevant stuff I have. It has everything that's relevant to the Bard with placeholders for each ability/feature.
Personally, I think sticking to 1 single CFV source and controlling the addition of the features through an adjustment -> configurable is the cleanest implementation. I mentally groan every time I see how bloated out our configure hero screen already is. I'm going to take a stab at adding your code in for the Bard expanded spell list. Code:
<thing id="p5CCFVBrd" name="Class Feature Variants - Bard" compset="InPlay"> <usesource source="p5eCFVUACP"/> <bootstrap thing="cfg5CCFVBrd"></bootstrap> <exprreq message="Test"><![CDATA[#levelcount[Bard] >= 1]]></exprreq> </thing> <thing id="cfg5CCFVBrd" name="Bard Variant Features" compset="Configure" uniqueness="unique"> <tag group="Helper" tag="Allow1Abil"/> </thing> <thing id="cBrd5CMgInsp" name="Magical Inspiration" description="<just needs text>" compset="CustomSpec" uniqueness="unique"> <tag group="AllowRCust" tag="cfg5CCFVBrd"/> </thing> <thing id="cAll5CSplVers" name="Spell Versatility" description="<just needs text>" compset="CustomSpec" uniqueness="unique"> <tag group="AllowRCust" tag="cfg5CCFVBrd"/> </thing> <thing id="cAll5CPrfVers" name="Proficiency Versatility" description="<Needs programming>" compset="CustomSpec" uniqueness="unique"> <tag group="AllowRCust" tag="cfg5CCFVBrd" name="Bard Variant Features" abbrev="Bard Variant Features"/> </thing> <thing id="cBrd5CXSplLst" name="Expanded Spell List" description="<Specific to the Bard, needs coding>" compset="CustomSpec" uniqueness="unique"> <tag group="AllowRCust" tag="cfg5CCFVBrd"/> <tag group="Helper" tag="SpecUp"/> </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! |
#9 |
Member
Join Date: Nov 2014
Posts: 90
|
Thanks Fenris, I'll try to use what you did for the Sorcerer.
As you can probably tell, it's what I am currently playing so I tend to scratch those itches first. As far as combining it into a single source, that's probably the best choice and I bow to your knowledge. I was just happy I figured out how to make subheadings and selectable options in Configure Hero. |
#10 |
Thread Tools | |
Display Modes | |
|
|