Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - D&D 5th Edition SRD
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
dungeonguru
Senior Member
 
Join Date: May 2016
Posts: 608

Old May 8th, 2017, 07:08 AM
So I copied a script from a monster that was adding (Humanoid Form Only) to the non-natural weapons and noticed that SRD weapons don't have a livename/sbname on all weapons? Not sure if it's a glitch or intentional but it causes an issue on the statblock where the weapon is listed with just the name " (Humanoid Form Only)."

Is it good practice to call out the base weapon name directly? The script examples are below (both are run in Rendering phase):

OLD SCRIPT (doesn't work):
Quote:
foreach pick in hero from BaseWep where "!wGroup.Natural"
eachpick.field[livename].text &= " (Humanoid or Hybrid Form Only)"
eachpick.field[sbName].text = eachpick.field[livename].text
nexteach
MY SCRIPT (works OK):
Quote:
foreach pick in hero from BaseWep where "!wGroup.Natural"
eachpick.field[livename].text = eachpick.field[name].text & " (Humanoid Form Only)"
eachpick.field[sbName].text = eachpick.field[livename].text
nexteach
dungeonguru is offline   #1 Reply With Quote
Mergon
Senior Member
 
Join Date: Sep 2012
Location: Ottawa, Canada
Posts: 788

Old May 8th, 2017, 09:07 AM
I've had the same issue at times when using '&='. Like you, when I use the method you did it works.

I went with the old adage, if a method works, go with it.

Watch your back, Conserve your ammo,
and NEVER cut a deal with a dragon!
Mergon is offline   #2 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old May 8th, 2017, 09:13 AM
This is all based on "timing" your script is running too early and Livename has not been set yet.

In addition I would not do a foreach loop with the amount of CPU it requires to just set a name. Why can't you just set the names when you bootstrap?

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   #3 Reply With Quote
Mergon
Senior Member
 
Join Date: Sep 2012
Location: Ottawa, Canada
Posts: 788

Old May 8th, 2017, 09:19 AM
I was just commenting on the use of '&='.

I quite agree with ShadowChemosh on this. When bootstrapping I'd go to the fields section of the bootstrapped item. I'd add the field - livename and then the new name.

Watch your back, Conserve your ammo,
and NEVER cut a deal with a dragon!
Mergon is offline   #4 Reply With Quote
dungeonguru
Senior Member
 
Join Date: May 2016
Posts: 608

Old May 8th, 2017, 03:50 PM
Quote:
Originally Posted by ShadowChemosh View Post
In addition I would not do a foreach loop with the amount of CPU it requires to just set a name. Why can't you just set the names when you bootstrap?
I was working on a shapeshifter and I'm lazy enough to want the PC to do the heavy work. I would rather put this into the eval script, so that later when I copy 4 or 5 of the same creature and then go back and give them each different weapons, I don't have to use the Adjustments tab to modify an attack new names and new damages - just go to gear and pick shortsword for one and give another a club. Or (heaven help me), I give a copy of my files to one of my less technical players to keep track of his new lycanthrope PC...

Now for the bite attack the same race gets - that livename gets the "(in beast mode only)" added to the end of the livename/sbName and that's done in the bootstrap rather than a script.

Last edited by dungeonguru; May 8th, 2017 at 03:55 PM.
dungeonguru is offline   #5 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 08:14 AM.


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