Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Authoring Kit
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
MagicSN
Senior Member
 
Join Date: Nov 2012
Posts: 208

Old November 1st, 2014, 01:15 PM
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
MagicSN is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,214

Old November 2nd, 2014, 09:00 AM
See the !Hide.Weapon part of the list expression? That's what's set up to let you hide weapons.
Mathias is offline   #2 Reply With Quote
MagicSN
Senior Member
 
Join Date: Nov 2012
Posts: 208

Old November 2nd, 2014, 02:19 PM
Quote:
Originally Posted by Mathias View Post
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
MagicSN is offline   #3 Reply With Quote
RavenX
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633

Old November 3rd, 2014, 01:44 AM
Quote:
Originally Posted by MagicSN View Post
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.

RavenX Pronouns: She/Her

Please do not PM me to inquire about datafiles I coded "for personal use" such as Exalted, World of Darkness, AD&D, or Warhammer 40K Roleplaying. I appreciate your interest, but I do not own the Intellectual Property rights to these game systems. Nor do I have permission from any of the Publishers to distribute the data files. As such, I cannot distribute the work I have done with community on these files. They are "for personal use" only. Thank you.

I am far too busy these days to answer emails. If you message me here there is no guarantee I will get back to you at all.
RavenX is offline   #4 Reply With Quote
MagicSN
Senior Member
 
Join Date: Nov 2012
Posts: 208

Old November 5th, 2014, 12:14 PM
Quote:
Originally Posted by RavenX View Post
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
MagicSN is offline   #5 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,214

Old November 5th, 2014, 12:19 PM
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.
Mathias is offline   #6 Reply With Quote
MagicSN
Senior Member
 
Join Date: Nov 2012
Posts: 208

Old November 5th, 2014, 08:35 PM
Quote:
Originally Posted by Mathias View Post
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
MagicSN is offline   #7 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,214

Old November 6th, 2014, 06:33 AM
I'd use a prereq to prevent them from selecting it without the prerequisite ability.
Mathias is offline   #8 Reply With Quote
MagicSN
Senior Member
 
Join Date: Nov 2012
Posts: 208

Old November 6th, 2014, 08:38 PM
Quote:
Originally Posted by Mathias View Post
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.
MagicSN is offline   #9 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,214

Old November 7th, 2014, 06:47 AM
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.
Mathias is offline   #10 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 11:43 AM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.