PDA

View Full Version : SubClass Feature problem.


Mergon
March 5th, 2016, 11:29 AM
I am trying to create a new Bardic school: White Wind College. This is a a healer's college.

3rd) It grants the bard proficiency in Medicine (working).

3rd) It grants the bard a 2 plus level of the healing spell slot bonus on damage healed (stolen from cleric life domain. (working)

6th) It grants bard the ability to target 2 individuals with a healing spell that normally targets 1 individual.

14th) Allows the bard to chose 2 'Cleric' spells and add him to his list of prepared spells. Now this is pretty much identical with the Magical Secrets ability of the College of Lore, so I tried to steal the code and just change the usrCandid1 & usrCandid2 to limit the spell selection to cleric spells.

Easy I thought. Just use the code from the Magical Secrets feature . . .NOT!
The custom expressions seem to work fine showing only cleric spells.

In the Eval Rules script I changed the references to the College of lore tag to my features tag.

Unfortunately I get an error that I have selected the spells but not added them . . .

I can post the Eval Rules scripts from the original and mine if necessary.
I've tried to stick to the original script just changing the references to my feature . . .

:confused:

ShadowChemosh
March 5th, 2016, 11:40 AM
Yep need to see the scripts. Otherwise we are working blind... ;)

Mergon
March 5th, 2016, 11:51 AM
If you need any further info please let me know.

Eval scripts (same on original and mine)


doneif (tagis[Helper.ShowSpec] = 0)

doneif (tagis[Helper.Disable] <> 0)

if (field[usrChosen1].ischosen <> 0) then
perform field[usrChosen1].chosen.pulltags[ClsAllowSp.?]
endif

if (field[usrChosen2].ischosen <> 0) then
perform field[usrChosen2].chosen.pulltags[ClsAllowSp.?]
endif

perform root.pushtags[ClsAllowSp.?]

Eval Rules (Magical Secrets feature)
College of Lore Tag: cBrdColLor
Custom Expresses 1 & 2 on class Special: component.BaseSpell


validif (tagis[Helper.ShowSpec] = 0)

validif (tagis[Helper.Disable] <> 0)

var spellname1 as string
var spellname2 as string
var searchexpr as string
var messnames as string
var foundone as number

@valid = 1

if (field[usrChosen1].ischosen <> 0) then
foundone = 0
searchexpr = "KnowSpell." & field[usrChosen1].chosen.idstring & " & SpellType.cHelpBrd & Helper.Known"

foreach pick in hero from BaseSpell where searchexpr
foundone = 1

~ If this copy of the ability is bootstrapped by the College of lore, the chosen spells should be marked as Free, because they don't count against our spells known limit.
if (root.tagis[Ability.cBrdColLor] <> 0) then
perform eachpick.assign[Helper.Free]
endif
nexteach

if (foundone = 0) then
spellname1 = field[usrChosen1].chosen.field[name].text
@valid = 0
endif
endif

if (field[usrChosen2].ischosen <> 0) then
foundone = 0
searchexpr = "KnowSpell." & field[usrChosen2].chosen.idstring & " & SpellType.cHelpBrd & Helper.Known"

foreach pick in hero from BaseSpell where searchexpr
foundone = 1

~ If this copy of the ability is bootstrapped by the College of lore, the chosen spells should be marked as Free, because they don't count against our spells known limit.
if (root.tagis[Ability.cBrdColLor] <> 0) then
perform eachpick.assign[Helper.Free]
endif
nexteach

if (foundone = 0) then
spellname2 = field[usrChosen2].chosen.field[name].text
@valid = 0
endif
endif

if (@valid = 0) then
messnames = splice(messnames, spellname1, ", ")
messnames = splice(messnames, spellname2, ", ")
@message = "You have selected the following spells for Magical Secrets but not added them to your Bard spells known: " & messnames
endif

Additional Magical Features (My Feature)
White Wind College Tag: cBrdSOEWWC
Custom Expresses 1 & 2 on class Special: component.BaseSpell & sClass.cHelpClr

validif (tagis[Helper.ShowSpec] = 0)

validif (tagis[Helper.Disable] <> 0)

var spellname1 as string
var spellname2 as string
var searchexpr as string
var messnames as string
var foundone as number

@valid = 1

if (field[usrChosen1].ischosen <> 0) then
foundone = 0
searchexpr = "KnowSpell." & field[usrChosen1].chosen.idstring & " & SpellType.cHelpBrd & Helper.Known"


foreach pick in hero from BaseSpell where searchexpr
foundone = 1

~ If this copy of the ability is bootstrapped by the White Wind College, the chosen spells should be marked as Free, because they don't count against our spells known limit.
if (root.tagis[Ability.cBrdSOEWWC] <> 0) then
perform eachpick.assign[Helper.Free]
endif
nexteach

if (foundone = 0) then
spellname1 = field[usrChosen1].chosen.field[name].text
@valid = 0
endif
endif

if (field[usrChosen2].ischosen <> 0) then
foundone = 0
searchexpr = "KnowSpell." & field[usrChosen2].chosen.idstring & " & SpellType.cHelpBrd & Helper.Known"

foreach pick in hero from BaseSpell where searchexpr
foundone = 1

~ If this copy of the ability is bootstrapped by the White Wind College, the chosen spells should be marked as Free, because they don't count against our spells known limit.
if (root.tagis[Ability.cBrdSOEWWC] <> 0) then
perform eachpick.assign[Helper.Free]
endif
nexteach

if (foundone = 0) then
spellname2 = field[usrChosen2].chosen.field[name].text
@valid = 0
endif
endif

if (@valid = 0) then
messnames = splice(messnames, spellname1, ", ")
messnames = splice(messnames, spellname2, ", ")
@message = "You have selected the following spells for Additional Magical Secrets but not added them to your Bard spells known: " & messnames
endif

Phase & Priority is the same on both so I didn't include them.

ShadowChemosh
March 5th, 2016, 12:09 PM
Well the problem is that the original script does not work. I just built a bard with College of Lore to confirm. :(

The issue is in the first script:

doneif (tagis[Helper.ShowSpec] = 0)

doneif (tagis[Helper.Disable] <> 0)

if (field[usrChosen1].ischosen <> 0) then
perform field[usrChosen1].chosen.pulltags[ClsAllowSp.?]
endif

if (field[usrChosen2].ischosen <> 0) then
perform field[usrChosen2].chosen.pulltags[ClsAllowSp.?]
endif

perform root.pushtags[ClsAllowSp.?]

The above "assumes" that it has been bootstapped by the class but it was bootstrapped to the "College of Lore" Custom Special. So its putting the allow spell tags on the wrong Pick.

The above needs to be changed to:

perform root.linkage[table].pushtags[ClsAllowSp.?]

That will actually go to the Custom Special and then to the class to correctly set the allow spell tags on the class.

Mergon
March 5th, 2016, 12:13 PM
I think the College of Lore was created by HL themselves . . .

Should I report this as a bug or have you already done so?

ShadowChemosh
March 5th, 2016, 12:17 PM
I think the College of Lore was created by HL themselves . . .
Yep appears so..


Should I report this as a bug or have you already done so?
If you could that would be great! :)

Mergon
March 5th, 2016, 12:18 PM
Once I get my script to work, I'll do that. Just buildign a bard to test the original before i do anything.

Mergon
March 5th, 2016, 12:25 PM
<sigh>

I wasn't thinking, I can't go in and fix the issue on the original.

My version is still not working. I guess I'll put this project on the back burner until HL fixes the bug.

ShadowChemosh
March 5th, 2016, 01:12 PM
I wasn't thinking, I can't go in and fix the issue on the original.

Nope. We need to report it to LW as a bug.


My version is still not working. I guess I'll put this project on the back burner until HL fixes the bug.
You put in the fix I listed above and it doesn't work? I tested the script with the fix and it works. So can you re-post your current script so we can see why its not working...

Mergon
March 6th, 2016, 09:13 AM
Scripts are identical to what I posted earlier, but I changed the line in the eval script as you suggested. Did I miss a change else where? I'll go over my scripts again.

ShadowChemosh
March 6th, 2016, 09:19 AM
The first small script needs to be:


doneif (tagis[Helper.ShowSpec] = 0)

doneif (tagis[Helper.Disable] <> 0)

if (field[usrChosen1].ischosen <> 0) then
perform field[usrChosen1].chosen.pulltags[ClsAllowSp.?]
endif

if (field[usrChosen2].ischosen <> 0) then
perform field[usrChosen2].chosen.pulltags[ClsAllowSp.?]
endif

perform root.linkage[table].pushtags[ClsAllowSp.?]


When I changed this on the Magical Secrets ability and a replace Thing ID everything started working.

So if the above does not work. Please repost just your scripts again and we can see...

Mergon
March 7th, 2016, 11:24 AM
Well, I have this all working which solved several scripting issues for me; once I figured out exactly what everything was doing . . . :)

Like in Pathfinder, sometimes the player has to do a wee bit of work.

Once you select your spells, you have to manually enter them into your list of prepared spells . . .

This solves my issues with Reaper feature in Death domain, the Arcane Initiate feature in the Arcane domain, and the Additional Magical Secrets feature in my own White Wind College (Healing College) feature.

Thanks a lot for the help and patience. ;)

Enforcer84
March 7th, 2016, 12:19 PM
That's a nice school!

Mergon
March 7th, 2016, 12:20 PM
Which one? :)

Enforcer84
March 9th, 2016, 07:47 AM
The White Wind College.
I like the idea.

Mergon
March 9th, 2016, 07:50 AM
I had a player who wanted to be a healer, but was tired of always playign a cleric. So I stolen a bit here and a bit there and came up with the White Wind school (which I stole from Mercedes Lackey's Valdamar novels) :)

Enforcer84
March 9th, 2016, 08:42 AM
Well I want to steal it from you!

Mergon
March 9th, 2016, 10:09 AM
Soon as I have some free time, I'll extract it to a standalone .user file. Then find out how I can send it to you.

Enforcer84
March 9th, 2016, 10:32 AM
Sweet! Thank you!