Senior Member
Join Date: Jan 2011
Location: Flint, MI
Posts: 100
|
I am trying to add the Arcane Schooling feat from the Forgotten Realms. It lets you choose an arcane spellcasting class and then adds that class as a favored class in addition to any others that have.
I was able to copy the script from the Half-elf's mutlitalented ability, but that lets you choose from any class. What I was wondering is if there was a way to limit the choices to just the bard, sorcerer, or wizard. Maybe limit them in the feat and then use that choice to add the favored class. Thanks for any help you might be able to provide. Michael |
#1 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
You can give your feat a chooser that picks among those classes class helpers, and then does a foreach to cycle through the associated class levels (NOT the helpers) to assign the Helper.FavorClass tag to them. I think that should be able to do it.
|
#2 |
Senior Member
Join Date: Jan 2011
Location: Flint, MI
Posts: 100
|
I can't seem to get it to add just the three classes. I can get all arcane spellcasters or all classes.
This gives me all arcane classes component.BaseClHelp & CasterSrc.Arcane I have tried a few variations using cHelpBrd | cHelpSor | cHelpWiz which seems that obvious choice (to me). Anyway thanks for you help. I am not much of coder, but I can usually manage by borrowing other code and adjusting it. I have not been able to get the dang chooser to work though. |
#3 |
Senior Member
Join Date: Jan 2011
Location: Flint, MI
Posts: 100
|
Also could you take a look at my script for the favored class part of the feat. It works (sort of). If I add the feat before choosing a favored class and choose my class in the feat, then the class is treated as a favored class. As soon as I choose my favored class on the classes tab then my feat selection is no longer treated as a favored class.
I modified the code from the weapon focus feat (I think, could have been weapon spec or something else I was going through a lot of code) And again thanks in advance for looking at this and providing any help that you can. ~ If we're disabled, do nothing doneif (tagis[Helper.FtDisable] <> 0) if (field[usrChosen1].ischosen <> 0) then ~ Assign the appropriate tag to all classes that meet the criteria var result as number var id as string id = field[usrChosen1].chosen.idstring foreach pick in hero where "IsClass." & id result = eachpick.assign[Helper.FavorClass] nexteach ~ Forward the favored class tag for the class to the hero result = field[usrChosen1].chosen.forward[Helper.FavorClass] endif |
#4 |
Senior Member
Join Date: Jan 2011
Location: Flint, MI
Posts: 100
|
Well it's not exactly what I was looking for but this works...
I added multitalented to the character using a script and then created an eval rule that looks for the bard, sorcerer, or wizard to be a favored class. |
#5 |
Senior Member
Join Date: Jan 2011
Location: Flint, MI
Posts: 100
|
Well I am like a dog with a bone I guess, and I couldn't let it go. I am still playing with this. I am trying different things to get the favored class tag for the class added to the hero.
|
#6 |
Senior Member
Join Date: Jan 2011
Location: Flint, MI
Posts: 100
|
Well I still can't get this to work. I am posting what I have so far so someone can take a look at it. For now I am just adding the mutlitalent ability (script from multitalent half-elf racial ability).
var name as string ~assign bard as a favored class if (field[usrChosen1].chosen.pulltags[thingid.cBard] = 1) then foreach pick in hero where "IsClass.cBard" perform eachpick.assign[Helper.FavorClass] nexteach ~assign sorcerer as a favored class elseif (field[usrChosen1].chosen.pulltags[thingid.cSorcerer] = 1) then foreach pick in hero where "IsClass.cSorcerer" perform eachpick.assign[Helper.FavorClass] nexteach ~assign wizard as a favored class elseif (field[usrChosen1].chosen.pulltags[thingid.cSorcerer] = 1) then foreach pick in hero where "IsClass.cSorcerer" perform eachpick.assign[Helper.FavorClass] nexteach ~ Set our 'short name' field[shortname].text = "Arcane Schooling: " & name endif |
#7 |
Senior Member
Join Date: Jan 2011
Location: Flint, MI
Posts: 100
|
Well, I got it to work. Here is what I came up with.
phase/priority (levels/100) Code:
~assign Bard as a favored class if (field[usrChosen1].chosen.pulltags[thingid.cBard] = 1) then perform hero.assign[FavClass.cBard] perform hero.childfound[cBard].assign[Helper.FavorClass] ~assign Sorcerer as a favored class elseif (field[usrChosen1].chosen.pulltags[thingid.cSorcerer] = 1) then perform hero.assign[FavClass.cSorcerer] perform hero.childfound[cSorcerer].assign[Helper.FavorClass] ~assign wizard as a favored class elseif (field[usrChosen1].chosen.pulltags[thingid.cWizard] = 1) then perform hero.assign[FavClass.cWizard] perform hero.childfound[cWizard].assign[Helper.FavorClass] endif Last edited by mbran01; May 2nd, 2012 at 08:20 PM. Reason: didn't work after all |
#8 |
|
|