• 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

build points for gizmos

barrelv

Well-known member
Need some directions here. Gizmos have been an experience in themselves, but I'm starting to make some headway - I think...

In this instance, to build magic items you have a housing (which uses an existing weapon or armor as the basis), then you add a power source that gives you a pool of points from which you can add runes to the item.

I've got a chooser_table to pick my power source, but I can't figure out how to get the value of the "power" field off of that pick and on to the entity so that I can then use it for the addpick value on the table_dynamic that handles the Runes...

ideas?
 
I'd have the power source component bootstrap a "power points" resource. Then, you can just add to the resmax of that resource like you'd add to any other resource. Just in this case, use container.child[whatever] instead of hero.child[whatever], since you want a resource that's in the same container as you.
 
nevermind, found my problem. there's a space between .field and [resRunePlt]

I did something wrong

Code:
    ~get the selected Capacitor item from the child and copy up some important
    ~fields
    perform state.clearfocus
    perform gizmo.findchild[Capacitor].setfocus
    if (state.isfocus <> 0) then
      container.child[resRunePlt] .field[resMax].value = focus.field[cpPower].value

getting the error "Invalid child transition syntax used"
 
Last edited:
Why not put that script on the Capacitor component?

There, it'd be one line:

Code:
container.child[resRunePlt].field[resMax].value += field[cpPower].value

(I'd use +=, not = in case there's some modification that can be added that means you have more or fewer power points to spend).
 
any idea why my resource is ending up on the hero and not the entity?

Code:
<!-- An entity for custom mechanika armor -->
<entity
  id="MeckArm"
  form="ctmMckArm">
  <bootstrap thing="MeckArmor"/>
  <bootstrap thing="resRunePlt"/>
</entity>
 
Check the enmasse entries in your bootstraps.1st file - is there something there that would add this resource to the character?

The one that comes to mind is that if you created this resource by copying another, it might still have the Helper.Bootstrap tag, which triggers one of the enmasse entries.
 
Back
Top