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
2. Replace old Lib:Magic token with my version and ensure that the properties are on the token and contain data.
3. Replace the code on the campaign window for the Wrathgon macros with the below respectively.
Code: Select all
@@ @<b>Cast</b> Wrathgon
@[email protected] 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 [email protected]:Magic"): tVar]
[H: tclassData = macro.return]
[H: tokenName = getName(tokenID)]
[Frame(tokenName+" Spells"):
{
[H: macroVar = json.append("", tokenID, classViewed, 1)]
[macro("Spell Cast [email protected]:Magic"): macroVar]
}]
}; {
[R, S: "You are not a spellcaster!"]
}]
!!
Code: Select all
@@ @<b>SLA</b> Wrathgon
@[email protected] 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 [email protected]:Magic"): tVar]
[H: tclassData = macro.return]
[H: tokenName = getName(tokenID)]
[Frame(tokenName+" Spells"):
{
[H: macroVar = json.append("", tokenID, classViewed)]
[macro("Spec Abil Main [email protected]:magic"): macroVar]
}]
}; {
[R, S: "You are not a spellcaster!"]
}]
!!
Code: Select all
@@ @<b>Spell Menu</b> W
@[email protected] 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 [email protected]:Magic"): macroVar]
!!
Code: Select all
@@ @Clear Class Info
@[email protected] 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("[email protected]:Magic"): macroVar]
[macro("Spell [email protected]:Magic"): macroVar]
!!
4. Drop token on map and have at it!