Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game

Notices

Reply
 
Thread Tools Display Modes
Azhrei
Senior Member
 
Join Date: Sep 2015
Posts: 435

Old December 30th, 2018, 05:24 PM
I have a new material that works a lot like obsidian, but it adds 1 point to the critical range of the weapon. So my scimitar, made of this material, would crit on 17-20, not 18-20. But how do I code this?

I noticed that the original obsidian material has an eval script. It's apparently calling functions defined elsewhere, but I'm not sure why the first one is there at all.
Code:
perform container.parent.setfocus

~ Our parent becomes Fragile
perform focus.assign[wSpecial.Fragile]
I've looked at the Improved Critical feat, but this is all greek to me! It does appear that I will need to combine the "perform container.parent.setfocus" from above with some part of the code below... Maybe this line is all I need, but somehow replacing 'each pick' with the parent? "perform eachpick.assign[Broadcast.ImpCrit]"
Code:
~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)
var name as string

~ If we haven't chosen anything, get out now
doneif (field[usrChosen1].ischosen + tagis[Target.?] = 0)

if (tagcount[Hero.MartVersa] + hero.tagcount[Hero.MartMaster] <> 0) then
  perform field[usrChosen1].chosen.pulltags[wFtrGroup.?]

  ~ this call takes care of mythic martial versatility and mythic martial mastery
  call MytMartial

  foreach pick in hero from BaseWep
    if (eachpick.tagmatch[wFtrGroup,wFtrGroup,initial] <> 0) then
      perform eachpick.assign[Broadcast.ImpCrit]
      perform eachpick.pulltags[ImpCrit.?]
      endif
    nexteach

  name = this.tagnames[wFtrGroup.?, ", "]
  perform hero.pushtags[ImpCrit.?]
else
  ~ Assign the appropriate tag to all weapons that meet the criteria
  var id as string
  call fTargetId
  foreach pick in hero where "IsWeapon." & id
    perform eachpick.assign[Broadcast.ImpCrit]
  nexteach

  ~ Forward the improved critical tag for the weapon to the hero
  perform hero.assignstr["ImpCrit." & id]
endif

~ Set our 'short name'
field[shortname].text = "Imp Crit: " & name

if (field[sbName].isempty <> 0) then
  field[sbName].text = "Improved Critical (" & lowercase(name) & ")"
endif
Azhrei is offline   #1 Reply With Quote
Ualaa
Senior Member
 
Join Date: Sep 2013
Location: Vancouver, Canada.
Posts: 813

Old December 30th, 2018, 08:06 PM
The Stalker (part of the Community Pack) has a Stalker Art that increases threat range by +1 (and is applied after Keen/Improved Critical).

That is the other source I'm aware of, of increasing a weapon's threat range.
Ualaa is offline   #2 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old December 31st, 2018, 08:27 AM
As Ualaa mentions, not sure if you want the expansion to stack with improved crit/keen, but one example that does not stack would be the phantom's "Ruthless Combatant" ability.

"The phantom threatens a critical hit with its slam attacks on a roll of 19–20. When the spiritualist reaches 11th level, the phantom’s critical modifier with slam attacks increases to ×3. This doesn’t stack with Improved Critical or similar effects."

PostLevel 10000
Code:
      doneif (tagis[Helper.ShowSpec] = 0)

      doneif (tagis[Helper.SpcDisable] <> 0)

      perform hero.findchild[BaseNatWep,"Custom.PhantSlam"].setfocus

      doneif (state.isfocus = 0)

      if (field[xAllLev].value >= 11) then
        perform focus.tagreplace[wCritMult.?,wCritMult.3]
        endif

      doneif (focus.tagexpr[Broadcast.ImpCrit | Helper.Keen] <> 0)

      var critvalue as number
      critvalue = focus.tagvalue[wCritMin.?]
      perform focus.delete[wCritMin.?]
      critvalue -= 1
      perform focus.assignstr["wCritMin." & critvalue]
That's a class ability, but you're making a material, so you'll need to alter the stops in the script and change where it sets the focus. Also, drop the CritMult section, and depending on if it should stack or not the doneif in the middle.
Aaron is offline   #3 Reply With Quote
Azhrei
Senior Member
 
Join Date: Sep 2015
Posts: 435

Old December 31st, 2018, 09:30 AM
Thanks, Ualaa. That seems like an almost perfect fit. We discussed it during the game last night and the GM ruled that the +1 from the material will stack with Improved Crit and the like, so that might be the only change needed. And, of course, the setfocus on the parent of the container.

Thanks, Aaron; that's a good starting point simply because there's less code that I have to parse through! Plus, it changes the crit threat range by one instead of just setting a flag that something has a doubled crit threat range, so it's more pertinent that the Improved Critical feat I was looking at. I'm guessing the source Ualaa found does something similar; I'll take a look at both.

Thanks again to both of you!
Azhrei is offline   #4 Reply With Quote
Reply

Thread Tools
Display Modes

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 10:32 PM.


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