• 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

CandExpr trouble

Lord Magus

Well-known member
I'm trying to code an item that is basically the same as a Lion Cloak, but allows you to polymorph into an owlbear instead of a lion. It otherwise uses the same mechanics, being based on Beast Shape II (even though Beast Shape II does not normally allow you to polymorph into a magical beast).

This is the code used by Lion Cloak on Polymorph Phase 3 to limit the shape choices to Lion

Code:
gizmo.child[PolymoHelp].field[foCandExpr].text = "Race.rmLion & HasType.tpAnimal & (RaceSize.Large1 | RaceSize.Medium0 | RaceSize.Small11 | RaceSize.Tiny12)"

I tried to replace rmLion with rOwlbear, and tpAnimal with tpMagBeast, but this does not restrict the available shapes to Owlbear, like Lion Cloak's shapes are restricted to Lion; in fact, it does not seem to limit it at all.

I'm kind of stumped and am wondering whether the internal workings of Beast Shape II actually prevent using it with a Magical Beast form. Any insight you could give me?
 
Last edited:
If the internal workings of Beast shape are setting things so that magic beasts aren't allowed, then you can check for that by using a debug. First go to Develop -> Enable Data File Debugging, then add this script to your item

Final 10000
Code:
debug "gizmo.child[PolymoHelp].field[foCandExpr].text is " & gizmo.child[PolymoHelp].field[foCandExpr].text

Integrate your changes/reload the system, then go to Develop -> Show Debug Window, does that come out like you'd expect (i.e. as you set it)?

If it turns out that is the issue, push your script to after the one which sets the candidate expression. Hope that helps!
 
Back
Top