Member
Join Date: Jun 2016
Location: KS, USA
Posts: 39
|
I'm in a campaign where, as a result of my Druidic Herbalism nature bond, the GM has decided to implement a house rule imposing a weight of 0.1# on potions and herbal concoctions (matching the 3.5E weight of a glass vial).
While I can create individual potions/concoctions in the editor and add the weight to them manually, it would be much easier if there was some way that I could add a flat weight to items created with the 'add custom potion' widget in the magic tab, and/or add another widget for herbal concoctions and/or 'weighty potions'. Is there any way to do this with the editor, or would such a thing require back-end stuff on the part of LWD? |
#1 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
I think that you could probably handle this by copying the existing custom potion item, but I am not sure everything related to that is well displayed in the editor, so you might need to work in the raw XML after making the copy. Is the weight the only thing that differs? I'll see what I can do real quick.
|
#2 |
Member
Join Date: Jun 2016
Location: KS, USA
Posts: 39
|
Quote:
As to editing the raw XML, I might just be able to handle that. After creating custom 'Herbal Concoctions' in the editor for a different campaign, I wrote a C# program that takes my source .USER file from that effort, copies it, and modifies the raw XML to change each item's source, modify it's ID, and add it's weight for use in this campaign. Quote:
Quote:
|
|||
#3 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
Ok, it looks like potions are of a type of pick which does not have a tab in the editor, so I'd have to give you the XML directly. So here is the Base Potion as it looks in the XML:
Code:
<!-- Custom potion --> <thing id="sCustomPot" name="- Add custom potion -" compset="MagicItem" description="Add this item to create a potion of a chosen spell." buytemplate="BuyGeneral" xactspecial="2"> <!-- Barebones purchase, showing just coin fields --> <tag group="Helper" tag="CustomItem"/> <tag group="Helper" tag="CustSpCont"/> <tag group="Helper" tag="UsesQty"/> <tag group="gType" tag="OilPotion"/> <tag group="SpecialTab" tag="GRPotion"/> <eval value="1" phase="Render" priority="105100"> <after name="Gen Custom Spell Name"/> <after name="Default livename Modify"/><![CDATA[ var spelllist as string call GenSplList field[livename].text = "Potion of " & spelllist field[sbName].text = "potion of " & spelllist ]]></eval> <eval index="2" phase="Final" priority="10000"><![CDATA[ ~our list of spells does not include wordspells or the custom wordspell helper gizmo.child[CustPotion].field[abItemExpr].text = "!component.BaseWord & !Helper.Helper & !Helper.Obsolete" ]]></eval> <eval index="3" phase="Final" priority="10000"><![CDATA[ ~during play, this doesn't need to be on the Special tab, but we do want ~it displayed in the gear description appendix, so we add tags that will ~make it show up in that list if we're outputting this item, but *not* in ~the general special abilities list at the end of the statblock if (state.isoutput <> 0) then perform assign[Helper.ShowSpec] perform assign[Hide.Statblock] endif ]]></eval> <evalrule index="1" phase="Validation" priority="5000" message="Potions must be created with exactly one spell."><![CDATA[ validif (tagcount[Helper.CustHasSpl] = 1) ]]></evalrule> <child entity="CustPotion"> <tag group="Helper" tag="PotLevReq"/> <tag group="Helper" tag="PersSpOnly"/> </child> </thing> Code:
<thing id="sCustWeighPotion" name="- Add custom weighty potion -" compset="MagicItem" description="Add this item to create a potion of a chosen spell (unlike the default potion, these have non-negligible weight)." buytemplate="BuyGeneral" xactspecial="2"> <!-- Barebones purchase, showing just coin fields --> <fieldval field="gWeight" value=".1"/> <tag group="Helper" tag="CustomItem"/> <tag group="Helper" tag="CustSpCont"/> <tag group="Helper" tag="UsesQty"/> <tag group="gType" tag="OilPotion"/> <tag group="SpecialTab" tag="GRPotion"/> <eval value="1" phase="Render" priority="105100"> <after name="Gen Custom Spell Name"/> <after name="Default livename Modify"/><![CDATA[ var spelllist as string call GenSplList field[livename].text = "Weighty Potion of " & spelllist field[sbName].text = "weighty potion of " & spelllist ]]></eval> <eval index="2" phase="Final" priority="10000"><![CDATA[ ~our list of spells does not include wordspells or the custom wordspell helper gizmo.child[CustPotion].field[abItemExpr].text = "!component.BaseWord & !Helper.Helper & !Helper.Obsolete" ]]></eval> <eval index="3" phase="Final" priority="10000"><![CDATA[ ~during play, this doesn't need to be on the Special tab, but we do want ~it displayed in the gear description appendix, so we add tags that will ~make it show up in that list if we're outputting this item, but *not* in ~the general special abilities list at the end of the statblock if (state.isoutput <> 0) then perform assign[Helper.ShowSpec] perform assign[Hide.Statblock] endif ]]></eval> <evalrule index="1" phase="Validation" priority="5000" message="Potions must be created with exactly one spell."><![CDATA[ validif (tagcount[Helper.CustHasSpl] = 1) ]]></evalrule> <child entity="CustPotion"> <tag group="Helper" tag="PotLevReq"/> <tag group="Helper" tag="PersSpOnly"/> </child> </thing> |
#4 |
Member
Join Date: Jun 2016
Location: KS, USA
Posts: 39
|
Quote:
Now I don't feel so bad about not being able to find the custom widget in the editor. ::code monkey starts playing with the XML to add a custom Herbal Concoction widget as well:: |
|
#5 |
|
|