• 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

Deathwatch

The field you've set up there isn't a text field - you've set up a user-controlled numerical field. You need a derived text field:

Code:
<field
  id="AllowMods"
  name="Modification Category Allowed"
  type="derived"
  maxlength="5000">
  </field>
 
Alright so the prepwork for the tagexpr is now in place, now to figure out the script that limits which mods show.
 
so the ModCatAllw tag goes on the armor? And I need to have that compare to ModCat on the mods to determine which modifications to show?
 
Mathias,

This is what I've come up with so far, obviously its not working. What am I doing with this?

Code:
    <!-- Mod Category script, generate the tagexpr relevant for our modification gizmo -->
    <eval index="2" phase="Setup" priority="5000" name="ModCat Tag Expression generate"><![CDATA[
        if (hero.tagis[ModCatAllw.Armor] <> 0) then
          gizmo.child[ModHelper].field[AllowMods].text &= "component.Mods & ModCat.Armor"
          endif
      ]]></eval>
 
I don't see any problem with that.

First, check timing - are your ModCatAllw tags present at Setup/5000, or are they being assigned by some script that happens later?

Check your tags - be certain that the armor has the ModCatAllw.Armor tag and make certain that the mods you're testing with have ModCat.Armor.
 
When I try to add a mod to the armor it says
"Empty candidate tagexpr specified for field 'AllowMods' on pick 'ModHelper' "
 
Oh, now I see the error.

You're testing hero.tagis[ModCatAllw.Armor]

The hero doesn't have that tag - the pick you're on has that tag. Therefore that test always fails, therefore the field is alwaye empty.

Step 1: ensure that the field is never empty, even if there are no tags:

Code:
<field
  id="AllowMods"
  name="Modification Category Allowed"
  type="derived"
  defvalue="component.Mods"
  maxlength="5000">
  </field>

Step 2: change the test from hero.tagis[] to tagis[]
 
And now it is working properly.
Now to just modify that script with elseifs to cover the weapon and gear modifications.
Thanks for the help.
I am happy to see I got this implemented properly.
 
Here's something that may work better, and make it easier to expand to include other categories of modifications:

Code:
var modexpr as string
 
if (tagis[ModCatAllw.?] <> 0) then
  modexpr = " & (" & tagids[ModCatAllw.?,"|"] & ")"
  modexpr = replace(modexpr,"ModCatAllw","ModCat",0)
  gizmo.child[ModHelper].field[AllowMods].text &= modexpr
  endif

That way, it can take any ModCatAllw tags that are there, and builds a list of them, with "|" - OR inbetween each one, in case there are many of them. Then, it takes that whole list and swaps out all instances of "ModCatAllw" with "ModCat", and then adds that to the AllowMods field.

(Note that this counts on a defvalue having been set properly in that field).
 
Alright, I'll swap out what I have with this. I don't anticipate needing a large list of mod categories, but I don't know what Fantasy Flight will add later on either.

And I may need to add vehicles to the list later on once I get to that book.
 
Please copy exactly what you put in - I need to make sure your line 5 is the same as my line 5, and that there weren't any copy/paste errors.
 
I got the Signum Link working for the Signum as a modification specific to that piece of equipment. I see why you had me code it this way. Individual equipment items that have their own mods just get new tag for that specific gear piece.
 
Now to figure out what to do about the power armour history now that I have the modifications working.
 
Is it possible to create a table_dynamic on the modification form to just display itself if a certain tag is present on the character's armor?
 
Mathias,

I am starting to think Weapons and Armor will need their own Modification gizmos.
Terminator Armour has a list of weapons that the user must spend 40 requisition on, and the weapons must be mounted to the Tactical Dreadnought Armour itself.

Weapons can have multiple clips of ammo and I will need to be able to track used ammunition as well.
 
Back
Top