• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Adding Weight to a Potion

Skarn

Active member
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?
 
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.
 
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.

I didn't find the "- Add custom potion -" widget in the editor. However, I will admit to being, at best, a gifted amateur.

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.

Aaron said:
Is the weight the only thing that differs?

Yes.

Aaron said:
I'll see what I can do real quick.

Much appreciation.
 
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>

And here is the modified version where I added a weight of .1 (I also tweaked the name stuff so you can distinguish from the default version).

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>
 
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.

. . .

And here is the modified version where I added a weight of .1 (I also tweaked the name stuff so you can distinguish from the default version).

Très magnifique! Domo arigato, Aaron-sama.

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::
 
Back
Top