• 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

custom magic item based on class level?

Quelos

Member
Hi
I'm trying to make a custom magic item, that evolves, based on class level.

The idea is: If 1st lvl wizard, gets a bonus to knowledge skills of +1, if 5th lvl gets a bonus of +2.

I'm having problems with the class level part, and hope one of you can fix that :)

if (hero.tagis[cWizard] >= 5) then
#competencebonus[hero.childfound[AllKnow], 2]
else
if (hero.tagis[cWizard] <> 0) then
#competencebonus[hero.childfound[AllKnow], 1]
endif
endif
 
Maybe something like this.

Code:
if (#levelcount[Wizard] >= 5) then
  #competencebonus[hero.childfound[AllKnow], 2]
elseif (#levelcount[Wizard] <> 0) then
  #competencebonus[hero.childfound[AllKnow], 1]
  endif
 
Well, Aaron, I don't get the error, but then again, I also don't get the bonus...
if I just put in the "#competencebonus[hero.childfound[AllKnow], 2]" then I get the bonus...
 
ok, tried another method.

if (#levelcount[Wizard] <> 0) then
field[abValue].value += 2
endif
#skillbonus[AllKnow] = field[abValue].value

This only adds an untyped bonus to all knowledge skills, at the value defined before wizard levels are checked (which it should). If I add a wizard level, there is no change (which there should be).

This leads me to guess that the problem is with the "if (#levelcount[Wizard] <> 0)" part of the code more specifically "#levelcount[Wizard]".

Any ideas how to fix this?
 
hmm, apparently I didn't submit my first reply.
#levelcount[wizard] fixed the error, but I didn't get the bonus.
if I removed the if then part, and just used "#competencebonus[hero.childfound[AllKnow], 1]" I would get the bonus.
 
What timing are you running your script at? Classes tags are added really early, but it's possible you've set your eval script to occur even earlier than that.
 
I just made a new blank, and inserted the script from above.
I pretty much have no clue what I'm doing, as it's the first time I look into doing anything customized in HL. :)

Does that mean, that I'm missing something somewhere else? If so, what?
 
The default timing is First 100, which is too early for just about everything, including this. Open up the eval script you entered, and in the box for Priority, try setting the value to 10000.

To learn some basic terminology (including what timing is), you can check out our intro seminar video from last GenCon. Found here:

https://www.youtube.com/watch?v=fOHWRXtxlhk

Edit: Heading to sleep now. I'll check back tomorrow if you still have questions.
 
Last edited:
Ok, I got the basics down now with this evolving item. I do have one more question though.

Lets say it should give a +2 enhancement bonus to int at lvl 6, +4 at lvl 10 and +6 at lvl 16. How do I get the skills that are trained (like with headband of vast intelligence) to show up at the respective levels? I recons it has something to do with bootstraps, but I have no idea how to go about it.

/Cheers :)
 
Last edited:
Whether a selector shows up is dependant on the candidate expression field having some text in it (usrCandid1 for the first selector and usrCandid2 for the second). You can use the same levelcount macro to fill in those fields only once you hit the appropriate levels.

Since there is only room for two selectors on your main pick, the third has to be on a seperate, bootstrapped helper pick. You can add a bootstrap condition to that helper pick so it isn't added until level 16. For an example of a bootstrap condition which counts class levels, take a look at the Ranger's Endurance class ability, which bootstraps the Endurance feat with a condition of 3 ranger levels.
 
ok, so if I use the rangers endurance feat method, i have:

Bootstrap:
Thing: ioINTHelp
Tags: Group Id: ClSpecWhen Tag Id: 16

This makes the 3rd skill appear at level 1 - no matter which class it is. I think I forgot to mention that it should be based on the Wizard level of the toon, and not the total level.

Whether a selector shows up is dependant on the candidate expression field having some text in it (usrCandid1 for the first selector and usrCandid2 for the second). You can use the same levelcount macro to fill in those fields only once you hit the appropriate levels.

I have no idea what to do with this information? Any chance you could come with an example?

/Thanks :)

p.s. Happy New Year :D
 
ClSpecWhen tags are just a mechanism for class specials, what I was pointing you towards was the bootstrap condition for the bootstrapped feat. Click on the class special, then hit the bootstraps button in the upper right, and find the bootstrap for fEndurance. To it's right is a button which says "Conditions", click on that and you'll see the bootstrap condition, which is a tag expression which must be satisfied before the bootstrap is added.

Actually, the example I pointed you to isn't as simple as I remember it, due to a couple other classes also reusing this special. Here is a simple version, I am sure that you can modify it appropriately.

To add a bootstrap condition to your item which only adds the extra chooser once you hit third level of ranger, the condition would look like this:

First 500
Code:
      count:Classes.Ranger >= 3

For the selectors, here is a script which would populate the 1st field. Please modify it to also have it set the 2nd at a higher level.

First 500
Code:
~ At 6th wizard level, give us a selector.
if (#levelcount[Wizard] >= 6) then
  ~ It's selecting among all skills
  field[usrCandid1].text = "component.BaseSkill"

  ~ And it should pick among skills added to the hero.
  perform assign[ChooseSrc1.Hero]
  endif
 
Back
Top