Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - d20 System (http://forums.wolflair.com/forumdisplay.php?f=46)
-   -   Looking to add some adjustments (http://forums.wolflair.com/showthread.php?t=63818)

Provos February 7th, 2020 07:37 PM

Looking to add some adjustments
 
I am looking to add a bunch of adjustment to speed up my gameplay a bit. Does all bonus damage stack and not need to be typed for example Spell: Prayer has luck to hit but untyped to damage?
Prayer (not full script)
Code:

~ Add to our damage bonus
      hero.child[Damage].field[tDamBonus].value = maximum(hero.child[Damage].field[tDamBonus].value, 1)

      ~ Add to our attack bonus
      hero.child[Attack].field[Bonus].value = maximum(hero.child[Attack].field[BonLuck].value, 1)

But I need a bit of help on some details for the eval scripts. I am looking to add Rapid shot, Spell: Blessed Aim (moral bonus),

Knowledge Devotion (have to make this insight bonus but not sure how)
Code:

      ~ If we're not enabled, get out now
      doneif (field[pIsOn].value = 0)
   
        ~ Add to our damage bonus
      hero.child[Damage].field[tDamBonus].value = maximum(hero.child[Damage].field[tDamBonus].value, field[pAdjust].value)

I will add the more questions as each gets answered as to keep the discussion organized.

Sendric February 10th, 2020 04:40 AM

Quote:

Originally Posted by Provos (Post 285701)
I am looking to add a bunch of adjustment to speed up my gameplay a bit. Does all bonus damage stack and not need to be typed for example Spell: Prayer has luck to hit but untyped to damage?
Prayer (not full script)
Code:

~ Add to our damage bonus
      hero.child[Damage].field[tDamBonus].value = maximum(hero.child[Damage].field[tDamBonus].value, 1)

      ~ Add to our attack bonus
      hero.child[Attack].field[Bonus].value = maximum(hero.child[Attack].field[BonLuck].value, 1)


Not all bonuses stack (they stack as they would in pen and paper).

All the bonuses supplied by Prayer are Luck bonuses, so you should use the BonLuck field for Damage as well as Attack.

(For the record, this adjustment already exists in the community set.)

Quote:

Originally Posted by Provos (Post 285701)
But I need a bit of help on some details for the eval scripts. I am looking to add Rapid shot, Spell: Blessed Aim (moral bonus),

Knowledge Devotion (have to make this insight bonus but not sure how)
Code:

      ~ If we're not enabled, get out now
      doneif (field[pIsOn].value = 0)
   
        ~ Add to our damage bonus
      hero.child[Damage].field[tDamBonus].value = maximum(hero.child[Damage].field[tDamBonus].value, field[pAdjust].value)

I will add the more questions as each gets answered as to keep the discussion organized.

I'm not entirely sure what the question(s) here is/are, but the field for Insight bonus is BonInsight.

To find all the fields on Damage, go to your portfolio and select the following in the menu:

Develop -> Floating Info Windows -> Show Selection Fields -> Damage

Provos February 10th, 2020 10:19 PM

I'm aware prayer exists already but in the code the damage is untyped. I know how the damage in 3.5 are supposed to stack but sometimes when having insight, luck, other bonuses on at the same time they do not add up.

Thanks for the info on the floating window info as it will hopefully help in troubleshooting.

Sendric February 11th, 2020 04:30 AM

Quote:

Originally Posted by Provos (Post 285803)
I'm aware prayer exists already but in the code the damage is untyped. I know how the damage in 3.5 are supposed to stack but sometimes when having insight, luck, other bonuses on at the same time they do not add up.

Hmm...that seems like a bug then. I'll look into it. Thanks.

Fixed. For reference, the best way to provide bonuses such as this is as such:

Code:

    #applybonus[BonLuck,hero.child[Attack],1]
Also note you should only use "hero.child" with things you know will always be on the hero (such as Attack). Otherwise, use "hero.childfound". This will help reduce errors.

Provos February 19th, 2020 04:15 AM

I updated my Knowledge Devotion script


You are affected by a Knowledge Devotion (Ex) ability.
Calculated effects: Insight bonus to attack and damage rolls.
Code:

      ~ If we're not enabled, get out now
      doneif (field[pIsOn].value = 0)
   
      ~ Add a Insight bonus to our attack
        #applybonus[BonInsight, hero.child[Attack], 1]

      ~ Add a bonus to our damage
        ~ Add to our damage bonus
      hero.child[Damage].field[tDamBonus].value = maximum(hero.child[Damage].field[tDamBonus].value, field[pAdjust].value)


Provos February 19th, 2020 04:21 AM

An example of the bonus error.
My cleric using a +1 Longbow (Str 3) has
+7 to hit and does 1d8+4 damage base.
He casts Divine Favor (luck bonus) +2 for his level
+9 to hit 1d8+6 damage
Uses Knowledge Devotion (insight bonus) +4 by rolling
+13 to hit and 1d8+8 damage (missing 2 damage)

Sendric February 19th, 2020 05:56 AM

Quote:

Originally Posted by Provos (Post 286082)
Code:


        ~ Add to our damage bonus
      hero.child[Damage].field[tDamBonus].value = maximum(hero.child[Damage].field[tDamBonus].value, field[pAdjust].value)


change to:
Code:

    #applybonus[BonInsight,hero.child[Damage],field[pAdjust].value]

Provos February 19th, 2020 07:17 AM

Thanks that seems to fix this.

I copied that code for damage from another Adjustment. That's what most of my edit for Hero Lab are find an example and duplicate.

I was looking to add Rapid Shot to the Adjustments but it looks like Kendell DM created one that was never added to the community files.

<<Post-Levels (Users) 10000>>

Code:

~ If we're not selected, get out now.
doneif (field[hIsOn1].value = 0)

~ Add extra attack and apply rapid shot penalty.
foreach pick in hero from BaseWep where "thingid.w? & wCategory.Range?"
  if (eachpick.tagis[Helper.ExtraHigh] = 0) then
    eachpick.field[wAttack].value -= 2
    perform eachpick.assign[Helper.ExtraHigh]
  endif
nexteach


Sendric February 19th, 2020 08:46 AM

Quote:

Originally Posted by Provos (Post 286087)
Thanks that seems to fix this.

I copied that code for damage from another Adjustment. That's what most of my edit for Hero Lab are find an example and duplicate.

90% of my scripts are also copy and paste as I have a hard time remembering everything. The biggest thing is understanding what you're copying. This script:

Code:

hero.child[Damage].field[tDamBonus].value = maximum(hero.child[Damage].field[tDamBonus].value, field[pAdjust].value)
Means:

Set the field tDamBonus equal to itself or field[pAdjust], whichever is higher. This means if *anything* else on the character adjusts that field, you may not get the desired result.

During one of ShadowChemosh's d20 updates, he added the individual bonus fields so that it would be easier to stack bonuses. In general, that means anything scripted before that change was inherently limited and may not be the best means to accomplish what you're looking to do. Just something to keep in mind as you go along.

Sendric February 19th, 2020 08:48 AM

Quote:

Originally Posted by Provos (Post 286087)
I was looking to add Rapid Shot to the Adjustments but it looks like Kendell DM created one that was never added to the community files.

<<Post-Levels (Users) 10000>>

Code:

~ If we're not selected, get out now.
doneif (field[hIsOn1].value = 0)

~ Add extra attack and apply rapid shot penalty.
foreach pick in hero from BaseWep where "thingid.w? & wCategory.Range?"
  if (eachpick.tagis[Helper.ExtraHigh] = 0) then
    eachpick.field[wAttack].value -= 2
    perform eachpick.assign[Helper.ExtraHigh]
  endif
nexteach


I would assume the feat itself already has this which is why there would be no adjustment for it. I'll check into it to verify.

Looks like I was wrong. There's no script. I'll update the feat now.

Provos February 19th, 2020 09:12 AM

1 Attachment(s)
Thanks for the reply. I can't seem to get the rapid shot feat to work. I did correct the typo in the
Code:

doneif (field[hIsOn1].value = 0)
I think it should be pIsOn

"When trying to test the Adjustment I get Specified thing is actively in use. All references must be deleted before changes can be applied."

Sendric February 19th, 2020 10:04 AM

Quote:

Originally Posted by Provos (Post 286090)
Thanks for the reply. I can't seem to get the rapid shot feat to work. I did correct the typo in the
Code:

doneif (field[hIsOn1].value = 0)
I think it should be pIsOn

"When trying to test the Adjustment I get Specified thing is actively in use. All references must be deleted before changes can be applied."

Not sure what that error is all about. I created a new feat for this, but if you want an adjustment in the meantime, I created and tested an adjustment for this using the same code as the feat:

Pre-Levels/10000
Code:

~ If we're not selected, get out now.
doneif (field[pIsOn].value = 0)

~ Add extra attack and apply rapid shot penalty.
foreach pick in hero from BaseWep where "thingid.w? & wCategory.Range?"
  if (eachpick.tagis[Helper.ExtraHigh] = 0) then
    eachpick.field[wAttBonus].value -= 2
    perform eachpick.assign[Helper.ExtraHigh]
  endif
nexteach


Provos February 19th, 2020 10:10 AM

Thanks

Provos February 21st, 2020 06:50 PM

So now it appears that this rapid shot does not stack with haste. Rapid shot give an extra attack at -2 for the first two attacks and haste should just an extra base attack and it doesn't.

Illyahr February 23rd, 2020 06:02 AM

Quote:

Originally Posted by Provos (Post 286178)
So now it appears that this rapid shot does not stack with haste. Rapid shot give an extra attack at -2 for the first two attacks and haste should just an extra base attack and it doesn't.

Unless an effect specifically states otherwise, the general rule is effects that add extra attacks don't stack with each other.

Provos February 23rd, 2020 04:04 PM

I was checking several forum looking for an answer on that. I believe you even has a post here about it not stacking. It seems to stacks in Pathfinder at least according to several posts I found.

cshadow133 February 25th, 2020 08:07 AM

I am unsure about Pathfinder, but 3.5 d20 system it doesn't stack. So no Rapid Fire with Haste or Furry of Blows with Haste. :(

Provos February 25th, 2020 05:16 PM

Can anyone point me to something that says they don't stack. I only ask because I have played in several groups and they have all allowed it to stack. I have read the Haste spell wording and I can understand boots of speed not stacking as that is just haste.
Quote:

(This effect is not cumulative with similar effects, such as that provided by a weapon of speed, nor does it actually grant an extra action, so you can’t use it to cast a second spell or otherwise take an extra action in the round.)

Dami February 25th, 2020 11:36 PM

Since the Haste spell states "This effect is not cumulative with similar effects" you could certainly decide that it does not stack with Rapid Shot because the feat is giving a similar effect. There is nothing official that specifically states they do or do not stack with each other, that I am aware of. (In either 3.5 or PF - the text is the same.)

In my game (both 3.5 and PF, Haste and Rapid Shot stack. In PF hero Lab, both work together correctly - A 6th fighter with a longbow (BA +6/+1, 14 Dex for +2 bonus) gets +1 attack from haste, and a -2 penalty from Rapid Shot (to ALL attacks) for a total of +7/+7/+7/+2.

Provos February 26th, 2020 10:20 PM

Is there a way to set thing to let them stack? Maybe set that as an option when setting up a new character.

Sendric February 27th, 2020 04:08 AM

I'll add a second button to the feat that will allow them to stack if selected.

Provos February 27th, 2020 01:37 PM

Thanks

Provos July 17th, 2020 11:40 PM

Hey, got a couple more adjustments I notice are missing. Antimagic zone which I have no idea how to go about. Righteous Wrath of the Faithfull (Comp Diviine) spell effect is not available.

Sendric July 18th, 2020 04:25 AM

Quote:

Originally Posted by Provos (Post 289746)
Hey, got a couple more adjustments I notice are missing. Antimagic zone which I have no idea how to go about. Righteous Wrath of the Faithfull (Comp Diviine) spell effect is not available.

I'll put Righteous Wrath of the Faithful on my to-do list and I'll look into the feasibility of Antimagic Zone.

Provos July 18th, 2020 03:11 PM

Righteous Wrath shouldn't be too hard, i think.

Code:

Allies gain one additional melee attack each round, at their highest attack bonus, when making a full attack. (This additional attack is not cumulative with other effects that grant extra attacks, such as a haste spell.) They also gain a +3 morale bonus on melee attack rolls and damage rolls. (This bonus on melee attack rolls does stack with the bonus provided by haste.)
But the antimagic zone looked overwhelming to even think about doing.

Provos December 17th, 2020 09:51 PM

I made another adjustment this is for the spell: Rage effect but I can't get the armor penalty working. Any suggestions?

Code:

<<Post-Levels (Users) 10000>>
  ~ If we're not enabled, get out now
      if (field[pIsOn].value = 0) then
        done
        endif

       
      ~ Add a +1 Morale Bonus to will saves
      #applybonus[BonMorale, hero.child[vWill], 1]

        ~ Add a +2 Morale bonus to our Strength
        #applybonus[BonMorale, hero.child[aSTR], 2]
       
            ~ Add a +2 Morale bonus to our Constitution
        #applybonus[BonMorale, hero.child[aCON], 2]
       
                ~ Add a -2 Armor bonus to our armor class
        #applybonus[tACArmor,hero.child[ArmorClass],-2]


Sendric December 18th, 2020 04:32 AM

Quote:

Originally Posted by Provos (Post 292382)
I made another adjustment this is for the spell: Rage effect but I can't get the armor penalty working. Any suggestions?

Code:

<<Post-Levels (Users) 10000>>
  ~ If we're not enabled, get out now
      if (field[pIsOn].value = 0) then
        done
        endif

       
      ~ Add a +1 Morale Bonus to will saves
      #applybonus[BonMorale, hero.child[vWill], 1]

        ~ Add a +2 Morale bonus to our Strength
        #applybonus[BonMorale, hero.child[aSTR], 2]
       
            ~ Add a +2 Morale bonus to our Constitution
        #applybonus[BonMorale, hero.child[aCON], 2]
       
                ~ Add a -2 Armor bonus to our armor class
        #applybonus[tACArmor,hero.child[ArmorClass],-2]


Timing. Your applying the bonus to tACArmor which will get over-written by the system later than this script. You can either change the timing or change which field you are manipulating. I would try changing the field first. ArmorClass contains all the bonus types, so pick one of those.

Also, you should generally avoid the phases with "(Users)" in the name. If there's ever another update to the core system, it could come with the removal of these phases.

Provos December 18th, 2020 06:08 AM

Thanks for the help again. I switched the code to
Code:

hero.child[ArmorClass].field[Penalty].value -= 2
and I changed the timing on all my adjustments to prelevel without (users)


All times are GMT -8. The time now is 06:12 PM.

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