Author Topic: Getting Base AC value  (Read 683 times)

Legacy_WhiZard

  • Hero Member
  • *****
  • Posts: 2149
  • Karma: +0/-0
Getting Base AC value
« Reply #15 on: December 22, 2013, 03:24:08 am »


               

Lightfoot8 wrote...

Why "des_crft_appear" ?     The Item format  lists  "parts_chest"  as being the place to look.  


Both work.  des_crft_appear is used in looping through the armor torsos when modifying armor (so as not to change the Base AC).

@henesua  I did go via the torso, in fact Lightfoot's method is almost identical to my own.
               
               

               


                     Modifié par WhiZard, 22 décembre 2013 - 03:25 .
                     
                  


            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Getting Base AC value
« Reply #16 on: December 22, 2013, 03:41:27 pm »


               The methods are not identical because des_craft_appear is not used by the engine to determine the base ac of a torso.
               
               

               
            

Legacy_WhiZard

  • Hero Member
  • *****
  • Posts: 2149
  • Karma: +0/-0
Getting Base AC value
« Reply #17 on: December 22, 2013, 04:09:16 pm »


               True, but I have yet to see new custom armor appearances that are not incorporated with both 2das.
               
               

               
            

Legacy_Khuzadrepa

  • Sr. Member
  • ****
  • Posts: 347
  • Karma: +0/-0
Getting Base AC value
« Reply #18 on: December 31, 2013, 07:50:48 pm »


               Not sure if this is similar to what MagicalMaster posted earlier since he removed it, but this is an OLD trick that I am quite certain works:

object oArmor = GetItemInSlot(INVENTORY_SLOT_CHEST, oPC); //Or however you are getting the armor item
int baseAC = GetItemACValue(oArmor) - IPGetWeaponEnhancementBonus(oArmor, ITEM_PROPERTY_AC_BONUS);

Hope that helps!
Cheers,
Khuzadrepa
               
               

               


                     Modifié par Khuzadrepa, 31 décembre 2013 - 08:01 .
                     
                  


            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Getting Base AC value
« Reply #19 on: December 31, 2013, 08:57:10 pm »


               

Khuzadrepa wrote...

Not sure if this is similar to what MagicalMaster posted earlier since he removed it, but this is an OLD trick that I am quite certain works:

object oArmor = GetItemInSlot(INVENTORY_SLOT_CHEST, oPC); //Or however you are getting the armor item
int baseAC = GetItemACValue(oArmor) - IPGetWeaponEnhancementBonus(oArmor, ITEM_PROPERTY_AC_BONUS);

Hope that helps!
Cheers,
Khuzadrepa


 For anyone wanting to use this:  IPGetWeaponEnhancementBonus  is located in  x2_inc_itemprop
               
               

               


                     Modifié par Lightfoot8, 31 décembre 2013 - 09:00 .