Hi there,
I am having some trouble applying 2 item properties to an item. Other properties are working fine.
The Item is a ring with no other properties on it. Here is the line for the creation of the property:
ipItemProperty = ItemPropertyBonusSavingThrow(0, 1);
when I run a:
GetItemPropertyType(ipItemProperty)
I get a -1 result. If I use other properties, I have no issue. The other item property I am trying is:
ipItemProperty = ItemPropertyDamageReduction(5, 2, 0, 1);
I get the same result. Again, other properties such as skill bonuses, Saving Throw VS, etc all work fine.
Any ideas what I could be doing wrong?
Thanks
Trouble with 2 Item Properties
Débuté par
Marshall V
, nov. 24 2010 02:44
#1
Posté 24 novembre 2010 - 02:44
#2
Posté 24 novembre 2010 - 02:54
Just to confirm the problem. I created a new mod with a lever in an empty area and put this in the onused event:
object oPC = GetLastUsedBy();
object oItem = CreateItemOnObject("ring", oPC);
//itemproperty ipProperty = ItemPropertyBonusSavingThrow(0, 1);
itemproperty ipProperty = ItemPropertyBonu****points(5);
AddItemProperty(DURATION_TYPE_PERMANENT, ipProperty, oItem);
When I apply the bonus hit points, the ring has the 5 hit points applied to it. when I comment that out and uncomment the saving throw one, no property gets applied.
object oPC = GetLastUsedBy();
object oItem = CreateItemOnObject("ring", oPC);
//itemproperty ipProperty = ItemPropertyBonusSavingThrow(0, 1);
itemproperty ipProperty = ItemPropertyBonu****points(5);
AddItemProperty(DURATION_TYPE_PERMANENT, ipProperty, oItem);
When I apply the bonus hit points, the ring has the 5 hit points applied to it. when I comment that out and uncomment the saving throw one, no property gets applied.
Modifié par Marshall V, 24 novembre 2010 - 02:54 .
#3
Posté 24 novembre 2010 - 08:41
You have ItemPropertyBonusSavingThrow(0, 1); ...the constant (bolded underlined and itallic) you have for the saving throw type is 0... there is no such value of 0 for any of the constants for that function, use either IP_CONST_SAVEBASETYPE_FORTITUDE, IP_CONST_SAVEBASETYPE_WILL or IP_CONST_SAVEBASETYPE_REFLEX ... or you can use...
1 (for Fort), 2 (for Will) or 3 (for Reflex) if you want to use a numerical number rather than a constant. 0 will not work.
The constants and/or numerical values in that function are referencing the rows in iprp_savingthrow.2da and row 0 as you have it in yoru script is for the 'All' row... which i believe isnt used by NWN2, hence your problem
Hope that helps.
ItemPropertyDamageReduction(5, 2, 0, 1);
For your other one, im assuming your wanting 5/- damage reduction thats bypassed by piercing weapons (1 for reduction by weapon damage type, damage_type being 2 which is peircing)?... again you should use the constants rather than numbers just to be safe... the values seem to be fine although im kinda remembering mention about damage reduction for damage types being broken at some time with item properties through scripting... may be very wrong on that, just rings a few bells. It could be that thats causing issues... try a reduction type other than by damage type (such as by magic bonus or material type) and see if the property applies as it should.
1 (for Fort), 2 (for Will) or 3 (for Reflex) if you want to use a numerical number rather than a constant. 0 will not work.
The constants and/or numerical values in that function are referencing the rows in iprp_savingthrow.2da and row 0 as you have it in yoru script is for the 'All' row... which i believe isnt used by NWN2, hence your problem
Hope that helps.
ItemPropertyDamageReduction(5, 2, 0, 1);
For your other one, im assuming your wanting 5/- damage reduction thats bypassed by piercing weapons (1 for reduction by weapon damage type, damage_type being 2 which is peircing)?... again you should use the constants rather than numbers just to be safe... the values seem to be fine although im kinda remembering mention about damage reduction for damage types being broken at some time with item properties through scripting... may be very wrong on that, just rings a few bells. It could be that thats causing issues... try a reduction type other than by damage type (such as by magic bonus or material type) and see if the property applies as it should.
Modifié par BigfootNZ, 24 novembre 2010 - 09:02 .





Retour en haut






