mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
Little Alien
- Externalized settings for Madlab quest, Mike and Iggy - Externalized visibility decrease for rain Madd Mugsy - Bug fix - "Auto" mode was turning off on Full Auto only weapons when you equipped a second gun - Fixed - 10 Tons of Guns code now affects EnemyGunChoices and EnemyItemChoices - Enemy reinforcements restricted from appearing in Omerta git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@75 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -360,6 +360,7 @@ void LoadGameExternalOptions()
|
|||||||
|
|
||||||
//Sight range
|
//Sight range
|
||||||
gGameExternalOptions.ubStraightSightRange = iniReader.ReadInteger("JA2 Tactical Settings","BaseSightRange",13);
|
gGameExternalOptions.ubStraightSightRange = iniReader.ReadInteger("JA2 Tactical Settings","BaseSightRange",13);
|
||||||
|
gGameExternalOptions.ubVisDistDecreasePerRainIntensity = iniReader.ReadInteger("JA2 Tactical Settings","VISUAL_DISTANCE_DECREASE_PER_RAIN_INTENSITY",20);
|
||||||
|
|
||||||
// Maximal search distance for grenades
|
// Maximal search distance for grenades
|
||||||
//gGameExternalOptions.guiMaxTossSearchDist = iniReader.ReadInteger("JA2 Tactical Settings","MaxTossSearchDist",3);
|
//gGameExternalOptions.guiMaxTossSearchDist = iniReader.ReadInteger("JA2 Tactical Settings","MaxTossSearchDist",3);
|
||||||
@@ -379,6 +380,11 @@ void LoadGameExternalOptions()
|
|||||||
gGameExternalOptions.guiMaxDLInterval = iniReader.ReadInteger("JA2 Thunder Settings","MAX_INTERVAL_BETWEEN_LIGHTNING_AND_THUNDERCLAPS_IN_SECONDS",5);
|
gGameExternalOptions.guiMaxDLInterval = iniReader.ReadInteger("JA2 Thunder Settings","MAX_INTERVAL_BETWEEN_LIGHTNING_AND_THUNDERCLAPS_IN_SECONDS",5);
|
||||||
gGameExternalOptions.guiProlongLightningIfSeenSomeone = iniReader.ReadInteger("JA2 Thunder Settings","PROLOGNE_DELAY_IF_SEEN_SOMEONE_DURING_LIGHTNING_IN_TURNBASED_IN_SECONDS",5);
|
gGameExternalOptions.guiProlongLightningIfSeenSomeone = iniReader.ReadInteger("JA2 Thunder Settings","PROLOGNE_DELAY_IF_SEEN_SOMEONE_DURING_LIGHTNING_IN_TURNBASED_IN_SECONDS",5);
|
||||||
gGameExternalOptions.guiChanceToDoLightningBetweenTurns = iniReader.ReadInteger("JA2 Thunder Settings","CHANCE_TO_DO_LIGHTNING_BETWEEN_TURNS",35);
|
gGameExternalOptions.guiChanceToDoLightningBetweenTurns = iniReader.ReadInteger("JA2 Thunder Settings","CHANCE_TO_DO_LIGHTNING_BETWEEN_TURNS",35);
|
||||||
|
|
||||||
|
//Gameplay settings
|
||||||
|
gGameExternalOptions.ubGameProgressStartMadlabQuest = iniReader.ReadInteger("JA2 Gameplay Settings","GAME_PROGRESS_START_MADLAB_QUEST",35);
|
||||||
|
gGameExternalOptions.ubGameProgressMikeAvailable = iniReader.ReadInteger("JA2 Gameplay Settings","GAME_PROGRESS_MIKE_AVALIABLE",50);
|
||||||
|
gGameExternalOptions.ubGameProgressIggyAvaliable = iniReader.ReadInteger("JA2 Gameplay Settings","GAME_PROGRESS_IGGY_AVALIABLE",70);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+14
-5
@@ -180,14 +180,14 @@ typedef struct
|
|||||||
|
|
||||||
// Moved from NewGameSettings.cpp
|
// Moved from NewGameSettings.cpp
|
||||||
|
|
||||||
//Video settings
|
|
||||||
UINT8 gubDeadLockDelay;
|
|
||||||
UINT8 ubStraightSightRange;
|
|
||||||
|
|
||||||
// System settings
|
// System settings
|
||||||
BOOLEAN gfVSync;
|
UINT8 gubDeadLockDelay;
|
||||||
BOOLEAN gfEnableEmergencyButton_SkipStrategicEvents;
|
BOOLEAN gfEnableEmergencyButton_SkipStrategicEvents;
|
||||||
|
|
||||||
|
|
||||||
|
//Video settings
|
||||||
|
BOOLEAN gfVSync;
|
||||||
|
|
||||||
//Animation settings
|
//Animation settings
|
||||||
UINT8 gubPlayerTurnSpeedUpFactor;
|
UINT8 gubPlayerTurnSpeedUpFactor;
|
||||||
UINT8 gubEnemyTurnSpeedUpFactor;
|
UINT8 gubEnemyTurnSpeedUpFactor;
|
||||||
@@ -206,6 +206,10 @@ typedef struct
|
|||||||
BOOLEAN gfAllowReinforcmentsOnlyInCity;
|
BOOLEAN gfAllowReinforcmentsOnlyInCity;
|
||||||
UINT32 guiBaseQueenPoolIncrement;
|
UINT32 guiBaseQueenPoolIncrement;
|
||||||
|
|
||||||
|
//Sight range
|
||||||
|
UINT8 ubStraightSightRange;
|
||||||
|
UINT32 ubVisDistDecreasePerRainIntensity;
|
||||||
|
|
||||||
// Rain settings
|
// Rain settings
|
||||||
BOOLEAN gfAllowRain;
|
BOOLEAN gfAllowRain;
|
||||||
UINT16 gusRainChancePerDay;
|
UINT16 gusRainChancePerDay;
|
||||||
@@ -221,6 +225,11 @@ typedef struct
|
|||||||
UINT32 guiProlongLightningIfSeenSomeone;
|
UINT32 guiProlongLightningIfSeenSomeone;
|
||||||
UINT32 guiChanceToDoLightningBetweenTurns;
|
UINT32 guiChanceToDoLightningBetweenTurns;
|
||||||
|
|
||||||
|
//Gameplay settings
|
||||||
|
UINT8 ubGameProgressStartMadlabQuest;
|
||||||
|
UINT8 ubGameProgressMikeAvailable;
|
||||||
|
UINT8 ubGameProgressIggyAvaliable;
|
||||||
|
|
||||||
} GAME_EXTERNAL_OPTIONS;
|
} GAME_EXTERNAL_OPTIONS;
|
||||||
|
|
||||||
//This structure will contain general Ja2 settings NOT individual game settings.
|
//This structure will contain general Ja2 settings NOT individual game settings.
|
||||||
|
|||||||
+1
-1
@@ -28,7 +28,7 @@ INT16 zVersionLabel[256] = { L"Beta v. 0.98" };
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
INT8 czVersionNumber[16] = { "Build 06.05.18" };
|
INT8 czVersionNumber[16] = { "Build 06.05.20" };
|
||||||
INT16 zTrackingNumber[16] = { L"Z" };
|
INT16 zTrackingNumber[16] = { L"Z" };
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -43,7 +43,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="libexpatMT.lib mss32.lib winmm.lib smackw32.lib fmodvc.lib"
|
AdditionalDependencies="libexpatMT.lib mss32.lib winmm.lib smackw32.lib fmodvc.lib"
|
||||||
OutputFile="C:\games\Jagged Alliance 2 v1.13\ja2_debug_2006_05_18.exe"
|
OutputFile="C:\games\Jagged Alliance 2 v1.13\ja2_debug_2006_05_20.exe"
|
||||||
LinkIncremental="2"
|
LinkIncremental="2"
|
||||||
SuppressStartupBanner="TRUE"
|
SuppressStartupBanner="TRUE"
|
||||||
AdditionalLibraryDirectories=".\..\..\Standard Gaming Platform\"
|
AdditionalLibraryDirectories=".\..\..\Standard Gaming Platform\"
|
||||||
@@ -546,7 +546,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="libexpatMT.lib winmm.lib smackw32.lib mss32.lib fmodvc.lib"
|
AdditionalDependencies="libexpatMT.lib winmm.lib smackw32.lib mss32.lib fmodvc.lib"
|
||||||
OutputFile="C:\Games\Jagged Alliance 2 v1.13\ja2_release_2006_05_18.exe"
|
OutputFile="C:\Games\Jagged Alliance 2 v1.13\ja2_release_2006_05_20.exe"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
SuppressStartupBanner="TRUE"
|
SuppressStartupBanner="TRUE"
|
||||||
AdditionalLibraryDirectories=".\..\..\Standard Gaming Platform\"
|
AdditionalLibraryDirectories=".\..\..\Standard Gaming Platform\"
|
||||||
|
|||||||
@@ -632,6 +632,9 @@ BOOLEAN DisplayItemInfo(UINT32 uiItemClass)
|
|||||||
|
|
||||||
for(i=gusCurWeaponIndex; ((i<=gusLastItemIndex) && (ubCount < 4)); i++)
|
for(i=gusCurWeaponIndex; ((i<=gusLastItemIndex) && (ubCount < 4)); i++)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("DisplayItemInfo: current weapon: %d",gusCurWeaponIndex));
|
||||||
|
|
||||||
if( uiItemClass == BOBBYR_USED_ITEMS )
|
if( uiItemClass == BOBBYR_USED_ITEMS )
|
||||||
{
|
{
|
||||||
//If there is not items in stock
|
//If there is not items in stock
|
||||||
|
|||||||
@@ -46,6 +46,9 @@ void GetNumberOfEnemiesInFiveSectors( INT16 sSectorX, INT16 sSectorY, UINT8 *pub
|
|||||||
if( !gGameExternalOptions.gfAllowReinforcments )
|
if( !gGameExternalOptions.gfAllowReinforcments )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if ( GetTownIdForSector( sSectorX, sSectorY ) == OMERTA ) //Madd: skip Omerta
|
||||||
|
return;
|
||||||
|
|
||||||
GenerateDirectionInfos( sSectorX, sSectorY, &ubDirNumber, pusMoveDir,
|
GenerateDirectionInfos( sSectorX, sSectorY, &ubDirNumber, pusMoveDir,
|
||||||
( GetTownIdForSector( sSectorX, sSectorY ) != BLANK_SECTOR ? TRUE : FALSE ), TRUE, IS_ONLY_IN_CITIES );
|
( GetTownIdForSector( sSectorX, sSectorY ) != BLANK_SECTOR ? TRUE : FALSE ), TRUE, IS_ONLY_IN_CITIES );
|
||||||
|
|
||||||
@@ -247,6 +250,9 @@ UINT8 DoReinforcementAsPendingEnemy( INT16 sMapX, INT16 sMapY )
|
|||||||
if( !gGameExternalOptions.gfAllowReinforcments )
|
if( !gGameExternalOptions.gfAllowReinforcments )
|
||||||
return 255;
|
return 255;
|
||||||
|
|
||||||
|
if ( GetTownIdForSector( sMapX, sMapY ) == OMERTA ) //Madd: skip Omerta
|
||||||
|
return 255;
|
||||||
|
|
||||||
pThisSector = &SectorInfo[ SECTOR( sMapX, sMapY ) ];
|
pThisSector = &SectorInfo[ SECTOR( sMapX, sMapY ) ];
|
||||||
|
|
||||||
GenerateDirectionInfos( sMapX, sMapY, &ubDirNumber, pusMoveDir,
|
GenerateDirectionInfos( sMapX, sMapY, &ubDirNumber, pusMoveDir,
|
||||||
|
|||||||
@@ -1342,19 +1342,19 @@ void HourlyProgressUpdate(void)
|
|||||||
// CJC: note when progress goes above certain values for the first time
|
// CJC: note when progress goes above certain values for the first time
|
||||||
|
|
||||||
// at 35% start the Madlab quest
|
// at 35% start the Madlab quest
|
||||||
if ( ubCurrentProgress >= 35 && gStrategicStatus.ubHighestProgress < 35 )
|
if ( ubCurrentProgress >= gGameExternalOptions.ubGameProgressStartMadlabQuest && gStrategicStatus.ubHighestProgress < gGameExternalOptions.ubGameProgressStartMadlabQuest )
|
||||||
{
|
{
|
||||||
HandleScientistAWOLMeanwhileScene();
|
HandleScientistAWOLMeanwhileScene();
|
||||||
}
|
}
|
||||||
|
|
||||||
// at 50% make Mike available to the strategic AI
|
// at 50% make Mike available to the strategic AI
|
||||||
if ( ubCurrentProgress >= 50 && gStrategicStatus.ubHighestProgress < 50 )
|
if ( ubCurrentProgress >= gGameExternalOptions.ubGameProgressMikeAvailable && gStrategicStatus.ubHighestProgress < gGameExternalOptions.ubGameProgressMikeAvailable )
|
||||||
{
|
{
|
||||||
SetFactTrue( FACT_MIKE_AVAILABLE_TO_ARMY );
|
SetFactTrue( FACT_MIKE_AVAILABLE_TO_ARMY );
|
||||||
}
|
}
|
||||||
|
|
||||||
// at 70% add Iggy to the world
|
// at 70% add Iggy to the world
|
||||||
if ( ubCurrentProgress >= 70 && gStrategicStatus.ubHighestProgress < 70 )
|
if ( ubCurrentProgress >= gGameExternalOptions.ubGameProgressIggyAvaliable && gStrategicStatus.ubHighestProgress < gGameExternalOptions.ubGameProgressIggyAvaliable )
|
||||||
{
|
{
|
||||||
gMercProfiles[ IGGY ].sSectorX = 5;
|
gMercProfiles[ IGGY ].sSectorX = 5;
|
||||||
gMercProfiles[ IGGY ].sSectorY = MAP_ROW_C;
|
gMercProfiles[ IGGY ].sSectorY = MAP_ROW_C;
|
||||||
|
|||||||
@@ -2533,8 +2533,8 @@ void ReplaceExtendedGuns( SOLDIERCREATE_STRUCT *pp, INT8 bSoldierClass )
|
|||||||
UINT16 SelectStandardArmyGun( UINT8 uiGunLevel )
|
UINT16 SelectStandardArmyGun( UINT8 uiGunLevel )
|
||||||
{
|
{
|
||||||
ARMY_GUN_CHOICE_TYPE *pGunChoiceTable;
|
ARMY_GUN_CHOICE_TYPE *pGunChoiceTable;
|
||||||
UINT32 uiChoice;
|
int uiChoice;
|
||||||
UINT16 usGunIndex;
|
int usGunIndex;
|
||||||
|
|
||||||
// pick the standard army gun for this weapon class from table
|
// pick the standard army gun for this weapon class from table
|
||||||
// usGunIndex = gStrategicStatus.ubStandardArmyGunIndex[uiGunLevel];
|
// usGunIndex = gStrategicStatus.ubStandardArmyGunIndex[uiGunLevel];
|
||||||
@@ -2554,10 +2554,28 @@ UINT16 SelectStandardArmyGun( UINT8 uiGunLevel )
|
|||||||
//}
|
//}
|
||||||
|
|
||||||
// choose one the of the possible gun choices
|
// choose one the of the possible gun choices
|
||||||
uiChoice = Random(pGunChoiceTable[ uiGunLevel ].ubChoices);
|
usGunIndex = -1;
|
||||||
usGunIndex = pGunChoiceTable[ uiGunLevel ].bItemNo[ uiChoice ];
|
|
||||||
|
|
||||||
Assert(usGunIndex);
|
while (usGunIndex == -1)
|
||||||
|
{
|
||||||
|
uiChoice = Random(pGunChoiceTable[ uiGunLevel ].ubChoices);
|
||||||
|
usGunIndex = pGunChoiceTable[ uiGunLevel ].bItemNo[ uiChoice ];
|
||||||
|
|
||||||
|
if (!ItemIsLegal(usGunIndex)) //Madd: check for 10 tons of guns
|
||||||
|
usGunIndex = -1;
|
||||||
|
|
||||||
|
if (usGunIndex == -1)
|
||||||
|
{
|
||||||
|
//Madd: there better be something from the original JA2 guns here somewhere (biggunlist=0) or else this will probably cause an endless loop
|
||||||
|
if ( uiGunLevel < ARMY_GUN_LEVELS )
|
||||||
|
uiGunLevel++;
|
||||||
|
else
|
||||||
|
uiGunLevel--;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//Assert(usGunIndex);
|
||||||
|
|
||||||
return(usGunIndex);
|
return(usGunIndex);
|
||||||
}
|
}
|
||||||
@@ -2638,7 +2656,7 @@ UINT16 PickARandomItem(UINT8 typeIndex, UINT8 maxCoolness, BOOLEAN getMatchingCo
|
|||||||
}
|
}
|
||||||
usItem = gArmyItemChoices[ typeIndex ].bItemNo[ uiChoice ];
|
usItem = gArmyItemChoices[ typeIndex ].bItemNo[ uiChoice ];
|
||||||
|
|
||||||
if ( usItem >= 0 && Item[usItem].ubCoolness <= maxCoolness )
|
if ( usItem >= 0 && Item[usItem].ubCoolness <= maxCoolness && ItemIsLegal(usItem) )
|
||||||
{
|
{
|
||||||
// pick a default item in case we don't find anything with a matching coolness, but pick the coolest item we can find
|
// pick a default item in case we don't find anything with a matching coolness, but pick the coolest item we can find
|
||||||
if ( defaultItem == 0 || Item[usItem].ubCoolness > Item[defaultItem].ubCoolness )
|
if ( defaultItem == 0 || Item[usItem].ubCoolness > Item[defaultItem].ubCoolness )
|
||||||
@@ -2685,12 +2703,16 @@ UINT16 PickARandomAttachment(UINT8 typeIndex, UINT16 usBaseItem, UINT8 maxCoolne
|
|||||||
if ( Item[usItem].ubCoolness == maxCoolness || !getMatchingCoolness )
|
if ( Item[usItem].ubCoolness == maxCoolness || !getMatchingCoolness )
|
||||||
{
|
{
|
||||||
// DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("PickARandomAttachment: baseItem = %d, usItem = %d",usBaseItem, usItem));
|
// DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("PickARandomAttachment: baseItem = %d, usItem = %d",usBaseItem, usItem));
|
||||||
return usItem;
|
if (ItemIsLegal(usItem))
|
||||||
|
return usItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// couldn't find anything with the exact matching coolness, so return the best item we did find
|
// couldn't find anything with the exact matching coolness, so return the best item we did find
|
||||||
// DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("PickARandomAttachment: baseItem = %d, defaultItem = %d",usBaseItem, defaultItem));
|
// DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("PickARandomAttachment: baseItem = %d, defaultItem = %d",usBaseItem, defaultItem));
|
||||||
return defaultItem;
|
if (ItemIsLegal(usItem))
|
||||||
|
return defaultItem;
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9352,7 +9352,7 @@ void ReLoadSoldierAnimationDueToHandItemChange( SOLDIERTYPE *pSoldier, UINT16 us
|
|||||||
|
|
||||||
// Shutoff burst....
|
// Shutoff burst....
|
||||||
// ( we could be on, then change gun that does not have burst )
|
// ( we could be on, then change gun that does not have burst )
|
||||||
if ( Weapon[ usNewItem ].ubShotsPerBurst == 0 && !Weapon[usNewItem].NoSemiAuto )
|
if ( Weapon[ usNewItem ].ubShotsPerBurst == 0 && !Weapon[pSoldier->inv[HANDPOS].usItem ].NoSemiAuto )
|
||||||
{
|
{
|
||||||
pSoldier->bDoBurst = FALSE;
|
pSoldier->bDoBurst = FALSE;
|
||||||
pSoldier->bWeaponMode = WM_NORMAL;
|
pSoldier->bWeaponMode = WM_NORMAL;
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//rain
|
//rain
|
||||||
#define VIS_DIST_DECREASE_PER_RAIN_INTENSITY 20
|
//#define VIS_DIST_DECREASE_PER_RAIN_INTENSITY 20
|
||||||
//end rain
|
//end rain
|
||||||
|
|
||||||
#define WE_SEE_WHAT_MILITIA_SEES_AND_VICE_VERSA
|
#define WE_SEE_WHAT_MILITIA_SEES_AND_VICE_VERSA
|
||||||
@@ -312,7 +312,7 @@ INT16 AdjustMaxSightRangeForEnvEffects( SOLDIERTYPE *pSoldier, INT8 bLightLevel,
|
|||||||
{
|
{
|
||||||
//sNewDist = sNewDist * 70 / 100;
|
//sNewDist = sNewDist * 70 / 100;
|
||||||
//rain
|
//rain
|
||||||
sNewDist = sNewDist * ( 100 - VIS_DIST_DECREASE_PER_RAIN_INTENSITY * gbCurrentRainIntensity ) / 100;
|
sNewDist = sNewDist * ( 100 - gGameExternalOptions.ubVisDistDecreasePerRainIntensity * gbCurrentRainIntensity ) / 100;
|
||||||
//end rain
|
//end rain
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user