mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Externalized Difficulty Settings
- Removed #ifdef DIFFICULTY_SETTING. Now the new difficulty settings code is always active (by Jazz) - Removed unused INI reading settings These parameters were moved to the file DifficultySettings.xml. ** Ja2_Options.INI ** ENEMY_AP_BONUS_NOVICE , _EXPERIENCED, _EXPERT, _INSANE NUM_KILLS_PER_PROGRESS_POINT_NOVICE , _EXPERIENCED, _EXPERT, _INSANE INITIAL_GARRISON_PERCENTAGES_NOVICE , _EXPERIENCED, _EXPERT, _INSANE MIN_ENEMY_GROUP_SIZE_NOVICE , _EXPERIENCED, _EXPERT, _INSANE UNLIMITED_POOL_OF_TROOPS_NOVICE , _EXPERIENCED, _EXPERT, _INSANE QUEENS_INITIAL_POOL_OF_TROOPS_NOVICE , _EXPERIENCED, _EXPERT, _INSANE ENEMY_STARTING_ALERT_LEVEL_NOVICE , _EXPERIENCED, _EXPERT, _INSANE ENEMY_ALERT_DECAY_NOVICE , _EXPERIENCED, _EXPERT, _INSANE NUM_AWARE_BATTLES_NOVICE , _EXPERIENCED, _EXPERT, _INSANE BASE_DELAY_IN_MINUTES_BETWEEN_EVALUATIONS_NOVICE , _EXPERIENCED, _EXPERT, _INSANE EVALUATION_DELAY_VARIANCE_NOVICE , _EXPERIENCED, _EXPERT, _INSANE GRACE_PERIOD_IN_HOURS_AFTER_SECTOR_LIBERATION_NOVICE , _EXPERIENCED, _EXPERT, _INSANE GRACE_PERIOD_IN_DAYS_AFTER_PATROL_DESTROYED_NOVICE , _EXPERIENCED, _EXPERT, _INSANE AGGRESSIVE_QUEEN_AI_NOVICE , _EXPERIENCED, _EXPERT, _INSANE QUEEN_POOL_INCREMENT_PER_DIFFICULTY_LEVEL PERCENT_EXTRA_ELITES_EXPERIENCED , _EXPERT, _INSANE MAX_MERC_DEATHS_EASY , _EXPERIENCED, _EXPERT, _INSANE ** Creatures_Settings.INI ** CREATURE_SPREAD_TIME_NOVICE , _EXPERIENCED, _EXPERT, _INSANE QUEEN_REPRODUCTION_BASE_NOVICE , _EXPERIENCED, _EXPERT, _INSANE QUEEN_REPRODUCTION_BONUS_NOVICE , _EXPERIENCED, _EXPERT, _INSANE QUEEN_INIT_BONUS_SPREAD_NOVICE , _EXPERIENCED, _EXPERT, _INSANE CREATURE_POPULATION_MODIFIER_NOVICE , _EXPERIENCED, _EXPERT, _INSANE CREATURE_TOWN_AGGRESSIVENESS_NOVICE , _EXPERIENCED, _EXPERT, _INSANE QUEEN_POOL_INCREMENT_PER_DIFFICULTY_LEVEL ** CTHConstants.ini ** BASE_DIFFICULTY_NOVICE , _EXPERIENCED, _EXPERT, _INSANE AIM_DIFFICULTY_NOVICE , _EXPERIENCED, _EXPERT, _INSANE git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7461 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+10
-27
@@ -55,9 +55,7 @@
|
||||
#include "Ja25_Tactical.h"
|
||||
#endif
|
||||
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
#include "GameInitOptionsScreen.h"
|
||||
#endif
|
||||
|
||||
#include "Music Control.h"
|
||||
|
||||
@@ -934,12 +932,9 @@ void HandleSight(SOLDIERTYPE *pSoldier, UINT8 ubSightFlags)
|
||||
// revealing roofs and looking for items handled here, too
|
||||
RevealRoofsAndItems(pSoldier,TRUE, TRUE, pSoldier->pathing.bLevel, FALSE );
|
||||
}
|
||||
// unless in easy mode allow alerted enemies to radio
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
// unless in easy mode allow alerted enemies to radio
|
||||
else if ( zDeffSetting[gGameOptions.ubDifficultyLevel].bRadioSightings == TRUE )
|
||||
#else
|
||||
else if ( gGameOptions.ubDifficultyLevel >= DIF_LEVEL_MEDIUM )
|
||||
#endif
|
||||
//else if ( gGameOptions.ubDifficultyLevel >= DIF_LEVEL_MEDIUM )
|
||||
{
|
||||
// don't allow admins to radio
|
||||
//Madd: Huh? why not admins? removed.
|
||||
@@ -985,12 +980,9 @@ void HandleSight(SOLDIERTYPE *pSoldier, UINT8 ubSightFlags)
|
||||
#endif
|
||||
RadioSightings(pThem,pSoldier->ubID, pThem->bTeam);
|
||||
}
|
||||
// unless in easy mode allow alerted enemies to radio
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
// unless in easy mode allow alerted enemies to radio
|
||||
else if ( zDeffSetting[gGameOptions.ubDifficultyLevel].bRadioSightings2 == TRUE )
|
||||
#else
|
||||
else if ( gGameOptions.ubDifficultyLevel >= DIF_LEVEL_MEDIUM )
|
||||
#endif
|
||||
//else if ( gGameOptions.ubDifficultyLevel >= DIF_LEVEL_MEDIUM )
|
||||
{
|
||||
// don't allow admins to radio
|
||||
if ( pThem->bTeam == ENEMY_TEAM && gTacticalStatus.Team[ ENEMY_TEAM ].bAwareOfOpposition && pThem->ubSoldierClass != SOLDIER_CLASS_ADMINISTRATOR )
|
||||
@@ -2515,7 +2507,6 @@ void ManSeesMan(SOLDIERTYPE *pSoldier, SOLDIERTYPE *pOpponent, INT32 sOppGridNo,
|
||||
else if ( pOpponent->ubBodyType == BLOODCAT && pOpponent->aiData.bNeutral)
|
||||
{
|
||||
// HEADROCK HAM 3.6: If bloodcats are set as affiliated with civilians, do not trigger hostilities.
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
UINT8 DiffLevel;
|
||||
if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_EASY )
|
||||
DiffLevel = 1;
|
||||
@@ -2531,11 +2522,11 @@ void ManSeesMan(SOLDIERTYPE *pSoldier, SOLDIERTYPE *pOpponent, INT32 sOppGridNo,
|
||||
if ( gBloodcatPlacements[SECTOR(pSoldier->sSectorX, pSoldier->sSectorY)][ 0 ].PlacementType != BLOODCAT_PLACEMENT_STATIC ||
|
||||
gBloodcatPlacements[SECTOR(pSoldier->sSectorX, pSoldier->sSectorY)][ DiffLevel - 1 ].ubFactionAffiliation == NON_CIV_GROUP ||
|
||||
gBloodcatPlacements[SECTOR(pSoldier->sSectorX, pSoldier->sSectorY)][ DiffLevel - 1 ].ubFactionAffiliation == QUEENS_CIV_GROUP )
|
||||
#else
|
||||
/*
|
||||
if ( gBloodcatPlacements[SECTOR(pSoldier->sSectorX, pSoldier->sSectorY)][ 0 ].PlacementType != BLOODCAT_PLACEMENT_STATIC ||
|
||||
gBloodcatPlacements[SECTOR(pSoldier->sSectorX, pSoldier->sSectorY)][ gGameOptions.ubDifficultyLevel - 1 ].ubFactionAffiliation == NON_CIV_GROUP ||
|
||||
gBloodcatPlacements[SECTOR(pSoldier->sSectorX, pSoldier->sSectorY)][ gGameOptions.ubDifficultyLevel - 1 ].ubFactionAffiliation == QUEENS_CIV_GROUP )
|
||||
#endif
|
||||
*/
|
||||
{
|
||||
MakeBloodcatsHostile();
|
||||
}
|
||||
@@ -6049,8 +6040,7 @@ void ProcessNoise(UINT8 ubNoiseMaker, INT32 sGridNo, INT8 bLevel, UINT8 ubTerrTy
|
||||
// Also, there's a toggle that determines whether or not bloodcats can sense enemies in this sector.
|
||||
UINT8 ubSectorID = SECTOR(gWorldSectorX, gWorldSectorY);
|
||||
UINT8 PlacementType = gBloodcatPlacements[ ubSectorID ][0].PlacementType;
|
||||
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
|
||||
UINT8 DiffLevel;
|
||||
if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_EASY )
|
||||
DiffLevel = 1;
|
||||
@@ -6062,15 +6052,11 @@ void ProcessNoise(UINT8 ubNoiseMaker, INT32 sGridNo, INT8 bLevel, UINT8 ubTerrTy
|
||||
DiffLevel = 4;
|
||||
else
|
||||
DiffLevel = 1;
|
||||
#endif
|
||||
|
||||
if (PlacementType == BLOODCAT_PLACEMENT_STATIC)
|
||||
{
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
if (gBloodcatPlacements[ ubSectorID ][ DiffLevel-1 ].ubFactionAffiliation == QUEENS_CIV_GROUP)
|
||||
#else
|
||||
if (gBloodcatPlacements[ ubSectorID ][ gGameOptions.ubDifficultyLevel-1 ].ubFactionAffiliation == QUEENS_CIV_GROUP)
|
||||
#endif
|
||||
//if (gBloodcatPlacements[ ubSectorID ][ gGameOptions.ubDifficultyLevel-1 ].ubFactionAffiliation == QUEENS_CIV_GROUP)
|
||||
{
|
||||
// skip noises between army & bloodcats
|
||||
if ( pSoldier->bTeam == ENEMY_TEAM && MercPtrs[ ubNoiseMaker ]->ubBodyType == BLOODCAT && MercPtrs[ ubNoiseMaker ]->bTeam == CREATURE_TEAM )
|
||||
@@ -6081,12 +6067,9 @@ void ProcessNoise(UINT8 ubNoiseMaker, INT32 sGridNo, INT8 bLevel, UINT8 ubTerrTy
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
}
|
||||
else if (gBloodcatPlacements[ ubSectorID ][ DiffLevel-1 ].ubFactionAffiliation > NON_CIV_GROUP)
|
||||
#else
|
||||
else if (gBloodcatPlacements[ ubSectorID ][ gGameOptions.ubDifficultyLevel-1 ].ubFactionAffiliation > NON_CIV_GROUP)
|
||||
#endif
|
||||
//else if (gBloodcatPlacements[ ubSectorID ][ gGameOptions.ubDifficultyLevel-1 ].ubFactionAffiliation > NON_CIV_GROUP)
|
||||
{
|
||||
if ( MercPtrs[ ubNoiseMaker ]->ubBodyType == BLOODCAT && MercPtrs[ ubNoiseMaker ]->bTeam == CREATURE_TEAM && pSoldier->bSide != gbPlayerNum)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user