Aller au contenu

Photo

What is the proper command for adding damage reduction to item property?


  • Veuillez vous connecter pour répondre
10 réponses à ce sujet

#1
Clangeddin86

Clangeddin86
  • Members
  • 221 messages

I use:

int N_ITEM = 4;
object oArmor = GetItemInSlot(INVENTORY_SLOT_CHEST, OBJECT_SELF);
iAC = ItemPropertyDamageReduction(N_ITEM, 0, 0, DR_TYPE_NONE);
AddItemProperty(DURATION_TYPE_PERMANENT, iAC, oArmor);

But nothing happens.

Am I doing something wrong with the syntax or is the ItemPropertyDamageReduction function broken?

The kind of damage reduction I'd like to add is the X/- type (like the adamantine equipment).



#2
AaronH

AaronH
  • Members
  • 116 messages

Go on;

 

b43516861742a0f400648dbef50ca0f8.png

 

 

Then scroll down in the options until you find damage resistance. It's what you're after. Damage reduction reduces the damage overrall. As you can see in the pic, I have my resistance in melee type combat. 

bcba169638a6bc759bc1a90bb1f5b05a.png

 

*NOTE*

Damage resistance: Physical is somehow bugged. So if you say, do want to reduce damage from all melee forms (Slash/pierce/bludgeon), then do that in each one, not phyiscal.



#3
Clangeddin86

Clangeddin86
  • Members
  • 221 messages

Thanks, in the end I've used a workaround. To the item I apply the damage resistance physical (which does not work at all, even if in the combat log it displays reducing the damage, it does not reduce it at all), but only for show, then I have a custom script that adds a damage reduction effect based on the sum of the various physical resistance effects from gear (yes, I want them to stack).



#4
-Semper-

-Semper-
  • Members
  • 2 259 messages

any form of specific physical damage resistance is bugged. it will appear in the combat log, but actually won't do anything. only use damage resistance for protection against elemental and energy damage.



#5
Clangeddin86

Clangeddin86
  • Members
  • 221 messages

any form of specific physical damage resistance is bugged. it will appear in the combat log, but actually won't do anything. only use damage resistance for protection against elemental and energy damage.

 

Ironically, for what I want to do, this bug is a boon. If the damage resistance worked and stacked with the damage reduction it wold throw all my plans in the gutter.  :lol:



#6
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages
Hi There,

This may be of no use to you, but is some background info (from an old post) that came to light regarding this matter:

Cheers,
Lance.

DAMAGE REDUCTION RESULTS
========================

EffectDamageResistance: Cannot use this function to add *ANY* DR reduction. (It is used with ELEMENTAL TYPE DAMAGE.)
ItemPropertyDamageReduction: Have not been successful in adding DR to skin or armour items.
EffectDamageReduction: Have only be successful in adding a *pair* of DR and not one by itself.
(Use IP_CONST_XXX and reverse logic.)

IP_CONST_DAMAGETYPE_BLUDGEONING = 0
IP_CONST_DAMAGETYPE_PIERCING = 1
IP_CONST_DAMAGETYPE_SLASHING = 2

EXAMPLES:

eDR = EffectDamageReduction(5, 0, 0, DR_TYPE_DMGTYPE); // Applies DR for P and S (B Gets Through)
eDR = EffectDamageReduction(5, 1, 0, DR_TYPE_DMGTYPE); // Applies DR for B and S (P Gets Through)
eDR = EffectDamageReduction(5, 2, 0, DR_TYPE_DMGTYPE); // Applies DR for B and P (S Gets Through)

SET VIA TOOLSET PRIOR PLAY (CREATURES AND ITEMS): Appears to work if you bear weapon corrections into account (See next).

The Morningstar is BLUDGEONING only (TLK 5412 NEEDS CORRECTING) and that the Longsword is both SLASHING AND PIERCING!
Also SLASHING & PIERCING: Bastard Sword, Halberd, Katana, Scythe. (Total five weapons.) Therefore, Longsword (TLK 5417),
Bastard Sword (TLK 5434) and Katana (TLK 5423) need descriptor correction.

From the toolset setting, we have the option of applying "OR" logic to the "piercings" selected, which means we can
make it so a creature (or item) has DR against only ONE type. In theory, as applying this to a "skin" item is possible,
it means we can also create different skins and alter "monsters" on the fly by swapping out "skins". NB: Using skins
with PCs is NOT possible in NWN2 due to problems that come from doing so. (See my blog for details. Search for "skin".)

For PCs, a better solution would be to use the DAMAGE IMMUNITY (5-90%) v WEAPON DAMAGE TYPE rather than the DR for an
item when only one DR type is required, due to the problems noted in the image in the previous post. (i.e. Property
presentation and lack of recognising the property is actually present!)


Weapon (Type) | DR Type | Bypass Y/N
--------------------------------------------
Longsword (SP) | BSP | N
Longsword (SP) | B | N
Longsword (SP) | S | Y
Longsword (SP) | P | Y
Longsword (SP) | BP | N
Longsword (SP) | BS | N
Longsword (SP) | SP | Y

Club (B ) | BSP | N
Club (B ) | B | Y
Club (B ) | S | N
Club (B ) | P | N
Club (B ) | BP | N
Club (B ) | BS | N
Club (B ) | SP | N

Spear (P) | BSP | N
Spear (P) | B | N
Spear (P) | S | N
Spear (P) | P | Y
Spear (P) | BP | N
Spear (P) | BS | N
Spear (P) | SP | N

Halberd (PS) | BSP | N
Halberd (PS) | B | N
Halberd (PS) | S | Y
Halberd (PS) | P | Y
Halberd (PS) | BP | N
Halberd (PS) | BS | N
Halberd (PS) | SP | Y

Morningstar (B ) | BSP | N
Morningstar (B ) | B | Y
Morningstar (B ) | S | N
Morningstar (B ) | P | N
Morningstar (B ) | BP | N
Morningstar (B ) | BS | N
Morningstar (P ) | SP | N

#7
kevL

kevL
  • Members
  • 4 070 messages
found it:
EffectDamageResistance problem


... for the brave or unwary!

#8
kevL

kevL
  • Members
  • 4 070 messages

NB: Using skins with PCs is NOT possible in NWN2 due to problems that come from doing so. (See my blog for details. Search for "skin".)


holy diana, confirmed.

ACP goes whack

#9
Dann-J

Dann-J
  • Members
  • 3 161 messages

holy diana, confirmed.

ACP goes whack

 

MotB gives the player a temporary skin at the beginning, in order to reduce their ability scores in a way that can't be fixed by resting or using restore spells. I'd never noticed any problems - then again, I can't remember ever unequipping and re-equipping shields before the cutscene where the skin gets removed. I doubt there are any shields to be found in that part of the campaign, and the only shield you're likely to have is the one your character had equipped if you imported an existing character.



#10
kevL

kevL
  • Members
  • 4 070 messages
in the tests i did,
it didn't trigger right away. In fact i had to swap out the shield and armor several times and suddenly my ACP read "-30"

then i wanted to see if it was just a character sheet thing, so I watched my Hide skill (affected by ACP), and by swapping in and out the shield + armor I could exploit a 2 pip increase each time.

I didn't investigate further but the bug could be getting triggered on a single swap-out ....


MotB isn't the only place that relies on a PC-equipped skin, grr -- I think i'm just going to create a cursed widget in inventory 'for the duration'.

#11
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages

holy diana, confirmed.

ACP goes whack


Hi KevL,

Sorry for the late response (no access to net for a couple of weeks).

Yes, discovering this was a nuisance. :(

Cheers,
Lance.