Senior Member
Join Date: Jan 2011
Location: Quebec, QC, Canada
Posts: 464
|
I have been working on the Incantatrix PrC for the last few days, as my first "serious" HeroLab project.
I am stumped by the coding for the class capstone, which allows all Metamagic feats to be used at -1 level cost (minimum cost stays 1). (I can't find a similar ability with code to resolve this.) Also, I want to make sure that Metamagic feats costing zero (eg Energy Substitution) will stay at 0, and hypothetic Metamagic feats (none like that in the 3.5 books IIRC) that would LOWER the level cost will also keep their original cost. So Maximize Spell would become +2, Quicken Spell +3, Energy Substitution +0 and (if it existed) Feeble Spell -1. Thanks for the help! Last edited by Lord Magus; March 9th, 2011 at 02:55 AM. Reason: Quicken Spell should become +3! |
#1 |
Senior Member
Join Date: Jan 2011
Location: Quebec, QC, Canada
Posts: 464
|
So far, I have tried variations on
hero.child[Metamagic].field[mmLevel].value = hero.child[Metamagic].field[mmLevel].value - 1 (tells me there is no such thing as Metamagic) and #applypenalty[Penalty, hero.child[mmLevel].field, -1] (not working either) |
#2 |
Senior Member
Volunteer Data File Contributor
Join Date: Mar 2007
Posts: 1,245
|
You could try a foreach looking for the exact MM things and mod the "mmLevel"
|
#3 |
Senior Member
Join Date: Jan 2011
Location: Quebec, QC, Canada
Posts: 464
|
I'm down to
Code:
foreach pick in hero from ???? where "fCategory.Metamagic" if eachpick.field[mmLevel].value <2 then do nothing else eachpick.field[mmLevel].value -= 1 endif nexteach |
#4 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
You can probably just leave out the from part of the statement.
Code:
foreach pick in hero where "fCategory.Metamagic" if (eachpick.field[mmLevel].value >= 2) then eachpick.field[mmLevel].value -= 1 endif nexteach |
#5 |
Senior Member
Join Date: Jan 2011
Location: Quebec, QC, Canada
Posts: 464
|
Thanks for the help... however...
Syntax error: only derived fields can generally be modified via scripts (field mmLevel) |
#6 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
The mmLevel field is set to a value and not derived. As I remember Mathias saying, you would have to change them to be set rather than modified. For example,
Code:
hero.child[fQuickSpl].field[mmLevel].value = 3 |
#7 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Actually, Kendall, since you know how to use the debugging tools, would you be able to help with this question? I've got two deadlines within the next week, so I won't have the time I'd need to figure out how to do this until at least the end of next week.
Since he's run into a user field, and authors should always avoid having to change those in a script, why not take a look at the custom spell itself, and figure out how the mmLevel of the metamagic is turned into a modification to the level of the spell - modify the spell instead of the metamagic. Or, see if the way that heighten spell, which has a user-controlled addition to the spell level differs from the metamagics with a fixed addition to the spell levels - maybe the information is stored differently in each case, and there's another field than mmLevel that can accomplish what he's trying to achieve. (I apologize, it's been a while since I've had to delve into the mechanics of metamagics, so I don't remember all the details off-hand). |
#8 |
Senior Member
Join Date: Jan 2011
Location: Quebec, QC, Canada
Posts: 464
|
I have thought of another strategy, since a direct general modifier to mmLevel seems to be a no-no. By the way, the ability I'm trying to translate is Improved Metamagic, which is the capstone ability for the Incantatrix prestige class from Player's Guide to Faerun. It reduces the cost of all metamagic feats used by 1 level, down to a minimum cost of 1.
Would it be possible to create a Metamagic thing (mm???) that would be bootstrapped not to a metamagic feat, but to a class special ability, and which would grant a -1 "penalty" to spell level. That metamagic thing would in turn automatically be applied (through the class ability script?) to spells modified by other metamagic feats, a number of times equal to the number of mm feats with lvl adjust >1 applied to the base spell. For example, for a quickened (+4), empowered (+2), energy substitution (+0) fireball, the metamagic thing (-1) would be applied twice (as energy subst. has a lvl adjust <=1) --------- I've seen in old posts that earlier versions of HeroLab only supported metamagic level adjustments >=1, is that still true? Sorry about all this, that is the last ability I need to code before the Incantatrix is complete... and my day job is physician, not programmer! Thanks a lot! |
#9 |
Senior Member
Join Date: Jan 2011
Location: Quebec, QC, Canada
Posts: 464
|
I first tried to create a metamagic feat called Improved Metamagic, with a level adjustment of -1. It does not cause bugs, but when I try to apply it to a spell its (the feat's) level adjustment is brought to 0. So it seems negative metamagic level adjustments can't be used.
I'll submit that as a request for a future feature. Last edited by Lord Magus; March 19th, 2011 at 03:41 PM. Reason: Thought of submitting feature idea |
#10 |
|
|