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
Dirtydeedz
Junior Member
 
Join Date: Sep 2013
Posts: 20

Old September 4th, 2017, 10:01 AM
Hello I have created a new racial trait. However, the benefit of the trait is determined by the constitution score.
Code:
~ If we're disabled, just get out now
      doneif (tagis[Helper.SpcDisable] <> 0)

      #situational[hero.child[svAll],"+X vs. spell & spell-like abilites",field[thingname].text]
Where X should equate to something like: hero.childfound[isCheckCon] += (4 is +1, 7 is +2, 11 is +3, 14 is +4, 18 is +5)

I simply do not know how to insert X into the statement. However, I can follow example code.

Well, I scripted a solution. If anyone would like to show me some cleaner code, especially on daisy-chaining "if's" instead of something like "&&", I would appreciate it. I also, couldn't get a "string &= "blah blah"" to compile inside of a #situational
Code:
~ If we're disabled, just get out now
      doneif (tagis[Helper.SpcDisable] <> 0)

      var str as string

      if (#attrvalue[aCON] < 4) then
        str = "+0"
      endif
      if (#attrvalue[aCON] > 3) then 
       if (#attrvalue[aCON] < 7) then 
         str = "+1"
       endif
      endif
      if (#attrvalue[aCON] > 6) then 
       if (#attrvalue[aCON] < 11) then 
         str = "+2"
       endif
      endif
      if (#attrvalue[aCON] > 10) then 
       if (#attrvalue[aCON] < 14) then 
         str = "+3"
       endif
      endif
      if (#attrvalue[aCON] > 13) then 
       if (#attrvalue[aCON] < 18) then 
         str = "+4"
       endif
      endif
      if (#attrvalue[aCON] >= 18) then
         str = "+5"
      endif 
   str &= " vs. spell & spell-like abilites"   
#situational[hero.child[svAll],str,field[thingname].text]

Last edited by Dirtydeedz; September 4th, 2017 at 11:23 PM. Reason: Solution
Dirtydeedz is offline   #1 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 03:11 PM.


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