Author Topic: Preventing Physical Damage Type Merging  (Read 563 times)

Legacy_Rubies

  • Hero Member
  • *****
  • Posts: 508
  • Karma: +0/-0
Preventing Physical Damage Type Merging
« on: July 05, 2012, 04:43:46 am »


               I have a feeling this is hugely hardcoded and I'll have to make several new item types, but I don't suppose anyone knows a half-decent method to get around the fact that all physical damage is altered to match the weapon's base damage type? So far two methods come to mind, but I'm not particularly looking forward to either: Applying the actual damage as an EffectDamageIncrease effect (not even sure if that works), or an OnHitCastSpell effect (which I'm REALLY, -REALLY- not wanting to do, because I have a bunch of other effects for unique weapons and this would be used on pretty much every weapon in the game).

For example, in vNWN:

Short Sword (Piercing 1d6 base)
Enhancement: +5 Bludgeoning, +5 Piercing

Actual Damage: 1d6+10 Piercing (or, at least, a creature with 100% Piercing immunity is entirely immune).

I don't have a chance to tinker with this any more being in work and all, but I'm assuming the only way to get around this is to make three identical items with Slashing/Piercing/Bludgeoning entries in the 2da? If so I suppose I've got some model renaming to do! ':pinched:'

As a note: Filling the damage type 2da entry with **** doesn't work. Just thought I'd mention it before anyone gives that a thought. '<img'>
               
               

               


                     Modifié par Rubies, 05 juillet 2012 - 03:45 .
                     
                  


            

Legacy_Carcerian

  • Hero Member
  • *****
  • Posts: 1655
  • Karma: +0/-0
Preventing Physical Damage Type Merging
« Reply #1 on: July 05, 2012, 11:20:10 am »


               Have you tired any experiments with the no-combat-damage property? (no clue if it even works)
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Preventing Physical Damage Type Merging
« Reply #2 on: July 05, 2012, 05:26:54 pm »


               Well when you have additional elemental damage, isn't that damage applied per elemental type? Is there a weapon property that can get physical damage to be treated the same way?

Or if none of that works could you create a new damage type that the engine thinks is elemental but would be treated as physical?

I'm just throwing this spaghetti at the wall.
               
               

               
            

Legacy_ShadowM

  • Hero Member
  • *****
  • Posts: 1373
  • Karma: +0/-0
Preventing Physical Damage Type Merging
« Reply #3 on: July 05, 2012, 05:42:06 pm »


               Well in my HR base I have a on hit cast spell intercept system(that catch all hits) that you could use custom functions to reapply the damage, but that be a bit intensive. You could use the system but when you make weapon and creatures you could put custom integers on them for a quicker check. Just some thoughts. Interesting problem.
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Preventing Physical Damage Type Merging
« Reply #4 on: July 05, 2012, 05:47:15 pm »


               The best way would be new damage type. Thats not possible to do without nwnx, but Ive seen on HG that theyve made it (psionic dmg) and it worked without custom client which is perfect. Unfortunately they didnt made this plugin public (AFAIK).
               
               

               
            

Legacy_Rubies

  • Hero Member
  • *****
  • Posts: 508
  • Karma: +0/-0
Preventing Physical Damage Type Merging
« Reply #5 on: July 05, 2012, 05:49:52 pm »


               

Have you tired any experiments with the no-combat-damage property? (no clue if it even works)


No luck, I'm afraid.

Well when you have additional elemental damage, isn't that damage applied per elemental type? Is there a weapon property that can get physical damage to be treated the same way?


Yeah, that's pretty much exactly what I'm after, treating physical damage types as elemental ones (a side effect of that would be negating Damage Reduction, but it's not something that bothers me in the least).


In case anyone is curious, what I'm attempting to do is to create a single "Medium" sized weapon that encompasses Slashing, Piercing, and Bludgeoning, which only loads a single model file. As a result, any medium weapon would fall into this single 0d0 base damage item type, and from thereon be purely modified by item properties. It sounds fairly simple until you try it, I suppose. '<img'>
               
               

               


                     Modifié par Rubies, 05 juillet 2012 - 05:00 .
                     
                  


            

Legacy_Rubies

  • Hero Member
  • *****
  • Posts: 508
  • Karma: +0/-0
Preventing Physical Damage Type Merging
« Reply #6 on: July 05, 2012, 05:52:13 pm »


               Oh, and as another note, the "Extra Damage Property" doesn't work for this kind of thing. It doesn't isolate damage to each type, rather splitting them among all types, and completely ignoring immunities. Just thought I'd make that clear in case anyone wondered, though it's pretty standard behaviour. '<img'>

For instance, a 1d6 Piercing Shortsword with Bludgeoning as an Extra Damage Type will still deal 1d6 damage to creatures immune to Piercing damage.

The best way would be new damage type. Thats not possible to do without
nwnx, but Ive seen on HG that theyve made it (psionic dmg) and it worked
without custom client which is perfect. Unfortunately they didnt made
this plugin public (AFAIK).


As a last resort I'll probably spend some time attempting new damage types, but it's an -absolute- fallback and not something I want to plan around.
               
               

               


                     Modifié par Rubies, 05 juillet 2012 - 06:06 .
                     
                  


            

Legacy_Rubies

  • Hero Member
  • *****
  • Posts: 508
  • Karma: +0/-0
Preventing Physical Damage Type Merging
« Reply #7 on: July 06, 2012, 03:22:56 am »


               For now I'll revert my 2das to having three of each weapon size/damage type and look at my other options later on. No sense in fixing what isn't broken I suppose. '<img'>

Thanks for the suggestions, everyone!
               
               

               


                     Modifié par Rubies, 06 juillet 2012 - 02:23 .
                     
                  


            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Preventing Physical Damage Type Merging
« Reply #8 on: July 06, 2012, 03:46:20 am »


               How will the indexes work for each of those new rows? Adding 256 to each weapon type twice?
               
               

               


                     Modifié par henesua, 06 juillet 2012 - 02:46 .
                     
                  


            

Legacy_Failed.Bard

  • Hero Member
  • *****
  • Posts: 1409
  • Karma: +0/-0
Preventing Physical Damage Type Merging
« Reply #9 on: July 06, 2012, 01:39:14 pm »


               It should be doable with an unique on-hit property and pseudo-item damage properties.  The headache would come from converting the properties into usable variables, and fetching the weapons enhancement or attack bonus for applying damage power in the damage effect.
Now that my work week is done, I have a bit of time to look into this.  I'll hopefully have a more specific answer on how to do it in a couple hours.
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Preventing Physical Damage Type Merging
« Reply #10 on: July 06, 2012, 01:51:27 pm »


               

Failed.Bard wrote...

It should be doable with an unique on-hit property and pseudo-item damage properties.  The headache would come from converting the properties into usable variables, and fetching the weapons enhancement or attack bonus for applying damage power in the damage effect.
Now that my work week is done, I have a bit of time to look into this.  I'll hopefully have a more specific answer on how to do it in a couple hours.

problem is that damage power doesnt work with effectDamage (and there is no good workaround), also, damage applied from onhit cannot be stacked the way how damage from weapon is, each damage (lets say we have onhit that triggers 1d4 by each element) will be printed in the new row in log. And the onhit triggers a bit later than normal dmg which together makes this workaround quite unesthetical to make something like OP wants.
               
               

               
            

Legacy_Failed.Bard

  • Hero Member
  • *****
  • Posts: 1409
  • Karma: +0/-0
Preventing Physical Damage Type Merging
« Reply #11 on: July 06, 2012, 03:15:52 pm »


               It looks like GetDamageDealtByType doesn't report the individual physical damages properly either.  I hadn't realized there were that many bugs in the damage handling system still.
 It could be done still, but without nwnx there's not much chance of making it look integrated.
               
               

               
            

Legacy_ShadowM

  • Hero Member
  • *****
  • Posts: 1373
  • Karma: +0/-0
Preventing Physical Damage Type Merging
« Reply #12 on: July 06, 2012, 06:17:31 pm »


               

ShaDoOoW wrote...

Failed.Bard wrote...

It should be doable with an unique on-hit property and pseudo-item damage properties.  The headache would come from converting the properties into usable variables, and fetching the weapons enhancement or attack bonus for applying damage power in the damage effect.
Now that my work week is done, I have a bit of time to look into this.  I'll hopefully have a more specific answer on how to do it in a couple hours.

problem is that damage power doesnt work with effectDamage (and there is no good workaround), also, damage applied from onhit cannot be stacked the way how damage from weapon is, each damage (lets say we have onhit that triggers 1d4 by each element) will be printed in the new row in log. And the onhit triggers a bit later than normal dmg which together makes this workaround quite unesthetical to make something like OP wants.


I confused? we just dealing with slashing, pierceing and bludgeon damage not the other damage effects, because though all will combine into one group of phyical damage. So you put a variable on the item for though base damage that are bonuses to the base damage and apply it on-hit system which I already have in place. I already made a function and tested it seem fine. So for her example, we

Short Sword (Piercing 1d6 base)
Enhancement: +5 Bludgeoning, +5 Piercing

Actual Damage: 1d6+10 Piercing (or, at least, a creature with 100% Piercing immunity is entirely immune).

We apply the 5 bludgeon /  Piercing damage onhit the only problem is we cannot use though IP properties so you will not see them in the weapon description unless you make some dummy ip to show this that does nothing or add the information in the description.
               
               

               


                     Modifié par ShadowM, 06 juillet 2012 - 05:31 .
                     
                  


            

Legacy_ShadowM

  • Hero Member
  • *****
  • Posts: 1373
  • Karma: +0/-0
Preventing Physical Damage Type Merging
« Reply #13 on: July 06, 2012, 09:36:58 pm »


               Ok, I played with some 2da to make the damage bonus of the three base are just there for show and added a function that transfers the data over into integers that is read by my custom onhit-cast spell system and break the damages into each type only problem it not compatible with old items that have had damage bonus already placed on them bioware standard but work when you update them.
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Preventing Physical Damage Type Merging
« Reply #14 on: July 06, 2012, 09:50:15 pm »


               

ShadowM wrote...

ShaDoOoW wrote...

Failed.Bard wrote...

It should be doable with an unique on-hit property and pseudo-item damage properties.  The headache would come from converting the properties into usable variables, and fetching the weapons enhancement or attack bonus for applying damage power in the damage effect.
Now that my work week is done, I have a bit of time to look into this.  I'll hopefully have a more specific answer on how to do it in a couple hours.

problem is that damage power doesnt work with effectDamage (and there is no good workaround), also, damage applied from onhit cannot be stacked the way how damage from weapon is, each damage (lets say we have onhit that triggers 1d4 by each element) will be printed in the new row in log. And the onhit triggers a bit later than normal dmg which together makes this workaround quite unesthetical to make something like OP wants.


I confused? we just dealing with slashing, pierceing and bludgeon damage not the other damage effects, because though all will combine into one group of phyical damage. So you put a variable on the item for though base damage that are bonuses to the base damage and apply it on-hit system which I already have in place. I already made a function and tested it seem fine. So for her example, we

Short Sword (Piercing 1d6 base)
Enhancement: +5 Bludgeoning, +5 Piercing

Actual Damage: 1d6+10 Piercing (or, at least, a creature with 100% Piercing immunity is entirely immune).

We apply the 5 bludgeon /  Piercing damage onhit the only problem is we cannot use though IP properties so you will not see them in the weapon description unless you make some dummy ip to show this that does nothing or add the information in the description.

OP wants to deal three damage types. Now one tpe is handled by weapon itself and lets say you use onhit for remaining two damage types. You cant stack the damage into one EffectDamage neither you can link it so player will see three times applying damage in log this for example:
player damaged target by X (physical)
player damaged target by Y (physical)
player daaged target by Z(A physical, B electrical)

everything I said applies, and I forgot to inform about DR problem. Due to this, the DR will apply for every damageEffect you apply to target.

To really make what OP wants is probably possible. Practically its not however. You have to workaound the DR somehow - you wont be able to find out how many physical damage was resisted in normal weapon damage. Then you have to workaround +X/+Y resistance as due to the bug EffectDamage is treated as +0. So you could probably have to apply larger damage to pierce it, but then you gonna break premonition and similar spells.