
Before Wesley L . and I go too far down the path.... We have spells in an array... example: {Call: "cure_wounds", Name: "Cure Wounds", Class: "Bard,Cleric,Druid,Paladin,Ranger", SubClass: "Life Domain", Ritual: "N", Concentration: "N", Level: "1", School: "Evocation", Component: "V,S", Material: "", Range: "Touch", CastingTime: "1 action", Duration: "Instantaneous", Description: "A creature I touch regains a number of hit points equal to 1d8 + my spellcasting ability modifier. This spell has no effect on undead or constructs.", HigherLevel: ""}, Lots of useful things can be done with that..... But one thing is to make a Power Card macro that looks like this: !power --name|Cure Wounds --ddn --desc| --txcolor|#fff --bgcolor|white --leftsub|1 Action --rightsub|Range 5 feet --1st Level|Evocation --Components|V, S --Duration|Instantaneous --Effect|I touch @{target|token_name}. They regain [[?{modifier|1}d8+3+@{wisdom_mod}]] hit points. --text|This spell has no effect on undead or constructs. --Higher Level|When I cast this spell using a spell slot of 2nd level or higher, the healing increases by 1d8 for each slot level above 1st. And reduce it to this: !cast cure_wounds --Effect|I touch @{target|token_name}. They regain [[?{modifier|1}d8+3+@{wisdom_mod}]] hit points. --text|This spell has no effect on undead or constructs. All the spell information is Power Card formatted in a standard way before being sent to Badgers PC script... also no modification to the PC script is needed. Also.... the API command of just "!cast cure_wounds" give just the spell information in PC format. Two examples... First is "!cast cure_wounds" with "--Effect|" information (or any PC information)... second is just "!cast cure_wounds" We are really just kicking this around and have 93 spells so far... but want to think this through before taking it any further.... Really bad code example below to just get it working: cast = function(msg) { if(msg.content.indexOf(' ') == -1){ var msgMessage = null; var msgApiCommand = msg.content.substr(1, msg.content.length); return; }else{ var msgMessage = msg.content.substr(msg.content.indexOf(' ') + 1); var msgApiCommand = msg.content.substr(1, msg.content.indexOf(' ')-1); }; if(msgMessage.indexOf(' ') == -1){ var msgAttack = "None"; var msgSpell = msgMessage; }else{ var msgSpell = msgMessage.substr(0, msgMessage.indexOf(' ')); var msgAttack = msgMessage.substr(msgMessage.indexOf(' ') + 1); }; if(msgAttack == "None"){ _.each(roll20API.spelllist, function(indexCommands) { if(indexCommands.Call == msgSpell){ var spellName = indexCommands.Name var spellLevel = indexCommands.Level var spellRitual = indexCommands.Ritual var spellSchool = indexCommands.School var spellName = indexCommands.Name var spellComponent = indexCommands.Component var spellMaterial = indexCommands.Material var spellRange = indexCommands.Range var spellCastingTime = indexCommands.CastingTime var spellDuration = indexCommands.Duration var spellDescription = indexCommands.Description if(spellLevel == "0"){spellLevel = "Cantrip"}; if(spellLevel == "1"){spellLevel = "1st Level"}; if(spellLevel == "2"){spellLevel = "2nd Level"}; if(spellLevel == "3"){spellLevel = "3rd Level"}; if(spellLevel.length == 1){spellLevel += "th Level"}; var CastString = " " CastString += "--name|" + spellName + " " CastString += "--desc| --bgcolor|#1c4587 --txcolor|#FFF " CastString += "--leftsub|" + spellCastingTime + " " CastString += "--rightsub|" + spellRange + " " CastString += "--" + spellLevel + "|" + spellSchool + " " CastString += "--Components|" + spellComponent + " " CastString += "--Duration|" + spellDuration + " " CastString += "--Description|" + spellDescription msg.content = CastString PowerCardScript.Process(msg); return; }; }); }; if(msgAttack != "None"){ _.each(roll20API.spelllist, function(indexCommands) { if(indexCommands.Call == msgSpell){ sendChat("API", "Test"); var spellName = indexCommands.Name var spellLevel = indexCommands.Level var spellRitual = indexCommands.Ritual var spellSchool = indexCommands.School var spellName = indexCommands.Name var spellComponent = indexCommands.Component var spellMaterial = indexCommands.Material var spellRange = indexCommands.Range var spellCastingTime = indexCommands.CastingTime var spellDuration = indexCommands.Duration var spellDescription = indexCommands.Description if(spellLevel == "0"){spellLevel = "Cantrip"}; if(spellLevel == "1"){spellLevel = "1st Level"}; if(spellLevel == "2"){spellLevel = "2nd Level"}; if(spellLevel == "3"){spellLevel = "3rd Level"}; if(spellLevel.length == 1){spellLevel += "th Level"}; var CastString = " " CastString += "--name|" + spellName + " " CastString += "--desc| --bgcolor|#1c4587 --txcolor|#FFF " CastString += "--leftsub|" + spellCastingTime + " " CastString += "--rightsub|" + spellRange + " " CastString += "--" + spellLevel + "|" + spellSchool + " " CastString += "--Components|" + spellComponent + " " CastString += "--Duration|" + spellDuration + " " CastString += "--Description|" + spellDescription msg.content = CastString + " " + msgAttack log(msg.content) PowerCardScript.Process(msg); return; }; }); }; }; Main idea is to feed the Power Cards script (without modification) from an Array of Spells to reduce macro typing. Right path? Wrong path? Better way? No way?