PDA

View Full Version : Scaling an item


MiEvil
May 19th, 2010, 05:42 AM
I really enjoy the editor but have a hard time creating some of the stuff that was given to me by the DM.
Is there a way to scale an item? Such as at level 5 get +5 to stealth then at Level 10 +7 to stealth and 15 so on.
There is nothing in any of the guides since it’s a made up item.

ShadowChemosh
May 19th, 2010, 06:50 AM
You can do something like the following script on to the "Eval Scripts" of the weapon or item power.


~Pre-Attributes 5,000
if (#totallevelcount[] >= 5) then
#skillbonus[skStealth] += 5
endif
if (#totallevelcount[] >= 10) then
#skillbonus[skStealth] += 2
endif
if (#totallevelcount[] >= 15) then
#skillbonus[skStealth] += 2
endif
if (#totallevelcount[] >= 20) then
#skillbonus[skStealth] += 2
endif


Granted this is a very simple way of doing it, but it works. At each level adjust past 5 you just want to add the next increase that was given at the previous levels.

Hope that helps.

MiEvil
May 21st, 2010, 06:41 AM
it doesn't seem to work, unless I'm missing something.
Anyway the item that was given to me has:

disable device
escape artist
slight of hand
appraise
stealth
disguise

with a scaling effect lvl 5 +3 lvl10 +5 lvl 15 +8 lvl 20 +12
Nice DM guess he didn't want my Rouge/ assassin to be doing nothing.

So I don't know if the coding has to permit stacking or not.

ShadowChemosh
May 21st, 2010, 08:06 AM
it doesn't seem to work, unless I'm missing something.
Without more information I don't know what to tell you. The above script I did in HL and attached it to a weapon. As the character leveled up so did the bonus to stealth so I know it works.

Did you get any error message or anything when you compiled it with "Test(Now)!"???

MiEvil
May 21st, 2010, 11:24 AM
oops sorry forgot to add it in. It is supposed to be an Icon worn around the neck. I was trying to create it in wondrous. I've checked off: appears as a wondrous item, can be equiped and powers always available but I'll probably change that to available when equiped. Cost and everything else I'll have to talk to the DM. Other than that I really don't know what else it needs.

MiEvil
May 21st, 2010, 11:33 AM
and there was no error message and the skill bonus was not added to stealth.

Mathias
May 21st, 2010, 11:40 AM
I think timing may be your problem. At the top of the Eval Script window is a dropdown to select which phase to schedule this script in, and a field to enter the specific priority within that phase. The default is First/100, and the script ShadowChemosh wrote won't do anything if it runs at that time, because the level of the character hasn't been calculated yet, so it's still 0.

The first line of his script was the instruction as to what phase and priority to use - Pre-Attributes/5000.

MiEvil
May 22nd, 2010, 08:05 AM
Thanks everything works. But now I have two other problems.

1) how do I make it only work when it's equiped? the code that I have been using for other items is:

if (field[gIsEquip].value <> 0) then
#competencebonus[hero.childfound[skStealth], 5]
endif

2) the scaling code doesn't seem to work for the red mantis assassin. For lvl 10 character (lvl 5 rogue and lvl 5 assassin) it works fine, when 5 lvls of red mantis assassin replaced the lvl 5 assassin it did not add in the lvl 10 bonus.

MiEvil
May 22nd, 2010, 08:19 AM
I should add that my character is only based on the red mantis assassin. So if there is something about the character that is not allowed I would like to work around it.

thanks again.

Mathias
May 22nd, 2010, 09:55 AM
You've got the correct "are we equipped code - so now just wrap it around the whole thing.


if (field[gIsEquip].value <> 0) then
~all the code you've written
endif

Mathias
May 22nd, 2010, 10:00 AM
I have no idea how it was created, but there appears to be a bug preventing the Red Mantis Assassin from counting towards #totallevelcount[]. It doesn't exist on any of the other adventure path prestige classes, so how did it get there?

It'll be fixed in the next update, thanks for pointing it out.

MiEvil
May 22nd, 2010, 11:48 AM
Everything works great, thanks for the help Mathias and Shadowchemosh.
Look forward to the update.