Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
poilbrun
Junior Member
 
Join Date: Aug 2010
Posts: 7

Old August 22nd, 2010, 03:43 AM
Hello all
I'm trying to add the Heirloom Weapon trait from Adventurer's Armory in Hero Lab. What the trait does is threefold:
  1. Give a masterwork weapon for the price of a normal one
  2. Make the character proficient with the use of that weapon
  3. Give a +1 Trait bonus on attack rolls with that weapon

I don't care too much if the bonus are for that specific weapon or any weapon of its type, so here is how I resolved it:
  1. Nothing automated, I just create the custom weapon and only pay the amount for a normal weapon
  2. Code:
    var v_tag as string
    v_tag = "Helper.ExoticProf"
    call ChosenProf
  3. That's where I'm stuck. It works if I do:
    Code:
    foreach pick in hero from BaseWep where "IsWeapon.wSwordBast"
      eachpick.field[wAttBonus].value += 1
      nexteach
But of course I would prefer if it gave the bonus to the weapon I chose in the drop-down rather than have to define the weapon in the code. By looking around, I found that I can use [usrChosen1].chosen to get the tag from the dropdown list, but I don't uderstand the syntax I need to use to include it instead of "IsWeapon.wSwordBast".

Can anyone help?
poilbrun is offline   #1 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old August 22nd, 2010, 08:11 AM
Quote:
Originally Posted by poilbrun View Post
Code:
foreach pick in hero from BaseWep where "IsWeapon.wSwordBast"
  eachpick.field[wAttBonus].value += 1
  nexteach
But of course I would prefer if it gave the bonus to the weapon I chose in the drop-down rather than have to define the weapon in the code. By looking around, I found that I can use [usrChosen1].chosen to get the tag from the dropdown list, but I don't uderstand the syntax I need to use to include it instead of "IsWeapon.wSwordBast".

Can anyone help?
Change the above to the following:
Code:
      ~ Add to attacks
      field[usrChosen1].chosen.field[wAttBonus].value += 1
Once the Thing is chosen you can access the fields of the Thing directly. You don't need to go and try and get the thing again.

Hero Lab Resources:
Pathfinder - d20pfsrd and Pathfinder Pack Setup
3.5 D&D (d20) - Community Server Setup
5E D&D - Community Server Setup
Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources.
Created by the community for the community
- Realm Works kickstarter backer (Alpha Wolf) and Beta tester.
- d20 HL package volunteer editor.
ShadowChemosh is offline   #2 Reply With Quote
poilbrun
Junior Member
 
Join Date: Aug 2010
Posts: 7

Old August 22nd, 2010, 10:19 AM
Thank you for your help, but it does not work when I try it...

and thanks also for the data sets on d20pfsrd

Last edited by poilbrun; August 22nd, 2010 at 10:23 AM.
poilbrun is offline   #3 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old August 23rd, 2010, 09:29 AM
Phase: Pre-Levels, Priority: 10000

Code:
 
~if nothing's been chosen, there's nothing we can do
doneif (field[usrChosen1].ischosen = 0)
 
~find the weapon we chose and make it proficient
perform field[usrChosen1].chosen.assign[Helper.Proficient]
 
~add a +1 attack bonus
field[usrChosen1].chosen.field[wAttBonus].value += 1
Mathias is offline   #4 Reply With Quote
poilbrun
Junior Member
 
Join Date: Aug 2010
Posts: 7

Old August 25th, 2010, 08:22 AM
Thank you for your help, but this also does not work. I can use permanent adjustments to solve the issue, so I'll manage until the release of the data set.

By the way, I really appreciate that you tried to help and did not just say that it would be in a future data set. As I'm a new customer, that kind of attitude really comforts me in the belief that I chose the right character generator.
poilbrun is offline   #5 Reply With Quote
risner
Senior Member
Volunteer Data File Contributor
 
Join Date: Jun 2010
Posts: 623

Old August 25th, 2010, 08:46 AM
I made this for Adventurer's Armory.

Here is the script I used
First Priority 1000
~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)

var v_tag as string
v_tag = "Helper.ExoticProf"
call ChosenProf

~ Add to attacks
field[usrChosen2].chosen.field[wAttBonus].value += 1

Eval Rules
Post Attributes Priority 10000

~ If we haven't chosen anything, get out
@valid = 1
doneif (field[usrChosen1].ischosen = 0)

~ Check the attribute requirements for taking an exotic weapon
~ proficiency
var v_req as number
var v_current as number
var v_attr as string
v_req = field[usrChosen1].chosen.tagvalue[StrReq.?]
v_current = hero.child[aSTR].field[aFinalVal].value
v_attr = "Strength"
call fExoticAtt
v_req = field[usrChosen1].chosen.tagvalue[DexReq.?]
v_current = hero.child[aDEX].field[aFinalVal].value
v_attr = "Dexterity"
call fExoticAtt
v_req = field[usrChosen1].chosen.tagvalue[ConReq.?]
v_current = hero.child[aCON].field[aFinalVal].value
v_attr = "Constitution"
call fExoticAtt
v_req = field[usrChosen1].chosen.tagvalue[IntReq.?]
v_current = hero.child[aINT].field[aFinalVal].value
v_attr = "Intelligence"
call fExoticAtt
v_req = field[usrChosen1].chosen.tagvalue[WisReq.?]
v_current = hero.child[aWIS].field[aFinalVal].value
v_attr = "Wisdom"
call fExoticAtt
v_req = field[usrChosen1].chosen.tagvalue[ChaReq.?]
v_current = hero.child[aCHA].field[aFinalVal].value
v_attr = "Charisma"
call fExoticAtt

Trait Category Equipment
Select from All Weapons
Restrict First List To all things
2nd Custom Expression thingid.iMagWeapon
Restrict Second List to all picks on hero
risner is offline   #6 Reply With Quote
poilbrun
Junior Member
 
Join Date: Aug 2010
Posts: 7

Old August 25th, 2010, 10:31 AM
Thanks a lot Risner, that works!

Just a note: don't forget to make the weapon Masterwork. I didn't at first, but then it does not appear in the list. It might be worth it to check if it's possible to automatically add a masterwork version of the weapon when you select the feat. I tried with Bootstrap, but you have to choose what you add from the list, so I don't know how you would get the information from the selection field.
poilbrun is offline   #7 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 01:21 AM.


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