diff --git a/GameSettings.cpp b/GameSettings.cpp index b2ec5af12..0a3506fcf 100644 --- a/GameSettings.cpp +++ b/GameSettings.cpp @@ -844,11 +844,13 @@ void LoadGameExternalOptions() gGameExternalOptions.giInsaneMercDeaths = iniReader.ReadInteger("Recruitment Settings","MAX_MERC_DEATHS_INSANE",4, 0, 10); // CHRISL: New setting to allow Slay to remain as a hired PC - gGameExternalOptions.fEnableSlayForever = iniReader.ReadBoolean("Recruitment Settings", "SLAY_STAYS_FOREVER", FALSE); + gGameExternalOptions.fEnableSlayForever = iniReader.ReadBoolean("Recruitment Settings", "SLAY_STAYS_FOREVER", FALSE); // Buggler: setting to show/hide skills/traits in AIM & MERC hiring page gGameExternalOptions.fShowSkillsInHirePage = iniReader.ReadBoolean("Recruitment Settings", "SHOW_SKILLS_IN_HIRING_PAGE", FALSE); + gGameExternalOptions.ubMercRandomStats = iniReader.ReadInteger("Recruitment Settings", "MERCS_RANDOM_STATS", 0, 0, 2); + //################# Financial Settings ################# gGameExternalOptions.iStartingCashNovice = iniReader.ReadInteger("Financial Settings", "STARTING_CASH_NOVICE",45000, 2000, 0x0FFFFFFF); @@ -1070,7 +1072,7 @@ void LoadGameExternalOptions() // Flugente: does the queen send out assassins that mix among your militia? gGameExternalOptions.fEnemyAssassins = iniReader.ReadBoolean("Tactical Difficulty Settings", "ENEMY_ASSASSINS", FALSE); - gGameExternalOptions.usAssassinMinimumProgress = iniReader.ReadInteger("Tactical Difficulty Settings", "ASSASSIN_MINIMUM_PROGRESS", 30, 0, 100); + gGameExternalOptions.usAssassinMinimumProgress = iniReader.ReadInteger("Tactical Difficulty Settings", "ASSASSIN_MINIMUM_PROGRESS", 20, 0, 100); gGameExternalOptions.usAssassinMinimumMilitia = iniReader.ReadInteger("Tactical Difficulty Settings", "ASSASSIN_MINIMUM_MILITIA", 10, 0, 64); gGameExternalOptions.usAssassinPropabilityModifier = iniReader.ReadInteger("Tactical Difficulty Settings", "ASSASSIN_PROPABILITY_MODIFIER", 100, 0, 1000); diff --git a/GameSettings.h b/GameSettings.h index 1fa783417..5d670d207 100644 --- a/GameSettings.h +++ b/GameSettings.h @@ -1141,6 +1141,8 @@ typedef struct BOOLEAN fShowSkillsInHirePage; + UINT8 ubMercRandomStats; + BOOLEAN fBobbyRayFastShipments; BOOLEAN fGridExitInTurnBased; diff --git a/Tactical/Soldier Profile.cpp b/Tactical/Soldier Profile.cpp index 0f8ca05e5..35cf47952 100644 --- a/Tactical/Soldier Profile.cpp +++ b/Tactical/Soldier Profile.cpp @@ -433,70 +433,76 @@ BOOLEAN LoadNewSystemMercsToSaveGameFile( HWFILE hFile ) //Random stats void RandomStats () { -UINT32 cnt; -INT8 bBaseAttribute = 0; -MERCPROFILESTRUCT * pProfile; + UINT32 cnt; + INT8 bBaseAttribute = 0; + MERCPROFILESTRUCT * pProfile; + + BOOLEAN randomStatsEnabled = FALSE; for ( cnt = 0; cnt < NUM_PROFILES; cnt++ ) { - if ( gRandomStatsValue[cnt].Enabled == TRUE ) + // WANNE: Random Stats are based on the INI entry (MERCS_RANDOM_STATS) + if ((gGameExternalOptions.ubMercRandomStats == 1) || (gGameExternalOptions.ubMercRandomStats == 2 && gRandomStatsValue[cnt].Enabled)) + randomStatsEnabled = TRUE; + + if ( randomStatsEnabled == TRUE ) + { + bBaseAttribute = gRandomStatsValue[cnt].BaseAttribute + ( 4 * gRandomStatsValue[cnt].ExpLevel ); + pProfile = &(gMercProfiles[cnt]); + + pProfile->bExpLevel = gRandomStatsValue[cnt].ExpLevel; + + if ( gRandomStatsValue[cnt].RandomLife == TRUE ) { - bBaseAttribute = gRandomStatsValue[cnt].BaseAttribute + ( 4 * gRandomStatsValue[cnt].ExpLevel ); - pProfile = &(gMercProfiles[cnt]); - - pProfile->bExpLevel = gRandomStatsValue[cnt].ExpLevel; - - if ( gRandomStatsValue[cnt].RandomLife == TRUE ) - { - pProfile->bLifeMax = (bBaseAttribute + Random( 9 ) + Random( 8 )); - pProfile->bLife = pProfile->bLifeMax; - } - - if ( gRandomStatsValue[cnt].RandomAgility == TRUE ) - { - pProfile->bAgility = (bBaseAttribute + Random( 9 ) + Random( 8 )); - } - - if ( gRandomStatsValue[cnt].RandomLeadership == TRUE ) - { - pProfile->bLeadership = (bBaseAttribute + Random( 9 ) + Random( 8 )); - } - - if ( gRandomStatsValue[cnt].RandomDexterity == TRUE ) - { - pProfile->bDexterity = (bBaseAttribute + Random( 9 ) + Random( 8 )); - } - - if ( gRandomStatsValue[cnt].RandomWisdom == TRUE ) - { - pProfile->bWisdom = (bBaseAttribute + Random( 9 ) + Random( 8 )); - } - - if ( gRandomStatsValue[cnt].RandomMarksmanship == TRUE ) - { - pProfile->bMarksmanship = (bBaseAttribute + Random( 9 ) + Random( 8 )); - } - - if ( gRandomStatsValue[cnt].RandomMedical == TRUE ) - { - pProfile->bMedical = (bBaseAttribute + Random( 9 ) + Random( 8 )); - } - - if ( gRandomStatsValue[cnt].RandomMechanical == TRUE ) - { - pProfile->bMechanical = (bBaseAttribute + Random( 9 ) + Random( 8 )); - } - - if ( gRandomStatsValue[cnt].RandomExplosive == TRUE ) - { - pProfile->bExplosive = (bBaseAttribute + Random( 9 ) + Random( 8 )); - } - - if ( gRandomStatsValue[cnt].RandomStrength == TRUE ) - { - pProfile->bStrength = (bBaseAttribute + Random( 9 ) + Random( 8 )); - } + pProfile->bLifeMax = (bBaseAttribute + Random( 9 ) + Random( 8 )); + pProfile->bLife = pProfile->bLifeMax; + } + + if ( gRandomStatsValue[cnt].RandomAgility == TRUE ) + { + pProfile->bAgility = (bBaseAttribute + Random( 9 ) + Random( 8 )); + } + + if ( gRandomStatsValue[cnt].RandomLeadership == TRUE ) + { + pProfile->bLeadership = (bBaseAttribute + Random( 9 ) + Random( 8 )); + } + + if ( gRandomStatsValue[cnt].RandomDexterity == TRUE ) + { + pProfile->bDexterity = (bBaseAttribute + Random( 9 ) + Random( 8 )); + } + + if ( gRandomStatsValue[cnt].RandomWisdom == TRUE ) + { + pProfile->bWisdom = (bBaseAttribute + Random( 9 ) + Random( 8 )); + } + + if ( gRandomStatsValue[cnt].RandomMarksmanship == TRUE ) + { + pProfile->bMarksmanship = (bBaseAttribute + Random( 9 ) + Random( 8 )); + } + + if ( gRandomStatsValue[cnt].RandomMedical == TRUE ) + { + pProfile->bMedical = (bBaseAttribute + Random( 9 ) + Random( 8 )); } + + if ( gRandomStatsValue[cnt].RandomMechanical == TRUE ) + { + pProfile->bMechanical = (bBaseAttribute + Random( 9 ) + Random( 8 )); + } + + if ( gRandomStatsValue[cnt].RandomExplosive == TRUE ) + { + pProfile->bExplosive = (bBaseAttribute + Random( 9 ) + Random( 8 )); + } + + if ( gRandomStatsValue[cnt].RandomStrength == TRUE ) + { + pProfile->bStrength = (bBaseAttribute + Random( 9 ) + Random( 8 )); + } + } } }