Useful Coding Examples
To pull tags from one thing and apply them to another. Example: Oracle Domain Class Special, Complete Divine
Code:
perform hero.childfound[cdOracle].pulltags[ClsScAllSp.?]
perform field[usrChosen1].chosen.pushtags[ClsScAllSp.?]
To increase the number of Secondary Spells. Example: Oracle Domain Class Special, Complete Divine
Code:
field[usrChosen1].chosen.field[cSecSplReq].value += 1
To pull an unknown number of tags, assign them to a string, then replace part of the tagid. Example: Oracle Domain Class Special, Complete Divine
Code:
var spells as string
spells = hero.childfound[cdOracle].tagids[ClsScAllSp.?,"|"]
spells = replace(spells, "ClsScAllSp", "thingid", 0)
To apply the above string to a list of available spells. Example: Domain Class Special, Players Guide to Faerun
Code:
field[usrChosen1].chosen.field[cSpellExpr].text &= " |" & spells