Author Topic: Need GetHasDvastatingCritical function search by BaseItem, not 2da driven  (Read 447 times)

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0


               My function is 2da driven with different values cos I replaced devast with my own version and now I need default values for other server, anyone have this so I can save some time?:innocent:
               
               

               
            

Legacy__Knightmare_

  • Full Member
  • ***
  • Posts: 191
  • Karma: +0/-0


               I sort of have one. Its not for DevCrit but for Weap Specialization. It does go through by base item type. I could send you the ERF and all you would need to do is change the feat names. Lots of changes to go through all weapon types, but much quicker than typing the entire thing out. Its done in NWN2, not sure if NWN1 can import NWN2 ERF files (I do know NWN2 can import NWN1 ERFs). Also, there may be a couple missing base item types due to weapon differences in the games. Still, should save you a bunch of time. Let me know. Send your email addy through a PM if you want.
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0


               im back, no need, that doesnt help me much, guess i will have to make it myself, thanks anyway
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0


               so there is it if anyone else needs it

int HasDevast(object oPC, int nBaseItem)
{
 switch(nBaseItem)
 {
 case BASE_ITEM_GLOVES:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_UNARMED;
 break;
 case BASE_ITEM_BASTARDSWORD:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_BASTARDSWORD;
 break;
 case BASE_ITEM_BATTLEAXE:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_BATTLEAXE;
 break;
 case BASE_ITEM_CLUB:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_CLUB;
 break;
 case BASE_ITEM_DAGGER:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_DAGGER;
 break;
 case BASE_ITEM_DART:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_DART;
 break;
 case BASE_ITEM_DIREMACE:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_DIREMACE;
 break;
 case BASE_ITEM_DOUBLEAXE:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_DOUBLEAXE;
 break;
 case BASE_ITEM_DWARVENWARAXE:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_DWAXE;
 break;
 case BASE_ITEM_GREATAXE:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_GREATAXE;
 break;
 case BASE_ITEM_GREATSWORD:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_GREATSWORD;
 break;
 case BASE_ITEM_HALBERD:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_HALBERD;
 break;
 case BASE_ITEM_HANDAXE:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_HANDAXE;
 break;
 case BASE_ITEM_HEAVYCROSSBOW:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_HEAVYCROSSBOW;
 break;
 case BASE_ITEM_HEAVYFLAIL:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_HEAVYFLAIL;
 break;
 case BASE_ITEM_KAMA:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_KAMA;
 break;
 case BASE_ITEM_KATANA:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_KATANA;
 break;
 case BASE_ITEM_KUKRI:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_KUKRI;
 break;
 case BASE_ITEM_LIGHTCROSSBOW:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_LIGHTCROSSBOW;
 break;
 case BASE_ITEM_LIGHTFLAIL:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_LIGHTFLAIL;
 break;
 case BASE_ITEM_LIGHTHAMMER:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_LIGHTHAMMER;
 break;
 case BASE_ITEM_LIGHTMACE:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_LIGHTMACE;
 break;
 case BASE_ITEM_LONGBOW:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_LONGBOW;
 break;
 case BASE_ITEM_LONGSWORD:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_LONGSWORD;
 break;
 case BASE_ITEM_MORNINGSTAR:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_MORNINGSTAR;
 break;
 case BASE_ITEM_QUARTERSTAFF:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_QUARTERSTAFF;
 break;
 case BASE_ITEM_RAPIER:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_RAPIER;
 break;
 case BASE_ITEM_SCIMITAR:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_SCIMITAR;
 break;
 case BASE_ITEM_SCYTHE:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_SCYTHE;
 break;
 case BASE_ITEM_SHORTBOW:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_SHORTBOW;
 break;
 case BASE_ITEM_SHORTSPEAR:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_SHORTSPEAR;
 break;
 case BASE_ITEM_SHORTSWORD:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_SHORTSWORD;
 break;
 case BASE_ITEM_SHURIKEN:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_SHURIKEN;
 break;
 case BASE_ITEM_SICKLE:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_SICKLE;
 break;
 case BASE_ITEM_SLING:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_SLING;
 break;
 case BASE_ITEM_THROWINGAXE:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_THROWINGAXE;
 break;
 case BASE_ITEM_TRIDENT:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_TRIDENT;
 break;
 case BASE_ITEM_TWOBLADEDSWORD:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_TWOBLADEDSWORD;
 break;
 case BASE_ITEM_WARHAMMER:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_WARHAMMER;
 break;
 case BASE_ITEM_WHIP:
 nBaseItem = FEAT_EPIC_DEVASTATING_CRITICAL_WHIP;
 break;
 default:
 return FALSE;
 }
return GetHasFeat(nBaseItem,oPC);
}


               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0


               Or, if you're running lin and have nwnx_weapons:

/* Get and set the various weapon feats for individual base item types. */
int GetWeaponDevastatingCriticalFeat (int nBaseItem);

Has the advantage of being able to change and add dev crit feats.

Funky
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0


               This is for server which do not use nwnx_weapons, im not admin just external WB so trying to do without need of any additional setup as much global as possible.

Personaly using 2da where I got all weapon feats typed, mainly because Im running on windows.