Senior Member
Join Date: Apr 2013
Location: Poughkeepsie, NY
Posts: 102
|
I'm having some trouble adding this feat to Hero Lab for 2 reasons.
First, I cannot seem to see Armor or Shields as a Select From... category. Is there a way to create a custom one? This would be the most straightforward way to implement this feat and then in the eval script do the mumbo-jumbo to see if that type is equipped and then apply the bonus... which brings me to my second part. I've resigned for now to make three versions of the feat: Shield Specialization (Buckler), Shield Specialization (Light Shield), and Shield Specialization (Heavy Shield). But I'm having trouble with checking to see if that type of shield is equipped and then adding the bonus to my AC. I found a Hero tag EquipShld and within each shield I found gIsEquip (either 1 or 0) so I'm asking how I can combine this knowledge. How do I write the eval script that first exits is a shield isn't equipped and then checks to see if the shield type matches the one corresponding to the feat. |
#1 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
This feat is also in the community set. There's quite a lot there, actually, and I recommend checking it out here before you try redoing all of this work.
The implementation of the feat in the community set is a little weird, but it seems to work ok. To answer your questions, though, you can't really combine the tag and field in the same line. You could use the tag like this, though: Code:
if (hero.tagis[Hero.EquipShld] <> 0) then <bunch of stuff> endif |
#2 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
Actually, you can check both a field and a tag using the tagexpr function, provided the context you are in permits it. Here are a couple examples of tagexpr in action:
Code:
if (container.tagexpr[Helper.NoPowers & !hero#source.OptAddPow] <> 0) then ~ do stuff endif if (focus.tagexpr[fieldval:cArcFStart > 0 & hero#Hero.MultiFamil & !hero#CompHas.cArcFMult] <> 0) then ~ Do other stuff endif |
#3 |
Senior Member
Join Date: Apr 2013
Location: Poughkeepsie, NY
Posts: 102
|
Yeah downloaded that set and I'm proud to say that the duplicated work I've already done was for the most part just as good as the Lawful_g set. Some of the stuff there is a LOT better though...
|
#4 |
|
|