Lone Wolf Development Forums  

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

Notices

Reply
 
Thread Tools Display Modes
blzbob
Senior Member
Volunteer Data File Contributor
 
Join Date: May 2010
Location: Mountlake Terrace, Washington
Posts: 407

Old March 1st, 2014, 11:56 PM
I have a few feats that set the minimum values at 1. Here they are:

Quote:
All good aligned creatures within 30 feet gain a sacred bonus to the next attack roll they make within 1 round, and all evil creatures suffer a penalty to their next attack roll in that time. The bonus is equal to +1 per 2 channeling dice (minimum +1), and the penalty -1 per 2 channeling dice (minimum -1).

Quote:
All evil-aligned creatures within 30 feet gain a profane bonus to the next damage roll they make within 1 round, and all good creatures suffer a penalty to their next damage roll in that time. The bonus is equal to +1 per 2 channeling dice (minimum +1), and the penalty -1 per 2 channeling dice (minimum -1).
Quote:
You expend two uses of your channel energy ability to delay the transformation of a single corpse touched into any form of undead. The body has many of its injuries repaired, and remains untouched by decay for 1 day/2 channel dice (minimum of 1 day). If the creature was slain in a manner that would cause it to rise as an undead, that transformation is delayed by the same amount of time. Likewise, any spells that would animate the creature as an undead automatically fail if cast before this effect expires. Delay corruption does not interfere with reincarnation, raise dead, or similar effects that return the creature to life.
Quote:
You are able to use channel energy to cause natural stone and earth to shudder within a 30-foot-radius of you. All creatures in this area of effect (except yourself) must make a Reflex save (DC 10 + channel dice + Cha modifier) each round or fall prone. These quakes persist for 1 round/2 channel dice (minimum 1 round). Any creature that enters this area of effect while it persists must also make the Reflex save. If you move from the spot where you used this ability, the quakes immediately end.
Quote:
You are able to affect the minds of those within the normal burst radius of your channel ability. Instead of normal damage, your channeling inflicts a penalty on affected creatures’ Will saves and to any Wisdom-based skill checks and the save DCs of their Wisdom-based spells and abilities. This penalty is equal to -1 per 2 dice of channeling (minimum -1). Creatures may attempt a Will save (DC 10 + channel dice + Cha modifier) to negate this effect. The penalty lasts for 1 round per channel die.
I have everything working on the feats except setting the floor at 1. How do I do that? I tried looking at a few feats (Amateur Gunslinger and Born Alone are just two of them) but I couldn't see where they set a minimum of 1.
blzbob is offline   #1 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old March 2nd, 2014, 10:09 AM
Quote:
Originally Posted by blzbob View Post
I have everything working on the feats except setting the floor at 1. How do I do that? I tried looking at a few feats (Amateur Gunslinger and Born Alone are just two of them) but I couldn't see where they set a minimum of 1.
This one often gets people as you want to use the Maximum function.

In Example:
The bonus is equal to +1 per 2 channeling dice (minimum +1)
Code:
field[abValue].value += maximum( round( #value2[xChannel]/2 ,0,-1) ,1 )
Then we can break down the above code. For functions wrapped in functions you always work from the inside out. So the above is done in this order:
1) "#value2[xChannel]/2" abValue2 from xChannel divided by 2.
2) "round( step1 ,0,-1)" take the result and round it. The ,0 tells us to round to whole numbers and the ,-1 tells us to round down. So that .5 will become 0 and 1.5 would become 1.
3) "maximum( step2 ,1 )" take the value from the result in step 2 or the value of one ,1.

Example 1:
So lets say we have 1 channel dice in xChannel abValue2:
1) 1/2 = .5
2) round .5 down into a whole number so we get 0
3) is 0 or 1 the "bigger" number? Of course its 1 so we get a result of 1.
Final answer placed into field[abValue].value is 1.

Example 2:
So lets say we have 4 channel dice in xChannel abValue2:
1) 4/2 = 2
2) round 2 down into a whole number so we get 2
3) is 2 or 1 the "bigger" number? Of course its 2 so we get a result of 2.
Final answer placed into field[abValue].value is 2.

hope that helps.

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.

Last edited by ShadowChemosh; March 2nd, 2014 at 10:13 AM.
ShadowChemosh is offline   #2 Reply With Quote
blzbob
Senior Member
Volunteer Data File Contributor
 
Join Date: May 2010
Location: Mountlake Terrace, Washington
Posts: 407

Old March 2nd, 2014, 11:57 AM
Here's what I'm doing:

doneif (hero.tagis[Hero.Channel] = 0)

field[abValue].value += minimum(round(hero.child[xChannel].field[abValue2].value/2,0,-1),1)

field[livename].text = field[name].text &" -/" & signed(field[abValue].value)

It's capping the value at 1 rather than setting the minimum.
blzbob is offline   #3 Reply With Quote
AndrewD2
Senior Member
 
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975

Old March 2nd, 2014, 12:05 PM
You need to use maximum, not minimum, like Shadow said
AndrewD2 is offline   #4 Reply With Quote
blzbob
Senior Member
Volunteer Data File Contributor
 
Join Date: May 2010
Location: Mountlake Terrace, Washington
Posts: 407

Old March 2nd, 2014, 12:49 PM
I thought he was giving me an example of how a function works and I was supposed to use "minimum." Thanks.
blzbob is offline   #5 Reply With Quote
blzbob
Senior Member
Volunteer Data File Contributor
 
Join Date: May 2010
Location: Mountlake Terrace, Washington
Posts: 407

Old March 2nd, 2014, 06:33 PM
Using the exact script Shadow gave is setting the value at 1 no matter what.
blzbob is offline   #6 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old March 2nd, 2014, 07:01 PM
Quote:
Originally Posted by blzbob View Post
Using the exact script Shadow gave is setting the value at 1 no matter what.
Um I actually tested the script and it was working fine. Do you have anything else in your script? You do know you will have to be level 7 Cleric before you will see a 2 right? Level 7 gives a 4d6 so half will finally give 2. Otherwise from level 1 to 6 the value should correctly be 1.

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   #7 Reply With Quote
blzbob
Senior Member
Volunteer Data File Contributor
 
Join Date: May 2010
Location: Mountlake Terrace, Washington
Posts: 407

Old March 2nd, 2014, 07:16 PM
Now I feel like an idiot. Everything is fine. It's me that's not so fine. I don't know what I was thinking.
blzbob is offline   #8 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 05:58 AM.


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