Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - d20 System (http://forums.wolflair.com/forumdisplay.php?f=46)
-   -   Ring of Epic Wizardry (http://forums.wolflair.com/showthread.php?t=8800)

chogenkiboy July 12th, 2009 01:44 PM

Ring of Epic Wizardry
 
Hi,

I tried adding a Ring of Epic Wizardry V, but I'm stuck.

I started by copying Ring of Wizardry IV, which has Eval Script
if (field[gIsEquip].value <> 0) then
var result as number
result = hero.assign[Hero.Wizardry4]
endif

I cannot simply change the Eval Script to
result = hero.assign[Hero.Wizardry5]
because the tag Wizardry5 does not exist in the d20 source files.

I found a tag in in file aug_tags.st1.
<value id="Wizardry4"/> <!-- Double arcane spells from level 4 (from Ring of Wizardry) -->

I also found the following in data.hlz while Hero Lab is running
~ If we have Wizardry for this level, and these spells are arcane,
~ we get twice as many spells.
if (isarcane <> 0) then
if (i = 1) then
if (hero.tagvalue[Hero.Wizardry1] <> 0) then
field[cMemMax].arrayvalue[i] = field[cMemMax].arrayvalue[i] * 2
endif
elseif (i = 2) then
if (hero.tagvalue[Hero.Wizardry2] <> 0) then
field[cMemMax].arrayvalue[i] = field[cMemMax].arrayvalue[i] * 2
endif
elseif (i = 3) then
if (hero.tagvalue[Hero.Wizardry3] <> 0) then
field[cMemMax].arrayvalue[i] = field[cMemMax].arrayvalue[i] * 2
endif
elseif (i = 4) then
if (hero.tagvalue[Hero.Wizardry4] <> 0) then
field[cMemMax].arrayvalue[i] = field[cMemMax].arrayvalue[i] * 2
endif

What I cannot figure out is how I mimic the behavior of Wizardry4 for Ring of Epic Wizardry V to double the number of 5th level spells memorized. I do not see how srd.dat files meld with aug_tags.st1 into what I find in data.hlz, nor do I see anything I can copy in Hero Lab Editor to mimic Wizardry4.

Any advice?

Thanks

chogenkiboy July 12th, 2009 02:13 PM

By the way, I was able to use an Adjustment of Spells Cast per Day as a workaround, but it would be nice to code the epic versions of the rings as needed.

Mathias July 12th, 2009 09:09 PM

The hero tag group isn't set up as dynamic, so users can't add new tags to it. Have you tried figuring out how the adjustment adds the appropriate number of spells and putting that script on the ring?

chogenkiboy July 14th, 2009 07:34 AM

I made one quick attempt that broke my data files, which I fixed. I haven't tried again as of yet since the computation in data.hlz to use cMemMax didn't seem to work for me when I tried it.

Mathias July 14th, 2009 12:27 PM

Actually, I was talking about going into the spells/day adjustment, figuring out how that works, and using it to create the code for your ring.

Code:


<eval phase="Final" priority="10000"><![CDATA[
~ If we're not enabled, get out now
if (field[pIsOn].value = 0) then
done
endif
~ If nothing chosen, get out now
if (field[pChosen].ischosen = 0) then
done
endif
~ Add extra spell levels appropriately
var spelllevel as number
spelllevel = field[pSpellLvl].value
field[pChosen].chosen.field[cMemMax].arrayvalue[spelllevel] += field[pAdjust].value
field[pChosen].chosen.field[cCastMax].arrayvalue[spelllevel] += field[pAdjust].value
]]></eval>

field[pChosen].chosen references the class that is chosen on the adjustment, so, since we know this only works for wizards, we can replace that with:

Code:

hero.childfound[cHelpWiz]
field[pAdjust].value is the amount to increase the values by. In this case, we're multiplying by 2 instead of adding a value.

arrayvalue[spelllevel] references the level of spells we want to modify. Since we know we're modifying 5th level spells, that can be changed to arrayvalue[5].

We'll start with the if/then statement from the ring of wizardry 4 that makes sure the ring only works while it's equiped:

Code:


if (field[gIsEquip].value <> 0) then
 
endif

next, change context to the class we're modifying:

Code:


if (field[gIsEquip].value <> 0) then
hero.childfound[cHelpWiz]
endif

and to the array we're modifying, along with the correct spell level:

Code:


if (field[gIsEquip].value <> 0) then
hero.childfound[cHelpWiz].field[cMemMax].arrayvalue[5]
endif

and then multiply that value by 2:

Code:


if (field[gIsEquip].value <> 0) then
hero.childfound[cHelpWiz].field[cMemMax].arrayvalue[5] *= 2
endif

The adjustment's timing is Final, 10000. I recommend any time in the Final Phase (Users) for this script, so that the ring happens before the adjustment does (in case something else is affecting the number of spells per day, we should probably muliply before adding/subtracting).

chogenkiboy July 14th, 2009 02:15 PM

Looks like a solid approach, but specialization and Intelligence bonuses will often affect Spells per Day, and all Wizardry rings specifically exclude doubling of bonus spells.

Since base Spells per Day progression is predictable for Wizards, the adjustment could be a hard coded addition based on Wizard casting level (+1 at 9th, +2 at 10-11, +3 at 12-14, +4 at 15+)... perhaps not the most elegant approach, but viable.

Mathias July 14th, 2009 04:14 PM

Specialist spells aren't affected by this, but attribute bonus spells are. Sorry, I didn't look up the ring of wizardry to look for details before doing the calculations. If you can make it work with the set progression, go with that.

Santok1972 August 6th, 2022 03:10 PM

Is there a way to access the "cCastTot" array add the base spells per level without adding the bonus from the stat?

Sendric August 8th, 2022 02:55 AM

Quote:

Originally Posted by Santok1972 (Post 299719)
Is there a way to access the "cCastTot" array add the base spells per level without adding the bonus from the stat?

Possibly, but I don't see any examples of it being used. What are you trying to accomplish? There may be a better way.


All times are GMT -8. The time now is 04:25 PM.

Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.