View Single Post
ploturo
Member
 
Join Date: May 2021
Posts: 84

Old May 30th, 2022, 11:34 PM
It looks like any attack/weapon which targets a specific Defense (has a Defense.? tag) won't be printed by the default character sheet.

You could temporarily patch this for the built-in character sheet by removing the Defense.? tags for any attacks/weapons which have them whenever the state says that it is being evaluated for output.

I only have M&M3 in demo mode, so I haven't checked this for any conflicts with text stat blocks or the output for specific weapons, but something like the following adjustment should work (added as a new file in the game folder):

file: weaponPrintFix.dat
Code:
<?xml version="1.0" encoding="UTF-8"?>
<document signature="Hero Lab Data">

  <thing id="adjWeaponPrint" name="Adjust weapon printing" description="Select this adjustment to force the built-in character sheet to print weapons/attacks which target specific defenses. When the hero is being output as a statblock or as a printed character sheet, the target defense will be added as a note to the weapon/attack and temporarily removed." compset="Adjustment">
    <tag group="InPlay" tag="PermOK" name="PermOK" abbrev="PermOK"/>
    <tag group="InPlay" tag="TempOK"/>
    <tag group="AdjustShow" tag="Info"/>
    <eval phase="Render" priority="999999"><![CDATA[

            doneif (field[adjEnabled].value = 0)

            ~ don't run unless state is being evaluated for output
            doneif (state.isoutput = 0)

            ~ add weapon target defenses as a note, and remove all Defense.? tags
            foreach pick in Hero where "component.Weapon"

                if (eachpick.tagis[Defense.?] <> 0) then

                    var notes as string
                    notes = "vs " & eachpick.tagabbrevs[Defense.?,"/"]

                    if (eachpick.field[atkSpecial].isempty = 0) then
                        ~ append existing atkSpecial notes if any
                        notes &= "; " & eachpick.field[atkSpecial].text
                    endif

                    eachpick.field[atkSpecial].text = notes
                    perform eachpick.delete[Defense.?]

                endif

            nexteach

    ]]></eval>
    </thing>

  </document>
ploturo is offline   #6 Reply With Quote