View Single Post
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,144

Old May 21st, 2012, 05:26 AM
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

Last edited by Sendric; March 4th, 2021 at 04:09 AM.
Sendric is offline   #3 Reply With Quote