• 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

Soul Knife psionic class

JeffSandmeier

Active member
I'm trying to get this into HL because a player is interested. One thing that I can't figure out yet-the soul knife creates a weapon from psionic energy that increases in power as he increases in level. How do you add bonuses to hit and damage to the weapon without having to create a new weapon for each power increase? The weapon-called the mind blade-is a specific weapon that he always has available so it shows up like unarmed strike (already have that figured out) but I can't find a script to copy or alter that will increase the to hit and damage bonuses of the weapon from within the class.
 
JeffSandmeier wrote:
>
>
> I'm trying to get this into HL because a player is interested. One thing
> that I can't figure out yet-the soul knife creates a weapon from psionic
> energy that increases in power as he increases in level. How do you add
> bonuses to hit and damage to the weapon without having to create a new
> weapon for each power increase? The weapon-called the mind blade-is a
> specific weapon that he always has available so it shows up like unarmed
> strike (already have that figured out) but I can't find a script to copy
> or alter that will increase the to hit and damage bonuses of the weapon
> from within the class.


You should be able to find documentation about weapon fields / tags in
the authoring kit documentation. Adding to the attack and damage bonus
should be just like adding an enhancement bonus to a weapon, so you can
use the #enhancementbonus macro something like this:

#enhancementbonus[hero.child[wMindBlade], bonus]

After calculating the bonus the Mind Blade should get based on the Soul
Knife's level, which you can do in an eval script in the PostLevel phase.


Hope this helps,


--
Colen McAlister (colen@wolflair.com)
Chief Engineer, Lone Wolf Development
http://www.wolflair.com/
 
Will that allow the weapon to be dynamically changed, ie when the class level goes up the bonus for the weapon goes up as well? What I'm trying to do is alter the weapon from within the class special ability.
 
JeffSandmeier wrote:
>
>
> Will that allow the weapon to be dynamically changed, ie when the class
> level goes up the bonus for the weapon goes up as well? What I'm trying
> to do is alter the weapon from within the class special ability.


Yes. What you'll do is add a class special ability for the Mind Blade
and give it a script like this:


~ Get the total class level of the ability
var level as number
level = field[xTotalLev].value

~ Get our bonus based on class level (the formula is
~ level divided by 4, rounded down)
var bonus as number
bonus = level / 4
bonus = round(bonus, 0, -1)

~ Add our bonus to the Mind Blade
#enhancementbonus[hero.child[wMindBlade], bonus]



This gets the total level of the class, calculates the bonus and applies
it to the Mind Blade. The only restriction is that you should do this in
the PostLevel phase or later, since you don't know the total level until
then.


Hope this helps,

--
Colen McAlister (colen@wolflair.com)
Chief Engineer, Lone Wolf Development
http://www.wolflair.com/
 
Yes, I got that to work. Thank you. Next question, is there a way to add a bonus to just the damage of just one weapon? The authoring kit shows ways to add damage bonus to all weapons, or all light weapons, etc., but not to a single weapon (such as the mind blade). This is also important for another reason, the psionic item power of collision, which gives a flat +5 to damage for the weapon it is applied to, but does not affect the chance to hit.
 
JeffSandmeier wrote:
>
>
> Yes, I got that to work. Thank you. Next question, is there a way to add
> a bonus to just the damage of just one weapon? The authoring kit shows
> ways to add damage bonus to all weapons, or all light weapons, etc., but
> not to a single weapon (such as the mind blade). This is also important
> for another reason, the psionic item power of collision, which gives a
> flat +5 to damage for the weapon it is applied to, but does not affect
> the chance to hit.


Just add to the "wDamBonus" field of that weapon. For example:


hero.child[wMindBlade].field[wDamBonus].value = 1


Should give the Mind Blade +1 damage.


--
Colen McAlister (colen@wolflair.com)
Chief Engineer, Lone Wolf Development
http://www.wolflair.com/
 
Update- the script works for the mindblade, or any other specifically named weapon, but how do you add it as an item power? I've tried the wDamBonus in the item power eval script, but that applies the bonus to all weapons the character has, including unarmed strike. How do you tell it to apply the damage bonus to only the weapon the power is attached to?
 
At 01:46 PM 7/13/2007, you wrote:
Update- the script works for the mindblade, or any other specifically named weapon, but how do you add it as an item power? I've tried the wDamBonus in the item power eval script, but that applies the bonus to all weapons the character has, including unarmed strike. How do you tell it to apply the damage bonus to only the weapon the power is attached to?
Colen is out of town for some well-earned R&R, and you've now ventured outside my knowledge of the d20 files. I could probably figure out something, but it would likely not be the best way of handling things. Colen will be able to get back to you on this on Tuesday. Thanks in advance for a little patience on this.
 
JeffSandmeier wrote:
>
>
> Update- the script works for the mindblade, or any other specifically
> named weapon, but how do you add it as an item power? I've tried the
> wDamBonus in the item power eval script, but that applies the bonus to
> all weapons the character has, including unarmed strike. How do you tell
> it to apply the damage bonus to only the weapon the power is attached to?

If you do a script like this on the item power:

container.parent.field[wDamBonus].value += 2

That should apply the bonus only to the weapon that the power is
attached to. Is this not working correctly?


--
Colen McAlister (colen@wolflair.com)
Chief Engineer, Lone Wolf Development
http://www.wolflair.com/
 
Back
Top