Re: Possible display bug with magical vestment spell
- --- In firstname.lastname@example.org, Eddy Anthony <eddyba@...> wrote:
> On 7/27/06 11:37 AM, "chackenmueller" <chackenmueller@...> wrote:
> > I have a custom coded class that can use Magical Vestment spell
> > first level spell. The spell sheet is displaying the output as a 0spell as
> > enhancement. I looked at the coding and it is using:
> > DESC:Armor or shield gains (min(CASTERLEVEL/4,5)) enhancement
> > This will normally work just fine for a cleric who gains the
> > a 3rd level spell because of rounding. The problem is at level 1,the
> > 1/4 gives a value of 0.for you
> Not a bug since it correctly follows the rules, it's just a hurdle
> since you're trying to append a house rule.reaches it
> > I'm not sure what funcation can be used to make that first portion
> > have a minimum value of 1.
> Add this to the 1st level line
> BONUS:CASTERLEVEL|SPELL.Magical Vestment|4|PREVARLT:CL,4
> This should adjust the caster level to 4 until the PC actually
> giving you a +1 through 8th level.When
> > Also, when trying to add this spell as a temporary bonus, it lists
> > the minimum caster level as 5th.
> As it should since it is coded for a 3rd level spell. But so what?
> adding it to a PC the caster level is not indicated anywhere, justthe
> effect. So just tell it 5th and it will apply the +1.I appreciate the advise but rather than use the hack you specified, I
> ~ Eddy Anthony (MoSaT)
> ~ PCGen BoD, Data Content Second, Doc Chimp
would prefer to .MOD the spell to change the DESC to something more
inlie with the spell description without making any assumptions. How
can I get that value to be a minimum of 1? Can I do something like:
Will that work?
> I appreciate the advise but rather than use the hack you specified, IDunno, didn't look at it hard. I know you went more complicated than
> would prefer to .MOD the spell to change the DESC to something more
> inlie with the spell description without making any assumptions. How
> can I get that value to be a minimum of 1? Can I do something like:
> Will that work?
you needed. Just need a max statement in there.
DESC:Armor or shield gains (max(min(CASTERLEVEL/4,5),1)) enhancement
I like to avoid IF statements whenever possible makes things nicer on
my brain. :p I got told to avoid IF statements whenever possible back
in my HS Comp. Sci. class. We got doc'd points on our grades for
using an IF statement if we could code it another way. Not the ideal
way for programming, since sometimes a well placed IF will take care
things with the least amout of processor time, but it did get lazy
teenagers to actually work on learning and using in later modules the
complex CASE and other types of code. Side effect is someone like me
who avoids them at almost any cost.
PCGen LST Chimp
- --- In email@example.com, "Tir Gwaith" <Tir.Gwaith@...> wrote:
> Dunno, didn't look at it hard. I know you went more complicated thanI have (min(5,ceil(CASTERLEVEL/4))) in my dataset, and it calculates
> you needed. Just need a max statement in there.
> DESC:Armor or shield gains (max(min(CASTERLEVEL/4,5),1)) enhancement
properly when given as a 1st-level spell -- +1 at 1st- through
4th-level, +2 for 5th- through 8th-level, etc. I've had it that way for
ages, since the Eberron campaign gives Magic Vestment to Artificers as
a 1st-level infusion.