• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Bomb Damage Number

Frodie

Well-known member
I had to redo a class special for bomb, anyways all works fine except on the weapon bond number of dice of damage. Post Att 15000

Code:
      ~ normally, the uses of thrown weapons are shown in the tracker section
      ~ we don't want that to happen for this weapon, since our charges are
      ~ handled by the class special
      perform delete[User.Tracker]

      ~ Generate the wFixDamage text, v_total is the modifier to damage,
      ~ element is the type of damage. damage is the number of dice done and

      ~ uses #abValue[cFGMPBomb] for the die size.
      var v_total as number

      ~ uses #value3[cFGMPBomb] for the die size.
      var damage as number
      var element as string
      var isfire as number
      var useval as number

      useval = #value3[cFGMPBomb]
      isfire = 1
      element = "Fire"
      call BombDam
 

Attachments

  • Untitled.jpg
    Untitled.jpg
    343.5 KB · Views: 6
My advice would be go to the *PROCEDURE tab in the editor and look up the procedure "BombDam" and look at the script. What logic is it using to calculate the number of dice? Is it storing it in a abValue field that can be changed/manipulated.
 
Yea, I didn't want to use the procedure because it removes the regular bomb even if you aren't using the setting.

I replaced on bomb class special this part of the code

Code:
field[abValue].value += field[xCount].value

with this (everything else is the same)
Code:
field[abValue].value += maximum(round(field[xAllLev].value/2,0,-1),1)

Right now, I am trying to find the right field on the weapon to modify with
Code:
field[wRMainDNum].value += round(hero.tagcount[Classes.?]/2,0,-1)
 
Last edited:
Out of curiosity what is the reason for creating a new special instead of using the one that already exists and modifying what needs to be changed via a script?
 
It's a class special, bootstrapped to an archetype, you get a increase in damage every other level. I wanted to avoid cluttering up the class field in the UI will multiple listings of "bomb" every other level. That is why I replaced xcount for the level script.
Everything else on the script works fine. Just the weapon part of the bomb.

I not really sure how the script on the weapon "bomb" works. I assume it's looking for values off the class special. So I am trying to modify it with a script, but IDK. Might not be the best idea.
 
Why not just bootstrap the normal cAlcBomb ability and have a script on the archetype of

#value[cAlcBomb] += round(field[cTotalLev].value/2,0,-1) - 1 on the archetype somewhere after PostAttr 10000 (which is where it's set on the special) This will do a couple things.

#1) Future proofs stuff that requires bombs as a prereq and #2) should make the procedure work just fine, otherwise you have a lot of extra coding ahead of you.

Always remember, code smart not hard.
 
That kind of works, I had to add the linkage.

Code:
#value[cAlcBomb] += round(linkage[varies].field[cTotalLev].value/2,0,-1) - 1

But, it works for the tracker and special values, but not still not on the weapon. I have the core class special and core weapon bootstrapped to the archetype.
 
Ah, It works at post att 12000. You are the dude! Thank You! That was a whole day working on that, lol
 
Last edited:
An issue came up, seems the value starts out at 0 at 1st level and starts adding 1 at 2nd level. Needs to start to add 1 at 1st level. I have been messing with the numbers in the script, but no go. Any ideas? Thank you!
 
Close, now it get the min of 1, but waits until 4th level before it adds 1. Needs to add at 3rd 5th, 7th, 9th ...

Code:
#value[cAlcBomb] += round(linkage[varies].field[cTotalLev].value/2,0,-1) -1

#value[cAlcBomb] = maximum(#value[cAlcBomb],1)

BTW - Thank you
 
I'll be completely honest, I would just add all the appropriate copies to the table but I'l sit down and think about the math.
 
actually try changing the round function from

#value[cAlcBomb] += round(linkage[varies].field[cTotalLev].value/2,0,-1) -1

to
Code:
#value[cAlcBomb] += round(linkage[varies].field[cTotalLev].value/2,0,1) -1

I think that will avoid needing the second line.
 
Got it!

Code:
#value[cAlcBomb] += round(linkage[varies].field[cTotalLev].value/2,0,-0) -1

#value[cAlcBomb] = maximum(#value[cAlcBomb],1)

Thank you again so much!
 
Back
Top