Member
Join Date: Aug 2013
Location: Lenexa, KS
Posts: 71
|
I am trying to create a trait based on Two World Magic from Sargava, the Lost Colony. I have tried changing the 2nd Custom Expression to select another 0 level spell. That part looks like it should work correctly. When I try to modify the Eval Script, this is when I run into problems.
Since the class is no longer being selected by the 2nd Custom Expression, I tried to add the cCleric class into the script, but I evidently don't have the expression correct. Here is the old expression. ~if we haven't chosen anything yet, just get out now doneif (field[usrChosen2].ischosen = 0) ~now that we've chosen a class, we can restrict the list of spells available field[usrCandid1].text &= " & !(" & field[usrChosen2].chosen.tagids[sClass.?,"|"] & ")" ~if we haven't chosen anything yet, just get out now doneif (field[usrChosen1].ischosen = 0) doneif (tagis[Helper.FtDisable] <> 0) ~ If we are a spontaneous caster this will set the correct cantrip perform field[usrChosen1].chosen.pulltags[ClsAllowSp.?] perform field[usrChosen2].chosen.pushtags[ClsAllowSp.?] This is what I have changed it to: ~if we haven't chosen anything yet, just get out now doneif (field[usrChosen2].ischosen = 0) ~now that we've chosen a class, we can restrict the list of spells available field[usrCandid1].text &= " & !(" & field [chosen.tagids[sClass.cCleric,"|"] & ")" field[usrCandid2].text &= " & !(" & field [chosen.tagids[sClass.cCleric,"|"] & ")" ~if we haven't chosen anything yet, just get out now doneif (field[usrChosen1].ischosen = 0) doneif (tagis[Helper.FtDisable] <> 0) ~ If we are a spontaneous caster this will set the correct cantrip perform field[usrChosen1].chosen.pulltags[ClsAllowSp.?] perform field[usrChosen1].chosen.pushtags[ClsAllowSp.cCleric] perform field[usrChosen2].chosen.pulltags[ClsAllowSp.?] perform field[usrChosen2].chosen.pushtags[ClsAllowSp.cCleric] The program doesn't like this modified expression. I have modified other scripts in the past, but I am missing something here. |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
Instead of building a tag expression based on the chosen class:
Code:
field[usrChosen2].chosen.tagids[sClass.?,"|"] sClass.cHelpClr So: Code:
field[usrCandid1].text &= " & !(sClass.cHelpClr)" Code:
perform hero.childfound[cHelpClr].pushtags[ClsAllowSp.?] |
#2 |
Member
Join Date: Aug 2013
Location: Lenexa, KS
Posts: 71
|
Thank you. I will work with that.
|
#3 |
Member
Join Date: Aug 2013
Location: Lenexa, KS
Posts: 71
|
I modified the script, and it shows up in the traits area. The selection feature works on the trait, but the spells are not showing up on the cleric spell selection section. They just aren't there. Do I need all of the other statements ending the script or should it work as described. This is the way it looks now.
~if we haven't chosen anything yet, just get out now doneif (field[usrChosen2].ischosen = 0) ~now that we've chosen a class, we can restrict the list of spells available field[usrCandid1].text &= " & !(sClass.cHelpClr)" field[usrCandid2].text &= " & !(sClass.cHelpClr)" ~if we haven't chosen anything yet, just get out now doneif (field[usrChosen1].ischosen = 0) doneif (tagis[Helper.FtDisable] <> 0) ~ If we are a spontaneous caster this will set the correct cantrip perform hero.childfound[cHelpClr].pushtags[ClsAllowSp.?] |
#4 |
Member
Join Date: Aug 2013
Location: Lenexa, KS
Posts: 71
|
The trait allows me to select any 0 level spell and put it on the cleric spell list. I wasn't sure if I phrased that in the first posting.
|
#5 |
Member
Join Date: Aug 2013
Location: Lenexa, KS
Posts: 71
|
sorry, two 0 level spells.
|
#6 |
Member
Join Date: Aug 2013
Location: Lenexa, KS
Posts: 71
|
My mistake. I didn't use the pulltags line when I modified it again. I have updated it and it works perfectly. Thank you for your assistance.
|
#7 |
|
|