Senior Member
Volunteer Data File Author
Join Date: Feb 2009
Posts: 173
|
I think I'm missing something regarding bootstraps and containerreq scripts. I'm trying to identify when a Tao (a trait) is part of an advance, apply a tag to the Tao, then test against that tag in the containerreq script within a bootstrap element (with the goal of setting the bootstrapped pick not live).
However, I think the tag expression testing for the Helper.NoEffects tag is failing, when I think it ought not to be: when the Tao is attached to the gizmo on an Advance. Details: So, in an Initialize 1500 eval script on the Tao component, I'm testing whether container.ishero. Debug confirms the value to be 0, so the container is a gizmo (an Advance). I assign a tag Helper.NoEffects. In thing_taos.dat, I've got bootstrap elements with containerreq elements testing for Helper.NoEffects and the trtUser of the Tao (containerreq runs at Initialize 9000): Code:
<child entity="entTao"> <bootstrap thing="teSureFtd"> <containerreq phase="Initialize" priority="9000" name="Calc Bootstrap"><![CDATA[ Helper.NoEffects = 0 & fieldval:trtUser >= 1 ]]></containerreq> <autotag group="TaoGroup" tag="LightStep"/> </bootstrap> ...[other bootstrap elements and close child]... The problem is that the Tao associated with the Advance gizmo is passing the Helper.NoEffects = 0 test when it should be failing. Thoughts? Thanks in advance with large gratitude as always. Last edited by Kairos; April 28th, 2013 at 01:05 PM. Reason: formatting |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
The container of a pick with a gizmo (aka where this containerreq is looking) is the gizmo container, not the pick that is the origin of that gizmo. That means you can't test a field value on the pick.
In the script that assigns Helper.NoEffects, can you revise that to also test field[trtUser].value >= 1?, and only assign the tag if that passes - that way, the containerreq only has to test for: Code:
!Helper.NoEffects |
#2 |
Senior Member
Volunteer Data File Author
Join Date: Feb 2009
Posts: 173
|
Quote:
I can't believe I missed that gizmo context! That did the trick, thanks. I ended up saving out the trtBonus value on the Tao into a field late in the Final phase so that it's available early in the eval cycle in order to construct a Helper.Level? tag. Works like a charm. PS: With the exception of some output tweaking and some shakedown testing, I think you just helped me put the cout de grace on this ruleset. Last edited by Kairos; April 28th, 2013 at 04:19 PM. |
|
#3 |
|
|