• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Arcane Thesis

doneif (isgizmo <> 0)

this actually breaks the entire script. It always seems to make it fail.

EDIT: changed the spell string that we're using for the top foreach loop to
spell = "thingid." & id&" & Helper.CustomItem"
 
Last edited:
Easy Metamagic eval

So popping in the tag on the Metamagic feat and testing it out worked. As usual I put my timing in Final with a huge number.

First - Grab the metamagic feat chosen
Second - Grab customized spells
Third - Grab customized spell's level
Fourth - Grab the original spell's level
Fifth- Is our metamagic feat there? ->increment level reduction
sixth - overhead.

var Lvl as number
var LvlRed as number
var MMg as string
var nlvl as number
var BLvl as number

doneif (field[fChosen].ischosen = 0)

MMg = field[fChosen].chosen.field[mmAbbr].text

foreach pick in hero where "NeedHelper.CustomSpl"
~Grab current level of the customized spell
Lvl = eachpick.field[sLevel].value
LvlRed=0
~Need the level of the base spell; I anticipate that this foreach
~will only find one thing.

foreach pick in eachpick.gizmo from BaseSpell
BLvl=eachpick.field[sLevel].value
nexteach

~Look for the metamagic chosen within the gizmos
foreach pick in eachpick.gizmo from BaseMetamg
if (compare(eachpick.field[mmAbbr].text,MMg) = 0) then
LvlRed += 1
endif
nexteach

nlvl=maximum(Lvl-LvlRed,BLvl)
perform eachpick.delete[sLevel.?]

~Set the field.
eachpick.field[sLevel].value=nlvl

~Set the correct tag
if (eachpick.field[sLevel].value = 0) then
perform eachpick.assign[sLevel.0]
elseif (eachpick.field[sLevel].value = 1) then
perform eachpick.assign[sLevel.1]
elseif (eachpick.field[sLevel].value = 2) then
perform eachpick.assign[sLevel.2]
elseif (eachpick.field[sLevel].value = 3) then
perform eachpick.assign[sLevel.3]
elseif (eachpick.field[sLevel].value = 4) then
perform eachpick.assign[sLevel.4]
elseif (eachpick.field[sLevel].value = 5) then
perform eachpick.assign[sLevel.5]
elseif (eachpick.field[sLevel].value = 6) then
perform eachpick.assign[sLevel.6]
elseif (eachpick.field[sLevel].value = 7) then
perform eachpick.assign[sLevel.7]
elseif (eachpick.field[sLevel].value = 8) then
perform eachpick.assign[sLevel.8]
else
perform eachpick.assign[sLevel.9]
endif
nexteach
 
doneif (isgizmo <> 0)

this actually breaks the entire script. It always seems to make it fail.

EDIT: changed the spell string that we're using for the top foreach loop to
spell = "thingid." & id&" & Helper.CustomItem"

Awesome. I was trying to figure this one out, but was getting nowhere. Sorry about that.

And thanks for the Easy Metamagic script. Looks good.
 
Last edited:
The timing has to be adjusted to get all the levels to change correctly:
Pre-levels 5000 works

Oh and the custom metamagic items are throwing:
Live state of gizmo 'CustSpell' is being tested before live state of parent pick 'sCustomSpl' is resolved
 
The timing has to be adjusted to get all the levels to change correctly:
Pre-levels 5000 works

Oh and the custom metamagic items are throwing:
Live state of gizmo 'CustSpell' is being tested before live state of parent pick 'sCustomSpl' is resolved

I'm not seeing this error, though I did realize that a script on a metamagic item doesn't seem to do anything. It looks like I will just have to add the tags to every available metamagic feat.
 
I did:
Final Phase 30000
if (hero.pickexists[fRepeatSpl] <>0) then
perform assign[User.EasyMM]
endif

and added the User Tags via the gui button and made sure to replace the stock metamagic item... it is working for me, except for the error.
 
I did:
Final Phase 30000
if (hero.pickexists[fRepeatSpl] <>0) then
perform assign[User.EasyMM]
endif

and added the User Tags via the gui button and made sure to replace the stock metamagic item... it is working for me, except for the error.

Yea. I think you can ignore the script and just add the tag through the gui. Also, Repeat Spell isn't a stock item. You can just modify the existing one in the Complete Arcane file. I only used replace thingid on Quicken cause its an original d20 metamagic feat and we can't modify that one.

Note: I am seeing the error now.

Update: Reload the code (ctrl-r) and the error goes away.
 
Last edited:
You guys just might have solved my years-old quandary about how to code the Forgotten Realms PrC Incantatrix' capstone power, which I had tried to script years ago but was told then that it probably couldn't be done without shenanigans such as rescripting the entire metamagic feats.

Kudos for that! Please try to craft your system so that said PrC could use it as well. Thanks.

*the power in question reduces the cost of all metamagic used by the character by 1 level, without bringing it lower than 1
 
You guys just might have solved my years-old quandary about how to code the Forgotten Realms PrC Incantatrix' capstone power, which I had tried to script years ago but was told then that it probably couldn't be done without shenanigans such as rescripting the entire metamagic feats.

Kudos for that! Please try to craft your system so that said PrC could use it as well. Thanks.

*the power in question reduces the cost of all metamagic used by the character by 1 level, without bringing it lower than 1

Attach the .user file that you have the PrC, special abilities, etc.. and I can write all the other stuff you need into it and re-attach in a day or so.
 
Thanks! Here it is. The troublesome ability is "improved metamagic"

I'm going to do two things. First I'm going to do up the Improved Metamagic. Second I'm going to clean up Focused Studies and then give the whole thing an overhaul. Probably be done by Friday. I'll let you know.
 
Okay so a few things.
  1. Updated Arcane Thesis
  2. Finished Incantatrix

Arcane Thesis: I saw something really weird when I was testing this with the finished Incantatrix. It was allowing metamagic feats that do not adjust level to incur a -1 to the level, but only when they were not the only metamagic feat on the spell. I think this is not okay. In no way should it be easier. So I adjusted the code slightly to check to make sure the mmLevel>=1 before incrementing the potential level reduction (LvlRed). Example: You put City Spell and Maximize on a Ray of Frost and you have the Arcane Thesis: Ray of Frost feat. Normally Maximize gives a +3 level adjustment (LA) and City Spell gives a +0 LA incurring a total of +3 LA. But with arcane thesis each takes a -1 bonus so now the LA is +1. Compare this to when you just Maximize the spell as incur a +2 LA. See? That is stupid.
Arcane Thesis also currently has an annoying functionality where all versions of spells in your spellbook and memorized are available for selection. Anyone know how to restrict this to just spellbook or known?

Incantatrix: Holy crap what a bear.
(1) Changed all the Focus Studies Custom Abilities to have Pick-reqs instead of Pre-reqs. This will prevent the selected school to go red once chosen (this happens because it is NOW on the forbidden list and is no longer eligable to be selected. Thus selecting it made it unselectable.). This way makes it less clear why a school is unselectable in the Add More Focused Studies window (now it only reads Precluded by XXX), but I think it is cleaner.
(2) Deleted the Improved Metamagic feat and Improved Metamagic metamagic.
(3) Added Arcane Thesis (fArcaneThe) and Easy Metamagic (fEasyMetaM).
(4) Added mmQuicken2. This should serve as a template on how to get metamagic picks to agree with how we did Easy Metamagic. I believe Sendric will be supplying a full replacement of these in the future, or you can do them yourself. I just set them to Replace Thing Id the previous mmXXX and add the User Tag EasyMM.
(5) Improved Metamagic now has a huge script which I provide here for people to make fun of, and the code in the Class Special is uncommented:
Prelevels 5000
~Set up Variables
var LvlRed as number
var OLvl as number
var spell as string
var ArcThe as number
var spellid as string
var MMg as string
var MMg2 as string
var EasyMM as number

~Go through each Spell with custom crap on it
foreach pick in Hero from BaseSpell where "NeedHelper.CustomSpl"
~Level Reduction is 0 so far
LvlRed=0
~Unknown if this spell has Arcane Thesis associated with it
ArcThe=0
~Grab the old level
OLvl=eachpick.field[sLevel].value

~Check for Arcane Thesis!!
~If you have the feat...
if (#hasfeat[fArcaneThe] <> 0) then
~Grab the original spell name
foreach pick in eachpick.gizmo from BaseSpell
spell=eachpick.idstring
nexteach
~Look through the Arcane Thesis Feats
foreach pick in Hero from BaseFeat where "HasFeat.fArcaneThe"
spellid=eachpick.field[fChosen].chosen.idstring
~If the current spell is the same as one we have Arcane Thesis for then set ArcThe to 1.
if (compare(spellid,spell)=0) then
ArcThe=1
endif
nexteach
endif
~Now go through all the metamagic feats applied to current spell
foreach pick in eachpick.gizmo from BaseMetamg
~unsure if this metamagic feat is associated with the Easy Metamagic feat
EasyMM=0
~Grab the abbreviation of the current Metamagic on the spell
MMg=eachpick.field[mmAbbr].text
~Look through each Easy Metamagic feat
foreach pick in hero from BaseFeat where "HasFeat.fEasyMetaM"
MMg2=eachpick.field[fChosen].chosen.field[mmAbbr].text
~if this matches the current metamagic ON the current spell set EasyMM=1
if (compare(MMg,MMg2)=0) then
EasyMM=1
endif
nexteach

~Now this is awesome...
~If the current spell is not arcane thesisized and if the current metamagic is not easy then so long as it incurs a +2 LA we subtract 1.
~If it is not thesisized and is easy then Easy Metamagic will already be taking 1 off so we need an LA of atleast 3 to bother
~If it is thesisized but not easy then Arcane Thesis will already be taking 1 off so we need an LA of atleast 3 to bother
~If it is thesisized and easy then they both will be taking 1 off so we need an LA of atleast 4 to bother
if (ArcThe=0) then
if (EasyMM=0) then
if (eachpick.field[mmLevel].value>=2) then
LvlRed +=1
endif
else
if (eachpick.field[mmLevel].value>=3) then
LvlRed +=1
endif
endif
else
if (EasyMM=0) then
if (eachpick.field[mmLevel].value>=3) then
LvlRed +=1
endif
else
if (eachpick.field[mmLevel].value>=4) then
LvlRed +=1
endif
endif
endif
nexteach
~Delete all sLevel tags
perform eachpick.delete[sLevel.?]
~Take off all level reductions due to metamagics and put into field
eachpick.field[sLevel].value=OLvl-LvlRed
~Assign the correct tag
if (eachpick.field[sLevel].value = 0) then
perform eachpick.assign[sLevel.0]
elseif (eachpick.field[sLevel].value = 1) then
perform eachpick.assign[sLevel.1]
elseif (eachpick.field[sLevel].value = 2) then
perform eachpick.assign[sLevel.2]
elseif (eachpick.field[sLevel].value = 3) then
perform eachpick.assign[sLevel.3]
elseif (eachpick.field[sLevel].value = 4) then
perform eachpick.assign[sLevel.4]
elseif (eachpick.field[sLevel].value = 5) then
perform eachpick.assign[sLevel.5]
elseif (eachpick.field[sLevel].value = 6) then
perform eachpick.assign[sLevel.6]
elseif (eachpick.field[sLevel].value = 7) then
perform eachpick.assign[sLevel.7]
elseif (eachpick.field[sLevel].value = 8) then
perform eachpick.assign[sLevel.8]
else
perform eachpick.assign[sLevel.9]
endif
nexteach
 

Attachments

Last edited:
Thanks a million times! Considering this was the first project I tried when I got HeroLab, I guess I now see it was way more than I could chew then... And even now.
 
Lord Magus,

Is this or anything else you have something you would be willing to share with the community? There's someone working on some Forgotten Realms stuff, but its largely not been covered in the community set. I would like to change that if possible.
 
Doh! there is a mistake in all this that I hadn't noticed. Easy Metamagic cannot reduce a modified spell to less than one level higher than normal... so each metamagic has to add at least 1.
 
Doh! there is a mistake in all this that I hadn't noticed. Easy Metamagic cannot reduce a modified spell to less than one level higher than normal... so each metamagic has to add at least 1.

I noticed that and didn't include any metamagics that increase spell level by less than 2 when tagging them with User.EasyMM. :D
 
Lord Magus,

Is this or anything else you have something you would be willing to share with the community? There's someone working on some Forgotten Realms stuff, but its largely not been covered in the community set. I would like to change that if possible.

Incantatrix was the only HL project I did for d20 that got anywhere. After that, my group converted to Pathfinder; I have a few half-finished PF projects lying around, but RL has gotten in the way quite a bit in the past months
 
Back
Top