Senior Member
Join Date: Oct 2011
Location: Portland
Posts: 313
|
Hey I'm trying to word this right, it's the bootstrap equivalent of the "if disabled get out of here."
so I have a natural weapon for a quasi shape-shifter that only works when in their 'combat' form. is there a version of the "if (field[abilActive].value <> 0)" argument I can put in the bootstrap condition? |
#1 |
Senior Member
Join Date: May 2016
Posts: 608
|
You can create a new tag to apply to the hero to check for and then write some scripts similar to what is in the Rage ability of the barbarian. When the ability button is checked, your scripts set Hero.ClawOK, so on your claw bootstrap you can check for Hero.ClawOK (as an example). You generally can create new tags in the .1st files (look at the community .1st files - they are just text).
Another thought is to set the livename and sbName on the Claw attack to be "Claw (Combat Mode Only)", like all the lycanthropes do. This leaves the claw stat on the sheet but at least in parentheses it shows not to use it. |
#2 |
Senior Member
Join Date: Oct 2011
Location: Portland
Posts: 313
|
Yeah that second one probably works fine, but the first is intriguing
I'll look into that. |
#3 |
Senior Member
Join Date: Oct 2011
Location: Portland
Posts: 313
|
Thank you for the response, by the way
|
#4 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
Code:
fieldval:abilActive <> 0 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. |
|
#5 |
Senior Member
Join Date: Oct 2011
Location: Portland
Posts: 313
|
Thank you as well!
|
#6 |
Senior Member
Join Date: May 2016
Posts: 608
|
I always forget that way.
I have a followup ShadowChemosh if you could indulge. For this example, wClaw is probably being bootstrapped by the racial ability that you need to check the field for so the fieldvalue is local. What if you had wClaw external to that ability? Normally in a script you would check for the activation like: Code:
hero.childfound[rAbility].field[abActive].value <> 0 Code:
thingid.rAbility & (fieldval:abilActive <> 0) A secondary to this (to the code gods, not you ShadowChemosh) is why does fieldval only return the first integer digits encountered? It makes writing a decent script looking for CR values below 0.5 really hard since it always returns 0 for anything that has a decimal place and a leading 0.... Last edited by dungeonguru; November 15th, 2017 at 04:19 AM. |
#7 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Simple answer is you can't. Pretty much you would need to then set a Local Variable like this:
Code:
field[abValue5].value = hero.childfound[rAbility].field[abActive].value Code:
fieldval:abValue5 <> 0 Code:
If (hero.childfound[rAbility].field[abActive].value <> 0) Then perform hero.assign[Custom.ThingOn] Endif Code:
Custom.ThingOn 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. |
#8 |
Senior Member
Join Date: May 2016
Posts: 608
|
Thanks ShadowChemosh!
|
#9 |
|
|