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
nextgenrpg
Junior Member
 
Join Date: Nov 2012
Posts: 11

Old April 26th, 2013, 04:55 PM
Hey, I cannot figure out how to add shield to this script:

Quote:
~ Get out now if wearing Medium or Heavy armor
doneif (hero.tagis[Hero.MedArmor] + hero.tagis[Hero.HeavyArmor] <> 0)
Specifically, I'd like to have this work where a buckler is the only shield you can wear without the script ending.

Essentially, this is a feat that requires that you be wearing light or no armor, and may not use shields except bucklers.

I tried adding hero.shield or hero.lightshield or hero.heavyshield but those don't seem to exist. Is there a comprehensive list of item references somewhere?

Thanks in advance.

Last edited by nextgenrpg; April 26th, 2013 at 05:00 PM.
nextgenrpg is offline   #1 Reply With Quote
bodrin
Senior Member
 
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265

Old April 27th, 2013, 08:35 AM
Unique Id's for shields

Buckler ID = shBuckler

Heavy Steel Shield ID = shHvSteel

Light Steel Shield ID = shLtSteel

Tower Shield ID = shTower


Dormio Forte Somnio


Community Created Resources :
Data Package Repositories :
d20pfsrd
Custom Character Sheets
Community Server Setup (Packs)

Hero Lab Help- Video Tutorials and Pathfinder FAQ

Created by the community for the community
bodrin is offline   #2 Reply With Quote
nextgenrpg
Junior Member
 
Join Date: Nov 2012
Posts: 11

Old April 27th, 2013, 02:46 PM
Thanks!
nextgenrpg is offline   #3 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old April 28th, 2013, 09:15 AM
Quote:
Originally Posted by nextgenrpg View Post
I tried adding hero.shield or hero.lightshield or hero.heavyshield but those don't seem to exist. Is there a comprehensive list of item references somewhere?
Make a new character. Add a buckler. Equip the buckler.

Go to "Develop->Floating Info Windows->Show Hero Tags" will show you every tag currently active on the hero. Look through the list for helpful tags. We find we have "Hero.EquipShld" and "ShldClass.Buckler" when a buckler is equipped. Or we have "Hero.EquipShld" and "ShldClass.Light" when its a light shield.

So with this info we can do the following:
Code:
~ Get out now if wearing Medium or Heavy armor
doneif (hero.tagis[Hero.MedArmor] + hero.tagis[Hero.HeavyArmor] <> 0) 
~ Get out now if wearing a shield besides a buckler
doneif (hero.tagis[Hero.EquipShld] - hero.tagis[ShldClass.Buckler] <> 0)
So tagis returns 1 or 0. So if we have a equipped shield (Hero.EquipShld) we get a value of 1. If its a Buckler (ShldClass.Buckler) it will also return 1 giving a final result of 1 - 1 = 0 which when compared to not equal to 0 will return false. If we have a light shield we get 1 - 0 = 1 which is NOT equal to zero and will return TRUE and end the script.

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   #4 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 07:07 AM.


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