Due to having to break the way the code was wrote in many places tokens from previous versions will not work!
Update procedures:
1. Ensure the campaign properties match the following (notice I changed EH to System to better represent what the property is being used for) (Also, you can see that everything is broken out between 3.5 and Pathfinder. This allows flexibility to possibly even add other systems like Trailblazer.):
Code: Select all
---|Wrathgon|---
BloodlineList
BloodlineListPF
ClassDetail
ClassDetailPF
DomainList
DomainListPF
System
SchoolSpells
SchoolSpellsPF
SLATemplate
SLATemplatePF
SpellCastingInfo
SpellCastingInfoPF
Spells
SpellsPF
3. Replace the code on the campaign window for the Wrathgon macros with the below respectively.
Code: Select all
@@ @<b>Cast</b> Wrathgon
@PROPS@ fontColor=white ; autoExecute=true ; fontSize=11pt ; sortBy=1.2 ; color=blue ; playerEditable=true ; applyToSelected=true ; group= ; tooltip=Wrathgon ; minWidth=80 ;
[H: ids = getSelected()]
[H: countIDs = listCount(ids)]
[H: abort(if(ids == "" || countIDs > 1, 0, 1))]
[H: tokenID = ids]
[H: classInfo = getProperty("CasterInfo")]
[H: tclassData = json.isEmpty(classInfo)]
[H, if(tclassData == 0): classList = json.fields(classInfo)]
[H, if(listCount(classList) > 1): classViewed = listGet(classList, 0)]
[H, if(listCount(classList) <= 1): classViewed = classList]
[R, if(tclassData == 0), CODE:
{
[H: tVar = json.append("", ids, classViewed)]
[macro("Get Object@Lib:Magic"): tVar]
[H: tclassData = macro.return]
[H: tokenName = getName(tokenID)]
[Frame(tokenName+" Spells"):
{
[H: macroVar = json.append("", tokenID, classViewed, 1)]
[macro("Spell Cast Text@Lib:Magic"): macroVar]
}]
}; {
[R, S: "You are not a spellcaster!"]
}]
!!
Code: Select all
@@ @<b>SLA</b> Wrathgon
@PROPS@ fontColor=white ; autoExecute=true ; fontSize=11pt ; sortBy=1.3 ; color=blue ; playerEditable=true ; applyToSelected=true ; group= ; tooltip=Wrathgon ; minWidth=80 ;
[H: ids = getSelected()]
[H: countIDs = listCount(ids)]
[H: abort(if(ids == "" || countIDs > 1, 0, 1))]
[H: tokenID = ids]
[H: classInfo = getProperty("CasterInfo")]
[H: tclassData = json.isEmpty(classInfo)]
[H, if(tclassData == 0): classList = json.fields(classInfo)]
[H, if(listCount(classList) > 1): classViewed = listGet(classList, 0)]
[H, if(listCount(classList) <= 1): classViewed = classList]
[R, if(tclassData == 0), CODE:
{
[H: tVar = json.append("", ids, classViewed)]
[macro("Get Object@Lib:Magic"): tVar]
[H: tclassData = macro.return]
[H: tokenName = getName(tokenID)]
[Frame(tokenName+" Spells"):
{
[H: macroVar = json.append("", tokenID, classViewed)]
[macro("Spec Abil Main Text@Lib:magic"): macroVar]
}]
}; {
[R, S: "You are not a spellcaster!"]
}]
!!
Code: Select all
@@ @<b>Spell Menu</b> W
@PROPS@ fontColor=white ; autoExecute=true ; fontSize=11pt ; sortBy=1.1 ; color=blue ; playerEditable=true ; applyToSelected=true ; group= ; tooltip=Wrathgon ; minWidth=80 ;
[H: ids = getSelected()]
[H: countIDs = listCount(ids)]
[H: abort(if(ids == "" || countIDs > 1, 0, 1))]
[H: macroVar = json.append("", ids, "None")]
[H, macro("Spell Main@Lib:Magic"): macroVar]
!!
Code: Select all
@@ @Clear Class Info
@PROPS@ fontColor=white ; autoExecute=true ; fontSize=11pt ; sortBy=ZZZ ; color=blue ; playerEditable=true ; applyToSelected=false ; group= ; tooltip=Wrathgon ; minWidth=80 ;
[H: ids = getSelected()]
[H: countIDs = listCount(ids)]
[H: abort(if(ids == "" || countIDs > 1, 0, 1))]
[H: macroVar = json.append("", ids, "None")]
[macro("Remove_ClassInfo@Lib:Magic"): macroVar]
[macro("Spell Main@Lib:Magic"): macroVar]
!!