Updated AMS marker feats

Updated AMS marker feats.  Removed arcane & divine marker feats.  Updated Dread Necromancer for epic progression. Updated weapon baseitem models.  Updated new weapons for crafting & npc equip.
 Updated prefix.  Updated release archive.
This commit is contained in:
Jaysyn904
2024-02-11 14:01:05 -05:00
parent 618cd42b82
commit 6ec137a24e
24762 changed files with 1528530 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
2DA V2.0
Name Label Description CasterType Level Skills DC Spells MarketPrice SpecialCost Size AppearanceSize HD Blueprint Epic Special
0 12572 Clay 12571 **** 11 38 15 1790_COMMUNE_153_*_*_* 40000 1500 4 4 11_18_33 **** 0 ****
1 12574 Flesh 12573 **** 8 38_4 13 2_9_LIMITED-WISH_*_GEAS/QUEST 20000 500 4 4 9_18_27 **** 0 ****
2 12576 Iron 12575 **** 16 25_26 20 23_POLYMORPH-ANY-OBJECT_LIMITED-WISH_*_GEAS/QUEST 150000 10000 4 4 18_24_54 **** 0 ****
3 12578 Stone 12577 **** 14 38 17 2076_SYMBOL-OF-STUNNING_*_*_GEAS/QUEST 90000 5000 4 4 14_21_42 **** 0 ****
4 0 Homunculus 0 **** 4 38 12 3659_3209_MENDING_*_*_* 2000 50 1 1 2_6_-1 **** 0 1
5 12693 Shield_Guardian 12692 **** 15 38 16 3656_417_LIMITED-WISH_SHIELD-OTHER_*_* 120000 5000 4 4 15_24_45 **** 0 1
6 111381 Ruby 111382 **** 16 38_4 15 LIMITED-WISH_MOVE-EARTH_POLYMORPH-ANY-OBJECT_STONE-SHAPE_*_* 40000 1500 4 4 10_20_30 **** 0 ****
7 111379 Emerald 111380 **** 17 38_4 15 2889_POLYMORPH-ANY-OBJECT_STONE-SHAPE_2877_*_* 40000 1500 4 4 12_24_36 **** 0 ****
8 111377 Diamond 111378 **** 16 38_4 16 41_LIMITED-WISH_POLYMORPH-ANY-OBJECT_STONE-SHAPE_183_* 40000 1500 4 4 14_28_42 **** 0 ****
9 84195 Demonflesh 86785 **** 18 7_4 20 36_366_367_128_UNHOLY-AURA_UNHOLY-BLIGHT_GEAS/QUEST 260000 1000 5 4 24_36_72 **** 1 ****
10 90391 Mithral 84406 **** 25 25_26 30 78_POLYMORPH-ANY-OBJECT_WISH_GEAS/QUEST 500000 5000 5 4 36_54_72 **** 1 ****
11 90392 Adamantine 84405 **** 30 25_26 40 463_POLYMORPH-ANY-OBJECT_WISH_GEAS/QUEST 1000000 25000 5 4 54_82_108 **** 1 ****
12 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
13 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
14 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
15 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
16 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
17 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
18 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
19 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
20 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
21 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
22 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
23 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
24 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
25 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
26 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
27 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
28 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
29 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
30 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
31 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
32 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
33 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
34 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
35 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
36 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
37 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
38 **** Stained_Glass 0 1 16 38 25 POLYMORPH-ANY-OBJECT_LIMITED-WISH_*_*_GEAS/QUEST 10000 5000 3 3 12_24_36 **** 0 ****
39 **** Brass 0 1 16 25_26 25 POLYMORPH-ANY-OBJECT_LIMITED-WISH_2888_123_GEAS/QUEST 108000 8000 4 4 16_32_48 **** 0 ****
40 **** Dragonflesh 0 1 16 4_7 25 POLYMORPH-ANY-OBJECT_LIMITED-WISH_*_*_GEAS/QUEST 400000 100000 4 4 30_60_90 **** 0 ****

View File

@@ -0,0 +1,26 @@
#include "prc_alterations"
#include "prc_craft_inc"
void main()
{
//struct ipstruct iptemp = GetIpStructFromString("1_*_1_*");
//itemproperty ip = ConstructIP(iptemp.type, iptemp.subtype, iptemp.costtablevalue, iptemp.param1value);
//PrintString(GetItemPropertyString(ip));
DoDebug("fs_test: starting");
//DoDebug(GetItemPropertyString(ip));
object oPC = GetFirstPC();
GetIsSkillSuccessful(oPC, SKILL_PERFORM, 10);
GetIsSkillSuccessful(oPC, SKILL_PERFORM, 20);
GetIsSkillSuccessful(oPC, SKILL_PERFORM, 20);
GetIsSkillSuccessful(oPC, SKILL_PERFORM, 20);
GetPRCIsSkillSuccessful(oPC, SKILL_PERFORM, 20, d20());
GetPRCIsSkillSuccessful(oPC, SKILL_PERFORM, 20, 10);
GetPRCIsSkillSuccessful(oPC, SKILL_PERFORM, 20, 20);
GetIsSkillSuccessful(oPC, SKILL_PERFORM, 40);
GetPRCIsSkillSuccessful(oPC, SKILL_PERFORM, 40, d20());
GetIsSkillSuccessful(oPC, SKILL_USE_MAGIC_DEVICE, 10);
GetIsSkillSuccessful(oPC, SKILL_USE_MAGIC_DEVICE, 40);
GetIsSkillSuccessful(oPC, SKILL_USE_MAGIC_DEVICE, 1);
//DoDebug(IntToString(PRCGetHasSpell(368, oPC)));
DoDebug("fs_test: ending");
}

View File

@@ -0,0 +1,312 @@
DelayCommand(2.6, MakeLookupLoop(CLASS_TYPE_BLACKGUARD, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "SpellID", "", "GetRowFromSpellID"));
DelayCommand(2.7, MakeLookupLoop(CLASS_TYPE_ANTI_PALADIN, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "SpellID", "", "GetRowFromSpellID"));
DelayCommand(2.8, MakeLookupLoop(CLASS_TYPE_SOLDIER_OF_LIGHT, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "SpellID", "", "GetRowFromSpellID"));
DelayCommand(2.9, MakeLookupLoop(CLASS_TYPE_KNIGHT_MIDDLECIRCLE, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "SpellID", "", "GetRowFromSpellID"));
DelayCommand(3.0, MakeLookupLoop(CLASS_TYPE_KNIGHT_CHALICE, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "SpellID", "", "GetRowFromSpellID"));
DelayCommand(3.1, MakeLookupLoop(CLASS_TYPE_VIGILANT, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "SpellID", "", "GetRowFromSpellID"));
DelayCommand(3.2, MakeLookupLoop(CLASS_TYPE_VASSAL, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "SpellID", "", "GetRowFromSpellID"));
DelayCommand(3.3, MakeLookupLoop(CLASS_TYPE_OCULAR, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "SpellID", "", "GetRowFromSpellID"));
DelayCommand(3.4, MakeLookupLoop(CLASS_TYPE_ASSASSIN, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "SpellID", "", "GetRowFromSpellID"));
DelayCommand(3.5, MakeLookupLoop(CLASS_TYPE_SUEL_ARCHANAMACH, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "SpellID", "", "GetRowFromSpellID"));
DelayCommand(4.0, MakeLookupLoop(CLASS_TYPE_SHADOWLORD, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "SpellID", "", "GetRowFromSpellID"));
DelayCommand(4.0, MakeLookupLoop(CLASS_TYPE_BARD, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "SpellID", "", "GetRowFromSpellID"));
DelayCommand(4.0, MakeLookupLoop(CLASS_TYPE_SORCERER, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "SpellID", "", "GetRowFromSpellID"));
DelayCommand(4.2, MakeLookupLoop(CLASS_TYPE_FAVOURED_SOUL, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "SpellID", "", "GetRowFromSpellID"));
DelayCommand(7.9, MakeLookupLoop(CLASS_TYPE_HEXBLADE, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "SpellID", "", "GetRowFromSpellID"));
DelayCommand(7.9, MakeLookupLoop(CLASS_TYPE_SOHEI, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "SpellID", "", "GetRowFromSpellID"));
DelayCommand(8.9, MakeLookupLoop(CLASS_TYPE_SLAYER_OF_DOMIEL, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "SpellID", "", "GetRowFromSpellID"));
DelayCommand(9.5, MakeLookupLoop(CLASS_TYPE_DUSKBLADE, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "SpellID", "", "GetRowFromSpellID"));
DelayCommand(10.2, MakeLookupLoop(CLASS_TYPE_HEALER, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "SpellID", "", "GetRowFromSpellID"));
DelayCommand(11.4, MakeLookupLoop(CLASS_TYPE_WARMAGE, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "SpellID", "", "GetRowFromSpellID"));
DelayCommand(3.0, MakeSpellIDLevelLoop(CLASS_TYPE_BLACKGUARD, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "RealSpellID", "GetRowFromRealSpellID"));
DelayCommand(3.1, MakeSpellIDLevelLoop(CLASS_TYPE_ANTI_PALADIN, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "RealSpellID", "GetRowFromRealSpellID"));
DelayCommand(3.2, MakeSpellIDLevelLoop(CLASS_TYPE_SOLDIER_OF_LIGHT, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "RealSpellID", "GetRowFromRealSpellID"));
DelayCommand(3.3, MakeSpellIDLevelLoop(CLASS_TYPE_KNIGHT_MIDDLECIRCLE, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "RealSpellID", "GetRowFromRealSpellID"));
DelayCommand(3.4, MakeSpellIDLevelLoop(CLASS_TYPE_KNIGHT_CHALICE, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "RealSpellID", "GetRowFromRealSpellID"));
DelayCommand(3.5, MakeSpellIDLevelLoop(CLASS_TYPE_VIGILANT, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "RealSpellID", "GetRowFromRealSpellID"));
DelayCommand(3.6, MakeSpellIDLevelLoop(CLASS_TYPE_VASSAL, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "RealSpellID", "GetRowFromRealSpellID"));
DelayCommand(3.7, MakeSpellIDLevelLoop(CLASS_TYPE_OCULAR, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "RealSpellID", "GetRowFromRealSpellID"));
DelayCommand(3.8, MakeSpellIDLevelLoop(CLASS_TYPE_ASSASSIN, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "RealSpellID", "GetRowFromRealSpellID"));
DelayCommand(3.9, MakeSpellIDLevelLoop(CLASS_TYPE_SUEL_ARCHANAMACH, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "RealSpellID", "GetRowFromRealSpellID"));
DelayCommand(4.0, MakeSpellIDLevelLoop(CLASS_TYPE_SHADOWLORD, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "RealSpellID", "GetRowFromRealSpellID"));
DelayCommand(4.1, MakeSpellIDLevelLoop(CLASS_TYPE_BARD, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "RealSpellID", "GetRowFromRealSpellID"));
DelayCommand(4.2, MakeSpellIDLevelLoop(CLASS_TYPE_SORCERER, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "RealSpellID", "GetRowFromRealSpellID"));
DelayCommand(4.3, MakeSpellIDLevelLoop(CLASS_TYPE_FAVOURED_SOUL, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "RealSpellID", "GetRowFromRealSpellID"));
DelayCommand(4.4, MakeSpellIDLevelLoop(CLASS_TYPE_HEXBLADE, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "RealSpellID", "GetRowFromRealSpellID"));
DelayCommand(4.5, MakeSpellIDLevelLoop(CLASS_TYPE_SOHEI, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "RealSpellID", "GetRowFromRealSpellID"));
DelayCommand(4.6, MakeSpellIDLevelLoop(CLASS_TYPE_SLAYER_OF_DOMIEL, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "RealSpellID", "GetRowFromRealSpellID"));
DelayCommand(4.7, MakeSpellIDLevelLoop(CLASS_TYPE_DUSKBLADE, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "RealSpellID", "GetRowFromRealSpellID"));
DelayCommand(4.8, MakeSpellIDLevelLoop(CLASS_TYPE_HEALER, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "RealSpellID", "GetRowFromRealSpellID"));
DelayCommand(4.9, MakeSpellIDLevelLoop(CLASS_TYPE_WARMAGE, 0, GetPRCSwitch(FILE_END_CLASS_SPELLBOOK) , "RealSpellID", "GetRowFromRealSpellID"));
void MakeSpellIDLevelLoop(int nClass, int nMin, int nMax, string sRealColumn,
string sVarNameBase, int nLoopSize = 100, string sTag = "")
{
if(DEBUG) DoDebug("MakeLookupLoop("
+IntToString(nClass)+", "
+IntToString(nMin)+", "
+IntToString(nMax)+", "
+sRealColumn+", "
+sVarNameBase+", "
+IntToString(nLoopSize)+", "
+") : sTag = "+sTag);
string sFile;
// Stuff handled in GetAMSDefinitionFileName()
if(nClass == CLASS_TYPE_PSION ||
nClass == CLASS_TYPE_PSYWAR ||
nClass == CLASS_TYPE_WILDER ||
nClass == CLASS_TYPE_FIST_OF_ZUOKEN ||
nClass == CLASS_TYPE_WARMIND ||
// Add new psionic classes here
// Tome of Battle
nClass == CLASS_TYPE_CRUSADER ||
nClass == CLASS_TYPE_SWORDSAGE ||
nClass == CLASS_TYPE_WARBLADE ||
// Other new caster types
nClass == CLASS_TYPE_TRUENAMER
)
sFile = GetAMSDefinitionFileName(nClass);
// New spellbook class
else
{
sFile = Get2DACache("classes", "FeatsTable", nClass);
//sFile = GetStringLeft(sFile, 4)+"spell"+GetStringRight(sFile, GetStringLength(sFile)-8);
sFile = "cls_spell" + GetStringRight(sFile, GetStringLength(sFile) - 8); // Hardcoded the cls_ part. It's not as if any class uses some other prefix - Ornedan, 20061210
}
// If on the first iteration, generate the storage token tag
if(sTag == "")
sTag = "PRC_" + sVarNameBase;
// Get the token to store the lookup table on. The token is piggybacked in the 2da cache creature's inventory
object oToken = _inc_lookups_GetCacheObject(sTag);
// Failed to obtain a valid token - nothing to store on
if(!GetIsObjectValid(oToken))
return;
// Starting a new run and the data is present already. Assume the whole thing is present and abort
if(nMin == 0
&& GetLocalInt(oToken, IntToString(StringToInt(Get2DACache(sFile, sRealColumn, nMin + 1)))))//+1 cos 0 is always null
{
DoDebug("MakeSpellIDLevelLoop("+sTag+") restored from database");
return;
}
int i;
int nSource, nDest;
int nTemp = 0;
int nCount = 0;
for(i = nMin; i < nMin + nLoopSize; i++)
{
// None of the relevant 2da files have blank Label entries on rows other than 0. We can assume i is greater than 0 at this point
if(i > 0 && Get2DAString(sFile, "Label", i) == "") // Using Get2DAString() instead of Get2DACache() to avoid caching extra
return;
nSource = StringToInt(Get2DACache(sFile, sRealColumn, i));
if(i != 0)
{
if(nSource == nTemp)
{
nCount += 1;
continue;
}
else
{
nDest = i;
SetLocalInt(oToken, IntToString(nTemp) + "_Count", i);
nCount = 0;
SetLocalInt(oToken, IntToString(nSource) + "_Start", i);
//;
}
}
}
// And delay continuation to avoid TMI
if(i < nMax)
DelayCommand(0.0, MakeSpellIDLevelLoop(nClass, i, nMax, sRealColumn, sVarNameBase, nLoopSize, sTag));
}
void MakeLookupLoop(int nClass, int nMin, int nMax, string sSourceColumn,
string sDestColumn, string sVarNameBase, int nLoopSize = 100, string sTag = "")
void MakeSpellbookLevelLoop(int nClass, int nMin, int nMax, string sVarNameBase,
string sColumnName, string sColumnValue, int nLoopSize = 100, string sTag = "")
{
if(DEBUG) DoDebug("MakeSpellbookLevelLoop("
+IntToString(nClass)+", "
+IntToString(nMin)+", "
+IntToString(nMax)+", "
+sVarNameBase+", "
+sColumnName+", "
+sColumnValue+", "
+IntToString(nLoopSize)+", "
+") : sTag = "+sTag);
/// Determine the 2da to use
int bNewSpellbook = FALSE;
string sFile;
// Stuff handled in GetAMSDefinitionFileName()
if(nClass == CLASS_TYPE_PSION ||
nClass == CLASS_TYPE_PSYWAR ||
nClass == CLASS_TYPE_WILDER ||
nClass == CLASS_TYPE_FIST_OF_ZUOKEN ||
nClass == CLASS_TYPE_WARMIND ||
// Add new psionic classes here
// Tome of Battle
nClass == CLASS_TYPE_CRUSADER ||
nClass == CLASS_TYPE_SWORDSAGE ||
nClass == CLASS_TYPE_WARBLADE ||
// Other new caster types
nClass == CLASS_TYPE_TRUENAMER
)
sFile = GetAMSDefinitionFileName(nClass);
// New spellbook class
else
{
sFile = Get2DACache("classes", "FeatsTable", nClass);
//sFile = GetStringLeft(sFile, 4)+"spell"+GetStringRight(sFile, GetStringLength(sFile)-8);
sFile = "cls_spell" + GetStringRight(sFile, GetStringLength(sFile) - 8); // Hardcoded the cls_ part. It's not as if any class uses some other prefix - Ornedan, 20061210
bNewSpellbook = TRUE;
}
// If on the first iteration, generate the storage token tag
if(sTag == "")
sTag = sVarNameBase + "_" + IntToString(nClass) + "_" + sColumnName + "_" + sColumnValue;
// Get the token to store the lookup table on. The token is piggybacked in the 2da cache creature's inventory
object oToken = _inc_lookups_GetCacheObject(sTag);
// Failed to obtain a valid token - nothing to store on
if(!GetIsObjectValid(oToken))
return;
// Starting a new run and the array exists already. Assume the whole thing is present and abort
if(nMin == 0 && array_exists(oToken, "Lkup"))
{
DoDebug("MakeSpellbookLevelLoop("+sTag+") restored from database");
return;
}
// New run, create the array
if(nMin == 0)
array_create(oToken, "Lkup");
// Cache loopsize rows
int i;
for(i = nMin; i < nMin + nLoopSize; i++)
{
// None of the relevant 2da files have blank Label entries on rows other than 0. We can assume i is greater than 0 at this point
if(i > 0 && Get2DAString(sFile, "Label", i) == "") // Using Get2DAString() instead of Get2DACache() to avoid caching useless data
return;
if(Get2DACache(sFile, sColumnName, i) == sColumnValue &&
(!bNewSpellbook ||Get2DACache(sFile, "ReqFeat", i) == "") // Only new spellbooks have the ReqFeat column. No sense in caching it for other stuff
)
{
array_set_int(oToken, "Lkup", array_get_size(oToken, "Lkup"), i);
}
}
// And delay continuation to avoid TMI
if(i < nMax)
DelayCommand(0.0, MakeSpellbookLevelLoop(nClass, i, nMax, sVarNameBase, sColumnName, sColumnValue, nLoopSize, sTag));
}
void MakeLookupLoop(int nClass, int nMin, int nMax, string sSourceColumn,
string sDestColumn, string sVarNameBase, int nLoopSize = 100, string sTag = "")
{
if(DEBUG) DoDebug("MakeLookupLoop("
+IntToString(nClass)+", "
+IntToString(nMin)+", "
+IntToString(nMax)+", "
+sSourceColumn+", "
+sDestColumn+", "
+sVarNameBase+", "
+IntToString(nLoopSize)+", "
+") : sTag = "+sTag);
string sFile;
// Stuff handled in GetAMSDefinitionFileName()
if(nClass == CLASS_TYPE_PSION ||
nClass == CLASS_TYPE_PSYWAR ||
nClass == CLASS_TYPE_WILDER ||
nClass == CLASS_TYPE_FIST_OF_ZUOKEN ||
nClass == CLASS_TYPE_WARMIND ||
// Add new psionic classes here
// Tome of Battle
nClass == CLASS_TYPE_CRUSADER ||
nClass == CLASS_TYPE_SWORDSAGE ||
nClass == CLASS_TYPE_WARBLADE ||
// Other new caster types
nClass == CLASS_TYPE_TRUENAMER
)
sFile = GetAMSDefinitionFileName(nClass);
// New spellbook class
else
{
sFile = Get2DACache("classes", "FeatsTable", nClass);
//sFile = GetStringLeft(sFile, 4)+"spell"+GetStringRight(sFile, GetStringLength(sFile)-8);
sFile = "cls_spell" + GetStringRight(sFile, GetStringLength(sFile) - 8); // Hardcoded the cls_ part. It's not as if any class uses some other prefix - Ornedan, 20061210
}
// If on the first iteration, generate the storage token tag
if(sTag == "")
sTag = "PRC_" + sVarNameBase;
// Get the token to store the lookup table on. The token is piggybacked in the 2da cache creature's inventory
object oToken = _inc_lookups_GetCacheObject(sTag);
// Failed to obtain a valid token - nothing to store on
if(!GetIsObjectValid(oToken))
return;
// Starting a new run and the data is present already. Assume the whole thing is present and abort
if(nMin == 0
&& GetLocalInt(oToken, /*sTag + "_" + */IntToString(StringToInt(Get2DACache(sFile, sSourceColumn, nMin + 1)))))//+1 cos 0 is always null
{
DoDebug("MakeLookupLoop("+sTag+") restored from database");
return;
}
int i;
int nSource, nDest;
for(i = nMin; i < nMin + nLoopSize; i++)
{
// None of the relevant 2da files have blank Label entries on rows other than 0. We can assume i is greater than 0 at this point
if(i > 0 && Get2DAString(sFile, "Label", i) == "") // Using Get2DAString() instead of Get2DACache() to avoid caching extra
return;
// In case of blank source or destination column, use current row index
// Otherwise, read the relevant data from the 2da and convert it to an integer - we assume that the 2da data is numeral
if(sSourceColumn == "") nSource = i;
else nSource = StringToInt(Get2DACache(sFile, sSourceColumn, i));
if(sDestColumn == "") nDest = i;
else nDest = StringToInt(Get2DACache(sFile, sDestColumn, i));
// Skip storing invalid values. The source column value should always be non-zero in valid cases.
// The destination column value might be zero in some cases. However, due to non-presence = 0, it works out OK.
if(nSource != 0 && nDest != 0)
{
if(DEBUG) Assert(!GetLocalInt(oToken, IntToString(nSource)) || (GetLocalInt(oToken, IntToString(nSource)) == nDest),
"!GetLocalInt(" + DebugObject2Str(oToken) + ", IntToString(" + IntToString(nSource) + ")) || GetLocalInt(" + DebugObject2Str(oToken) + ", IntToString(" + IntToString(nSource) + ")) == " + IntToString(nDest) + ")\n"
+ " = !" + IntToString(GetLocalInt(oToken, IntToString(nSource))) + " || " + IntToString(GetLocalInt(oToken, IntToString(nSource))) + " == " + IntToString(nDest)
,
"sFile = " + sFile + "\n"
+ "i = " + IntToString(i)
+ "sSourceColumn = " + sSourceColumn + "\n"
+ "sDestColumn = " + sDestColumn
, "inc_lookups", "MakeLookupLoop");
SetLocalInt(oToken, /*sTag + "_" + */IntToString(nSource), nDest);
}
}
// And delay continuation to avoid TMI
if(i < nMax)
DelayCommand(0.0, MakeLookupLoop(nClass, i, nMax, sSourceColumn, sDestColumn, sVarNameBase, nLoopSize, sTag));
}

View File

@@ -0,0 +1,125 @@
#include "prc_alterations"
#include "prc_craft_inc"
itemproperty ReadIPFrom2DA(string sFile, int nLine, int nIndex)
{
itemproperty ip;
int nTemp;
string sTemp = Get2DACache(sFile, "Type" + IntToString(nIndex), nLine);
if(sTemp == "") return ip;
int nType = StringToInt(sTemp);
int nSubType = StringToInt(Get2DACache(sFile, "SubType" + IntToString(nIndex), nLine));
int nCostTableValue = StringToInt(Get2DACache(sFile, "CostTableValue" + IntToString(nIndex), nLine));
int nParam1Value = StringToInt(Get2DACache(sFile, "Param1Value" + IntToString(nIndex), nLine));
return ConstructIP(nType, nSubType, nCostTableValue, nParam1Value);
}
void DumpCrafting2DAHB(string sFile, int nEnd, int i = 0)
{
string sDesc, sTemp1, sTemp2, sType;
string sName = GetName(GetTempCraftChest());
string sDoubleQuote = GetStringLeft(sName, 1);
itemproperty ip;
int j, nTemp1;
// ";\n
// <entry id="51521" lang="en" sex="m">
sDesc;
sDesc += " <entry id=" + sDoubleQuote;
sDesc += IntToString(StringToInt(Get2DACache(sFile, "Description", i)) - 16777216);
sDesc += sDoubleQuote + " lang=" + sDoubleQuote + "en" + sDoubleQuote + " sex=";
sDesc += sDoubleQuote + "m" + sDoubleQuote + ">";
if(sFile == "craft_wondrous")
{
sDesc += "Base Item: " + GetStringByStrRef(StringToInt(Get2DACache("baseitems", "Name", StringToInt(Get2DACache(sFile, "BaseItem", i))))) + "\n\n";
}
sDesc += "Description: \n\n";
for(j = 1; j <= 6; j++)
{
ip = ReadIPFrom2DA(sFile, i, j);
if(Get2DACache(sFile, "Type" + IntToString(j), i) != "")
sDesc += GetItemPropertyString(ip);
}
sDesc += "\nPrerequisites: \n\n";
sType = Get2DACache(sFile, "PropertyType", i);
if(sType == "M")
sDesc += "Caster ";
else if(sType == "P")
sDesc += "Manifester ";
sDesc += "Level: " + Get2DACache(sFile, "Level", i) + "\n";
sTemp1 = Get2DACache(sFile, "Race", i);
if(sTemp1 != "")
sDesc += "Race: " + GetStringByStrRef(StringToInt(Get2DACache("racialtypes", "Name", StringToInt(sTemp1)))) + "\n";
sTemp1 = Get2DACache(sFile, "Feat", i);
if(sTemp1 != "")
sDesc += "Feat: " + GetStringByStrRef(StringToInt(Get2DACache("feat", "FEAT", StringToInt(sTemp1)))) + "\n";
sTemp1 = Get2DACache(sFile, "Skill", i);
if(sTemp1 != "")
sDesc += "Skill: " + GetStringByStrRef(StringToInt(Get2DACache("skills", "Name", StringToInt(sTemp1)))) + " " + Get2DACache(sFile, "SkillRanks", i) + " ranks\n";
sTemp1 = Get2DACache(sFile, "AlignGE", i);
sTemp2 = Get2DACache(sFile, "AlignLC", i);
if(sTemp1 != "" || sTemp2 != "")
{
sDesc += "Alignment: ";
if(sTemp1 == "N" && sTemp2 == "N")
sDesc += "True Neutral";
else
{
if(sTemp2 != "")
{
if(sTemp2 == "L") sDesc += "Lawful ";
else if(sTemp2 == "C") sDesc += "Chaotic ";
else if(sTemp2 == "N") sDesc += "Neutral ";
}
if(sTemp1 != "")
{
if(sTemp1 == "G") sDesc += "Good";
else if(sTemp1 == "E") sDesc += "Evil";
else if(sTemp1 == "N") sDesc += "Neutral";
}
}
sDesc += "\n";
}
sTemp1 = Get2DACache(sFile, "SpellPattern", i);
if(sTemp1 != "")
{
nTemp1 = StringToInt(sTemp1);
if(sType == "M")
sDesc += "Spell(s): ";
else if(sType == "P")
sDesc += "Power(s): ";
if(nTemp1 & 1)
sDesc += GetStringByStrRef(StringToInt(Get2DACache("spells", "Name", StringToInt(Get2DACache(sFile, "Spell1", i)))));
if(nTemp1 & 2)
sDesc += ", " + GetStringByStrRef(StringToInt(Get2DACache("spells", "Name", StringToInt(Get2DACache(sFile, "Spell2", i)))));
if(nTemp1 & 4)
sDesc += ", " + GetStringByStrRef(StringToInt(Get2DACache("spells", "Name", StringToInt(Get2DACache(sFile, "Spell3", i)))));
if(nTemp1 & 8)
sDesc += ", " + GetStringByStrRef(StringToInt(Get2DACache("spells", "Name", StringToInt(Get2DACache(sFile, "SpellOR1", i)))));
if(nTemp1 & 16)
sDesc += " or " + GetStringByStrRef(StringToInt(Get2DACache("spells", "Name", StringToInt(Get2DACache(sFile, "SpellOR2", i)))));
sDesc += "\n";
}
if(StringToInt(Get2DACache(sFile, "Epic", i)))
sDesc += "Epic\n";
sDesc += "\nCost: \n\n";
sTemp1 = Get2DACache(sFile, "Enhancement", i);
if(sTemp1 != "")
sDesc += "+" + sTemp1 + " Enhancement\n";
sTemp1 = Get2DACache(sFile, "AdditionalCost", i);
if(sTemp1 != "")
sDesc += "+" + sTemp1 + "gp\n";
sDesc += "</entry>\n";
PrintString(sDesc);
if(i < nEnd)
DelayCommand(0.01, DumpCrafting2DAHB(sFile, nEnd, i + 1));
else
if(DEBUG) DoDebug("DumpCrafting2DAHB: Finished " + sFile);
}
void main()
{
//DumpCrafting2DAHB("craft_armour", PRCGetFileEnd("craft_armour"), 20);
//DelayCommand(6.0, DumpCrafting2DAHB("craft_weapon", PRCGetFileEnd("craft_weapon"), 20));
DumpCrafting2DAHB("craft_wondrous", 113);
}

View File

@@ -0,0 +1,106 @@
2DA V2.0
Label TrapScript SetDC DetectDCMod DisarmDCMod TrapName ResRef IconResRef
0 MinorSpike NW_T1_SpikeMinoC 5 10 22 6846 NW_IT_TRAP001 iit_trap_009
1 AverageSpike NW_T1_SpikeAvgC 20 10 22 6847 NW_IT_TRAP002 iit_trap_009
2 StrongSpike NW_T1_SpikeStrC 25 10 22 6848 NW_IT_TRAP003 iit_trap_009
3 DeadlySpike NW_T1_SpikeDeadC 35 22 36 6849 NW_IT_TRAP004 iit_trap_009
4 MinorHoly NW_T1_HolyMinoC 15 10 22 6850 NW_IT_TRAP005 iit_trap_006
5 AverageHoly NW_T1_HolyAvgC 20 10 22 6851 NW_IT_TRAP006 iit_trap_006
6 StrongHoly NW_T1_HolyStrC 25 14 26 6852 NW_IT_TRAP007 iit_trap_006
7 DeadlyHoly NW_T1_HolyDeadC 30 14 26 6853 NW_IT_TRAP008 iit_trap_006
8 MinorTangle NW_T1_TangMinoC 15 10 22 6854 NW_IT_TRAP009 iit_trap_010
9 AverageTangle NW_T1_TangAvgC 20 14 26 6855 NW_IT_TRAP010 iit_trap_010
10 StrongTangle NW_T1_TangStrC 25 14 26 6856 NW_IT_TRAP011 iit_trap_010
11 DeadlyTangle NW_T1_TangDeadC 30 18 31 6857 NW_IT_TRAP012 iit_trap_010
12 MinorAcid NW_T1_AcidMinoC 15 10 22 6858 NW_IT_TRAP013 iit_trap_002
13 AverageAcid NW_T1_AcidAvgC 25 14 26 6859 NW_IT_TRAP014 iit_trap_002
14 StrongAcid NW_T1_AcidStrC 30 18 31 6860 NW_IT_TRAP015 iit_trap_002
15 DeadlyAcid NW_T1_AcidDeadC 35 18 31 6861 NW_IT_TRAP016 iit_trap_002
16 MinorFire NW_T1_FireMinoC 20 14 26 6862 NW_IT_TRAP017 iit_trap_004
17 AverageFire NW_T1_FireAvgC 25 14 26 6863 NW_IT_TRAP018 iit_trap_004
18 StrongFire NW_T1_FireStrC 30 18 31 6864 NW_IT_TRAP019 iit_trap_004
19 DeadlyFire NW_T1_FireDeadC 35 22 36 6865 NW_IT_TRAP020 iit_trap_004
20 MinorElectrical NW_T1_ElecMinoC 20 14 26 6866 NW_IT_TRAP021 iit_trap_003
21 AverageElectrical NW_T1_ElecAvgC 25 18 31 6867 NW_IT_TRAP022 iit_trap_003
22 StrongElectrical NW_T1_ElecStrC 30 22 36 6868 NW_IT_TRAP023 iit_trap_003
23 DeadlyElectrical NW_T1_ElecDeadC 35 22 36 6869 NW_IT_TRAP024 iit_trap_003
24 MinorGas NW_T1_GasMinoC 30 18 31 6870 NW_IT_TRAP025 iit_trap_005
25 AverageGas NW_T1_GasAvgC 35 18 31 6871 NW_IT_TRAP026 iit_trap_005
26 StrongGas NW_T1_GasStrC 45 22 36 6872 NW_IT_TRAP027 iit_trap_005
27 DeadlyGas NW_T1_GasDeadC 45 22 36 6873 NW_IT_TRAP028 iit_trap_005
28 MinorFrost NW_T1_ColdMinoC 15 10 22 6874 NW_IT_TRAP029 iit_trap_011
29 AverageFrost NW_T1_ColdAvgC 20 10 22 6875 NW_IT_TRAP030 iit_trap_011
30 StrongFrost NW_T1_ColdStrC 25 10 22 6876 NW_IT_TRAP031 iit_trap_011
31 DeadlyFrost NW_T1_ColdDeadC 30 10 22 6877 NW_IT_TRAP032 iit_trap_011
32 MinorNegative NW_T1_NegMinC 15 10 22 6878 NW_IT_TRAP041 iit_trap_007
33 AverageNegative NW_T1_NegAvgC 20 10 22 6879 NW_IT_TRAP042 iit_trap_007
34 StrongNegative NW_T1_NegStrC 25 14 26 6880 NW_IT_TRAP043 iit_trap_007
35 DeadlyNegative NW_T1_NegDeadC 30 14 26 6881 NW_IT_TRAP044 iit_trap_007
36 MinorSonic NW_T1_SoncMinC 15 10 22 6882 NW_IT_TRAP037 iit_trap_008
37 AverageSonic NW_T1_SoncAvgC 20 10 22 6883 NW_IT_TRAP038 iit_trap_008
38 StrongSonic NW_T1_SoncStrC 25 10 22 6884 NW_IT_TRAP039 iit_trap_008
39 DeadlySonic NW_T1_SoncDeadC 30 10 22 6885 NW_IT_TRAP040 iit_trap_008
40 MinorAcidSplash NW_T1_SplshMinC 15 10 22 6886 NW_IT_TRAP033 iit_trap_001
41 AverageAcidSplash NW_T1_SplshAvgC 20 10 22 6887 NW_IT_TRAP034 iit_trap_001
42 StrongAcidSplash NW_T1_SplshStrC 25 10 22 6888 NW_IT_TRAP035 iit_trap_001
43 DeadlyAcidSplash NW_T1_SplshDeadC 30 10 22 6889 NW_IT_TRAP036 iit_trap_001
44 EpicElectrical X2_T1_ElecEpicC 65 43 58 83329 X2_IT_TRAP001 iit_trap_003
45 EpicFire X2_T1_FireEpicC 65 43 58 83330 X2_IT_TRAP002 iit_trap_004
46 EpicFrost X2_T1_ColdEpicC 65 43 58 83331 X2_IT_TRAP003 iit_trap_011
47 EpicSonic X2_T1_SoncEpicC 65 43 58 83332 X2_IT_TRAP004 iit_trap_008
48 **** **** **** **** **** **** **** ****
49 **** **** **** **** **** **** **** ****
50 **** **** **** **** **** **** **** ****
51 **** **** **** **** **** **** **** ****
52 **** **** **** **** **** **** **** ****
53 **** **** **** **** **** **** **** ****
54 **** **** **** **** **** **** **** ****
55 **** **** **** **** **** **** **** ****
56 **** **** **** **** **** **** **** ****
57 **** **** **** **** **** **** **** ****
58 **** **** **** **** **** **** **** ****
59 **** **** **** **** **** **** **** ****
60 **** **** **** **** **** **** **** ****
61 **** **** **** **** **** **** **** ****
62 **** **** **** **** **** **** **** ****
63 **** **** **** **** **** **** **** ****
64 **** **** **** **** **** **** **** ****
65 **** **** **** **** **** **** **** ****
66 **** **** **** **** **** **** **** ****
67 **** **** **** **** **** **** **** ****
68 **** **** **** **** **** **** **** ****
69 **** **** **** **** **** **** **** ****
70 **** **** **** **** **** **** **** ****
71 **** **** **** **** **** **** **** ****
72 **** **** **** **** **** **** **** ****
73 **** **** **** **** **** **** **** ****
74 **** **** **** **** **** **** **** ****
75 **** **** **** **** **** **** **** ****
76 **** **** **** **** **** **** **** ****
77 **** **** **** **** **** **** **** ****
78 **** **** **** **** **** **** **** ****
79 **** **** **** **** **** **** **** ****
80 **** **** **** **** **** **** **** ****
81 **** **** **** **** **** **** **** ****
82 **** **** **** **** **** **** **** ****
83 **** **** **** **** **** **** **** ****
84 **** **** **** **** **** **** **** ****
85 **** **** **** **** **** **** **** ****
86 **** **** **** **** **** **** **** ****
87 **** **** **** **** **** **** **** ****
88 **** **** **** **** **** **** **** ****
89 **** **** **** **** **** **** **** ****
90 **** **** **** **** **** **** **** ****
91 **** **** **** **** **** **** **** ****
92 **** **** **** **** **** **** **** ****
93 **** **** **** **** **** **** **** ****
94 **** **** **** **** **** **** **** ****
95 **** **** **** **** **** **** **** ****
96 **** **** **** **** **** **** **** ****
97 **** **** **** **** **** **** **** ****
98 **** **** **** **** **** **** **** ****
99 **** **** **** **** **** **** **** ****
100 PRGT **** 0 0 0 **** prgt_kit iit_trap_009
101 TeleCircle prc_telecirc_trg **** 0 34 16825707 **** ****
102 Symbol **** **** 25 25 **** **** ****