• 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

Adding a form to Serithtial

wdmartin

Well-known member
I need to adjust the code for the magic weapon Serithtial so that it can assume the form of my PC's favored weapon.

I copied the thing, renamed it, and added a couple new bootstraps inside the magic weapon gizmo:

attachment.php


The improvised weapon power works fine, though it triggers an error specifying that magic weapons can't be improvised. This one can, because GM fiat.

The only problem is that "shovel" is not appearing in the selector:

attachment.php


The thing wShovel exists and has been working fine for the whole campaign. I set a condition on it (First, 450, "fieldval:usrIndex = 8"). That's identical to all the other forms, except I incremented the usrIndex value by one.

What else I need to do in order to make this form show up in the selector?
 

Attachments

  • sc1.png
    sc1.png
    89.2 KB · Views: 56
  • sc2.png
    sc2.png
    92.5 KB · Views: 56
This item uses custom usrArray menu for weapon type choice.
it is not a tag-based choice - just harcoded array of possible values.
It looks like editor doesn't provide you way to modify it, so,
open your user file with any editor, find menu definition:

<arrayval field="usrArray" index="7" value="Short sword"/>

and add your Showel there:

<arrayval field="usrArray" index="8" value="Showel"/>

Don't forget to make Gizmo bootstrap conditional:

<bootstrap thing="wShovel">
<containerreq phase="First" priority="450">fieldval:usrIndex = 8</containerreq>
</bootstrap>
 
I figured it out.

The bootstrap was just fine, but the options that display in the UI are set up inside the usrArray. I have no idea how you're supposed to edit that in the HL editor -- I figured it out by opening up the .user file in a text editor and reading the XML. Once I added this line:

Code:
<arrayval field="usrArray" index="8" value="Shovel"/>

... the option appeared in the drop down and worked. I was able to change the form to a shovel. I also set up the Improvised weapon quality to require the same selection on the drop-down, so it only counts as improvised when it's a shovel.

Finally, the magic sauce to get rid of the error saying that improvised weapons can't be magical/masterwork, I added an eval script on the item that runs at First/10000 and says this:

Code:
perform hero.assign[Custom.MagImprov]

That's cribbed from the Monk of the Empty Hand archetype courtesy of an old post by Matthias, and it makes me very happy that that error won't be blaring in my face any longer.

So it all works now. Yay!
 
Last edited:
Back
Top