Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
In that case, the thing to test is to add proficiency in one of the exotic weapons without using any if...then statement -what you want to do is figure out if that will work on its own, and if not, what's missing.
You may also want to add an exotic weapon, then look at the weapon's tags and fields (right click on the weapon once selected). Keep those info windows open, add (the normal version of) exotic weapon profociency for that weapon, and watch for what changes in the weapon's tags and fields - once you know that, look into what your script needs to do to make those changes. |
#11 |
Senior Member
|
Interesting stuff... thanks for the debug lesson! The proficiency can be granted without the IF...THEN in the First or Pre-Levels phase. Any later than that and weapon assignments fail. The #hasfeats macro won't operate in either of these phases (i.e. returns '0'). It seems to like the Post-Levels phase and weapons can't be assigned and work in the Post-Levels phase. So, basically it looks like there's a "same phase" conflict: can't use both #hasfeats and assign weapons in the same Post-Levels phase. Also, the difference is a pick tag called Helper.Proficient. All of this leads me to believe that I can't use #hasfeats for the conditional in the Post-Levels phase. So I need some other way to build the conditional that will work in this phase. So what's the non-macro way for looking for a feat?
AWizardInDallas |
#12 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
hero.pickexists[fWGrpAxes] or hero.tagis[HasFeat.fWGrpAxes] - as usual, 0 means it doesn't exist, 1 means it does. In the debug menu, "floating info windows", select "hero tags" to see what you can find with tagis[], and choose "Show Selection List" to see what you can find with pickexists[].
|
#13 |
Senior Member
|
Problem solved. Here's the final working code for the two feats (all done without splitting phases and all done in the First (Users) phase:
Weapon Group (Axes) Code:
perform hero.assign[WepProf.wHandaxe] perform hero.assign[WepProf.wBattleaxe] perform hero.assign[WepProf.wGreataxe] perform hero.assign[WepProf.wWaraxeDw] var hasfeats as number hasfeats = hero.pickexists[fWGrpSpLa] + hero.pickexists[fWGrpDbl] if (hasfeats = 2) then if (hero.pickexists[wUrgroshDw] = 0) then perform hero.assign[WepProf.wUrgroshDw] endif perform hero.assign[WepProf.wAxeOrcDbl] endif Code:
perform hero.assign[WepProf.wJavelin] perform hero.assign[WepProf.wLance] perform hero.assign[WepProf.wLongspear] perform hero.assign[WepProf.wShortspr] perform hero.assign[WepProf.wTrident] var hasfeats as number hasfeats = hero.pickexists[fWGrpAxes] + hero.pickexists[fWGrpDbl] if (hasfeats = 2) then if (hero.pickexists[wUrgroshDw] = 0) then perform hero.assign[WepProf.wUrgroshDw] endif endif |
#14 |
|
|