View previous topic :: View next topic |
Author |
Message |
xardex
Joined: 02 Mar 2010 Posts: 40
|
Posted: Sun Jun 13, 2010 2:56 Post subject: Calculating damage |
|
|
First of all I am NOT experienced with nwnx. Best (and appreciated) if you keep it simple. If you link me to a plugin with no instructions its only going to mix the mess in my head more.
It would be convenient for me to have a way to meddle with the calculation of damage of attacks (normal regular attacks made with weapons), even more so to be able to completely control it.
I realise there propably are plugins and whatnot that allows this, but even though searching I only found 'Attack' event in Events plugin, which might allow me to do this... or not... And I wouldnt even know how to go about using that event. |
|
Back to top |
|
|
Zunath
Joined: 06 Jul 2006 Posts: 183
|
Posted: Sun Jun 13, 2010 7:54 Post subject: |
|
|
This would be extremely useful. As far as I know, no plugin exists to do this (but please correct me if I'm wrong - and send me a link!)
You might be able to do something similar to this with creative 2da editing and scripting or perhaps setting the weapon to have the No Combat Damage property.
It's still not the same though. >< |
|
Back to top |
|
|
xardex
Joined: 02 Mar 2010 Posts: 40
|
Posted: Sun Jun 13, 2010 12:11 Post subject: |
|
|
Im doing it with scripting right now but its a pain... Also it seems that even though I hand a goblin weapon with 'No Damage' and set his strength to 10, he does 1 non scripted damage to me anyway...
And even if I manage to fix that the combat log would still be spammed.
( Goblin damaged you for #customDMG# )
( Goblin damaged you for 0 )
Heres the scripts...
Code: | void main()
{
object oPC = GetEnteringObject();
object oSkin = CreateItemOnObject("myskin", oPC);
AssignCommand(oPC, ActionEquipItem(oSkin, INVENTORY_SLOT_CARMOUR));
} |
You got to create a creature skin (tag 'myskin') and then add an on hit property to it. I know you could use tag based scripting, but since some creatures already have a skin that wouldnt have been very practical and could get rather difficult. I decided to replace the spell script of 'light' with the script below. (In my module you cant use NWN spells anyway)
Im giving it to PC's with this script and to NPC's in the default9 (onspawn) script.
You just got to make sure you'll only hand out weapons that have the No Damage property. (onequip!? Why didnt I think of that earlier)
Code: | void main()
{
object oTarget = GetSpellTargetObject();
ExecuteScript("the_script_below_this_one", oTarget);
} |
The script must run on the attacker, or else the combat log will say "Jack damaged Jack", and the killer wouldnt be recognized...
Code: | void main()
{
object oPC = OBJECT_SELF;
object oTarget = GetAttackTarget();
int iDMG = 3;
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(iDMG, DAMAGE_TYPE_SLASHING), oTarget);
} |
And that basically is it. You can whirl around the damage amount and type any way you want in the last script.
ANYWAY
I think this now-gone PVP server which name I cant remember right now had customized the way devastating crit worked. Instead of killing it would double your damage... But maybe thats a different thing alltogether.
Well... Its a shame if there really isnt any way to do it. |
|
Back to top |
|
|
Zunath
Joined: 06 Jul 2006 Posts: 183
|
Posted: Mon Jun 14, 2010 7:10 Post subject: |
|
|
Another thing that would be helpful is a plugin that allows us to adjust the delay between attacks for each particular weapon.
Something that's always bothered me is that no matter how much damage a weapon does, the delay between attacks is always the same.
I'm not even sure if this is feasible but thought I'd throw it out there since it sort of relates to damage. |
|
Back to top |
|
|
xardex
Joined: 02 Mar 2010 Posts: 40
|
Posted: Mon Jun 14, 2010 13:06 Post subject: |
|
|
Well you could in a way, if you somehow made sure people remain at <6 BAB, you could make your onequp script throw the number-of-attacks increasing effect depending on what was equipped...
But it would be rather trivial, since the damage is still applied only once every 2 seconds. (Unless that could be changed too........) |
|
Back to top |
|
|
Zunath
Joined: 06 Jul 2006 Posts: 183
|
Posted: Mon Jun 14, 2010 16:32 Post subject: |
|
|
Yeah, but I was more referring to increasing the delay between attacks. I thought about some way to do that using the OnAttack event but without the attack animations available in NWScript I'm at a loss. |
|
Back to top |
|
|
|