Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Skarn
Member
 
Join Date: Jun 2016
Location: KS, USA
Posts: 39

Old November 7th, 2018, 03:38 PM
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?
Skarn is offline   #1 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old November 7th, 2018, 07:15 PM
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.
Aaron is offline   #2 Reply With Quote
Skarn
Member
 
Join Date: Jun 2016
Location: KS, USA
Posts: 39

Old November 7th, 2018, 07:48 PM
Quote:
Originally Posted by Aaron View Post
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.

Quote:
Originally Posted by Aaron
Is the weight the only thing that differs?
Yes.

Quote:
Originally Posted by Aaron
I'll see what I can do real quick.
Much appreciation.
Skarn is offline   #3 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old November 7th, 2018, 08:00 PM
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>
Aaron is offline   #4 Reply With Quote
Skarn
Member
 
Join Date: Jun 2016
Location: KS, USA
Posts: 39

Old November 7th, 2018, 08:18 PM
Quote:
Originally Posted by Aaron View Post
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::
Skarn is offline   #5 Reply With Quote
Reply


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 03:12 AM.


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