diff --git a/GameSettings.cpp b/GameSettings.cpp index f2476426a..79ee41a4e 100644 --- a/GameSettings.cpp +++ b/GameSettings.cpp @@ -2672,10 +2672,16 @@ void LoadModSettings(){ gModSettings.CreatureMeanwhileCutscene = iniReader.ReadBoolean("Meanwhile", "CREATURE_MEANWHILE_CUTSCENE", TRUE); - + + //[End Game] gModSettings.ubEndGameVictorySectorX = iniReader.ReadInteger("End Game", "VICTORY_SECTOR_X", 3); gModSettings.ubEndGameVictorySectorY = iniReader.ReadInteger("End Game", "VICTORY_SECTOR_Y", 16); gModSettings.iEndGameVictoryGridNo = iniReader.ReadInteger("End Game", "VICTORY_POSITION", 5687); + + //[Creatures] + gModSettings.ubCrepitusFeedingSectorX = iniReader.ReadInteger("Creatures", "CREPITUS_FEEDING_SECTOR_X", 9); + gModSettings.ubCrepitusFeedingSectorY = iniReader.ReadInteger("Creatures", "CREPITUS_FEEDING_SECTOR_Y", 10); + gModSettings.ubCrepitusFeedingSectorZ = iniReader.ReadInteger("Creatures", "CREPITUS_FEEDING_SECTOR_Z", 2); } // silversurfer: load item property modifiers diff --git a/GameSettings.h b/GameSettings.h index 7ffa06cad..8a233a456 100644 --- a/GameSettings.h +++ b/GameSettings.h @@ -2073,13 +2073,20 @@ typedef struct UINT8 ubMeanwhileAddMadlabSector4X; UINT8 ubMeanwhileAddMadlabSector4Y; + //[End Game] //victory celebration stuff UINT8 ubEndGameVictorySectorX; UINT8 ubEndGameVictorySectorY; INT32 iEndGameVictoryGridNo; - + BOOLEAN CreatureMeanwhileCutscene; + //[Creatures] + //Crepitus Feeding Sector + UINT8 ubCrepitusFeedingSectorX; + UINT8 ubCrepitusFeedingSectorY; + UINT8 ubCrepitusFeedingSectorZ; + }MOD_SETTINGS; // silversurfer: item property modifiers diff --git a/Strategic/Creature Spreading.cpp b/Strategic/Creature Spreading.cpp index 4a42e8ca3..51f3d13bb 100644 --- a/Strategic/Creature Spreading.cpp +++ b/Strategic/Creature Spreading.cpp @@ -404,16 +404,16 @@ void InitCreatureQuest() } */ - // determine mine infectible status + // determine mine infectible status in initmines.lua script for (x = 0; x < MAX_NUMBER_OF_MINES; x++) { if( gMineStatus[ x ].fInfectible ) { if( gMineStatus[ x ].fAttackedHeadMiner || //gMineStatus[ x ].uiOreRunningOutPoint || - !gMineStatus[ x ].fInfectible || StrategicMap[ gMineStatus[ x ].StrategicIndex() ].fEnemyControlled ) - { //If head miner was attacked, ore will/has run out, or enemy controlled + { + //If head miner was attacked, ore will/has run out, or enemy controlled fMineInfectible[ iNumMinesInfectibleLUA ] = FALSE; } iNumMinesInfectibleLUA++; @@ -430,7 +430,7 @@ void InitCreatureQuest() //// externalize to xml data //iNumMinesInfectible = fMineInfectible[0] + fMineInfectible[1] + fMineInfectible[2] + fMineInfectible[3]; - //count min of infectible sites defined in xml and initmines.lua script + //count actual infectible sites, use min of infectible sites defined in xml and initmines.lua script in case they do not tally for (x = 0; x < min( NUMBER_OF_INFECTIBLE_SITES, iNumMinesInfectibleLUA ); x++) { iNumMinesInfectible += fMineInfectible[x]; @@ -1181,7 +1181,8 @@ void EndCreatureQuest() } //Remove the creatures that are trapped underneath Tixa - pSector = FindUnderGroundSector( gModSettings.ubTixaPrisonSectorX, gModSettings.ubTixaPrisonSectorY, 2 ); + pSector = FindUnderGroundSector( gModSettings.ubCrepitusFeedingSectorX, gModSettings.ubCrepitusFeedingSectorY, + gModSettings.ubCrepitusFeedingSectorZ ); // (9, 10, 2) if( pSector ) { pSector->ubNumCreatures = 0; diff --git a/Strategic/Creature Spreading.h b/Strategic/Creature Spreading.h index 0fdae1220..3ec1a1958 100644 --- a/Strategic/Creature Spreading.h +++ b/Strategic/Creature Spreading.h @@ -63,8 +63,8 @@ extern UINT8 NUMBER_OF_INFECTIBLE_SITES; extern UINT8 NUMBER_OF_CREATURE_COMPOSITIONS; #define MAX_NUMBER_OF_INFECTIBLE_SITES 10 -#define MAX_NUMBER_OF_CREATURE_SECTORS 50 -#define MAX_NUMBER_OF_CREATURE_COMPOSITIONS 30 +#define MAX_NUMBER_OF_CREATURE_SECTORS 255 +#define MAX_NUMBER_OF_CREATURE_COMPOSITIONS 50 typedef struct CREATUREHABITAT { diff --git a/Strategic/strategicmap.cpp b/Strategic/strategicmap.cpp index 369ff3f40..8691512dc 100644 --- a/Strategic/strategicmap.cpp +++ b/Strategic/strategicmap.cpp @@ -2174,7 +2174,8 @@ BOOLEAN SetCurrentWorldSector( INT16 sMapX, INT16 sMapY, INT8 bMapZ ) #ifdef JA2UB /* Ja25 no creatures */ #else - if( gWorldSectorX == 9 && gWorldSectorY == 10 && gbWorldSectorZ == 2 ) + if( gWorldSectorX == gModSettings.ubCrepitusFeedingSectorX && gWorldSectorY == gModSettings.ubCrepitusFeedingSectorY + && gbWorldSectorZ == gModSettings.ubCrepitusFeedingSectorZ ) // (9, 10, 2) { InitCreatureQuest(); //Ignored if already active. }