dungeonguru
Well-known member

So, I've been playing with a "Spellcasting Dragon" template over the last couple of days and I've made some progress, but I keep banging into a few things I can't seem to find any notes on.
Bootstrapping the Innate Spellcasting (xInnatSpel) for the Innate spellcasting text to get autogenerated.
Heres the code at First/10000 that allows you to pick 1st level spells on the race tab when you have a dragon loaded with this template:
Code:
perform hero.assign[Hero.Caster]
perform hero.assign[sClass.cHelpSor]
~ perform hero.assign[Helper.WarlocCast] <- not needed..
perform hero.assign[CasterSrc.Arcane]
perform hero.assign[CasterType.SpontKnow]
perform hero.assign[SplAttr.aCHA]
~ for a test just allow 1st level sorcerer spells, will need to be 1/3 the CR for max spell level
hero.findchild[BaseRace].field[rSpExLst].text = "sClass.cHelpSor & sLevel.1"
~ make the label show up as Dragon Innate Spells
hero.findchild[BaseRace].field[rSpExLstNm].text = "Dragon Innate Spells"
~ the below line is returning a string for some reason, hardcoding to 1 for now but this needs to be the Charisma modifier for number of spells
~ hero.findchild[BaseRace].field[rSpExAllw].value = hero.child[aCHA].field[aModBonus].value
hero.findchild[BaseRace].field[rSpExAllw].value = 1
~ add the atwill and 1/day
foreach pick in hero from BaseSpell
[B] ~ assign tags
~ eachpick.assign[Helper.RaceSpell]
~ eachpick.assign[Usage.Day][/B]
eachpick.field[trkMax].value = 1
nexteach
The commented out code in bold is where I try to add the RaceSpell and Usage tags. In a normal creature, these are autotags, the question is can you assign autotags or am I just assigning these tags wrong. I get an "Unspecified Error in parsing... " so my guess is I'm close.
The result of the above code allows a dragon to choose 1 spell from the 1st level sorcerer list and on the spells tab it shows the spell (example Fog Cloud) as:
Fog Cloud (1) and the tracker with 1 usage.
So right now I'm stuck on the /day and racial tags.
Last edited: