View Single Post
dungeonguru
Senior Member
 
Join Date: May 2016
Posts: 608

Old August 1st, 2019, 03:47 PM
Here's an adjustment that will change the actual DC number from the old attribute to the new attribute for abilities that use the StandardDC process - not all abilities are coded the same, so it "might" fail spectacularly on random abilities. It will also NOT change the text description on the ability.

You can copy/paste this code directly into your own custom.user file at the end after the last </thing> and before </document>, you *might* want to change the thing id. to something less gibberish.

Code:
<thing id="pLFCSAAO" name="Class Special Ability Attribute Override" description="Use this adjustment to override the DC on a class ability" compset="InPlay">
    <fieldval field="pUsePicks" value="1"/>
    <fieldval field="pUsePicks2" value="1"/>
    <fieldval field="pCandExpr2" value="component.BaseAttr"/>
    <tag group="Adjustment" tag="ClassAbil"/>
    <tag group="Helper" tag="NoIncr" name="NoIncr" abbrev="NoIncr"/>
    <tag group="OthAdjCat" tag="SpecAbil"/>
    <eval phase="PreLevel" priority="10000">      doneif (field[pIsOn].value = 0)
      doneif (field[pChosen].ischosen = 0)
      doneif (field[pChosen2].ischosen = 0)
      ~ delete the original DC calculation on the ability in box 1
      perform field[pChosen].chosen.delete[StandardDC.?]
      ~ pull the DC calculation tag from the attribute chosen in box 2
      perform field[pChosen2].chosen.pulltags[StandardDC.?]
      ~ push the tags we got onto the ability in box 1
      perform field[pChosen].chosen.pushtags[StandardDC.?]</eval>
    </thing>


I have some ideas on how to create a second script to replace the text "Charisma modifier" with "CHOSENATTRIBUTE modifier".
Somewhere in the Render Phase you would need to play with a script that had lines of code like this:

Code:
var oldatt as text
var newatt as text
... some lines of code to get the attribute name fields 
oldatt &= " modifier"
newatt &= " modifier"
field[CustDesc].text = replace(field[CustDesc].text,oldatt,newatt,0)
dungeonguru is offline   #2 Reply With Quote