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
Matt Droz
Senior Member
 
Join Date: Apr 2010
Posts: 152

Old May 5th, 2014, 08:48 AM
I just noticed these procedures in the Dragon races to set their special weapons and fly statistics. I'm trying to use SetDraWep for a new dragon, but when I added it to the dragon's Pre-Levels: Priority 9900, I'm getting the following error:

Code:
Attempt to access 'focus' pick from script when no focus exists
Location: Procedure 'SetDraWep' near line 30

Attempt to access 'focus' pick from script when no focus exists
Location: Procedure 'SetDraWep' near line 41
Ideas/Suggestions?

Matt Droz Community material (Forgotten Realms & Non-SRD/Retro)
Matt Droz is offline   #1 Reply With Quote
AndrewD2
Senior Member
 
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975

Old May 5th, 2014, 09:06 AM
I could be wrong but I'm guessing that you need to make sure you have:

raDrBreath

bootstrapped to the race and have the fields abValue, abVaule2, and abValue4 properly set according to what the special says

Quote:

~ The dragon race should bootstrap this special with an abValue = the
~ number of dice, and abValue2 = to the die size and a BloodEner.? tag
~ for the energy type. Lines should set abValue4 equal to 1. The procedure
~ we call will set the range (stored in abValue3) & livename based on those
~ and the variables we set before calling it.
You also need to have the BloodEner.? tag set to the proper energy type. This is all just my guess looking at the scripts for the items. I can't see the actual procedure but I'm guessing it's trying to do a setfocus on the raDrBreath thing and if it's not there it can't set focus.
AndrewD2 is offline   #2 Reply With Quote
Matt Droz
Senior Member
 
Join Date: Apr 2010
Posts: 152

Old May 5th, 2014, 09:32 AM
Got that:

raDrBreath:
abValue = 12
abValue2 = 6
abValue4 = 1
BloodEner.Acid

Matt Droz Community material (Forgotten Realms & Non-SRD/Retro)
Matt Droz is offline   #3 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old May 5th, 2014, 04:17 PM
It's complaining about SetDraWep (which sets the damage and hide-state of dragon natural weapons based on size). I believe the notes you are referring to are talking about the other procedure. Here are both of them, for your examination:

SetDraWep
Code:
    ~ Modified natural weapons according to size... If we are too small hide the
    ~ weapons.

    ~ Handle each weapon in turn, to minimize the number of findchilds we have to do

    ~ Wing is hidden at Small and smaller
    perform hero.findchild[BaseNatWep,"IsWeapon.wWing & SpecSource.TrueDragon"].setfocus

    if (herofield[tSize].value <= -1) then
      perform focus.assign[Hide.Weapon]
      endif

    ~ Tail Slap is hidden at Medium and smaller
    perform state.clearfocus
    perform hero.findchild[BaseNatWep,"IsWeapon.wTailSlap & SpecSource.TrueDragon"].setfocus

    if (herofield[tSize].value <= 0) then
      perform focus.assign[Hide.Weapon]
      endif

    ~ Crush is hidden at Large and smaller, and needs damage set at higher sizes
    perform state.clearfocus
    perform hero.findchild[BaseWep,"IsWeapon.wCrush & SpecSource.TrueDragon"].setfocus

    if (herofield[tSize].value <= 1) then
      perform focus.assign[Hide.Weapon]
    elseif (herofield[tSize].value = 2) then
      perform focus.assign[wMain.2d8_204]
    elseif (herofield[tSize].value = 3) then
      perform focus.assign[wMain.4d6_106]
    elseif (herofield[tSize].value >= 4) then
      perform focus.assign[wMain.4d8_206]
      endif

    ~ Tail Sweep is hidden at Huge and smaller, and needs damage set at higher sizes
    perform state.clearfocus
    perform hero.findchild[BaseWep,"IsWeapon.wTailSweep & SpecSource.TrueDragon"].setfocus

    if (herofield[tSize].value <= 2) then
      perform focus.assign[Hide.Weapon]
    elseif (herofield[tSize].value = 3) then
      perform focus.assign[wMain.2d6_104]
    elseif (herofield[tSize].value >= 4) then
      perform focus.assign[wMain.2d8_204]
      endif
SetDraBre
Code:
    ~ We don't want to overwrite any existing livename that has been set, so
    ~ stop if there is something already in the livename.
    doneif (field[livename].isempty = 0)

    ~ Set the name, range (based on size) and damage of our breath weapon.
    var conebreath as number
    var linebreath as number

    var range as string
    var damage as string

    if (field[abValue4].value <> 0) then
      if (herofield[tSize].value <= -2) then
        field[abValue3].value += 30
      elseif (herofield[tSize].value = -1) then
        field[abValue3].value += 40
      elseif (herofield[tSize].value = 0) then
        field[abValue3].value += 60
      elseif (herofield[tSize].value = 1) then
        field[abValue3].value += 80
      elseif (herofield[tSize].value = 2) then
        field[abValue3].value += 100
      elseif (herofield[tSize].value = 3) then
        field[abValue3].value += 120
      elseif (herofield[tSize].value >= 4) then
        field[abValue3].value += 140
        endif

    else
      if (herofield[tSize].value <= -2) then
        field[abValue3].value += 15
      elseif (herofield[tSize].value = -1) then
        field[abValue3].value += 20
      elseif (herofield[tSize].value = 0) then
        field[abValue3].value += 30
      elseif (herofield[tSize].value = 1) then
        field[abValue3].value += 40
      elseif (herofield[tSize].value = 2) then
        field[abValue3].value += 50
      elseif (herofield[tSize].value = 3) then
        field[abValue3].value += 60
      elseif (herofield[tSize].value >= 4) then
        field[abValue3].value += 70
        endif
      endif

    field[livename].text = "Breath Weapon (" & field[abValue3].value & " ft "

    if (field[abValue4].value <> 0) then
      field[livename].text &= "line, "
    else
      field[livename].text &= "cone, "
      endif

    field[livename].text &= field[abValue].value & "d" & field[abValue2].value & " " & tagnames[BloodEner.?,"/"] & ", every d4 rds)"
Based on looking at those, I would guess the problem is you need to bootstrap the race's natural weapons with the SpecSource.TrueDragon tag.
Aaron is offline   #4 Reply With Quote
Matt Droz
Senior Member
 
Join Date: Apr 2010
Posts: 152

Old May 5th, 2014, 04:55 PM
That does look like what the issue was. On another note, however, I'd point out that wCrush and wTailSweep are not in the Natural Attacks choices, so users need to set them directly in the Bootstraps.

Matt Droz Community material (Forgotten Realms & Non-SRD/Retro)
Matt Droz 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 06:09 AM.


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