2 Commits
v0.04 ... v0.05

Author SHA1 Message Date
Jaysyn904
e2d524963b Updated Invoking include to allow invoking past 3rd class
Updated Invoking include to allow invoking past 3rd class.  Updated epic spell include to allow epic spellcasting past 3rd class.  Updated nwscript compiler for .35.  Added .35 change log / notes.
2023-03-10 19:04:21 -05:00
Jaysyn904
ef28d788a3 Updated Disciple of Dispater's Iron Power for new weapon types
Updated Disciple of Dispater's Iron Power for new weapon types. Added note about adding new weapons.
2023-03-10 10:12:48 -05:00
8 changed files with 146 additions and 33 deletions

Binary file not shown.

View File

@@ -0,0 +1,5 @@
Files changed for .35:
inv_inc_invfunc.nss - GetHighestInvokerLevel(), GetFirstInvocationClassPosition(), GetPrimaryInvocationClass()
inc_epicspellfnc.nss - GetCanLearnSeed()

View File

@@ -0,0 +1,25 @@
Scripts that need to be updated whenever we get a new weapon type:
prc_misc_const.nss - New weapon constants go here
prc_dispater.nss - Metal / Iron weapons
inc_item_props.nss - Missing Light lance
inc_rand_equip.nss - Missing all new weapons
prc_craft_inc.nss
prc_inc_clsfunc.nss - Missing Light Lance & new weapons. Needs update for .35
prc_inc_combat.nss - Missing Light lance, elf blades & new weapons.
prc_inc_fork.nss - Missing Light Lance & new weapons.
prc_inc_wpnrest.nss - Missing Light Lance for some functions
prc_x2_itemprop.nss - Missing Light lance.
psi_callweapon.nss - May need to make a new default version for each new weapon, needs testing.
prc_ad_falskeen.nss - Missing Light lance, elf blades & new weapons.
prc_battletempus.nss - Martial melee weapons. Missing new Martial weapons.
prc_intuiatk.nss - Simple melee weapons. Missing new Simple weapons.
prc_swashweak.nss - All melee weapons. Missing Light lance, elf blades & new weapons.
prc_ipfeat_const.nss - Weapon Feat constants go here.
2DAs that need updating for new weapon types:
baseitems.2da - Obviously.
prc_weap_items.2da

View File

@@ -132,7 +132,7 @@ int GetCanLearnSeed(object oPC, int nSeedID)
{
int nRestr = GetClassForSeed(nSeedID);
int i, nClass;
for(i = 1; i <= 3; i++)
for(i = 1; i <= 8; i++)
{
nClass = GetClassByPosition(i, oPC);
if(_CheckEpicSpellcastingForClass(oPC, nClass)//this class has epic spellcasting

View File

@@ -230,14 +230,37 @@ int GetIsInvocationUser(object oCreature)
);
}
int GetHighestInvokerLevel(object oCreature)
{
int n = 0;
int nHighest;
int nTemp;
while(n <= 8)
{
if(GetClassByPosition(n, oCreature) != CLASS_TYPE_INVALID)
{
nTemp = GetInvokerLevel(oCreature, GetClassByPosition(n, oCreature));
if(nTemp > nHighest)
nHighest = nTemp;
}
n++;
}
return nHighest;
}
/* int GetHighestInvokerLevel(object oCreature)
{
return max(max(GetClassByPosition(1, oCreature) != CLASS_TYPE_INVALID ? GetInvokerLevel(oCreature, GetClassByPosition(1, oCreature)) : 0,
GetClassByPosition(2, oCreature) != CLASS_TYPE_INVALID ? GetInvokerLevel(oCreature, GetClassByPosition(2, oCreature)) : 0
),
GetClassByPosition(3, oCreature) != CLASS_TYPE_INVALID ? GetInvokerLevel(oCreature, GetClassByPosition(3, oCreature)) : 0
);
}
} */
int GetIsInvocationClass(int nClass)
{
@@ -278,7 +301,7 @@ int GetPrimaryInvocationClass(object oCreature = OBJECT_SELF)
{
int nClass;
if(GetPRCSwitch(PRC_CASTERLEVEL_FIRST_CLASS_RULE))
if(GetPRCSwitch(PRC_CASTERLEVEL_FIRST_CLASS_RULE)) //: Kinda pointless for .35
{
int nInvocationPos = GetFirstInvocationClassPosition(oCreature);
if (!nInvocationPos) return CLASS_TYPE_INVALID; // no invoking class
@@ -288,18 +311,30 @@ int GetPrimaryInvocationClass(object oCreature = OBJECT_SELF)
else
{
int nClassLvl;
int nClass1, nClass2, nClass3;
int nClass1Lvl, nClass2Lvl, nClass3Lvl;
int nClass1, nClass2, nClass3, nClass4, nClass5, nClass6, nClass7, nClass8;
int nClass1Lvl, nClass2Lvl, nClass3Lvl, nClass4Lvl, nClass5Lvl, nClass6Lvl, nClass7Lvl, nClass8Lvl;
nClass1 = GetClassByPosition(1, oCreature);
nClass2 = GetClassByPosition(2, oCreature);
nClass3 = GetClassByPosition(3, oCreature);
nClass4 = GetClassByPosition(4, oCreature);
nClass5 = GetClassByPosition(5, oCreature);
nClass6 = GetClassByPosition(6, oCreature);
nClass7 = GetClassByPosition(7, oCreature);
nClass8 = GetClassByPosition(8, oCreature);
if(GetIsInvocationClass(nClass1)) nClass1Lvl = GetLevelByClass(nClass1, oCreature);
if(GetIsInvocationClass(nClass2)) nClass2Lvl = GetLevelByClass(nClass2, oCreature);
if(GetIsInvocationClass(nClass3)) nClass3Lvl = GetLevelByClass(nClass3, oCreature);
if(GetIsInvocationClass(nClass4)) nClass4Lvl = GetLevelByClass(nClass4, oCreature);
if(GetIsInvocationClass(nClass5)) nClass5Lvl = GetLevelByClass(nClass5, oCreature);
if(GetIsInvocationClass(nClass6)) nClass6Lvl = GetLevelByClass(nClass6, oCreature);
if(GetIsInvocationClass(nClass7)) nClass7Lvl = GetLevelByClass(nClass7, oCreature);
if(GetIsInvocationClass(nClass8)) nClass8Lvl = GetLevelByClass(nClass8, oCreature);
nClass = nClass1;
nClassLvl = nClass1Lvl;
if(nClass2Lvl > nClassLvl)
{
nClass = nClass2;
@@ -310,6 +345,32 @@ int GetPrimaryInvocationClass(object oCreature = OBJECT_SELF)
nClass = nClass3;
nClassLvl = nClass3Lvl;
}
if(nClass4Lvl > nClassLvl)
{
nClass = nClass4;
nClassLvl = nClass4Lvl;
}
if(nClass5Lvl > nClassLvl)
{
nClass = nClass5;
nClassLvl = nClass5Lvl;
}
if(nClass6Lvl > nClassLvl)
{
nClass = nClass6;
nClassLvl = nClass6Lvl;
}
if(nClass7Lvl > nClassLvl)
{
nClass = nClass7;
nClassLvl = nClass7Lvl;
}
if(nClass8Lvl > nClassLvl)
{
nClass = nClass8;
nClassLvl = nClass8Lvl;
}
if(nClassLvl == 0)
nClass = CLASS_TYPE_INVALID;
}
@@ -325,7 +386,17 @@ int GetFirstInvocationClassPosition(object oCreature = OBJECT_SELF)
return 2;
if (GetIsInvocationClass(GetClassByPosition(3, oCreature)))
return 3;
if (GetIsInvocationClass(GetClassByPosition(4, oCreature)))
return 4;
if (GetIsInvocationClass(GetClassByPosition(5, oCreature)))
return 5;
if (GetIsInvocationClass(GetClassByPosition(6, oCreature)))
return 6;
if (GetIsInvocationClass(GetClassByPosition(7, oCreature)))
return 7;
if (GetIsInvocationClass(GetClassByPosition(8, oCreature)))
return 8;
return 0;
}

View File

@@ -10,33 +10,45 @@ int IsItemMetal(object oItem)
// Any of these Base Item Types can be considered "mostly metal"
if (type==BASE_ITEM_BASTARDSWORD ||
type==BASE_ITEM_BATTLEAXE ||
type==BASE_ITEM_DAGGER ||
type==BASE_ITEM_DIREMACE ||
type==BASE_ITEM_DOUBLEAXE ||
type==BASE_ITEM_DWARVENWARAXE ||
type==BASE_ITEM_GREATAXE ||
type==BASE_ITEM_GREATSWORD ||
type==BASE_ITEM_HALBERD ||
type==BASE_ITEM_HANDAXE ||
type==BASE_ITEM_HEAVYFLAIL ||
type==BASE_ITEM_KAMA ||
type==BASE_ITEM_KATANA ||
type==BASE_ITEM_KUKRI ||
type==BASE_ITEM_LIGHTFLAIL ||
type==BASE_ITEM_LIGHTHAMMER ||
type==BASE_ITEM_LIGHTMACE ||
type==BASE_ITEM_LONGSWORD ||
type==BASE_ITEM_MORNINGSTAR ||
type==BASE_ITEM_RAPIER ||
type==BASE_ITEM_SCIMITAR ||
type==BASE_ITEM_SCYTHE ||
type==BASE_ITEM_SHORTSWORD ||
type==BASE_ITEM_SHURIKEN ||
type==BASE_ITEM_SICKLE ||
type==BASE_ITEM_THROWINGAXE ||
type==BASE_ITEM_TWOBLADEDSWORD ||
type==BASE_ITEM_WARHAMMER)
type==BASE_ITEM_BATTLEAXE ||
type==BASE_ITEM_DAGGER ||
type==BASE_ITEM_DIREMACE ||
type==BASE_ITEM_DOUBLEAXE ||
type==BASE_ITEM_DWARVENWARAXE ||
type==BASE_ITEM_GREATAXE ||
type==BASE_ITEM_GREATSWORD ||
type==BASE_ITEM_HALBERD ||
type==BASE_ITEM_HANDAXE ||
type==BASE_ITEM_HEAVYFLAIL ||
type==BASE_ITEM_KAMA ||
type==BASE_ITEM_KATANA ||
type==BASE_ITEM_KUKRI ||
type==BASE_ITEM_LIGHTFLAIL ||
type==BASE_ITEM_LIGHTHAMMER ||
type==BASE_ITEM_LIGHTMACE ||
type==BASE_ITEM_LONGSWORD ||
type==BASE_ITEM_MORNINGSTAR ||
type==BASE_ITEM_RAPIER ||
type==BASE_ITEM_SCIMITAR ||
type==BASE_ITEM_SCYTHE ||
type==BASE_ITEM_SHORTSWORD ||
type==BASE_ITEM_SHURIKEN ||
type==BASE_ITEM_SICKLE ||
type==BASE_ITEM_THROWINGAXE ||
type==BASE_ITEM_TWOBLADEDSWORD ||
type==BASE_ITEM_WARHAMMER ||
type==BASE_ITEM_HEAVY_PICK ||
type==BASE_ITEM_LIGHT_PICK ||
type==BASE_ITEM_SAI ||
type==BASE_ITEM_FALCHION ||
type==BASE_ITEM_KATAR ||
type==BASE_ITEM_HEAVY_MACE ||
type==BASE_ITEM_MAUL ||
type==BASE_ITEM_DOUBLE_SCIMITAR ||
type==BASE_ITEM_EAGLE_CLAW ||
type==BASE_ITEM_ELVEN_LIGHTBLADE ||
type==BASE_ITEM_ELVEN_THINBLADE ||
type==BASE_ITEM_ELVEN_COURTBLADE)
{
nReturnVal=2; // Mostly metal
}

BIN
trunk/tools/.34_nwnsc.exe Normal file

Binary file not shown.

Binary file not shown.