Skip to content

Item Property Value

Hello,

I'm trying to build a "Corruption Vat" that reverses the value of "ITEM_PROPERTY_ENHANCEMENT_BONUS_VS_ALIGNMENT_GROUP"

I cannot, for the life of me, figure out how to identify the "alignment group" and the "enchantment bonus" attributed to this particular item property. Does anyone have a script that is able to do this? I know it has something to do with SubType value... but I can't dig it up.

Thanks in advance! Will plus up for help! :smiley:

Comments

  • CalgacusCalgacus Member Posts: 273
    edited February 2019
    Try something like this?
    itemproperty ip = GetFirstItemProperty(oItem);
     
    while (GetIsItemPropertyValid(ip)) // valid ip?
    {
      // right property type?
      if ((GetItemPropertyType(ip) == ITEM_PROPERTY_ENHANCEMENT_BONUS_VS_ALIGNMENT_GROUP))
      {
        SpeakString("has sub-property == "+ IntToString(GetItemPropertySubType(ip)));
        if (GetItemPropertySubType(ip) ==  IP_CONST_ALIGNMENTGROUP_GOOD   ){
          /// do custom  stuff
        }
      }
      // get next ip ...
      ip = GetNextItemProperty(oItem);
    }//end loop
    
    Post edited by Calgacus on
  • antirelicantirelic Member Posts: 20
    Calgacus wrote: »
    Try something like this?
    itemproperty ip = GetFirstItemProperty(oItem);
     
    while (GetIsItemPropertyValid(ip)) // valid ip?
    {
      // right property type?
      if ((GetItemPropertyType(ip) == ITEM_PROPERTY_ENHANCEMENT_BONUS_VS_ALIGNMENT_GROUP))
      {
        SpeakString("has sub-property == "+ IntToString(GetItemPropertySubType(ip)));
        if (GetItemPropertySubType(ip) ==  IP_CONST_ALIGNMENTGROUP_GOOD   ){
          /// do custom  stuff
        }
      }
      // get next ip ...
      ip = GetNextItemProperty(oItem);
    }//end loop
    

    How to get the enchantment bonus number?

    Thank you for this much!
  • CalgacusCalgacus Member Posts: 273
    edited February 2019
    not sure... thought I had it but no... let me see...

    how about IPGetWeaponEnhancementBonus

    eg
    int bonus = IPGetWeaponEnhancementBonus(
         oItem,
         ITEM_PROPERTY_ENHANCEMENT_BONUS_VS_ALIGNMENT_GROUP 
    );
    

    Assuming you only have one "ITEM_PROPERTY_ENHANCEMENT_BONUS_VS_ALIGNMENT_GROUP" property per item, that should do. Not sure how to differentiate between them if you have multiple.
  • antirelicantirelic Member Posts: 20
    Great. I think that might do it
  • antirelicantirelic Member Posts: 20
    Yes. That did it. Thank you Calgacus.
Sign In or Register to comment.