Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Pathfinder Roleplaying Game (http://forums.wolflair.com/forumdisplay.php?f=62)
-   -   Changing Unarmed Damage (http://forums.wolflair.com/showthread.php?t=12878)

Mythanthor April 16th, 2011 08:31 AM

Changing Unarmed Damage
 
I am attempting to create a Will-o'wisp PC race, and i have made some headway. I am trying to scale the shock natural attack by level and have gotten to the following code:

Code:

  var level as number
  level = herofield[tLevel].value
  var result as number
  result = hero.child[wUnarmed].delete[wMain.?]
  var dice as string


  if (level < 3) then
    result = hero.child[wUnarmed].assign[wMain.1d6_5]
    dice = "1d6"
  elseif (level < 5) then
    result = hero.child[wUnarmed].assign[wMain.1d8_6]
    dice = "1d8"
  elseif (level < 7) then
    result = hero.child[wUnarmed].assign[wMain.1d10_304]
    dice = "1d10"
  elseif (level < 9) then
    result = hero.child[wUnarmed].assign[wMain.2d6_104]
    dice = "2d6"
  else
    result = hero.child[wUnarmed].assign[wMain.2d8_204]
    dice = "2d8"
  endif
  hero.child[wUnarmed].field[livename].text = "Shock " & dice

I have put this in an Eval with a phase: First and Priority: 500 and the code runs. The Unarmed Attack is Renamed to 'Shock 1d6' but the actual damage is unchanged.

Can anyone see anything wrong with this code?

Also, how do you remove the Strength bonus/penalty?

Thanks in advance

Mathias April 16th, 2011 10:44 AM

Is this d20 or Pathfinder, or something else - the answer may differ.

As a general rule, the First phase is too early for anything that doesn't specifically need to happen that early, and it's definately too early to look up the level of the character - that needs to happen in the post-level phase or later.

I don't recognize herofield[tLevel].value - I don't think that exists in d20 or Pathfinder.

Mythanthor April 16th, 2011 05:01 PM

This is for Pathfinder. I have gotten the main part to work, changed the phase to Post-Levels, Priority 5000.

The issue I have now is that the damage is being adjusted by Strength bonus/penalty. How can I get it to ignore Strength bonus/penalty or add it back as an adjustment?

Code:

  var level as number
  level = herofield[tLevel].value
  var result as number
  result = hero.child[wUnarmed].delete[wMain.?]
  var dice as string

  if (level < 3) then
    result = hero.child[wUnarmed].assign[wMain.1d6_5]
    perform hero.child[wUnarmed].assign[Helper.DamageUp]
    dice = "1d6"
  elseif (level < 5) then
    result = hero.child[wUnarmed].assign[wMain.1d8_6]
    perform hero.child[wUnarmed].assign[Helper.DamageUp]
    dice = "1d8"
  elseif (level < 7) then
    result = hero.child[wUnarmed].assign[wMain.1d10_304]
    perform hero.child[wUnarmed].assign[Helper.DamageUp]
    dice = "1d10"
  elseif (level < 9) then
    result = hero.child[wUnarmed].assign[wMain.2d6_104]
    perform hero.child[wUnarmed].assign[Helper.DamageUp]
    dice = "2d6"
  else
    result = hero.child[wUnarmed].assign[wMain.2d8_204]
    perform hero.child[wUnarmed].assign[Helper.DamageUp]
    dice = "2d8"
  endif
  hero.child[wUnarmed].field[livename].text = "Shock " & dice


Adam.Ormond May 7th, 2011 09:12 AM

I think you'd add these tags:

hero.child[wUnarmed].assign[wMaxStrBon.0]
hero.child[wUnarmed].assign[wMaxStrPen.0]

You might have to delete them first -- hero.child[wUnarmed].delete[wMaxStrBon.?], hero.child[wUnarmed].delete[wMaxStrPen.?]

I also see a tagreplace method, which might let you do the delete/assign in one go. Something like perform tagreplace[wMaxStrBon.?,wMaxStrBon.0]. No idea if the wildcard is going to work in that context.

Additionally, I'm not certain that assigning the Helper.DamageUp tag in the PostLevels phase actually does anything. In my testing of that tag, it only seemed to take effect if it was assigned in the Pre-Levels or earlier phases. You could probably delete those statements, with no noticeable effect.


All times are GMT -8. The time now is 01:35 PM.

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