The same can be done for the Pathfinder token type with a minor adjustment to AC name.
Code: Select all
*@sheet.creature (Creature):[r: strformat("%{CreatureType} (%{LevelsInfo})")]
*@Languages:[R: json.get(getProperty("Race"), "notes")]
*@sheet.hpstatus (Hit Points):[r: strformat("%s/%s%s",HP+HPtemp-HPNonLethalDMG,HPmax,if(HPtemp || HPNonLethalDMG," (+"+HPtemp+"/-"+HPNonLethalDMG+")",""))]
*sheet.distance (Distance):[R: distanceStatSheet(currentToken())]
*sheet.appearance (Appearance)
*sheet.moveReach (Tactical):[r: strformat("Move:%{Movement} Reach:%{Reach} Elev:%{Elevation}")]
*@MoveRemain
*AC (AC/TH/FF)
*@sheet.specialA (Attacks):[r, if(SpecialATK == "NA" || SpecialATK == ""): ""; substring(SpecialATK,0,min(length(SpecialATK),50))]
*@sheet.specialD (Defenses):[r, if(SpecialQual == "NA" || SpecialQual == ""):""; substring(SpecialQual,0,min(length(SpecialQual),50))]
*@sheet.resistances (Resistances):[r, if(! json.isEmpty(spellResistance)): "SR: "+spellResistance+" "][r, if(! json.isEmpty(DR)): "DR: "+DR]
*@sheet.physical (Body):[R: strformat("Str:%s(%+d) Dex:%s(%+d) Con:%s(%+d)",Strength+StrMod,StrB,Dexterity+DexMod,DexB,Constitution+ConMod,ConB)]
*@sheet.mental (Mind):[R: strformat("Int:%s(%+d) Wis:%s(%+d) Chr:%s(%+d)",Intelligence+IntMod,IntB,Wisdom+WisMod,WisB,Charisma+ChaMod,ChaB)]
*@AllSaves (Saves):[R: strformat("Fort:%+d Ref:%+d Will:%+d",Fort+ConB+FortBonus,Reflex+DexB+ReflexBonus,Will+WisB+WillBonus)]
*@SaveMisc
Code: Select all
<!-- distanceStatSheet(currentToken): distance token list -->
<!-- created by AM, modified by W42 -->
[H: sheet.target = arg(0)]
[H: sheet.source = getSelected()]
[H: sheet.doDistance = if(listCount(sheet.source) > 0 && sheet.target != sheet.source,1,0)]
[h: sheet.output = ""]
[H, if(sheet.doDistance), CODE:{
[foreach(tok, sheet.source): sheet.output = listAppend(sheet.output,strformat("%s (%s)",getName(tok),getDistance(sheet.target,1,tok)))]
};{}]
[H: macro.return = sheet.output]
Code: Select all
<!-- onCampaignLoad -->
[H: defineFunction("distanceStatSheet","distanceStatSheet@"+getMacroLocation(),1)]
The main reason I did this is to avoid the statsheet from covering up the majority of the screen when special abilities are too long. The above limits the output to 50 characters. If that line is really important to you and you would like to list more, then I have an update for additional lines for special abilities and special defenses upon request.
I put a line in there for appearance, in case gm wants to list token's armor type, weapon and shield. I added a Distance tool. If you select a token, any other token will tell you the distance to the selected token. I combined the reach, movement and elevation in to one line called Tactical. HP are displayed as "current/max (temp/nonlethal)" where current is your effective hit points (+temp,-nonlethal). The rest is just formatting preference for me.
edit: Modified by Wolph42 to actually work and list all selected token distances on moused over targets.