Major update

Fixed CCOH, Fixed starting GP, Fixed DMFI languages, Fix cep weapon appearances, Fixed new player start up system.  Added PC deleter.  Added ACP 4.1.  Full compile.  Updated release archive.
This commit is contained in:
Jaysyn904
2024-09-16 23:40:48 -04:00
parent 7f75e229f9
commit 5d27edafba
6724 changed files with 558193 additions and 92109 deletions

View File

@@ -178,6 +178,9 @@ the original treasure generation system in user-made modules.
//:://////////////////////////////////////////////////
// For legacy treasure generation
#include "loot_inc_data"
#include "loot_inc_main"
#include "nw_o2_coninclude"
/**********************************************************************
@@ -187,6 +190,7 @@ the original treasure generation system in user-made modules.
// * this is the percent chance that no treasure will be spawned by a creature dying
const int BK_CHANCE_OF_N0_MONSTERTREASURE = 80;
// Tags for the module-wide containers
string sModContLow = "X0_MOD_TREASURE_LOW";
string sModContMed = "X0_MOD_TREASURE_MED";
@@ -301,7 +305,8 @@ int CTG_GetIsTreasureGenerated(object oCont);
// Set whether treasure has been generated
void CTG_SetIsTreasureGenerated(object oCont, int bGenerated=TRUE);
// Set whether treasure has been regenerated
void CTG_SetIsTreasureRegenerated(object oCont, int bGenerated=FALSE);
// Create random treasure items of the appropriate type
// in the specified container. Will typically be called
// by a script on a treasure container.
@@ -398,7 +403,6 @@ string CTG_GetRacialtypeChestTag(string sBaseTag, object oSource);
// This function deliberately not prototyped. Should not be used
// outside this library.
// Test whether a treasure container has been initialized for
// specific base treasure type use.
int CTG_GetIsContainerInitialized(object oBaseCont)
@@ -523,7 +527,7 @@ object CTG_GetMonsterBaseContainer(object oSource=OBJECT_SELF)
// a chest with a tag matching the specific
// monster.
// We strip numbers off the end of the tag first
string sCreatureTag = GetResRef(oSource);
string sCreatureTag = GetTag(oSource);
while ( GetIsInteger(GetStringRight(sCreatureTag, 1)) ) {
sCreatureTag = GetStringLeft(sCreatureTag,
GetStringLength(sCreatureTag)-1);
@@ -757,8 +761,13 @@ int CTG_GetIsTreasureGenerated(object oCont)
void CTG_SetIsTreasureGenerated(object oCont, int bGenerated=TRUE)
{
SetLocalInt(oCont, sTreasureGeneratedVarname, bGenerated);
}
}
void CTG_SetIsTreasureRegenerated(object oCont, int bGenerated=FALSE)
{
float fRespawnTime = GetRespawnTime (oCont);
AssignCommand(oCont, DelayCommand(fRespawnTime, SetLocalInt(oCont, sTreasureGeneratedVarname, FALSE) ) );
}
// Create random treasure items of the appropriate type
// in the specified container. Should be called
// by a script on a treasure container.
@@ -808,6 +817,9 @@ void CTG_CreateSpecificBaseTypeTreasure(int nTreasureType,
// Prevent duplicate treasure generation
if (CTG_GetIsTreasureGenerated(oCont)) {return;}
CTG_SetIsTreasureGenerated(oCont);
float fRespawnTime = GetRespawnTime (oCont);
AssignCommand(oCont, DelayCommand(fRespawnTime, CTG_SetIsTreasureRegenerated(oCont) ) );
// Locate the base container
object oBaseCont = CTG_GetNearestBaseContainer(nTreasureType,
@@ -915,30 +927,10 @@ void CTG_CreateSpecificBaseTypeTreasure(int nTreasureType,
else
{
// Make the item
//CRP CODE ADDITION - BREAKABLE ITEMS
if(CRP_USE_BREAKABLE_ITEMS && CRP_CONTAINER_HAS_BEEN_DESTROYED)
{
//int bDamage = GetDamageDealtByType(DAMAGE_TYPE_ACID) + 1;
//bDamage = bDamage + GetDamageDealtByType(DAMAGE_TYPE_ELECTRICAL) + 1;
//bDamage = bDamage + GetDamageDealtByType(DAMAGE_TYPE_FIRE) + 1;
//bDamage = bDamage + GetDamageDealtByType(DAMAGE_TYPE_MAGICAL) + 1;
//if(bDamage >= 7 && crp_GetIsItemDestroyed(oItem, TRUE))
//CreateItemOnObject(CRP_DESTROYED_ITEM, oCont, 1);
//else
if(crp_GetIsItemDestroyed(oItem, CRP_ALT_DAMAGE))
CreateItemOnObject(CRP_DESTROYED_ITEM, oCont, 1);
else
CopyItem(oItem, oCont);
}
else
{
CopyItem(oItem, oCont);
}
if (nItemsCreated == 1)
CopyItem(oItem, oCont);
if (nItemsCreated == 1) {
oItem1 = oItem;
else
{
} else {
// if this is the third item, it doesn't matter
// anyway, so we might as well save the conditional.
oItem2 = oItem;
@@ -992,16 +984,10 @@ void CTG_GenerateNPCTreasure(int nTreasureType=5, object oNPC=OBJECT_SELF)
// No treasure, sorry.
return;
}
//CRP CODE ADDITION
if (nTreasureType == TREASURE_TYPE_MONSTER)
{
if(CRP_USE_COINS)
{
if(d100() < CRP_CHANCE_OF_NO_MONSTERTREASURE)
return;
}
else if (d100() < BK_CHANCE_OF_N0_MONSTERTREASURE)
{
if (nTreasureType == TREASURE_TYPE_MONSTER) {
if (d100() < BK_CHANCE_OF_N0_MONSTERTREASURE) {
return;
}
}