• 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

Optional Weapons

MagicSN

Well-known member
I have weapons defined like this:

<thing id="wpUnarm" name="Unarmed Strike" description=" " compset="Melee" holdable="no">
<tag group="WepDamage" tag="1"/>
<tag group="WepCat" tag="wcSimple"/>
<tag group="WepProp" tag="Bludg"/>
<tag group="WepProp" tag="OffHand"/>
</thing>

and an Armory list like this:

<portal
id="arMelee"
style="tblNormal">
<table_dynamic
component="Gear"
showtemplate="arWpnPick"
choosetemplate="arWpnThing"
buytemplate="BuySizCash"
selltemplate="SellCash">
<list><![CDATA[
component.WeapMelee & !Hide.Weapon
]]></list>
<candidate inheritlist="yes"><![CDATA[
!Equipment.Natural & !component.MagicStaff & !User.HexbladeWp &!Helper.FeatHack
]]></candidate>
<description/>
<headertitle><![CDATA[
@text = "Melee Weapons"
]]></headertitle>
<additem><![CDATA[
@text = "Add New Melee Weapons"
]]></additem>
</table_dynamic>
</portal>

Now I want to make the display of some of the weapons based on if a specific Hero Tag is present (like Hero.IsSpecial). How can I do this?

I tried using

<containerreq phase="Initialize" priority="10">Hero.IsSpecial</containerreq>

in the weapon definition, but the effect I got was that - in this example the tag Hero.IsSpecial was present only if a special class (which is part of houserules) was at least of level 10 - when I leveled up the character to level 10 the weapon still was not there. Only when I leveled some more - or saved the character and reloaded - the weapon appeared. What am I doing wrong? Or is there a better way to do this?

Thanks in advance.

Best regards,
MagicSN
 
See the !Hide.Weapon part of the list expression? That's what's set up to let you hide weapons.
 
See the !Hide.Weapon part of the list expression? That's what's set up to let you hide weapons.

But how do I set this Hide.Weapon based on when a specific feat is present or not present (a weapon not choosen for a character, so not by "foreach pick in hero", but one from the general list of weapons? Is there a specific foreach to access the weapon-list?

Thanks.

MagicSN
 
But how do I set this Hide.Weapon based on when a specific feat is present or not present (a weapon not choosen for a character, so not by "foreach pick in hero", but one from the general list of weapons? Is there a specific foreach to access the weapon-list?

Thanks.

MagicSN

A script in the feat that runs a foreach loop through the weapons on the hero you want the tag applied to.
Code:
foreach pick in hero from BaseWep where "thingid.?"
  perform eachpick.assign[ the tag ]
  nexteach

BaseWep would be whatever your weapon component is, and the ? would be the unique id for the item your looking to apply the tag to.
 
A script in the feat that runs a foreach loop through the weapons on the hero you want the tag applied to.
Code:
foreach pick in hero from BaseWep where "thingid.?"
  perform eachpick.assign[ the tag ]
  nexteach

BaseWep would be whatever your weapon component is, and the ? would be the unique id for the item your looking to apply the tag to.

I tried (as a quick test with all weapons, so I would expect this code-piece would make all weapons disappear):

foreach pick in hero from WeapMelee
perform eachpick.assign[Helper.Disable]
perform eachpick.assign[Hide.Weapon]
nexteach

Instead all Weapons where still there. I tried the same with WeaponBase, but this had no different result.

Any ideas?

Thanks.

Best regards,
MagicSN
 
What list expression are you using on your table?

Also, are these bootstrapped weapons, or user-added weapons that you're testing with? User-added picks may never be hidden on the table they were added to. Unarmed strike is presumably bootstrapped to all characters, so this shouldn't be a problem for that weapon.
 
What list expression are you using on your table?

Also, are these bootstrapped weapons, or user-added weapons that you're testing with? User-added picks may never be hidden on the table they were added to. Unarmed strike is presumably bootstrapped to all characters, so this shouldn't be a problem for that weapon.

I could manage to fix the issue for Unarmed Weapon (where I did not need to hide it, just to modify it's tags which worked - basically the tag displaying how much damage the unarmed strike performs).

The remaining issue is with a houseruled spec where I would want the user-added weapon only to appear if the Dragon Descendant Spec is chosen for the character in question.

You see my table in the first post. And here is the weapon:

<thing id="wpDrClaw" name="Half-Dragon: Claw" description=" " compset="Melee" holdable="no">
<tag group="WepDamage" tag="1d6p"/>
<tag group="WepCat" tag="wcMartial"/>
<tag group="WepProp" tag="Versatile"/>
<tag group="WepProp" tag="Slashing"/>
<tag group="WepProp" tag="Light"/>
<tag group="WepProp" tag="Finesse"/>
<pickreq thing="ppFgtDrag"/>
</thing>

The weapon is not bootstrapped. The matter is about the Armory, that it should not appear there, so that it is not even selectable for a character with the wrong spec. Currently I have it shown there only as proficient with the spec, but it would be nicer, if it would not appear at all, if the character has the wrong spec.

Thanks again!

MagicSN
 
I'd use a prereq to prevent them from selecting it without the prerequisite ability.

This is what I currently do. Still I would PREFER in this case for it not to appear. But if this is not possible I will just stay with a prereq.
 
Normally, if an ability gave you claws, I'd just bootstrap it - the user wouldn't need to add the claws separately from the ability.
 
Back
Top