mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
New Feature: dynamic dialogue is played when dynamic opinions are active. Mercs can comment on each others actions, and this can influence their opinions further. IMP character answers can even be chosen by the player.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7297 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1365,10 +1365,9 @@ void HandleDialogue( )
|
||||
gubCurrentTalkingID = QItem->iFaceIndex;
|
||||
|
||||
//ExecuteCharacterDialogue( QItem->ubCharacterNum, QItem->usQuoteNum, QItem->iFaceIndex, DIALOGUE_TACTICAL_UI, TRUE );
|
||||
|
||||
//ExecuteCharacterDialogue( QItem->ubCharacterNum, QItem->usQuoteNum, QItem->iFaceIndex, DIALOGUE_TACTICAL_UI, TRUE);
|
||||
ExecuteSnitchCharacterDialogue( QItem->ubCharacterNum, QItem->usQuoteNum, QItem->iFaceIndex, QItem->bUIHandlerID, QItem->uiSpecialEventData2, QItem->uiSpecialEventData3, QItem->uiSpecialEventData4 );
|
||||
}
|
||||
|
||||
#ifdef JA2UB
|
||||
//JA25 UB
|
||||
if ( QItem->uiSpecialEventData & MULTIPURPOSE_SPECIAL_EVENT_TEAM_MEMBERS_DONE_TALKING )
|
||||
@@ -1465,8 +1464,6 @@ void HandleDialogue( )
|
||||
|
||||
BOOLEAN GetDialogue( UINT8 ubCharacterNum, UINT16 usQuoteNum, UINT32 iDataSize, STR16 zDialogueText, UINT32 *puiSoundID, CHAR8 *zSoundString );
|
||||
|
||||
BOOLEAN SnitchDialogueReplaceMercNicksWithProperData( CHAR16 *pFinishedString, UINT8 ubTargetProfile, UINT8 ubSecondaryTargetProfile );
|
||||
|
||||
BOOLEAN GetSnitchDialogue( UINT8 ubCharacterNum, UINT16 usQuoteNum, UINT32 iDataSize, STR16 zDialogueText, UINT32 *puiSound1ID, UINT32 *puiSound2ID, UINT32 *puiSound3ID, CHAR8 zSoundFiles[][64], UINT8 ubTargetProfile, UINT8 ubSecondaryTargetProfile );
|
||||
|
||||
BOOLEAN DelayedTacticalCharacterDialogue( SOLDIERTYPE *pSoldier, UINT16 usQuoteNum )
|
||||
@@ -1817,17 +1814,17 @@ BOOLEAN SnitchCharacterDialogue( UINT8 ubCharacterNum, UINT16 usQuoteNum, INT32
|
||||
QItem = (DIALOGUE_Q_STRUCT *) MemAlloc( sizeof( DIALOGUE_Q_STRUCT ) );
|
||||
memset( QItem, 0, sizeof( DIALOGUE_Q_STRUCT ) );
|
||||
|
||||
QItem->ubCharacterNum = ubCharacterNum;
|
||||
QItem->ubCharacterNum = ubCharacterNum;
|
||||
QItem->usQuoteNum = usQuoteNum;
|
||||
QItem->uiSpecialEventFlag = uiSpecialEventFlag;
|
||||
QItem->uiSpecialEventData = uiSpecialEventData1;
|
||||
QItem->uiSpecialEventFlag = uiSpecialEventFlag;
|
||||
QItem->uiSpecialEventData = uiSpecialEventData1;
|
||||
QItem->uiSpecialEventData2 = uiSpecialEventData2;
|
||||
QItem->uiSpecialEventData3 = uiSpecialEventData3;
|
||||
QItem->uiSpecialEventData4 = uiSpecialEventData4;
|
||||
QItem->iFaceIndex = iFaceIndex;
|
||||
QItem->bUIHandlerID = bUIHandlerID;
|
||||
QItem->bUIHandlerID = bUIHandlerID;
|
||||
QItem->iTimeStamp = GetJA2Clock( );
|
||||
QItem->fFromSoldier = fFromSoldier;
|
||||
QItem->fFromSoldier = fFromSoldier;
|
||||
QItem->fDelayed = fDelayed;
|
||||
|
||||
// check if pause already locked, if so, then don't mess with it
|
||||
@@ -2533,21 +2530,17 @@ BOOLEAN GetDialogue( UINT8 ubCharacterNum, UINT16 usQuoteNum, UINT32 iDataSize,
|
||||
return (*puiSoundID != NO_SAMPLE) || fTextAvailable;
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN SnitchDialogueReplaceMercNicksWithProperData( CHAR16 *pFinishedString, UINT8 ubTargetProfile, UINT8 ubSecondaryTargetProfile )
|
||||
BOOLEAN ReplaceTextWithOtherText( CHAR16 *pFinishedString, CHAR16 compare[32], CHAR16 replace[32] )
|
||||
{
|
||||
CHAR16 pTempString[ 320 ];
|
||||
INT32 iLength =0;
|
||||
INT32 iCurLocInSourceString =0 ;
|
||||
INT32 iLengthOfSourceString = wcslen( pFinishedString ); //Get the length of the source string
|
||||
CHAR16 *pMercNickString = NULL;
|
||||
CHAR16 *pOtherMercNickString = NULL;
|
||||
CHAR16 pTempString[320];
|
||||
INT32 iLength = 0;
|
||||
INT32 iCurLocInSourceString = 0;
|
||||
INT32 iLengthOfSourceString = wcslen( pFinishedString ); //Get the length of the source string
|
||||
CHAR16 *pNickString = NULL;
|
||||
|
||||
CHAR16 *pSubString = NULL;
|
||||
BOOLEAN fReplacingMercName = TRUE;
|
||||
CHAR16 *pSubString = NULL;
|
||||
BOOLEAN fReplacingMercName = TRUE;
|
||||
|
||||
CHAR16 sMercNick[ 32 ] = L"$MERCNICK$"; //Will be replaced by the mercs name
|
||||
CHAR16 sOtherMercNick[ 32 ] = L"$MERCNICK2$"; //Will be replaced by the mercs name
|
||||
CHAR16 sSearchString[32];
|
||||
|
||||
//Copy the original string over to the temp string
|
||||
@@ -2557,43 +2550,19 @@ BOOLEAN SnitchDialogueReplaceMercNicksWithProperData( CHAR16 *pFinishedString, U
|
||||
pFinishedString[0] = L'\0';
|
||||
|
||||
//Keep looping through to replace all references to the keyword
|
||||
while( iCurLocInSourceString < iLengthOfSourceString )
|
||||
while ( iCurLocInSourceString < iLengthOfSourceString )
|
||||
{
|
||||
iLength = 0;
|
||||
pSubString = NULL;
|
||||
|
||||
//Find out if the $MERCNICK$ is in the string
|
||||
pMercNickString = wcsstr( &pTempString[ iCurLocInSourceString ], sMercNick );
|
||||
pNickString = wcsstr( &pTempString[iCurLocInSourceString], compare );
|
||||
|
||||
//Find out if the $MERCNICK2$ is in the string
|
||||
pOtherMercNickString = wcsstr( &pTempString[ iCurLocInSourceString ], sOtherMercNick );
|
||||
|
||||
if( pMercNickString != NULL && pOtherMercNickString != NULL )
|
||||
{
|
||||
if( pMercNickString < pOtherMercNickString )
|
||||
{
|
||||
fReplacingMercName = TRUE;
|
||||
pSubString = pMercNickString;
|
||||
wcscpy( sSearchString, sMercNick);
|
||||
}
|
||||
else
|
||||
{
|
||||
fReplacingMercName = FALSE;
|
||||
pSubString = pOtherMercNickString;
|
||||
wcscpy( sSearchString, sOtherMercNick);
|
||||
}
|
||||
}
|
||||
else if( pMercNickString != NULL )
|
||||
if ( pNickString != NULL )
|
||||
{
|
||||
fReplacingMercName = TRUE;
|
||||
pSubString = pMercNickString;
|
||||
wcscpy( sSearchString, sMercNick);
|
||||
}
|
||||
else if( pOtherMercNickString != NULL )
|
||||
{
|
||||
fReplacingMercName = FALSE;
|
||||
pSubString = pOtherMercNickString;
|
||||
wcscpy( sSearchString, sOtherMercNick);
|
||||
pSubString = pNickString;
|
||||
wcscpy( sSearchString, compare );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2601,37 +2570,32 @@ BOOLEAN SnitchDialogueReplaceMercNicksWithProperData( CHAR16 *pFinishedString, U
|
||||
}
|
||||
|
||||
// if there is a substring
|
||||
if( pSubString != NULL )
|
||||
if ( pSubString != NULL )
|
||||
{
|
||||
iLength = pSubString - &pTempString[ iCurLocInSourceString ];
|
||||
iLength = pSubString - &pTempString[iCurLocInSourceString];
|
||||
|
||||
//Copy the part of the source string up to the keyword
|
||||
wcsncat( pFinishedString, &pTempString[ iCurLocInSourceString ], iLength );
|
||||
wcsncat( pFinishedString, &pTempString[iCurLocInSourceString], iLength );
|
||||
|
||||
//increment the source string counter by how far in the keyword is and by the length of the keyword
|
||||
iCurLocInSourceString+= iLength + wcslen( sSearchString );
|
||||
iCurLocInSourceString += iLength + wcslen( sSearchString );
|
||||
|
||||
if( fReplacingMercName )
|
||||
if ( fReplacingMercName )
|
||||
{
|
||||
//add the mercs name to the string
|
||||
wcscat( pFinishedString, gMercProfiles[ ubTargetProfile ].zNickname );
|
||||
}
|
||||
else
|
||||
{
|
||||
//add the mercs name to the string
|
||||
wcscat( pFinishedString, gMercProfiles[ ubSecondaryTargetProfile ].zNickname );
|
||||
wcscat( pFinishedString, replace );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//add the rest of the string
|
||||
wcscat( pFinishedString, &pTempString[ iCurLocInSourceString ] );
|
||||
wcscat( pFinishedString, &pTempString[iCurLocInSourceString] );
|
||||
|
||||
iCurLocInSourceString += wcslen( &pTempString[ iCurLocInSourceString ] );
|
||||
iCurLocInSourceString += wcslen( &pTempString[iCurLocInSourceString] );
|
||||
}
|
||||
}
|
||||
|
||||
return( TRUE );
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
// anv: special version of GetDialogue, message is put together from parts
|
||||
@@ -2653,23 +2617,11 @@ BOOLEAN GetSnitchDialogue( UINT8 ubCharacterNum, UINT16 usQuoteNum, UINT32 iData
|
||||
{
|
||||
|
||||
LoadEncryptedDataFromFile( pFilename1, zDialogueText, usQuoteNum * iDataSize, iDataSize );
|
||||
//LoadEncryptedDataFromFile( pFilename2, zDialogueText2, ubSnitchTarget * iDataSize, iDataSize );
|
||||
//LoadEncryptedDataFromFile( pFilename3, zDialogueText3, ubSecondarySnitchTarget * iDataSize, iDataSize );
|
||||
SnitchDialogueReplaceMercNicksWithProperData( zDialogueText, ubTargetProfile, ubSecondaryTargetProfile );
|
||||
//if( ubSnitchTargetID != NOBODY )
|
||||
//{
|
||||
// wcscpy( zDialogueTextTemp, gMercProfiles[ubTargetProfile].zNickname );
|
||||
// wcscat( zDialogueTextTemp, zDialogueText );
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// wcscpy( zDialogueTextTemp, zDialogueText );
|
||||
//}
|
||||
//if( ubSecondarySnitchTargetID != NOBODY )
|
||||
//{
|
||||
// wcscat( zDialogueTextTemp, gMercProfiles[ubSecondaryTargetProfile].zNickname );
|
||||
//}
|
||||
//wcscpy( zDialogueText, zDialogueTextTemp );
|
||||
|
||||
// Flugente: replaced SnitchDialogueReplaceMercNicksWithProperData with ReplaceTextWithOtherText - less complicated an can be used for other things than merc names
|
||||
ReplaceTextWithOtherText( zDialogueText, L"$MERCNICK$", gMercProfiles[ubTargetProfile].zNickname );
|
||||
ReplaceTextWithOtherText( zDialogueText, L"$MERCNICK2$", gMercProfiles[ubSecondaryTargetProfile].zNickname );
|
||||
|
||||
if(zDialogueText[0] == 0)
|
||||
{
|
||||
swprintf( zDialogueText, L"I have no text in the EDT file ( %d ) %S", usQuoteNum, pFilename1 );
|
||||
@@ -2785,7 +2737,7 @@ void HandleTacticalTextUI( INT32 iFaceIndex, SOLDIERTYPE *pSoldier, STR16 zQuote
|
||||
// TODO.RW: Wenn wir in tactical sind, dann normal. In strategy den offset dazurechnen!
|
||||
if ( guiCurrentScreen == GAME_SCREEN )
|
||||
{
|
||||
sLeft = 110;
|
||||
sLeft = 110;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2969,8 +2921,8 @@ void HandleTacticalSpeechUI( UINT8 ubCharacterNum, INT32 iFaceIndex )
|
||||
}
|
||||
|
||||
// Setup video overlay!
|
||||
VideoOverlayDesc.sLeft = 10;
|
||||
VideoOverlayDesc.sTop = 20;
|
||||
VideoOverlayDesc.sLeft = 10;
|
||||
VideoOverlayDesc.sTop = 20;
|
||||
VideoOverlayDesc.sRight = VideoOverlayDesc.sLeft + 99;
|
||||
VideoOverlayDesc.sBottom = VideoOverlayDesc.sTop + 98;
|
||||
VideoOverlayDesc.sX = VideoOverlayDesc.sLeft;
|
||||
|
||||
@@ -344,6 +344,9 @@ BOOLEAN TacticalCharacterDialogue( SOLDIERTYPE *pSoldier, UINT16 usQuoteNum );
|
||||
|
||||
BOOLEAN SnitchTacticalCharacterDialogue( SOLDIERTYPE *pSoldier, UINT16 usQuoteNum, UINT8 ubEventType, UINT8 ubTargetProfile, UINT8 ubSecondaryTargetProfile );
|
||||
|
||||
// Flugente: replace text with other text
|
||||
BOOLEAN ReplaceTextWithOtherText( CHAR16 *pFinishedString, CHAR16 compare[32], CHAR16 replace[32] );
|
||||
|
||||
// A higher level function used for tactical quotes
|
||||
BOOLEAN DelayedTacticalCharacterDialogue( SOLDIERTYPE *pSoldier, UINT16 usQuoteNum );
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "Food.h" // added by Flugente
|
||||
#include "Animation data.h" // added by Flugente for SoldierBodyTypes
|
||||
#include "CampaignStats.h" // added by Flugente
|
||||
#include "DynamicDialogue.h"// added by Flugente
|
||||
#endif
|
||||
|
||||
//forward declarations of common classes to eliminate includes
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,432 @@
|
||||
#ifndef __DYNAMICDIALOGUE_H
|
||||
#define __DYNAMICDIALOGUE_H
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @author Flugente (bears-pit.com)
|
||||
* @brief This file contains declarations of classes and functions used for dynamic dialogue
|
||||
*/
|
||||
|
||||
#include "Types.h"
|
||||
#include "Soldier Control.h"
|
||||
|
||||
// Flugente: calculate A's opinion of B
|
||||
INT8 SoldierRelation( SOLDIERTYPE* pSoldierA, SOLDIERTYPE* pSoldierB );
|
||||
INT8 SoldierRelation( UINT8 usProfileA, UINT8 usProfileB );
|
||||
|
||||
// Flugente: dynamic opinions
|
||||
enum
|
||||
{
|
||||
OPINIONEVENT_FRIENDLYFIRE,
|
||||
OPINIONEVENT_SNITCHSOLDMEOUT,
|
||||
OPINIONEVENT_SNITCHINTERFERENCE,
|
||||
OPINIONEVENT_FRIENDSWITHHATED,
|
||||
|
||||
OPINIONEVENT_CONTRACTEXTENSION,
|
||||
OPINIONEVENT_ORDEREDRETREAT,
|
||||
OPINIONEVENT_CIVKILLER,
|
||||
OPINIONEVENT_SLOWSUSDOWN,
|
||||
|
||||
OPINIONEVENT_NOSHARINGFOOD,
|
||||
OPINIONEVENT_ANNOYINGDISABILITY,
|
||||
OPINIONEVENT_ADDICT,
|
||||
OPINIONEVENT_THIEF,
|
||||
|
||||
OPINIONEVENT_WORSTCOMMANDEREVER,
|
||||
OPINIONEVENT_RICHGUY,
|
||||
OPINIONEVENT_BETTERGEAR,
|
||||
OPINIONEVENT_YOUMOUNTEDAGUNONMYBREASTS,
|
||||
|
||||
OPINIONEVENT_BANDAGED,
|
||||
OPINIONEVENT_DRINKBUDDIES_GOOD,
|
||||
OPINIONEVENT_DRINKBUDDIES_SUPER,
|
||||
OPINIONEVENT_DRINKBUDDIES_BAD,
|
||||
|
||||
OPINIONEVENT_DRINKBUDDIES_WORSE,
|
||||
// events from dialogue
|
||||
OPINIONEVENT_AGAINST_US, // other guy was against us in dialogue
|
||||
OPINIONEVENT_FOR_US, // other guy was for us in dialogue
|
||||
OPINIONEVENT_AGAINST_ENEMY, // other guy was against our dialogue enemy in dialogue
|
||||
|
||||
OPINIONEVENT_FOR_ENEMY, // other guy was for our dialogue enemy in dialogue
|
||||
OPINIONEVENT_SOLVECONFLICT_REASON_GOOD, // other guy attempted to solve the conflict reasonably, and we thought that was good
|
||||
OPINIONEVENT_SOLVECONFLICT_REASON_BAD, // other guy attempted to solve the conflict reasonably, and we thought that was bad
|
||||
OPINIONEVENT_SOLVECONFLICT_AGGRESSIVE_GOOD, // other guy attempted to solve the conflict agressively, and we thought that was good
|
||||
|
||||
OPINIONEVENT_SOLVECONFLICT_AGGRESSIVE_BAD, // other guy attempted to solve the conflict agressively, and we thought that was bad
|
||||
|
||||
OPINIONEVENT_MAX
|
||||
};
|
||||
|
||||
typedef struct DynamicOpinionEvent
|
||||
{
|
||||
UINT8 ubEventId;
|
||||
INT8 sOpinionModifier;
|
||||
BOOLEAN fSameSector;
|
||||
BOOLEAN fSameAssignment;
|
||||
BOOLEAN fAwake;
|
||||
BOOLEAN fSquadsOnly;
|
||||
} DynamicOpinionEvent;
|
||||
|
||||
extern DynamicOpinionEvent gDynamicOpinionEvent[OPINIONEVENT_MAX];
|
||||
|
||||
// -------- added by Flugente: flags for opinions --------
|
||||
// easier than adding 32 differently named variables. DO NOT CHANGE THEM, UNLESS YOU KNOW WHAT YOU ARE DOING!!!
|
||||
// if someone influences our opinion, STAGE1 gets set. Every day, stages move up one step, until we 'forget' them
|
||||
// these flags describe what the other guy did to us....
|
||||
// flagmask 1
|
||||
#define OPINIONFLAG_STAGE1_FRIENDLYFIRE 0x00000001 //1 // fired on us
|
||||
#define OPINIONFLAG_STAGE2_FRIENDLYFIRE 0x00000002 //2
|
||||
#define OPINIONFLAG_STAGE3_FRIENDLYFIRE 0x00000004 //4
|
||||
#define OPINIONFLAG_STAGE4_FRIENDLYFIRE 0x00000008 //8
|
||||
|
||||
#define OPINIONFLAG_STAGE1_SNITCHSOLDMEOUT 0x00000010 //16 // has been snitching to the player about us
|
||||
#define OPINIONFLAG_STAGE2_SNITCHSOLDMEOUT 0x00000020 //32
|
||||
#define OPINIONFLAG_STAGE3_SNITCHSOLDMEOUT 0x00000040 //64
|
||||
#define OPINIONFLAG_STAGE4_SNITCHSOLDMEOUT 0x00000080 //128
|
||||
|
||||
#define OPINIONFLAG_STAGE1_INTERFERENCE 0x00000100 //256 // is interfering with us (stopped us from taking drugs or stealing)
|
||||
#define OPINIONFLAG_STAGE2_INTERFERENCE 0x00000200 //512
|
||||
#define OPINIONFLAG_STAGE3_INTERFERENCE 0x00000400 //1024
|
||||
#define OPINIONFLAG_STAGE4_INTERFERENCE 0x00000800 //2048
|
||||
|
||||
#define OPINIONFLAG_STAGE1_FRIENDSWITHHATED 0x00001000 //4096 // is friends with someone we hate
|
||||
#define OPINIONFLAG_STAGE2_FRIENDSWITHHATED 0x00002000 //8192
|
||||
#define OPINIONFLAG_STAGE3_FRIENDSWITHHATED 0x00004000 //16384
|
||||
#define OPINIONFLAG_STAGE4_FRIENDSWITHHATED 0x00008000 //32768
|
||||
|
||||
#define OPINIONFLAG_STAGE1_CONTRACTEXTENSION 0x00010000 //65536 // got his contract extended before we did, even though we had less time left
|
||||
#define OPINIONFLAG_STAGE2_CONTRACTEXTENSION 0x00020000 //131072
|
||||
#define OPINIONFLAG_STAGE3_CONTRACTEXTENSION 0x00040000 //262144
|
||||
#define OPINIONFLAG_STAGE4_CONTRACTEXTENSION 0x00080000 //524288
|
||||
|
||||
#define OPINIONFLAG_STAGE1_ORDEREDRETREAT 0x00100000 //1048576 // was commander (most senior merc around) and ordered retreat
|
||||
#define OPINIONFLAG_STAGE2_ORDEREDRETREAT 0x00200000 //2097152
|
||||
#define OPINIONFLAG_STAGE3_ORDEREDRETREAT 0x00400000 //4194304
|
||||
#define OPINIONFLAG_STAGE4_ORDEREDRETREAT 0x00800000 //8388608
|
||||
|
||||
#define OPINIONFLAG_STAGE1_CIVKILLER 0x01000000 //16777216 // killed an unarmed civilian
|
||||
#define OPINIONFLAG_STAGE2_CIVKILLER 0x02000000 //33554432
|
||||
#define OPINIONFLAG_STAGE3_CIVKILLER 0x04000000 //67108864
|
||||
#define OPINIONFLAG_STAGE4_CIVKILLER 0x08000000 //134217728
|
||||
|
||||
#define OPINIONFLAG_STAGE1_SLOWSUSDOWN 0x10000000 //268435456 // is overloaded and thus slows us down
|
||||
#define OPINIONFLAG_STAGE2_SLOWSUSDOWN 0x20000000 //536870912
|
||||
#define OPINIONFLAG_STAGE3_SLOWSUSDOWN 0x40000000 //1073741824
|
||||
#define OPINIONFLAG_STAGE4_SLOWSUSDOWN 0x80000000 //2147483648
|
||||
|
||||
// flagmask 2
|
||||
#define OPINIONFLAG_STAGE1_NOSHARINGFOOD 0x00000001 //1 // had water/food when we needed it. So he did not share!
|
||||
#define OPINIONFLAG_STAGE2_NOSHARINGFOOD 0x00000002 //2
|
||||
#define OPINIONFLAG_STAGE3_NOSHARINGFOOD 0x00000004 //4
|
||||
#define OPINIONFLAG_STAGE4_NOSHARINGFOOD 0x00000008 //8
|
||||
|
||||
#define OPINIONFLAG_STAGE1_ANNOYINGDISABILITY 0x00000010 //16 // disability kicked in at a bad time, putting the team at risk (forgeful, nervous, psycho...)
|
||||
#define OPINIONFLAG_STAGE2_ANNOYINGDISABILITY 0x00000020 //32
|
||||
#define OPINIONFLAG_STAGE3_ANNOYINGDISABILITY 0x00000040 //64
|
||||
#define OPINIONFLAG_STAGE4_ANNOYINGDISABILITY 0x00000080 //128
|
||||
|
||||
#define OPINIONFLAG_STAGE1_ADDICT 0x00000100 //256 // is taking drugs
|
||||
#define OPINIONFLAG_STAGE2_ADDICT 0x00000200 //512
|
||||
#define OPINIONFLAG_STAGE3_ADDICT 0x00000400 //1024
|
||||
#define OPINIONFLAG_STAGE4_ADDICT 0x00000800 //2048
|
||||
|
||||
#define OPINIONFLAG_STAGE1_THIEF 0x00001000 //4096 // is stealing items
|
||||
#define OPINIONFLAG_STAGE2_THIEF 0x00002000 //8192
|
||||
#define OPINIONFLAG_STAGE3_THIEF 0x00004000 //16384
|
||||
#define OPINIONFLAG_STAGE4_THIEF 0x00008000 //32768
|
||||
|
||||
#define OPINIONFLAG_STAGE1_WORSTCOMMANDEREVER 0x00010000 //65536 // was commander (most senior merc around) when a lot of our people (including militia) died
|
||||
#define OPINIONFLAG_STAGE2_WORSTCOMMANDEREVER 0x00020000 //131072
|
||||
#define OPINIONFLAG_STAGE3_WORSTCOMMANDEREVER 0x00040000 //262144
|
||||
#define OPINIONFLAG_STAGE4_WORSTCOMMANDEREVER 0x00080000 //524288
|
||||
|
||||
#define OPINIONFLAG_STAGE1_RICHGUY 0x00100000 //1048576 // gets paid a lot more than we do
|
||||
#define OPINIONFLAG_STAGE2_RICHGUY 0x00200000 //2097152
|
||||
#define OPINIONFLAG_STAGE3_RICHGUY 0x00400000 //4194304
|
||||
#define OPINIONFLAG_STAGE4_RICHGUY 0x00800000 //8388608
|
||||
|
||||
#define OPINIONFLAG_STAGE1_BETTERGEAR 0x01000000 //16777216 // has a lot better gear than we do
|
||||
#define OPINIONFLAG_STAGE2_BETTERGEAR 0x02000000 //33554432
|
||||
#define OPINIONFLAG_STAGE3_BETTERGEAR 0x04000000 //67108864
|
||||
#define OPINIONFLAG_STAGE4_BETTERGEAR 0x08000000 //134217728
|
||||
|
||||
#define OPINIONFLAG_STAGE1_YOUMOUNTEDAGUNONMYBREASTS 0x10000000 //268435456 // used our body to rest his gun on
|
||||
#define OPINIONFLAG_STAGE2_YOUMOUNTEDAGUNONMYBREASTS 0x20000000 //536870912
|
||||
#define OPINIONFLAG_STAGE3_YOUMOUNTEDAGUNONMYBREASTS 0x40000000 //1073741824
|
||||
#define OPINIONFLAG_STAGE4_YOUMOUNTEDAGUNONMYBREASTS 0x80000000 //2147483648
|
||||
|
||||
// flagmask 3
|
||||
#define OPINIONFLAG_STAGE1_BANDAGED 0x00000001 //1 // bandaged our wounds
|
||||
#define OPINIONFLAG_STAGE2_BANDAGED 0x00000002 //2
|
||||
#define OPINIONFLAG_STAGE3_BANDAGED 0x00000004 //4
|
||||
#define OPINIONFLAG_STAGE4_BANDAGED 0x00000008 //8
|
||||
|
||||
#define OPINIONFLAG_STAGE1_DRINKBUDDIES_GOOD 0x00000010 //16 // had a drink with him, he's okay.
|
||||
#define OPINIONFLAG_STAGE2_DRINKBUDDIES_GOOD 0x00000020 //32
|
||||
#define OPINIONFLAG_STAGE3_DRINKBUDDIES_GOOD 0x00000040 //64
|
||||
#define OPINIONFLAG_STAGE4_DRINKBUDDIES_GOOD 0x00000080 //128
|
||||
|
||||
#define OPINIONFLAG_STAGE1_DRINKBUDDIES_SUPER 0x00000100 //256 // had a drink with him, he's super okay
|
||||
#define OPINIONFLAG_STAGE2_DRINKBUDDIES_SUPER 0x00000200 //512
|
||||
#define OPINIONFLAG_STAGE3_DRINKBUDDIES_SUPER 0x00000400 //1024
|
||||
#define OPINIONFLAG_STAGE4_DRINKBUDDIES_SUPER 0x00000800 //2048
|
||||
|
||||
#define OPINIONFLAG_STAGE1_DRINKBUDDIES_BAD 0x00001000 //4096 // had a drink with him, don't like him
|
||||
#define OPINIONFLAG_STAGE2_DRINKBUDDIES_BAD 0x00002000 //8192
|
||||
#define OPINIONFLAG_STAGE3_DRINKBUDDIES_BAD 0x00004000 //16384
|
||||
#define OPINIONFLAG_STAGE4_DRINKBUDDIES_BAD 0x00008000 //32768
|
||||
|
||||
#define OPINIONFLAG_STAGE1_DRINKBUDDIES_WORSE 0x00010000 //65536 // had a drink with him, and I REALLY don't like him now
|
||||
#define OPINIONFLAG_STAGE2_DRINKBUDDIES_WORSE 0x00020000 //131072
|
||||
#define OPINIONFLAG_STAGE3_DRINKBUDDIES_WORSE 0x00040000 //262144
|
||||
#define OPINIONFLAG_STAGE4_DRINKBUDDIES_WORSE 0x00080000 //524288
|
||||
|
||||
#define OPINIONFLAG_STAGE1_AGAINST_US 0x00100000 //1048576 // was against us in dialogue
|
||||
#define OPINIONFLAG_STAGE2_AGAINST_US 0x00200000 //2097152
|
||||
#define OPINIONFLAG_STAGE3_AGAINST_US 0x00400000 //4194304
|
||||
#define OPINIONFLAG_STAGE4_AGAINST_US 0x00800000 //8388608
|
||||
|
||||
#define OPINIONFLAG_STAGE1_FOR_US 0x01000000 //16777216 // other guy was for us in dialogue
|
||||
#define OPINIONFLAG_STAGE2_FOR_US 0x02000000 //33554432
|
||||
#define OPINIONFLAG_STAGE3_FOR_US 0x04000000 //67108864
|
||||
#define OPINIONFLAG_STAGE4_FOR_US 0x08000000 //134217728
|
||||
|
||||
#define OPINIONFLAG_STAGE1_AGAINST_ENEMY 0x10000000 //268435456 // was against our dialogue enemy in dialogue
|
||||
#define OPINIONFLAG_STAGE2_AGAINST_ENEMY 0x20000000 //536870912
|
||||
#define OPINIONFLAG_STAGE3_AGAINST_ENEMY 0x40000000 //1073741824
|
||||
#define OPINIONFLAG_STAGE4_AGAINST_ENEMY 0x80000000 //2147483648
|
||||
|
||||
// flagmask 4
|
||||
#define OPINIONFLAG_STAGE1_FOR_ENEMY 0x00000001 //1 // was for our dialogue enemy in dialogue
|
||||
#define OPINIONFLAG_STAGE2_FOR_ENEMY 0x00000002 //2
|
||||
#define OPINIONFLAG_STAGE3_FOR_ENEMY 0x00000004 //4
|
||||
#define OPINIONFLAG_STAGE4_FOR_ENEMY 0x00000008 //8
|
||||
|
||||
#define OPINIONFLAG_STAGE1_SOLVECONFLICT_REASON_GOOD 0x00000010 //16 // attempted to solve the conflict reasonably, and we thought that was good
|
||||
#define OPINIONFLAG_STAGE2_SOLVECONFLICT_REASON_GOOD 0x00000020 //32
|
||||
#define OPINIONFLAG_STAGE3_SOLVECONFLICT_REASON_GOOD 0x00000040 //64
|
||||
#define OPINIONFLAG_STAGE4_SOLVECONFLICT_REASON_GOOD 0x00000080 //128
|
||||
|
||||
#define OPINIONFLAG_STAGE1_SOLVECONFLICT_REASON_BAD 0x00000100 //256 // attempted to solve the conflict reasonably, and we thought that was bad
|
||||
#define OPINIONFLAG_STAGE2_SOLVECONFLICT_REASON_BAD 0x00000200 //512
|
||||
#define OPINIONFLAG_STAGE3_SOLVECONFLICT_REASON_BAD 0x00000400 //1024
|
||||
#define OPINIONFLAG_STAGE4_SOLVECONFLICT_REASON_BAD 0x00000800 //2048
|
||||
|
||||
#define OPINIONFLAG_STAGE1_SOLVECONFLICT_AGGRESSIVE_GOOD 0x00001000 //4096 // attempted to solve the conflict agressively, and we thought that was good
|
||||
#define OPINIONFLAG_STAGE2_SOLVECONFLICT_AGGRESSIVE_GOOD 0x00002000 //8192
|
||||
#define OPINIONFLAG_STAGE3_SOLVECONFLICT_AGGRESSIVE_GOOD 0x00004000 //16384
|
||||
#define OPINIONFLAG_STAGE4_SOLVECONFLICT_AGGRESSIVE_GOOD 0x00008000 //32768
|
||||
|
||||
#define OPINIONFLAG_STAGE1_SOLVECONFLICT_AGGRESSIVE_BAD 0x00010000 //65536 // attempted to solve the conflict agressively, and we thought that was bad
|
||||
#define OPINIONFLAG_STAGE2_SOLVECONFLICT_AGGRESSIVE_BAD 0x00020000 //131072
|
||||
#define OPINIONFLAG_STAGE3_SOLVECONFLICT_AGGRESSIVE_BAD 0x00040000 //262144
|
||||
#define OPINIONFLAG_STAGE4_SOLVECONFLICT_AGGRESSIVE_BAD 0x00080000 //524288
|
||||
|
||||
/*#define OPINIONFLAG_STAGE1_AGAINST_US 0x00100000 //1048576 // was against us in dialogue
|
||||
#define OPINIONFLAG_STAGE2_AGAINST_US 0x00200000 //2097152
|
||||
#define OPINIONFLAG_STAGE3_AGAINST_US 0x00400000 //4194304
|
||||
#define OPINIONFLAG_STAGE4_AGAINST_US 0x00800000 //8388608
|
||||
|
||||
#define OPINIONFLAG_STAGE1_FOR_US 0x01000000 //16777216 // other guy was for us in dialogue
|
||||
#define OPINIONFLAG_STAGE2_FOR_US 0x02000000 //33554432
|
||||
#define OPINIONFLAG_STAGE3_FOR_US 0x04000000 //67108864
|
||||
#define OPINIONFLAG_STAGE4_FOR_US 0x08000000 //134217728
|
||||
|
||||
#define OPINIONFLAG_STAGE1_AGAINST_ENEMY 0x10000000 //268435456 // was against our dialogue enemy in dialogue
|
||||
#define OPINIONFLAG_STAGE2_AGAINST_ENEMY 0x20000000 //536870912
|
||||
#define OPINIONFLAG_STAGE3_AGAINST_ENEMY 0x40000000 //1073741824
|
||||
#define OPINIONFLAG_STAGE4_AGAINST_ENEMY 0x80000000 //2147483648*/
|
||||
|
||||
#define OPINIONFLAG_STAGE1_ALL 0x11111111 // flags of all first stages, used when rolling over
|
||||
#define OPINIONFLAG_STAGE4_ALL 0x88888888 // flags of all final stages, used when rolling over
|
||||
// ----------------------------------------------------------------
|
||||
|
||||
|
||||
// we have several 'roles' in a dialogue for now:
|
||||
// victim - a merc initiating dialogue because an event has happened to him (can also be a positive thing)
|
||||
// cause - the merc that caused the event through his behaviour
|
||||
// interjector - an person that is neither victim nor cause and attemtps to solve the situation, the player can control his/her actions
|
||||
// speaker - whoever speaks the current line, for no one of the above
|
||||
typedef enum
|
||||
{
|
||||
// opinion event has occured and a merc points that out to ...
|
||||
DOST_VICTIM_INITIATE, // victim begins dialogue
|
||||
|
||||
DOST_VICTIM_TO_INTERJECTOR_DENY, // victim denies what interjector said
|
||||
DOST_VICTIM_TO_INTERJECTOR_AGREE, // victim agrees what interjector said
|
||||
|
||||
DOST_CAUSE_TO_VICTIM_DENY, // cause denies victim's accusation
|
||||
DOST_CAUSE_TO_VICTIM_AGREE, // cause accepts responsibility to victim
|
||||
|
||||
DOST_CAUSE_TO_INTERJECTOR_DENY, // cause denies what interjector said
|
||||
DOST_CAUSE_TO_INTERJECTOR_AGREE, // cause agrees what interjector said
|
||||
|
||||
DOST_INTERJECTOR_DIALOGUESELECTION, // special: creates the interjector dialogue selection
|
||||
|
||||
DOST_INTERJECTOR_TO_VICTIM_DENY, // interjector denies victim's accusation
|
||||
DOST_INTERJECTOR_TO_VICTIM_AGREE, // interjectorinterjector agrees to victim that cause is to blame
|
||||
|
||||
DOST_INTERJECTOR_TO_CAUSE_DENY, // interjector denies victim denial
|
||||
DOST_INTERJECTOR_TO_CAUSE_AGREE, // interjector agrees that victim is not to blame
|
||||
|
||||
DOST_INTERJECTOR_SOLVE_REASON, // interjector tries to solve the situation peacefully
|
||||
DOST_INTERJECTOR_SOLVE_AGGRESSIVE, // interjector tries to solve the situation aggressively
|
||||
|
||||
DOST_INTERJECTOR_NOTHING, // interjector decides to say nothing
|
||||
|
||||
DOST_SIDEWITH_VICTIM, // another person sides with victim
|
||||
DOST_SIDEWITH_CAUSE, // another person sides with cause
|
||||
|
||||
DOST_MAX,
|
||||
|
||||
} DynamicOpinionSpeechType;
|
||||
|
||||
// the different choices we can take when selecting what approach to use in dialogue
|
||||
enum
|
||||
{
|
||||
DOST_CHOICE_NOTHING = 0,
|
||||
DOST_CHOICE_SIDEWITH_VICTIM,
|
||||
DOST_CHOICE_SIDEWITH_CAUSE,
|
||||
DOST_CHOICE_REASON,
|
||||
DOST_CHOICE_AGGRESSIVE,
|
||||
|
||||
DOST_CHOICE_MAX
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
DOST_POSITION_LEFT,
|
||||
DOST_POSITION_RIGHT,
|
||||
DOST_POSITION_MIDDLE,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
DOST_PRIORITY_LOW, // can be handled hours later if needed
|
||||
DOST_PRIORITY_NORMAL, // normal priority
|
||||
DOST_PRIORITY_HIGH, // urgent, handle as soon as possible
|
||||
|
||||
DOST_PRIORITY_MAX
|
||||
};
|
||||
|
||||
typedef struct OpinionEvent
|
||||
{
|
||||
OpinionEvent( ) :
|
||||
ubEventId( 0 ),
|
||||
ubProfileComplainant( NO_PROFILE ),
|
||||
ubProfileCause( NO_PROFILE ),
|
||||
usSector( 0 )
|
||||
{}
|
||||
|
||||
UINT8 ubEventId; // the dynamic opinion event this is all about
|
||||
UINT8 ubProfileComplainant; // the merc who started this dialogue by complaining
|
||||
UINT8 ubProfileCause; // the merc who caused the event
|
||||
UINT8 usSector; // sector of incident
|
||||
} OpinionEvent;
|
||||
|
||||
#define DOST_INTERJECTORS_MAX 4
|
||||
|
||||
typedef struct DynamicOpinionSpeechEvent_EventData
|
||||
{
|
||||
DynamicOpinionSpeechEvent_EventData( ) :
|
||||
event( ),
|
||||
usId( 0 ),
|
||||
usPriority( 0 ),
|
||||
ubProfileINTERJECTOR( NO_PROFILE )
|
||||
{}
|
||||
|
||||
OpinionEvent event; // the event that this is all about
|
||||
|
||||
UINT16 usId; // id that signifies wether dialogue belongs to this event or another one
|
||||
UINT8 usPriority; // priority of event, used when determining which event will be handled next
|
||||
|
||||
// other mercs an interfere in the dialogue
|
||||
UINT8 ubProfileINTERJECTOR; // if an INTERJECTOR tries to solve the situation, it'll be this guy
|
||||
|
||||
// several other mercs can agree with either cause or complainant. Most of the time, these guys will have similar events at the time, which will simply be merged
|
||||
// the goal is to have less dialogue events while making them somewhat deeper
|
||||
UINT8 ubProfileSideCause[DOST_INTERJECTORS_MAX];
|
||||
UINT8 ubProfileSideComplainant[DOST_INTERJECTORS_MAX];
|
||||
|
||||
} DynamicOpinionSpeechEvent_EventData;
|
||||
|
||||
typedef struct DynamicOpinionSpeechEvent
|
||||
{
|
||||
DynamicOpinionSpeechEvent( ) :
|
||||
data( ),
|
||||
usStarttime( 0 ),
|
||||
ubEventType( DOST_INTERJECTOR_NOTHING ),
|
||||
usQueueNumber( 0 ),
|
||||
usSpeaker( NO_PROFILE ),
|
||||
usSide( DOST_POSITION_LEFT ),
|
||||
usNumonside( 0 )
|
||||
{}
|
||||
|
||||
DynamicOpinionSpeechEvent_EventData data;
|
||||
|
||||
UINT32 usStarttime; // time this dialogue should be displayed
|
||||
|
||||
UINT8 ubEventType; // kind of speech event (from DynamicOpinionSpeechType)
|
||||
UINT8 usQueueNumber; // number of this dialogue bit in the event's queue
|
||||
UINT8 usSpeaker; // the merc who says this
|
||||
UINT8 usSide; // side with ubProfileComplainant (DOST_POSITION_LEFT), ubProfileCause (DOST_POSITION_RIGHT) or stay neutral (DOST_POSITION_MIDDLE)
|
||||
|
||||
UINT8 usNumonside; // this argument is the x'th on this side
|
||||
UINT8 usFiller[3]; // to appease the petty gods of padding AGAIN
|
||||
} DynamicOpinionSpeechEvent;
|
||||
|
||||
|
||||
|
||||
void CleanDynamicOpinionSpeechEvents( );
|
||||
void AddDynamicOpinionEvent_New( OpinionEvent aEvent );
|
||||
void AddDynamicOpinionEvent_Continue( DynamicOpinionSpeechEvent aEvent );
|
||||
void CreateSpeechEventsFromDynamicOpinionEvent( DynamicOpinionSpeechEvent aEvent );
|
||||
void HandleDynamicOpinionSpeechEvents( );
|
||||
void StartDynamicOpinionDialogue( );
|
||||
void PerformPossibleDynamicOpinionEventMerges( );
|
||||
|
||||
BOOLEAN DynamicOpinionTacticalCharacterDialogue( DynamicOpinionSpeechEvent& aEvent );
|
||||
|
||||
INT8 GetSidePosition( UINT8 aDostPosition );
|
||||
|
||||
BOOLEAN DynamicOpinionSpeechInProgress( );
|
||||
void SetfDynamicOpinionSpeechInProgress( BOOLEAN aVal );
|
||||
|
||||
BOOLEAN SaveDynamicDialogue( HWFILE hwFile );
|
||||
BOOLEAN LoadDynamicDialogue( HWFILE hwFile );
|
||||
|
||||
|
||||
// modify usProfileA's opinion of usProfileB because of usEvent
|
||||
void AddOpinionEvent( UINT8 usProfileA, UINT8 usProfileB, UINT8 usEvent, BOOLEAN fStartDialogue = TRUE );
|
||||
|
||||
// get usProfileA's opinion of usProfileB on one of the last 4 days
|
||||
INT8 GetDynamicOpinionDay( UINT8 usProfileA, UINT8 usProfileB, UINT8 usDay );
|
||||
|
||||
// get usProfileA's opinion of usProfileB concerning usEvent
|
||||
INT8 GetDynamicOpinion( UINT8 usProfileA, UINT8 usProfileB, UINT8 usEvent );
|
||||
|
||||
// daily rollover of opinions
|
||||
void HandleDynamicOpinionsDailyRefresh( );
|
||||
|
||||
// a day has passed, 'age' opinions
|
||||
void RolloverDynamicOpinions( UINT8 usProfileA );
|
||||
|
||||
// check wether other people are friends with someone else we hate. All persons must be in Arulco
|
||||
void CheckForFriendsofHated( SOLDIERTYPE* pSoldier );
|
||||
|
||||
void HandleDynamicOpinionOnContractExtension( UINT8 ubCode, UINT8 usProfile );
|
||||
void HandleDynamicOpinionBattleLosses( );
|
||||
void HandleDynamicOpinionRetreat( );
|
||||
void HandleDynamicOpinionTeamDrinking( SOLDIERTYPE* pSoldier );
|
||||
|
||||
// get id of a random merc in a sector, provided one exists
|
||||
UINT8 GetRandomMercInSectorNotInList( INT16 sX, INT16 sY, INT8 sZ, std::vector<UINT8> aTaboo, BOOLEAN fImpOnly );
|
||||
|
||||
UINT8 GetFittingInterjectorProfile( UINT8 usEvent, UINT8 usProfileVictim, UINT8 usProfileCause );
|
||||
|
||||
UINT8 HighestInventoryCoolness( SOLDIERTYPE* pSoldier );
|
||||
|
||||
void HandleDynamicOpinionChange( SOLDIERTYPE* pSoldier, UINT8 usEvent, BOOLEAN fOffender, BOOLEAN fStartDialogue );
|
||||
|
||||
#endif
|
||||
+2
-4
@@ -3182,11 +3182,11 @@ void SetupFinalTalkingDelay( FACETYPE *pFace )
|
||||
if ( gGameSettings.fOptions[ TOPTION_SUBTITLES ] )
|
||||
{
|
||||
//pFace->uiTalkingDuration = FINAL_TALKING_DURATION;
|
||||
pFace->uiTalkingDuration = 300;
|
||||
pFace->uiTalkingDuration = 5000;
|
||||
}
|
||||
else
|
||||
{
|
||||
pFace->uiTalkingDuration = 300;
|
||||
pFace->uiTalkingDuration = 5000;
|
||||
}
|
||||
|
||||
pFace->sMouthFrame = 0;
|
||||
@@ -3220,6 +3220,4 @@ void SetupFinalTalkingDelay( FACETYPE *pFace )
|
||||
|
||||
// Set final delay!
|
||||
pFace->fValidSpeech = FALSE;
|
||||
|
||||
|
||||
}
|
||||
|
||||
+2
-1
@@ -25,6 +25,7 @@
|
||||
#include "Facilities.h"
|
||||
#include "Soldier macros.h"
|
||||
#include "strategicmap.h"
|
||||
#include "DynamicDialogue.h" // added by Flugente
|
||||
#endif
|
||||
|
||||
//forward declarations of common classes to eliminate includes
|
||||
@@ -618,7 +619,7 @@ void HourlyFoodAutoDigestion( SOLDIERTYPE *pSoldier )
|
||||
}
|
||||
|
||||
// dynamic opinions: if we're still really hungry an someone in this sector has food, we get a lwoer opinion of him, as he obviously doesn't share
|
||||
HandleDynamicOpinionFoodSharing( pSoldier );
|
||||
HandleDynamicOpinionChange( pSoldier, OPINIONEVENT_NOSHARINGFOOD, FALSE, FALSE );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
#include "Map Screen Interface Bottom.h"
|
||||
#include "Quests.h"
|
||||
#include "GameSettings.h"
|
||||
#include "DynamicDialogue.h"// added by Flugente
|
||||
#endif
|
||||
#include "connect.h"
|
||||
|
||||
|
||||
+36
-922
@@ -31,6 +31,7 @@
|
||||
#include "finances.h" // added by Flugente for EXTENDED_CONTRACT_BY_1_DAY
|
||||
#include "Soldier Add.h" // added by Flugente for MERC_TYPE__AIM_MERC
|
||||
#include "CampaignStats.h" // added by Flugente for gCurrentIncident
|
||||
#include "DynamicDialogue.h" // added by Flugente
|
||||
#endif
|
||||
|
||||
#include "connect.h"
|
||||
@@ -112,6 +113,40 @@ MoraleEvent gbMoraleEvent[NUM_MORALE_EVENTS] =
|
||||
{ STRATEGIC_MORALE_EVENT, -1}, //MORALE_PREVENTED_MISBEHAVIOUR,
|
||||
};
|
||||
|
||||
// Flugente: dynamic opinions
|
||||
DynamicOpinionEvent gDynamicOpinionEvent[OPINIONEVENT_MAX] =
|
||||
{
|
||||
{ OPINIONEVENT_FRIENDLYFIRE, -10, TRUE, FALSE, FALSE, FALSE },
|
||||
{ OPINIONEVENT_SNITCHSOLDMEOUT, -3, FALSE, FALSE, FALSE, FALSE },
|
||||
{ OPINIONEVENT_SNITCHINTERFERENCE, -5, FALSE, FALSE, FALSE, FALSE },
|
||||
{ OPINIONEVENT_FRIENDSWITHHATED, -4, FALSE, FALSE, FALSE, FALSE },
|
||||
{ OPINIONEVENT_CONTRACTEXTENSION, -2, FALSE, FALSE, FALSE, FALSE },
|
||||
{ OPINIONEVENT_ORDEREDRETREAT, -6, TRUE, FALSE, TRUE, TRUE },
|
||||
{ OPINIONEVENT_CIVKILLER, -8, FALSE, FALSE, FALSE, FALSE },
|
||||
{ OPINIONEVENT_SLOWSUSDOWN, -2, FALSE, TRUE, FALSE, TRUE },
|
||||
{ OPINIONEVENT_NOSHARINGFOOD, -1, TRUE, FALSE, TRUE, FALSE },
|
||||
{ OPINIONEVENT_ANNOYINGDISABILITY, -2, TRUE, FALSE, TRUE, FALSE },
|
||||
{ OPINIONEVENT_ADDICT, -6, TRUE, FALSE, TRUE, FALSE },
|
||||
{ OPINIONEVENT_THIEF, -5, TRUE, FALSE, TRUE, FALSE },
|
||||
{ OPINIONEVENT_WORSTCOMMANDEREVER, -7, TRUE, FALSE, FALSE, TRUE },
|
||||
{ OPINIONEVENT_RICHGUY, -1, FALSE, FALSE, FALSE, FALSE },
|
||||
{ OPINIONEVENT_BETTERGEAR, -2, TRUE, FALSE, FALSE, TRUE },
|
||||
{ OPINIONEVENT_YOUMOUNTEDAGUNONMYBREASTS, -3, TRUE, FALSE, FALSE, TRUE },
|
||||
{ OPINIONEVENT_BANDAGED, 1, TRUE, FALSE, FALSE, FALSE },
|
||||
{ OPINIONEVENT_DRINKBUDDIES_GOOD, 1, TRUE, FALSE, TRUE, FALSE },
|
||||
{ OPINIONEVENT_DRINKBUDDIES_SUPER, 4, TRUE, FALSE, TRUE, FALSE },
|
||||
{ OPINIONEVENT_DRINKBUDDIES_BAD, -1, TRUE, FALSE, TRUE, FALSE },
|
||||
{ OPINIONEVENT_DRINKBUDDIES_WORSE, -4, TRUE, FALSE, TRUE, FALSE },
|
||||
{OPINIONEVENT_AGAINST_US, -2, TRUE, FALSE, TRUE, FALSE},
|
||||
{OPINIONEVENT_FOR_US, 2, TRUE, FALSE, TRUE, FALSE},
|
||||
{OPINIONEVENT_AGAINST_ENEMY, 1, TRUE, FALSE, TRUE, FALSE},
|
||||
{OPINIONEVENT_FOR_ENEMY, -1, TRUE, FALSE, TRUE, FALSE},
|
||||
{OPINIONEVENT_SOLVECONFLICT_REASON_GOOD, 2, TRUE, FALSE, TRUE, FALSE},
|
||||
{OPINIONEVENT_SOLVECONFLICT_REASON_BAD, -2, TRUE, FALSE, TRUE, FALSE},
|
||||
{OPINIONEVENT_SOLVECONFLICT_AGGRESSIVE_GOOD, 3, TRUE, FALSE, TRUE, FALSE},
|
||||
{OPINIONEVENT_SOLVECONFLICT_AGGRESSIVE_BAD, -3, TRUE, FALSE, TRUE, FALSE},
|
||||
};
|
||||
|
||||
BOOLEAN gfSomeoneSaidMoraleQuote = FALSE;
|
||||
|
||||
BOOLEAN IsShowOffNearBy( SOLDIERTYPE * pSoldier ); // Added by SANDRO
|
||||
@@ -295,7 +330,7 @@ void DecayTacticalMoraleModifiers( void )
|
||||
HandleMoraleEvent( pSoldier, MORALE_NERVOUS_ALONE, pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ );
|
||||
|
||||
// Flugente: dynamic opinions
|
||||
HandleDynamicOpinionDisability( pSoldier );
|
||||
HandleDynamicOpinionChange( pSoldier, OPINIONEVENT_ANNOYINGDISABILITY, TRUE, TRUE );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1656,924 +1691,3 @@ BOOLEAN IsShowOffNearBy( SOLDIERTYPE * pSoldier )
|
||||
|
||||
return( fYesHeIs );
|
||||
}
|
||||
|
||||
// Flugente: calculate A's opinion of B
|
||||
INT8 SoldierRelation( SOLDIERTYPE* pSoldierA, SOLDIERTYPE* pSoldierB)
|
||||
{
|
||||
INT8 bOpinion = 0;
|
||||
|
||||
if ( !OKToCheckOpinion(pSoldierA->ubProfile) || !OKToCheckOpinion(pSoldierB->ubProfile) )
|
||||
return 0;
|
||||
|
||||
MERCPROFILESTRUCT* pProfile = &(gMercProfiles[ pSoldierA->ubProfile ]);
|
||||
|
||||
bOpinion = pProfile->bMercOpinion[ pSoldierB->ubProfile ];
|
||||
|
||||
// Flugente: evaluate appearance/refinement/hated nationalities
|
||||
|
||||
// some people loathe ugly people and like beautiful people. It's a mean world.
|
||||
// we also handle sexism here
|
||||
switch ( gMercProfiles[ pSoldierB->ubProfile ].bAppearance )
|
||||
{
|
||||
case APPEARANCE_UGLY:
|
||||
{
|
||||
if ( pProfile->bAppearanceCareLevel == CARELEVEL_SOME )
|
||||
bOpinion -= gGameExternalOptions.sMoraleModAppearance * 2;
|
||||
else if ( pProfile->bAppearanceCareLevel == CARELEVEL_EXTREME )
|
||||
bOpinion -= gGameExternalOptions.sMoraleModAppearance * 4;
|
||||
|
||||
// some people are sexists
|
||||
if ( pProfile->bSexist && gMercProfiles[ pSoldierB->ubProfile ].bSex != pProfile->bSex )
|
||||
{
|
||||
if ( pProfile->bSexist == SOMEWHAT_SEXIST )
|
||||
bOpinion -= gGameExternalOptions.sMoraleModSexism * 2;
|
||||
else if ( pProfile->bSexist == VERY_SEXIST )
|
||||
bOpinion -= gGameExternalOptions.sMoraleModSexism * 4;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case APPEARANCE_HOMELY:
|
||||
{
|
||||
if ( pProfile->bAppearanceCareLevel == CARELEVEL_SOME )
|
||||
bOpinion -= gGameExternalOptions.sMoraleModAppearance;
|
||||
else if ( pProfile->bAppearanceCareLevel == CARELEVEL_EXTREME )
|
||||
bOpinion -= gGameExternalOptions.sMoraleModAppearance * 2;
|
||||
|
||||
// some people are sexists
|
||||
if ( pProfile->bSexist && gMercProfiles[ pSoldierB->ubProfile ].bSex != pProfile->bSex )
|
||||
{
|
||||
if ( pProfile->bSexist == SOMEWHAT_SEXIST )
|
||||
bOpinion -= gGameExternalOptions.sMoraleModSexism;
|
||||
else if ( pProfile->bSexist == VERY_SEXIST )
|
||||
bOpinion -= gGameExternalOptions.sMoraleModSexism * 2;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case APPEARANCE_ATTRACTIVE:
|
||||
{
|
||||
if ( pProfile->bAppearanceCareLevel == CARELEVEL_SOME )
|
||||
bOpinion += gGameExternalOptions.sMoraleModAppearance;
|
||||
else if ( pProfile->bAppearanceCareLevel == CARELEVEL_EXTREME )
|
||||
bOpinion += gGameExternalOptions.sMoraleModAppearance * 2;
|
||||
|
||||
// some people are sexists
|
||||
if ( pProfile->bSexist && gMercProfiles[ pSoldierB->ubProfile ].bSex != pProfile->bSex )
|
||||
{
|
||||
if ( pProfile->bSexist == SOMEWHAT_SEXIST )
|
||||
bOpinion += gGameExternalOptions.sMoraleModSexism;
|
||||
else if ( pProfile->bSexist == VERY_SEXIST )
|
||||
bOpinion += gGameExternalOptions.sMoraleModSexism * 2;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case APPEARANCE_BABE:
|
||||
{
|
||||
if ( pProfile->bAppearanceCareLevel == CARELEVEL_SOME )
|
||||
bOpinion += gGameExternalOptions.sMoraleModAppearance * 2;
|
||||
else if ( pProfile->bAppearanceCareLevel == CARELEVEL_EXTREME )
|
||||
bOpinion += gGameExternalOptions.sMoraleModAppearance * 4;
|
||||
|
||||
// some people are sexists
|
||||
if ( pProfile->bSexist && gMercProfiles[ pSoldierB->ubProfile ].bSex != pProfile->bSex )
|
||||
{
|
||||
if ( pProfile->bSexist == SOMEWHAT_SEXIST )
|
||||
bOpinion += gGameExternalOptions.sMoraleModSexism * 2;
|
||||
else if ( pProfile->bSexist == VERY_SEXIST )
|
||||
bOpinion += gGameExternalOptions.sMoraleModSexism * 4;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// some people care about how distuingished other people are. Malus if on different ends of the spectrum, a small bonus if on the same and its really important to the person
|
||||
// also give a malus if the other person is a slob or snob and we are average but care extremely (we don't like people who behave differently)
|
||||
// if we don't care, doesn't matter
|
||||
if ( pProfile->bRefinementCareLevel == CARELEVEL_NONE )
|
||||
{
|
||||
// nothing to do...
|
||||
}
|
||||
// if we care somewhat, malus on slob/snob
|
||||
else if ( pProfile->bRefinementCareLevel == CARELEVEL_SOME )
|
||||
{
|
||||
if ( pProfile->bRefinement * gMercProfiles[pSoldierB->ubProfile].bRefinement == 2 )
|
||||
bOpinion -= gGameExternalOptions.sMoraleModRefinement;
|
||||
}
|
||||
// if we care extremely, reward for similarity, malus otherwise
|
||||
else //if( pProfile->bRefinementCareLevel == CARELEVEL_EXTREME )
|
||||
{
|
||||
if ( pProfile->bRefinement * gMercProfiles[pSoldierB->ubProfile].bRefinement == 2 )
|
||||
bOpinion -= 2 * gGameExternalOptions.sMoraleModRefinement;
|
||||
else if ( pProfile->bRefinement * gMercProfiles[pSoldierB->ubProfile].bRefinement == 0 )
|
||||
bOpinion -= gGameExternalOptions.sMoraleModRefinement;
|
||||
else
|
||||
bOpinion += gGameExternalOptions.sMoraleModRefinement;
|
||||
}
|
||||
|
||||
// some people hate other nationalities (do not mix up with racism, which uses bRace)
|
||||
if ( pProfile->bHatedNationality > -1 && gMercProfiles[ pSoldierB->ubProfile ].bNationality == pProfile->bHatedNationality )
|
||||
{
|
||||
if ( pProfile->bHatedNationalityCareLevel == CARELEVEL_SOME )
|
||||
bOpinion -= gGameExternalOptions.sMoraleModHatedNationality;
|
||||
else if ( pProfile->bHatedNationalityCareLevel == CARELEVEL_EXTREME )
|
||||
bOpinion -= gGameExternalOptions.sMoraleModHatedNationality * 2;
|
||||
}
|
||||
|
||||
// some people are racists
|
||||
if ( pProfile->bRacist && gMercProfiles[ pSoldierB->ubProfile ].bRace != pProfile->bRace )
|
||||
{
|
||||
if ( pProfile->bRacist == RACIST_SOME )
|
||||
bOpinion -= gGameExternalOptions.sMoraleModRacism;
|
||||
else if ( pProfile->bRacist == RACIST_VERY )
|
||||
bOpinion -= gGameExternalOptions.sMoraleModRacism * 2;
|
||||
}
|
||||
|
||||
// Flugente: backgrounds
|
||||
if ( pSoldierA->GetBackgroundValue( BG_DISLIKEBG ) && pSoldierA->GetBackgroundValue( BG_DISLIKEBG ) == -pSoldierB->GetBackgroundValue( BG_DISLIKEBG ) )
|
||||
{
|
||||
bOpinion -= 2;
|
||||
}
|
||||
|
||||
if ( pSoldierA->HasBackgroundFlag( BACKGROUND_XENOPHOBIC ) && pSoldierB->ubProfile != NO_PROFILE && gMercProfiles[pSoldierA->ubProfile].usBackground != gMercProfiles[pSoldierB->ubProfile].usBackground )
|
||||
bOpinion -= gGameExternalOptions.sMoraleModXenophobicBackGround;
|
||||
|
||||
// Flugente: dynamic opinions
|
||||
if ( gGameExternalOptions.fDynamicOpinions )
|
||||
{
|
||||
for ( UINT8 opinionevent = OPINIONEVENT_FRIENDLYFIRE; opinionevent < OPINIONEVENT_MAX; ++opinionevent )
|
||||
{
|
||||
bOpinion += GetDynamicOpinion( pSoldierA->ubProfile, pSoldierB->ubProfile, opinionevent );
|
||||
}
|
||||
}
|
||||
|
||||
// reasonable values
|
||||
bOpinion = min( BUDDY_OPINION, bOpinion );
|
||||
bOpinion = max( HATED_OPINION, bOpinion );
|
||||
|
||||
return bOpinion;
|
||||
}
|
||||
|
||||
// Flugente: dynamic opinions
|
||||
void AddOpinionEvent( UINT8 usProfileA, UINT8 usProfileB, UINT8 usEvent )
|
||||
{
|
||||
if ( usProfileA == NO_PROFILE || usProfileA == NO_PROFILE )
|
||||
return;
|
||||
|
||||
if ( usEvent >= OPINIONEVENT_MAX )
|
||||
return;
|
||||
|
||||
// we add a flag signifiying that an event happened today
|
||||
switch ( usEvent )
|
||||
{
|
||||
case OPINIONEVENT_FRIENDLYFIRE: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] |= OPINIONFLAG_STAGE1_FRIENDLYFIRE; break;
|
||||
case OPINIONEVENT_SNITCHSOLDMEOUT: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] |= OPINIONFLAG_STAGE1_SNITCHSOLDMEOUT; break;
|
||||
case OPINIONEVENT_SNITCHINTERFERENCE: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] |= OPINIONFLAG_STAGE1_INTERFERENCE; break;
|
||||
case OPINIONEVENT_FRIENDSWITHHATED: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] |= OPINIONFLAG_STAGE1_FRIENDSWITHHATED; break;
|
||||
case OPINIONEVENT_CONTRACTEXTENSION: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] |= OPINIONFLAG_STAGE1_CONTRACTEXTENSION; break;
|
||||
case OPINIONEVENT_ORDEREDRETREAT: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] |= OPINIONFLAG_STAGE1_ORDEREDRETREAT; break;
|
||||
case OPINIONEVENT_CIVKILLER: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] |= OPINIONFLAG_STAGE1_CIVKILLER; break;
|
||||
case OPINIONEVENT_SLOWSUSDOWN: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] |= OPINIONFLAG_STAGE1_SLOWSUSDOWN; break;
|
||||
|
||||
case OPINIONEVENT_NOSHARINGFOOD: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] |= OPINIONFLAG_STAGE1_NOSHARINGFOOD; break;
|
||||
case OPINIONEVENT_ANNOYINGDISABILITY: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] |= OPINIONFLAG_STAGE1_ANNOYINGDISABILITY; break;
|
||||
case OPINIONEVENT_ADDICT: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] |= OPINIONFLAG_STAGE1_ADDICT; break;
|
||||
case OPINIONEVENT_THIEF: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] |= OPINIONFLAG_STAGE1_THIEF; break;
|
||||
case OPINIONEVENT_WORSTCOMMANDEREVER: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] |= OPINIONFLAG_STAGE1_WORSTCOMMANDEREVER; break;
|
||||
case OPINIONEVENT_RICHGUY: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] |= OPINIONFLAG_STAGE1_RICHGUY; break;
|
||||
case OPINIONEVENT_BETTERGEAR: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] |= OPINIONFLAG_STAGE1_BETTERGEAR; break;
|
||||
case OPINIONEVENT_YOUMOUNTEDAGUNONMYBREASTS: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] |= OPINIONFLAG_STAGE1_YOUMOUNTEDAGUNONMYBREASTS; break;
|
||||
|
||||
case OPINIONEVENT_BANDAGED: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] |= OPINIONFLAG_STAGE1_BANDAGED; break;
|
||||
|
||||
// drinking flags are a bit different - drinking can apply the GOOD or BAD flag, and they cancel each other out.
|
||||
// GOOD on GOOD causes SUPER, which cannot be removed (and stops this for today)
|
||||
// BAD on BAD causes WORSE, which cannot be removed (and stops this for today)
|
||||
case OPINIONEVENT_DRINKBUDDIES_GOOD:
|
||||
// if we do not already have the SUPER flag...
|
||||
if ( !(gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & (OPINIONFLAG_STAGE1_DRINKBUDDIES_SUPER | OPINIONFLAG_STAGE1_DRINKBUDDIES_WORSE)) )
|
||||
{
|
||||
// if we already have GOOD, get SUPER
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE1_DRINKBUDDIES_GOOD )
|
||||
{
|
||||
gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] |= OPINIONFLAG_STAGE1_DRINKBUDDIES_SUPER;
|
||||
gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] &= ~OPINIONFLAG_STAGE1_DRINKBUDDIES_GOOD;
|
||||
}
|
||||
// if we have BAD, cancel it out
|
||||
else if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE1_DRINKBUDDIES_BAD )
|
||||
gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] &= ~OPINIONFLAG_STAGE1_DRINKBUDDIES_BAD;
|
||||
// if we have nothing, get GOOD
|
||||
else
|
||||
gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] |= OPINIONFLAG_STAGE1_DRINKBUDDIES_GOOD;
|
||||
}
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_DRINKBUDDIES_BAD:
|
||||
// if we do not already have the SUPER flag...
|
||||
if ( !(gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & (OPINIONFLAG_STAGE1_DRINKBUDDIES_SUPER | OPINIONFLAG_STAGE1_DRINKBUDDIES_WORSE)) )
|
||||
{
|
||||
// if we already have BAD, get WORSE
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE1_DRINKBUDDIES_BAD )
|
||||
{
|
||||
gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] |= OPINIONFLAG_STAGE1_DRINKBUDDIES_WORSE;
|
||||
gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] &= ~OPINIONFLAG_STAGE1_DRINKBUDDIES_BAD;
|
||||
}
|
||||
// if we have GOOD, cancel it out
|
||||
else if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE1_DRINKBUDDIES_GOOD )
|
||||
gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] &= ~OPINIONFLAG_STAGE1_DRINKBUDDIES_GOOD;
|
||||
// if we have nothing, get BAD
|
||||
else
|
||||
gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] |= OPINIONFLAG_STAGE1_DRINKBUDDIES_BAD;
|
||||
}
|
||||
break;
|
||||
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
// get usProfileA's opinion of usProfileB concerning usEvent
|
||||
INT8 GetDynamicOpinion( UINT8 usProfileA, UINT8 usProfileB, UINT8 usEvent )
|
||||
{
|
||||
INT32 opinion = 0;
|
||||
|
||||
if ( usProfileA == NO_PROFILE || usProfileA == NO_PROFILE )
|
||||
return opinion;
|
||||
|
||||
if ( usEvent >= OPINIONEVENT_MAX )
|
||||
return opinion;
|
||||
|
||||
// count how many relevant flags are set
|
||||
UINT8 numflags = 0;
|
||||
switch ( usEvent )
|
||||
{
|
||||
case OPINIONEVENT_FRIENDLYFIRE:
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE1_FRIENDLYFIRE) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE2_FRIENDLYFIRE ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE3_FRIENDLYFIRE ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE4_FRIENDLYFIRE ) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_SNITCHSOLDMEOUT:
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE1_SNITCHSOLDMEOUT ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE2_SNITCHSOLDMEOUT ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE3_SNITCHSOLDMEOUT ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE4_SNITCHSOLDMEOUT ) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_SNITCHINTERFERENCE:
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE1_INTERFERENCE ) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE2_INTERFERENCE) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE3_INTERFERENCE ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE4_INTERFERENCE ) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_FRIENDSWITHHATED:
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE1_FRIENDSWITHHATED ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE2_FRIENDSWITHHATED ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE3_FRIENDSWITHHATED ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE4_FRIENDSWITHHATED ) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_CONTRACTEXTENSION:
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE1_CONTRACTEXTENSION ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE2_CONTRACTEXTENSION ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE3_CONTRACTEXTENSION ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE4_CONTRACTEXTENSION ) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_ORDEREDRETREAT:
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE1_ORDEREDRETREAT ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE2_ORDEREDRETREAT ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE3_ORDEREDRETREAT ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE4_ORDEREDRETREAT ) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_CIVKILLER:
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE1_CIVKILLER ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE2_CIVKILLER ) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE3_CIVKILLER) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE4_CIVKILLER) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_SLOWSUSDOWN:
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE1_SLOWSUSDOWN) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE2_SLOWSUSDOWN) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE3_SLOWSUSDOWN) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE4_SLOWSUSDOWN) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_NOSHARINGFOOD:
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE1_NOSHARINGFOOD) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE2_NOSHARINGFOOD) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE3_NOSHARINGFOOD) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE4_NOSHARINGFOOD) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_ANNOYINGDISABILITY:
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE1_ANNOYINGDISABILITY) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE2_ANNOYINGDISABILITY) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE3_ANNOYINGDISABILITY) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE4_ANNOYINGDISABILITY) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_ADDICT:
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE1_ADDICT) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE2_ADDICT) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE3_ADDICT) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE4_ADDICT) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_THIEF:
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE1_THIEF) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE2_THIEF) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE3_THIEF) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE4_THIEF) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_WORSTCOMMANDEREVER:
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE1_WORSTCOMMANDEREVER) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE2_WORSTCOMMANDEREVER) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE3_WORSTCOMMANDEREVER) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE4_WORSTCOMMANDEREVER) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_RICHGUY:
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE1_RICHGUY) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE2_RICHGUY) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE3_RICHGUY) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE4_RICHGUY) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_BETTERGEAR:
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE1_BETTERGEAR) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE2_BETTERGEAR) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE3_BETTERGEAR) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE4_BETTERGEAR) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_YOUMOUNTEDAGUNONMYBREASTS:
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE1_YOUMOUNTEDAGUNONMYBREASTS) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE2_YOUMOUNTEDAGUNONMYBREASTS) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE3_YOUMOUNTEDAGUNONMYBREASTS) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE4_YOUMOUNTEDAGUNONMYBREASTS) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_BANDAGED:
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE1_BANDAGED ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE2_BANDAGED ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE3_BANDAGED ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE4_BANDAGED ) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_DRINKBUDDIES_GOOD:
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE1_DRINKBUDDIES_GOOD ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE2_DRINKBUDDIES_GOOD ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE3_DRINKBUDDIES_GOOD ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE4_DRINKBUDDIES_GOOD ) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_DRINKBUDDIES_SUPER:
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE1_DRINKBUDDIES_SUPER ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE2_DRINKBUDDIES_SUPER ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE3_DRINKBUDDIES_SUPER ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE4_DRINKBUDDIES_SUPER ) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_DRINKBUDDIES_BAD:
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE1_DRINKBUDDIES_BAD ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE2_DRINKBUDDIES_BAD ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE3_DRINKBUDDIES_BAD ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE4_DRINKBUDDIES_BAD ) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_DRINKBUDDIES_WORSE:
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE1_DRINKBUDDIES_WORSE ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE2_DRINKBUDDIES_WORSE ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE3_DRINKBUDDIES_WORSE ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE4_DRINKBUDDIES_WORSE ) ++numflags;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// event opinion is number of times this happened times opinion modifer
|
||||
opinion = numflags * gMoraleSettings.bDynamicOpinionModifiers[usEvent];
|
||||
|
||||
// cut it down to INT8
|
||||
return (INT8)opinion;
|
||||
}
|
||||
|
||||
// daily rollover of opinions
|
||||
void HandleDynamicOpinions( )
|
||||
{
|
||||
for ( UINT8 usProfile = 0; usProfile < NUM_PROFILES; ++usProfile )
|
||||
{
|
||||
// each profile has its opinions on everyone else renewed
|
||||
RolloverDynamicOpinions( usProfile );
|
||||
}
|
||||
|
||||
SOLDIERTYPE* pSoldier = NULL;
|
||||
UINT16 bMercID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
||||
UINT16 bLastTeamID = gTacticalStatus.Team[gbPlayerNum].bLastID;
|
||||
for ( pSoldier = MercPtrs[bMercID]; bMercID <= bLastTeamID; ++bMercID, pSoldier++ )
|
||||
{
|
||||
if ( pSoldier->bActive && pSoldier->ubProfile != NO_PROFILE &&
|
||||
!(pSoldier->bAssignment == IN_TRANSIT ||
|
||||
pSoldier->bAssignment == ASSIGNMENT_DEAD) )
|
||||
{
|
||||
// or each profile, check wether everyone else is a friend of someone else we hate
|
||||
CheckForFriendsofHated( pSoldier );
|
||||
|
||||
// get annoyed on mercs that receive a lot more money than we do
|
||||
HandleDynamicOpinionWageJealousy( pSoldier );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// a day has passed, 'age' opinions
|
||||
void RolloverDynamicOpinions( UINT8 usProfileA )
|
||||
{
|
||||
for ( UINT8 usProfileB = 0; usProfileB < NUM_PROFILES; ++usProfileB )
|
||||
{
|
||||
for ( UINT8 i = 0; i < OPINION_FLAGMASKS_NUMBER; ++i )
|
||||
{
|
||||
// events that are at stage 4 are forgotten
|
||||
gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][i] &= ~OPINIONFLAG_STAGE4_ALL;
|
||||
|
||||
// all other events move up one stage
|
||||
gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][i] = gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][i] << 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// check wether other people are friends with someone else we hate. All persons must be in Arulco
|
||||
void CheckForFriendsofHated( SOLDIERTYPE* pSoldier )
|
||||
{
|
||||
INT8 bMercID, bOtherID, bThirdID;
|
||||
INT8 bOpinion = -1;
|
||||
INT8 bSecondOpinion = -1;
|
||||
INT8 bLastTeamID;
|
||||
SOLDIERTYPE* pOtherSoldier;
|
||||
SOLDIERTYPE* pThirdSoldier;
|
||||
|
||||
bMercID = pSoldier->ubID;
|
||||
bLastTeamID = gTacticalStatus.Team[gbPlayerNum].bLastID;
|
||||
|
||||
// loop through all other mercs
|
||||
bOtherID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
||||
for ( pOtherSoldier = MercPtrs[bOtherID]; bOtherID <= bLastTeamID; ++bOtherID, pOtherSoldier++ )
|
||||
{
|
||||
// skip past ourselves and all inactive mercs
|
||||
if ( bOtherID != bMercID && pOtherSoldier->bActive && pOtherSoldier->ubProfile != NO_PROFILE &&
|
||||
!(pOtherSoldier->bAssignment == IN_TRANSIT ||
|
||||
pOtherSoldier->bAssignment == ASSIGNMENT_DEAD ) )
|
||||
{
|
||||
bOpinion = SoldierRelation( pSoldier, pOtherSoldier );
|
||||
|
||||
// we cannot simply check for HATED_OPINION here - this very feature makes opinions not so easy anymore. Simply check for a range
|
||||
if ( bOpinion < -20 )
|
||||
{
|
||||
// there is someone in our team that we hate. We dislike his friends somewhat, purely because they like our foe
|
||||
// loop through all other mercs
|
||||
bThirdID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
||||
for ( pThirdSoldier = MercPtrs[bThirdID]; bThirdID <= bLastTeamID; ++bThirdID, pThirdSoldier++ )
|
||||
{
|
||||
// skip past ourselves and all inactive mercs
|
||||
if ( bThirdID != bMercID && bThirdID != bOtherID && pThirdSoldier->bActive && pThirdSoldier->ubProfile != NO_PROFILE &&
|
||||
!(pThirdSoldier->bAssignment == IN_TRANSIT ||
|
||||
pThirdSoldier->bAssignment == ASSIGNMENT_DEAD) )
|
||||
{
|
||||
bSecondOpinion = SoldierRelation( pThirdSoldier, pOtherSoldier );
|
||||
|
||||
if ( bSecondOpinion > 20 )
|
||||
{
|
||||
// this guy is friends with someone we hate! We dislike him a bit for that
|
||||
AddOpinionEvent( pSoldier->ubProfile, pThirdSoldier->ubProfile, OPINIONEVENT_FRIENDSWITHHATED );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void HandleDynamicOpinionOnContractExtension( UINT8 ubCode, UINT8 usProfile )
|
||||
{
|
||||
if ( usProfile == NO_PROFILE )
|
||||
return;
|
||||
|
||||
if ( ubCode == EXTENDED_CONTRACT_BY_1_DAY || ubCode == EXTENDED_CONTRACT_BY_1_WEEK || ubCode == EXTENDED_CONTRACT_BY_2_WEEKS )
|
||||
{
|
||||
INT16 id = GetSoldierIDFromMercID( usProfile );
|
||||
if ( id > -1 )
|
||||
{
|
||||
SOLDIERTYPE* pSoldierWhoGotPaid = MercPtrs[id];
|
||||
|
||||
// only for AIM mercs
|
||||
if ( pSoldierWhoGotPaid->ubWhatKindOfMercAmI != MERC_TYPE__AIM_MERC )
|
||||
return;
|
||||
|
||||
// determine the remaining length of his contract BEFORE it go renewed
|
||||
INT32 oldcontract = pSoldierWhoGotPaid->iEndofContractTime;
|
||||
if ( ubCode == EXTENDED_CONTRACT_BY_1_DAY )
|
||||
oldcontract -= 1440;
|
||||
else if ( ubCode == EXTENDED_CONTRACT_BY_1_WEEK )
|
||||
oldcontract -= 7 * 1440;
|
||||
else if ( ubCode == EXTENDED_CONTRACT_BY_2_WEEKS )
|
||||
oldcontract -= 14 * 1440;
|
||||
|
||||
// someones contract got extended. Other mercs who have less time on their contract will be annoyed by this, as they feel they shoul be paid first
|
||||
SOLDIERTYPE* pSoldier = NULL;
|
||||
UINT16 bMercID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
||||
UINT16 bLastTeamID = gTacticalStatus.Team[gbPlayerNum].bLastID;
|
||||
for ( pSoldier = MercPtrs[bMercID]; bMercID <= bLastTeamID; ++bMercID, pSoldier++ )
|
||||
{
|
||||
if ( pSoldier->bActive && pSoldier->ubProfile != NO_PROFILE && pSoldier->ubProfile != usProfile &&
|
||||
!(pSoldier->bAssignment == IN_TRANSIT ||
|
||||
pSoldier->bAssignment == ASSIGNMENT_DEAD) )
|
||||
{
|
||||
// only for AIM mercs
|
||||
if ( pSoldier->ubProfile == NO_PROFILE || pSoldier->ubWhatKindOfMercAmI != MERC_TYPE__AIM_MERC )
|
||||
continue;
|
||||
|
||||
if ( pSoldier->iEndofContractTime < oldcontract )
|
||||
{
|
||||
// this guy got paid at a point where we had less time than he did! Favouritism!
|
||||
AddOpinionEvent( pSoldier->ubProfile, usProfile, OPINIONEVENT_CONTRACTEXTENSION );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void HandleDynamicOpinionCivKill( SOLDIERTYPE* pSoldier )
|
||||
{
|
||||
SOLDIERTYPE* pTeamSoldier = NULL;
|
||||
UINT16 bMercID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
||||
UINT16 bLastTeamID = gTacticalStatus.Team[gbPlayerNum].bLastID;
|
||||
for ( pTeamSoldier = MercPtrs[bMercID]; bMercID <= bLastTeamID; ++bMercID, pTeamSoldier++ )
|
||||
{
|
||||
if ( pTeamSoldier->bActive && pTeamSoldier->ubProfile != NO_PROFILE && pTeamSoldier->ubProfile != pSoldier->ubProfile &&
|
||||
!(pTeamSoldier->bAssignment == IN_TRANSIT ||
|
||||
pTeamSoldier->bAssignment == ASSIGNMENT_DEAD) )
|
||||
{
|
||||
if ( (gMercProfiles[pTeamSoldier->ubProfile].ubMiscFlags3 & PROFILE_MISC_FLAG3_GOODGUY) )
|
||||
{
|
||||
AddOpinionEvent( pTeamSoldier->ubProfile, pSoldier->ubProfile, OPINIONEVENT_CIVKILLER );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void HandleDynamicOpinionSlowdown( SOLDIERTYPE* pSoldier )
|
||||
{
|
||||
if ( !pSoldier || pSoldier->ubProfile == NO_PROFILE )
|
||||
return;
|
||||
|
||||
INT32 iPercentEncumbranceOffended = CalculateCarriedWeight( pSoldier );
|
||||
if ( iPercentEncumbranceOffended > 100 )
|
||||
{
|
||||
// everyone else on the same squad gets annoyed, if they aren't overencumbered themselves, or at least not as much as the offender
|
||||
SOLDIERTYPE* pTeamSoldier = NULL;
|
||||
UINT16 bMercID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
||||
UINT16 bLastTeamID = gTacticalStatus.Team[gbPlayerNum].bLastID;
|
||||
for ( pTeamSoldier = MercPtrs[bMercID]; bMercID <= bLastTeamID; ++bMercID, pTeamSoldier++ )
|
||||
{
|
||||
if ( pTeamSoldier->bActive && pTeamSoldier->ubProfile != NO_PROFILE && pTeamSoldier->ubProfile != pSoldier->ubProfile && pTeamSoldier->bAssignment == pSoldier->bAssignment &&
|
||||
!(pTeamSoldier->bAssignment == IN_TRANSIT ||
|
||||
pTeamSoldier->bAssignment == ASSIGNMENT_DEAD) )
|
||||
{
|
||||
INT32 iPercentEncumbrance = CalculateCarriedWeight( pTeamSoldier );
|
||||
|
||||
if ( iPercentEncumbrance < 100 || iPercentEncumbrance < 0.7 * iPercentEncumbranceOffended )
|
||||
{
|
||||
AddOpinionEvent( pTeamSoldier->ubProfile, pSoldier->ubProfile, OPINIONEVENT_SLOWSUSDOWN );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void HandleDynamicOpinionWageJealousy( SOLDIERTYPE* pSoldier )
|
||||
{
|
||||
if ( !pSoldier || pSoldier->ubProfile == NO_PROFILE )
|
||||
return;
|
||||
|
||||
if ( !pSoldier->iTotalContractLength || (pSoldier->ubWhatKindOfMercAmI != MERC_TYPE__AIM_MERC && pSoldier->ubWhatKindOfMercAmI != MERC_TYPE__MERC && pSoldier->ubWhatKindOfMercAmI != MERC_TYPE__NPC_WITH_UNEXTENDABLE_CONTRACT) )
|
||||
return;
|
||||
|
||||
// determine our mean daily wage
|
||||
UINT32 meanwage = gMercProfiles[pSoldier->ubProfile].uiTotalCostToDate / pSoldier->iTotalContractLength;
|
||||
|
||||
UINT8 explevel = pSoldier->stats.bExpLevel;
|
||||
|
||||
// hu?
|
||||
if ( !explevel )
|
||||
return;
|
||||
|
||||
SOLDIERTYPE* pTeamSoldier = NULL;
|
||||
UINT16 bMercID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
||||
UINT16 bLastTeamID = gTacticalStatus.Team[gbPlayerNum].bLastID;
|
||||
for ( pTeamSoldier = MercPtrs[bMercID]; bMercID <= bLastTeamID; ++bMercID, pTeamSoldier++ )
|
||||
{
|
||||
if ( pTeamSoldier->bActive && pTeamSoldier->ubProfile != NO_PROFILE && pTeamSoldier->ubProfile != pSoldier->ubProfile &&
|
||||
!(pTeamSoldier->bAssignment == IN_TRANSIT ||
|
||||
pTeamSoldier->bAssignment == ASSIGNMENT_DEAD) )
|
||||
{
|
||||
if ( !pTeamSoldier->iTotalContractLength || (pTeamSoldier->ubWhatKindOfMercAmI != MERC_TYPE__AIM_MERC && pTeamSoldier->ubWhatKindOfMercAmI != MERC_TYPE__MERC && pTeamSoldier->ubWhatKindOfMercAmI != MERC_TYPE__NPC_WITH_UNEXTENDABLE_CONTRACT) )
|
||||
continue;
|
||||
|
||||
// their wage
|
||||
UINT32 theirmeanwage = gMercProfiles[pTeamSoldier->ubProfile].uiTotalCostToDate / pTeamSoldier->iTotalContractLength;
|
||||
|
||||
// adjust this for experience levels
|
||||
FLOAT explevelfactor = gGameExternalOptions.fDynamicWageFactor * pTeamSoldier->stats.bExpLevel / explevel;
|
||||
|
||||
if ( theirmeanwage > explevelfactor * meanwage )
|
||||
{
|
||||
AddOpinionEvent( pSoldier->ubProfile, pTeamSoldier->ubProfile, OPINIONEVENT_RICHGUY );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void HandleDynamicOpinionDisability( SOLDIERTYPE* pSoldier )
|
||||
{
|
||||
if ( !pSoldier || pSoldier->ubProfile == NO_PROFILE )
|
||||
return;
|
||||
|
||||
SOLDIERTYPE* pTeamSoldier = NULL;
|
||||
UINT16 bMercID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
||||
UINT16 bLastTeamID = gTacticalStatus.Team[gbPlayerNum].bLastID;
|
||||
for ( pTeamSoldier = MercPtrs[bMercID]; bMercID <= bLastTeamID; ++bMercID, pTeamSoldier++ )
|
||||
{
|
||||
// everybody other merc in the same sector gets annoyed
|
||||
if ( pTeamSoldier->bActive && pTeamSoldier->ubProfile != NO_PROFILE && pTeamSoldier->ubProfile != pSoldier->ubProfile &&
|
||||
pTeamSoldier->sSectorX == pSoldier->sSectorX && pTeamSoldier->sSectorY == pSoldier->sSectorY && pTeamSoldier->bSectorZ == pSoldier->bSectorZ &&
|
||||
!(pTeamSoldier->bAssignment == IN_TRANSIT ||
|
||||
pTeamSoldier->bAssignment == ASSIGNMENT_DEAD) )
|
||||
{
|
||||
AddOpinionEvent( pTeamSoldier->ubProfile, pSoldier->ubProfile, OPINIONEVENT_ANNOYINGDISABILITY );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void HandleDynamicOpinionAddict( SOLDIERTYPE* pSoldier )
|
||||
{
|
||||
if ( !pSoldier || pSoldier->ubProfile == NO_PROFILE )
|
||||
return;
|
||||
|
||||
SOLDIERTYPE* pTeamSoldier = NULL;
|
||||
UINT16 bMercID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
||||
UINT16 bLastTeamID = gTacticalStatus.Team[gbPlayerNum].bLastID;
|
||||
for ( pTeamSoldier = MercPtrs[bMercID]; bMercID <= bLastTeamID; ++bMercID, pTeamSoldier++ )
|
||||
{
|
||||
if ( pTeamSoldier->bActive && pTeamSoldier->ubProfile != NO_PROFILE && pTeamSoldier->ubProfile != pSoldier->ubProfile &&
|
||||
!(pTeamSoldier->bAssignment == IN_TRANSIT ||
|
||||
pTeamSoldier->bAssignment == ASSIGNMENT_DEAD) )
|
||||
{
|
||||
AddOpinionEvent( pTeamSoldier->ubProfile, pSoldier->ubProfile, OPINIONEVENT_ADDICT );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void HandleDynamicOpinionThief( SOLDIERTYPE* pSoldier )
|
||||
{
|
||||
if ( !pSoldier || pSoldier->ubProfile == NO_PROFILE )
|
||||
return;
|
||||
|
||||
SOLDIERTYPE* pTeamSoldier = NULL;
|
||||
UINT16 bMercID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
||||
UINT16 bLastTeamID = gTacticalStatus.Team[gbPlayerNum].bLastID;
|
||||
for ( pTeamSoldier = MercPtrs[bMercID]; bMercID <= bLastTeamID; ++bMercID, pTeamSoldier++ )
|
||||
{
|
||||
// everybody other merc in the same sector gets annoyed
|
||||
if ( pTeamSoldier->bActive && pTeamSoldier->ubProfile != NO_PROFILE && pTeamSoldier->ubProfile != pSoldier->ubProfile &&
|
||||
pTeamSoldier->sSectorX == pSoldier->sSectorX && pTeamSoldier->sSectorY == pSoldier->sSectorY && pTeamSoldier->bSectorZ == pSoldier->bSectorZ &&
|
||||
!(pTeamSoldier->bAssignment == IN_TRANSIT ||
|
||||
pTeamSoldier->bAssignment == ASSIGNMENT_DEAD) )
|
||||
{
|
||||
AddOpinionEvent( pTeamSoldier->ubProfile, pSoldier->ubProfile, OPINIONEVENT_THIEF );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void HandleDynamicOpinionFoodSharing( SOLDIERTYPE* pSoldier )
|
||||
{
|
||||
if ( !pSoldier || pSoldier->ubProfile == NO_PROFILE )
|
||||
return;
|
||||
|
||||
BOOLEAN fCheckFood = (pSoldier->bFoodLevel < FoodMoraleMods[FOOD_MERC_START_SHOW_HUNGER_SYMBOL].bThreshold);
|
||||
BOOLEAN fCheckDrink = (pSoldier->bDrinkLevel < FoodMoraleMods[FOOD_MERC_START_SHOW_HUNGER_SYMBOL].bThreshold);
|
||||
|
||||
// no hunger - no problem
|
||||
if ( !fCheckFood && !fCheckDrink )
|
||||
return;
|
||||
|
||||
SOLDIERTYPE* pTeamSoldier = NULL;
|
||||
UINT16 bMercID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
||||
UINT16 bLastTeamID = gTacticalStatus.Team[gbPlayerNum].bLastID;
|
||||
for ( pTeamSoldier = MercPtrs[bMercID]; bMercID <= bLastTeamID; ++bMercID, pTeamSoldier++ )
|
||||
{
|
||||
// everybody other merc in the same sector gets annoyed
|
||||
if ( pTeamSoldier->bActive && pTeamSoldier->ubProfile != NO_PROFILE && pTeamSoldier->ubProfile != pSoldier->ubProfile &&
|
||||
pTeamSoldier->sSectorX == pSoldier->sSectorX && pTeamSoldier->sSectorY == pSoldier->sSectorY && pTeamSoldier->bSectorZ == pSoldier->bSectorZ &&
|
||||
!(pTeamSoldier->bAssignment == IN_TRANSIT ||
|
||||
pTeamSoldier->bAssignment == ASSIGNMENT_DEAD) )
|
||||
{
|
||||
if ( HasFoodInInventory( pTeamSoldier, fCheckFood, fCheckDrink ) )
|
||||
{
|
||||
AddOpinionEvent( pSoldier->ubProfile, pTeamSoldier->ubProfile, OPINIONEVENT_NOSHARINGFOOD );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void HandleDynamicOpinionGear( SOLDIERTYPE* pSoldier )
|
||||
{
|
||||
// only in combat squads
|
||||
if ( !pSoldier || pSoldier->ubProfile == NO_PROFILE || pSoldier->bAssignment >= ON_DUTY )
|
||||
return;
|
||||
|
||||
UINT8 highestcoolness = HighestInventoryCoolness( pSoldier );
|
||||
|
||||
SOLDIERTYPE* pTeamSoldier = NULL;
|
||||
UINT16 bMercID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
||||
UINT16 bLastTeamID = gTacticalStatus.Team[gbPlayerNum].bLastID;
|
||||
for ( pTeamSoldier = MercPtrs[bMercID]; bMercID <= bLastTeamID; ++bMercID, pTeamSoldier++ )
|
||||
{
|
||||
// everybody other merc in the same sector gets annoyed
|
||||
if ( pTeamSoldier->bActive && pTeamSoldier->ubProfile != NO_PROFILE && pTeamSoldier->ubProfile != pSoldier->ubProfile &&
|
||||
pTeamSoldier->sSectorX == pSoldier->sSectorX && pTeamSoldier->sSectorY == pSoldier->sSectorY && pTeamSoldier->bSectorZ == pSoldier->bSectorZ &&
|
||||
pTeamSoldier->bAssignment < ON_DUTY &&
|
||||
!(pTeamSoldier->bAssignment == IN_TRANSIT ||
|
||||
pTeamSoldier->bAssignment == ASSIGNMENT_DEAD) )
|
||||
{
|
||||
if ( HighestInventoryCoolness( pTeamSoldier ) > highestcoolness + 2 )
|
||||
{
|
||||
AddOpinionEvent( pSoldier->ubProfile, pTeamSoldier->ubProfile, OPINIONEVENT_BETTERGEAR );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void HandleDynamicOpinionBattleLosses()
|
||||
{
|
||||
UINT32 badstuff = 0;
|
||||
|
||||
for ( UINT16 i = 0; i < CAMPAIGNHISTORY_SD_CIV; ++i )
|
||||
{
|
||||
badstuff += 5 * gCurrentIncident.usKills[i];
|
||||
badstuff += gCurrentIncident.usWounds[i];
|
||||
badstuff += 4 * gCurrentIncident.usPrisoners[i];
|
||||
}
|
||||
|
||||
if ( badstuff > 100 )
|
||||
{
|
||||
// this was a disaster (Ignoring of how high the enemies losses were to create drama :-) )! Someone needs to be blamed!
|
||||
SOLDIERTYPE* pScapeGoat = NULL;
|
||||
FLOAT bestdommanderrating = 0.0f;
|
||||
SOLDIERTYPE* pTeamSoldier = NULL;
|
||||
UINT16 bMercID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
||||
UINT16 bLastTeamID = gTacticalStatus.Team[gbPlayerNum].bLastID;
|
||||
for ( pTeamSoldier = MercPtrs[bMercID]; bMercID <= bLastTeamID; ++bMercID, pTeamSoldier++ )
|
||||
{
|
||||
// everybody other merc in the same sector gets annoyed
|
||||
if ( pTeamSoldier->bActive && pTeamSoldier->ubProfile != NO_PROFILE &&
|
||||
pTeamSoldier->sSectorX == SECTORX( gCurrentIncident.usSector ) && pTeamSoldier->sSectorY == SECTORY( gCurrentIncident.usSector ) && pTeamSoldier->bSectorZ == gCurrentIncident.usLevel &&
|
||||
pTeamSoldier->bAssignment < ON_DUTY &&
|
||||
!(pTeamSoldier->bAssignment == IN_TRANSIT ||
|
||||
pTeamSoldier->bAssignment == ASSIGNMENT_DEAD) )
|
||||
{
|
||||
FLOAT commanderrating = pTeamSoldier->stats.bExpLevel + NUM_SKILL_TRAITS( pTeamSoldier, SQUADLEADER_NT );
|
||||
|
||||
if ( commanderrating > bestdommanderrating )
|
||||
{
|
||||
bestdommanderrating = commanderrating;
|
||||
|
||||
pScapeGoat = pTeamSoldier;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// we've found someone competent. Let's all blame him for this disaster!
|
||||
if ( bestdommanderrating > 0.0f )
|
||||
{
|
||||
bMercID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
||||
for ( pTeamSoldier = MercPtrs[bMercID]; bMercID <= bLastTeamID; ++bMercID, pTeamSoldier++ )
|
||||
{
|
||||
// everybody other merc in the same sector gets annoyed
|
||||
if ( pTeamSoldier->bActive && pTeamSoldier->ubProfile != NO_PROFILE &&
|
||||
pTeamSoldier->ubProfile != pScapeGoat->ubProfile &&
|
||||
pTeamSoldier->sSectorX == SECTORX( gCurrentIncident.usSector ) && pTeamSoldier->sSectorY == SECTORY( gCurrentIncident.usSector ) && pTeamSoldier->bSectorZ == gCurrentIncident.usLevel &&
|
||||
pTeamSoldier->bAssignment < ON_DUTY &&
|
||||
!(pTeamSoldier->bAssignment == IN_TRANSIT ||
|
||||
pTeamSoldier->bAssignment == ASSIGNMENT_DEAD) )
|
||||
{
|
||||
AddOpinionEvent( pTeamSoldier->ubProfile, pScapeGoat->ubProfile, OPINIONEVENT_WORSTCOMMANDEREVER );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void HandleDynamicOpinionRetreat()
|
||||
{
|
||||
// this was a disaster (Ignoring of how high the enemies losses were to create drama :-) )! Someone needs to be blamed!
|
||||
SOLDIERTYPE* pScapeGoat = NULL;
|
||||
FLOAT bestdommanderrating = 0.0f;
|
||||
SOLDIERTYPE* pTeamSoldier = NULL;
|
||||
UINT16 bMercID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
||||
UINT16 bLastTeamID = gTacticalStatus.Team[gbPlayerNum].bLastID;
|
||||
for ( pTeamSoldier = MercPtrs[bMercID]; bMercID <= bLastTeamID; ++bMercID, pTeamSoldier++ )
|
||||
{
|
||||
// everybody other merc in the same sector gets annoyed
|
||||
if ( pTeamSoldier->bActive && pTeamSoldier->ubProfile != NO_PROFILE &&
|
||||
pTeamSoldier->sSectorX == gWorldSectorX && pTeamSoldier->sSectorY == gWorldSectorY && (pTeamSoldier->bSectorZ == gbWorldSectorZ) &&
|
||||
pTeamSoldier->bAssignment < ON_DUTY &&
|
||||
!(pTeamSoldier->bAssignment == IN_TRANSIT ||
|
||||
pTeamSoldier->bAssignment == ASSIGNMENT_DEAD) )
|
||||
{
|
||||
FLOAT commanderrating = pTeamSoldier->stats.bExpLevel + NUM_SKILL_TRAITS( pTeamSoldier, SQUADLEADER_NT );
|
||||
|
||||
if ( commanderrating > bestdommanderrating )
|
||||
{
|
||||
bestdommanderrating = commanderrating;
|
||||
|
||||
pScapeGoat = pTeamSoldier;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// we've found someone competent. Let's all blame him for this disaster!
|
||||
if ( bestdommanderrating > 0.0f )
|
||||
{
|
||||
bMercID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
||||
for ( pTeamSoldier = MercPtrs[bMercID]; bMercID <= bLastTeamID; ++bMercID, pTeamSoldier++ )
|
||||
{
|
||||
// everybody other merc in the same sector gets annoyed
|
||||
if ( pTeamSoldier->bActive && pTeamSoldier->ubProfile != NO_PROFILE &&
|
||||
pTeamSoldier->ubProfile != pScapeGoat->ubProfile &&
|
||||
pTeamSoldier->sSectorX == gWorldSectorX && pTeamSoldier->sSectorY == gWorldSectorY && (pTeamSoldier->bSectorZ == gbWorldSectorZ) &&
|
||||
pTeamSoldier->bAssignment < ON_DUTY &&
|
||||
!(pTeamSoldier->bAssignment == IN_TRANSIT ||
|
||||
pTeamSoldier->bAssignment == ASSIGNMENT_DEAD) )
|
||||
{
|
||||
AddOpinionEvent( pTeamSoldier->ubProfile, pScapeGoat->ubProfile, OPINIONEVENT_ORDEREDRETREAT );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void HandleDynamicOpinionTeamDrinking( SOLDIERTYPE* pSoldier )
|
||||
{
|
||||
// need to be drunk for this
|
||||
if ( !pSoldier || pSoldier->ubProfile == NO_PROFILE || !MercUnderTheInfluence( pSoldier, DRUG_TYPE_ALCOHOL ) )
|
||||
return;
|
||||
|
||||
SOLDIERTYPE* pTeamSoldier = NULL;
|
||||
UINT16 bMercID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
||||
UINT16 bLastTeamID = gTacticalStatus.Team[gbPlayerNum].bLastID;
|
||||
for ( pTeamSoldier = MercPtrs[bMercID]; bMercID <= bLastTeamID; ++bMercID, pTeamSoldier++ )
|
||||
{
|
||||
// everybody other merc in the same sector can get updated if they are drugged too
|
||||
if ( pTeamSoldier->bActive && pTeamSoldier->ubProfile != NO_PROFILE && pTeamSoldier->ubProfile != pSoldier->ubProfile &&
|
||||
pTeamSoldier->sSectorX == pSoldier->sSectorX && pTeamSoldier->sSectorY == pSoldier->sSectorY && pTeamSoldier->bSectorZ == pSoldier->bSectorZ &&
|
||||
MercUnderTheInfluence( pTeamSoldier, DRUG_TYPE_ALCOHOL ) &&
|
||||
!(pTeamSoldier->bAssignment == IN_TRANSIT ||
|
||||
pTeamSoldier->bAssignment == ASSIGNMENT_DEAD) )
|
||||
{
|
||||
// both mercs drink together, they opinion either improve or worsen
|
||||
if ( Chance( 67 ) )
|
||||
AddOpinionEvent( pTeamSoldier->ubProfile, pSoldier->ubProfile, OPINIONEVENT_DRINKBUDDIES_GOOD );
|
||||
else
|
||||
AddOpinionEvent( pTeamSoldier->ubProfile, pSoldier->ubProfile, OPINIONEVENT_DRINKBUDDIES_BAD );
|
||||
|
||||
if ( Chance( 67 ) )
|
||||
AddOpinionEvent( pSoldier->ubProfile, pTeamSoldier->ubProfile, OPINIONEVENT_DRINKBUDDIES_GOOD );
|
||||
else
|
||||
AddOpinionEvent( pSoldier->ubProfile, pTeamSoldier->ubProfile, OPINIONEVENT_DRINKBUDDIES_BAD );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
UINT8 HighestInventoryCoolness( SOLDIERTYPE* pSoldier )
|
||||
{
|
||||
UINT8 coolness = 0;
|
||||
|
||||
if ( !pSoldier )
|
||||
return coolness;
|
||||
|
||||
// search for food in our inventory
|
||||
INT8 invsize = (INT8)pSoldier->inv.size( ); // remember inventorysize, so we don't call size() repeatedly
|
||||
for ( INT8 bLoop = 0; bLoop < invsize; ++bLoop ) // ... for all items in our inventory ...
|
||||
{
|
||||
// ... if Item exists and is food ...
|
||||
if ( pSoldier->inv[bLoop].exists( ) )
|
||||
{
|
||||
coolness = max( coolness, Item[pSoldier->inv[bLoop].usItem].ubCoolness );
|
||||
}
|
||||
}
|
||||
|
||||
return coolness;
|
||||
}
|
||||
@@ -118,10 +118,6 @@ typedef struct MoraleEvent
|
||||
INT8 bChange;
|
||||
} MoraleEvent;
|
||||
|
||||
#define MAX_SNITCH_EVENTS 64;
|
||||
#define MAX_SNITCHES 16;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SNITCH_INTRODUCTION= 0,
|
||||
@@ -148,135 +144,6 @@ typedef struct SnitchEvent
|
||||
UINT8 ubSecondaryTargetProfile;
|
||||
} SnitchEvent;
|
||||
|
||||
// -------- added by Flugente: flags for opinions --------
|
||||
// easier than adding 32 differently named variables. DO NOT CHANGE THEM, UNLESS YOU KNOW WHAT YOU ARE DOING!!!
|
||||
// if someone influences our opinion, STAGE1 gets set. Every day, stages move up one step, until we 'forget' them
|
||||
// these flags describe what the other guy did to us....
|
||||
// flagmask 1
|
||||
#define OPINIONFLAG_STAGE1_FRIENDLYFIRE 0x00000001 //1 // fired on us
|
||||
#define OPINIONFLAG_STAGE2_FRIENDLYFIRE 0x00000002 //2
|
||||
#define OPINIONFLAG_STAGE3_FRIENDLYFIRE 0x00000004 //4
|
||||
#define OPINIONFLAG_STAGE4_FRIENDLYFIRE 0x00000008 //8
|
||||
|
||||
#define OPINIONFLAG_STAGE1_SNITCHSOLDMEOUT 0x00000010 //16 // has been snitching to the player about us
|
||||
#define OPINIONFLAG_STAGE2_SNITCHSOLDMEOUT 0x00000020 //32
|
||||
#define OPINIONFLAG_STAGE3_SNITCHSOLDMEOUT 0x00000040 //64
|
||||
#define OPINIONFLAG_STAGE4_SNITCHSOLDMEOUT 0x00000080 //128
|
||||
|
||||
#define OPINIONFLAG_STAGE1_INTERFERENCE 0x00000100 //256 // is interfering with us (stopped us from taking drugs or stealing)
|
||||
#define OPINIONFLAG_STAGE2_INTERFERENCE 0x00000200 //512
|
||||
#define OPINIONFLAG_STAGE3_INTERFERENCE 0x00000400 //1024
|
||||
#define OPINIONFLAG_STAGE4_INTERFERENCE 0x00000800 //2048
|
||||
|
||||
#define OPINIONFLAG_STAGE1_FRIENDSWITHHATED 0x00001000 //4096 // is friends with someone we hate
|
||||
#define OPINIONFLAG_STAGE2_FRIENDSWITHHATED 0x00002000 //8192
|
||||
#define OPINIONFLAG_STAGE3_FRIENDSWITHHATED 0x00004000 //16384
|
||||
#define OPINIONFLAG_STAGE4_FRIENDSWITHHATED 0x00008000 //32768
|
||||
|
||||
#define OPINIONFLAG_STAGE1_CONTRACTEXTENSION 0x00010000 //65536 // got his contract extended before we did, even though we had less time left
|
||||
#define OPINIONFLAG_STAGE2_CONTRACTEXTENSION 0x00020000 //131072
|
||||
#define OPINIONFLAG_STAGE3_CONTRACTEXTENSION 0x00040000 //262144
|
||||
#define OPINIONFLAG_STAGE4_CONTRACTEXTENSION 0x00080000 //524288
|
||||
|
||||
#define OPINIONFLAG_STAGE1_ORDEREDRETREAT 0x00100000 //1048576 // was commander (most senior merc around) and ordered retreat
|
||||
#define OPINIONFLAG_STAGE2_ORDEREDRETREAT 0x00200000 //2097152
|
||||
#define OPINIONFLAG_STAGE3_ORDEREDRETREAT 0x00400000 //4194304
|
||||
#define OPINIONFLAG_STAGE4_ORDEREDRETREAT 0x00800000 //8388608
|
||||
|
||||
#define OPINIONFLAG_STAGE1_CIVKILLER 0x01000000 //16777216 // killed an unarmed civilian
|
||||
#define OPINIONFLAG_STAGE2_CIVKILLER 0x02000000 //33554432
|
||||
#define OPINIONFLAG_STAGE3_CIVKILLER 0x04000000 //67108864
|
||||
#define OPINIONFLAG_STAGE4_CIVKILLER 0x08000000 //134217728
|
||||
|
||||
#define OPINIONFLAG_STAGE1_SLOWSUSDOWN 0x10000000 //268435456 // is overloaded and thus slows us down
|
||||
#define OPINIONFLAG_STAGE2_SLOWSUSDOWN 0x20000000 //536870912
|
||||
#define OPINIONFLAG_STAGE3_SLOWSUSDOWN 0x40000000 //1073741824
|
||||
#define OPINIONFLAG_STAGE4_SLOWSUSDOWN 0x80000000 //2147483648
|
||||
|
||||
// flagmask 2
|
||||
#define OPINIONFLAG_STAGE1_NOSHARINGFOOD 0x00000001 //1 // had water/food when we needed it. So he did not share!
|
||||
#define OPINIONFLAG_STAGE2_NOSHARINGFOOD 0x00000002 //2
|
||||
#define OPINIONFLAG_STAGE3_NOSHARINGFOOD 0x00000004 //4
|
||||
#define OPINIONFLAG_STAGE4_NOSHARINGFOOD 0x00000008 //8
|
||||
|
||||
#define OPINIONFLAG_STAGE1_ANNOYINGDISABILITY 0x00000010 //16 // disability kicked in at a bad time, putting the team at risk (forgeful, nervous, psycho...)
|
||||
#define OPINIONFLAG_STAGE2_ANNOYINGDISABILITY 0x00000020 //32
|
||||
#define OPINIONFLAG_STAGE3_ANNOYINGDISABILITY 0x00000040 //64
|
||||
#define OPINIONFLAG_STAGE4_ANNOYINGDISABILITY 0x00000080 //128
|
||||
|
||||
#define OPINIONFLAG_STAGE1_ADDICT 0x00000100 //256 // is taking drugs
|
||||
#define OPINIONFLAG_STAGE2_ADDICT 0x00000200 //512
|
||||
#define OPINIONFLAG_STAGE3_ADDICT 0x00000400 //1024
|
||||
#define OPINIONFLAG_STAGE4_ADDICT 0x00000800 //2048
|
||||
|
||||
#define OPINIONFLAG_STAGE1_THIEF 0x00001000 //4096 // is stealing items
|
||||
#define OPINIONFLAG_STAGE2_THIEF 0x00002000 //8192
|
||||
#define OPINIONFLAG_STAGE3_THIEF 0x00004000 //16384
|
||||
#define OPINIONFLAG_STAGE4_THIEF 0x00008000 //32768
|
||||
|
||||
#define OPINIONFLAG_STAGE1_WORSTCOMMANDEREVER 0x00010000 //65536 // was commander (most senior merc around) when a lot of our people (including militia) died
|
||||
#define OPINIONFLAG_STAGE2_WORSTCOMMANDEREVER 0x00020000 //131072
|
||||
#define OPINIONFLAG_STAGE3_WORSTCOMMANDEREVER 0x00040000 //262144
|
||||
#define OPINIONFLAG_STAGE4_WORSTCOMMANDEREVER 0x00080000 //524288
|
||||
|
||||
#define OPINIONFLAG_STAGE1_RICHGUY 0x00100000 //1048576 // gets paid a lot more than we do
|
||||
#define OPINIONFLAG_STAGE2_RICHGUY 0x00200000 //2097152
|
||||
#define OPINIONFLAG_STAGE3_RICHGUY 0x00400000 //4194304
|
||||
#define OPINIONFLAG_STAGE4_RICHGUY 0x00800000 //8388608
|
||||
|
||||
#define OPINIONFLAG_STAGE1_BETTERGEAR 0x01000000 //16777216 // has a lot better gear than we do
|
||||
#define OPINIONFLAG_STAGE2_BETTERGEAR 0x02000000 //33554432
|
||||
#define OPINIONFLAG_STAGE3_BETTERGEAR 0x04000000 //67108864
|
||||
#define OPINIONFLAG_STAGE4_BETTERGEAR 0x08000000 //134217728
|
||||
|
||||
#define OPINIONFLAG_STAGE1_YOUMOUNTEDAGUNONMYBREASTS 0x10000000 //268435456 // used our body to rest his gun on
|
||||
#define OPINIONFLAG_STAGE2_YOUMOUNTEDAGUNONMYBREASTS 0x20000000 //536870912
|
||||
#define OPINIONFLAG_STAGE3_YOUMOUNTEDAGUNONMYBREASTS 0x40000000 //1073741824
|
||||
#define OPINIONFLAG_STAGE4_YOUMOUNTEDAGUNONMYBREASTS 0x80000000 //2147483648
|
||||
|
||||
// flagmask 3
|
||||
#define OPINIONFLAG_STAGE1_BANDAGED 0x00000001 //1 // bandaged our wounds
|
||||
#define OPINIONFLAG_STAGE2_BANDAGED 0x00000002 //2
|
||||
#define OPINIONFLAG_STAGE3_BANDAGED 0x00000004 //4
|
||||
#define OPINIONFLAG_STAGE4_BANDAGED 0x00000008 //8
|
||||
|
||||
#define OPINIONFLAG_STAGE1_DRINKBUDDIES_GOOD 0x00000010 //16 // had a drink with him, he's okay.
|
||||
#define OPINIONFLAG_STAGE2_DRINKBUDDIES_GOOD 0x00000020 //32
|
||||
#define OPINIONFLAG_STAGE3_DRINKBUDDIES_GOOD 0x00000040 //64
|
||||
#define OPINIONFLAG_STAGE4_DRINKBUDDIES_GOOD 0x00000080 //128
|
||||
|
||||
#define OPINIONFLAG_STAGE1_DRINKBUDDIES_SUPER 0x00000100 //256 // had a drink with him, he's super okay
|
||||
#define OPINIONFLAG_STAGE2_DRINKBUDDIES_SUPER 0x00000200 //512
|
||||
#define OPINIONFLAG_STAGE3_DRINKBUDDIES_SUPER 0x00000400 //1024
|
||||
#define OPINIONFLAG_STAGE4_DRINKBUDDIES_SUPER 0x00000800 //2048
|
||||
|
||||
#define OPINIONFLAG_STAGE1_DRINKBUDDIES_BAD 0x00001000 //4096 // had a drink with him, don't like him
|
||||
#define OPINIONFLAG_STAGE2_DRINKBUDDIES_BAD 0x00002000 //8192
|
||||
#define OPINIONFLAG_STAGE3_DRINKBUDDIES_BAD 0x00004000 //16384
|
||||
#define OPINIONFLAG_STAGE4_DRINKBUDDIES_BAD 0x00008000 //32768
|
||||
|
||||
#define OPINIONFLAG_STAGE1_DRINKBUDDIES_WORSE 0x00010000 //65536 // had a drink with him, and I REALLY don't like him now
|
||||
#define OPINIONFLAG_STAGE2_DRINKBUDDIES_WORSE 0x00020000 //131072
|
||||
#define OPINIONFLAG_STAGE3_DRINKBUDDIES_WORSE 0x00040000 //262144
|
||||
#define OPINIONFLAG_STAGE4_DRINKBUDDIES_WORSE 0x00080000 //524288
|
||||
|
||||
/*#define OPINIONFLAG_STAGE1_RICHGUY 0x00100000 //1048576 // gets paid a lot more than we do
|
||||
#define OPINIONFLAG_STAGE2_RICHGUY 0x00200000 //2097152
|
||||
#define OPINIONFLAG_STAGE3_RICHGUY 0x00400000 //4194304
|
||||
#define OPINIONFLAG_STAGE4_RICHGUY 0x00800000 //8388608
|
||||
|
||||
#define OPINIONFLAG_STAGE1_BETTERGEAR 0x01000000 //16777216 // has a lot better gear than we do
|
||||
#define OPINIONFLAG_STAGE2_BETTERGEAR 0x02000000 //33554432
|
||||
#define OPINIONFLAG_STAGE3_BETTERGEAR 0x04000000 //67108864
|
||||
#define OPINIONFLAG_STAGE4_BETTERGEAR 0x08000000 //134217728
|
||||
|
||||
#define OPINIONFLAG_STAGE1_YOUMOUNTEDAGUNONMYBREASTS 0x10000000 //268435456 // used our body to rest his gun on
|
||||
#define OPINIONFLAG_STAGE2_YOUMOUNTEDAGUNONMYBREASTS 0x20000000 //536870912
|
||||
#define OPINIONFLAG_STAGE3_YOUMOUNTEDAGUNONMYBREASTS 0x40000000 //1073741824
|
||||
#define OPINIONFLAG_STAGE4_YOUMOUNTEDAGUNONMYBREASTS 0x80000000 //2147483648*/
|
||||
|
||||
#define OPINIONFLAG_STAGE4_ALL 0x88888888 // flags of all final stages, used when rolling over
|
||||
// ----------------------------------------------------------------
|
||||
|
||||
extern void HandleMoraleEvent( SOLDIERTYPE * pSoldier, INT8 bMoraleEvent, INT16 sMapX, INT16 sMapY, INT8 bMapZ );
|
||||
extern void RefreshSoldierMorale( SOLDIERTYPE * pSoldier );
|
||||
@@ -290,40 +157,4 @@ void DailyMoraleUpdate( SOLDIERTYPE *pSoldier );
|
||||
|
||||
void DecayTacticalMoraleModifiers( void );
|
||||
|
||||
// Flugente: calculate A's opinion of B
|
||||
INT8 SoldierRelation( SOLDIERTYPE* pSoldierA, SOLDIERTYPE* pSoldierB);
|
||||
|
||||
// Flugente: dynamic opinions
|
||||
// modify usProfileA's opinion of usProfileB because of usEvent
|
||||
void AddOpinionEvent( UINT8 usProfileA, UINT8 usProfileB, UINT8 usEvent );
|
||||
|
||||
// get usProfileA's opinion of usProfileB concerning usEvent
|
||||
INT8 GetDynamicOpinion( UINT8 usProfileA, UINT8 usProfileB, UINT8 usEvent );
|
||||
|
||||
// daily rollover of opinions
|
||||
void HandleDynamicOpinions();
|
||||
|
||||
// a day has passed, 'age' opinions
|
||||
void RolloverDynamicOpinions( UINT8 usProfileA );
|
||||
|
||||
// check wether other people are friends with someone else we hate. All persons must be in Arulco
|
||||
void CheckForFriendsofHated( SOLDIERTYPE* pSoldier );
|
||||
|
||||
void HandleDynamicOpinionOnContractExtension( UINT8 ubCode, UINT8 usProfile );
|
||||
void HandleDynamicOpinionCivKill( SOLDIERTYPE* pSoldier );
|
||||
void HandleDynamicOpinionSlowdown( SOLDIERTYPE* pSoldier );
|
||||
void HandleDynamicOpinionWageJealousy( SOLDIERTYPE* pSoldier );
|
||||
void HandleDynamicOpinionDisability( SOLDIERTYPE* pSoldier );
|
||||
void HandleDynamicOpinionAddict( SOLDIERTYPE* pSoldier );
|
||||
void HandleDynamicOpinionThief( SOLDIERTYPE* pSoldier );
|
||||
void HandleDynamicOpinionFoodSharing( SOLDIERTYPE* pSoldier );
|
||||
void HandleDynamicOpinionGear( SOLDIERTYPE* pSoldier );
|
||||
void HandleDynamicOpinionBattleLosses();
|
||||
void HandleDynamicOpinionRetreat();
|
||||
void HandleDynamicOpinionTeamDrinking( SOLDIERTYPE* pSoldier );
|
||||
|
||||
UINT8 HighestInventoryCoolness( SOLDIERTYPE* pSoldier );
|
||||
|
||||
void HandleDynamicOpinionDialogue();
|
||||
|
||||
#endif
|
||||
@@ -111,6 +111,7 @@
|
||||
#include "bullets.h"
|
||||
#include "Inventory Choosing.h" // added by Flugente for TakeMilitiaEquipmentfromSector()
|
||||
#include "CampaignStats.h" // added by Flugente
|
||||
#include "DynamicDialogue.h" // added by Flugente for HandleDynamicOpinions()
|
||||
#endif
|
||||
#include "connect.h"
|
||||
|
||||
@@ -2482,7 +2483,7 @@ BOOLEAN HandleGotoNewGridNo( SOLDIERTYPE *pSoldier, BOOLEAN *pfKeepMoving, BOOLE
|
||||
UnSetUIBusy( pSoldier->ubID );
|
||||
|
||||
// Flugente: dynamic opinions
|
||||
HandleDynamicOpinionDisability( pSoldier );
|
||||
HandleDynamicOpinionChange( pSoldier, OPINIONEVENT_ANNOYINGDISABILITY, TRUE, TRUE );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3224,7 +3225,7 @@ void InternalSelectSoldier( UINT16 usSoldierID, BOOLEAN fAcknowledge, BOOLEAN fF
|
||||
pSoldier->usQuoteSaidFlags |= SOLDIER_QUOTE_SAID_PERSONALITY;
|
||||
|
||||
// Flugente: dynamic opinions
|
||||
HandleDynamicOpinionDisability( pSoldier );
|
||||
HandleDynamicOpinionChange( pSoldier, OPINIONEVENT_ANNOYINGDISABILITY, TRUE, TRUE );
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -3237,7 +3238,7 @@ void InternalSelectSoldier( UINT16 usSoldierID, BOOLEAN fAcknowledge, BOOLEAN fF
|
||||
pSoldier->usQuoteSaidFlags |= SOLDIER_QUOTE_SAID_PERSONALITY;
|
||||
|
||||
// Flugente: dynamic opinions
|
||||
HandleDynamicOpinionDisability( pSoldier );
|
||||
HandleDynamicOpinionChange( pSoldier, OPINIONEVENT_ANNOYINGDISABILITY, TRUE, TRUE );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
#include "GameSettings.h"
|
||||
#include "Animation Data.h"
|
||||
#include "Soldier Control.h"
|
||||
#include "Interface.h" // added by Flugente for zBackground
|
||||
#include "Interface.h" // added by Flugente for zBackground
|
||||
#include "DynamicDialogue.h" // added by Flugente
|
||||
#endif
|
||||
|
||||
extern void ReducePointsForHunger( SOLDIERTYPE *pSoldier, UINT32 *pusPoints );
|
||||
@@ -785,7 +786,7 @@ INT32 SkillCheck( SOLDIERTYPE * pSoldier, INT8 bReason, INT8 bChanceMod )
|
||||
TacticalCharacterDialogue( pSoldier, QUOTE_PERSONALITY_TRAIT );
|
||||
|
||||
// Flugente: dynamic opinions
|
||||
HandleDynamicOpinionDisability( pSoldier );
|
||||
HandleDynamicOpinionChange( pSoldier, OPINIONEVENT_ANNOYINGDISABILITY, TRUE, TRUE );
|
||||
}
|
||||
// do we realize that we just can't do this?
|
||||
if ( (100 - (pSoldier->ubSkillCheckAttempts - 2) * 20) < EffectiveWisdom( pSoldier ) )
|
||||
|
||||
@@ -1839,7 +1839,7 @@ INT16 GetSoldierIDFromMercID(UINT8 ubMercID)
|
||||
ubLastTeamID = gTacticalStatus.Team[ OUR_TEAM ].bLastID;
|
||||
|
||||
// look for all mercs on the same team,
|
||||
for ( pTeamSoldier = MercPtrs[ cnt ]; cnt <= ubLastTeamID; cnt++,pTeamSoldier++)
|
||||
for ( pTeamSoldier = MercPtrs[ cnt ]; cnt <= ubLastTeamID; ++cnt, pTeamSoldier++)
|
||||
{
|
||||
if ( pTeamSoldier->ubProfile == ubMercID )
|
||||
{
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
#include "Strategic Status.h"
|
||||
#include "Food.h"
|
||||
#include "CampaignStats.h" // added by Flugente
|
||||
#include "DynamicDialogue.h" // added by Flugente
|
||||
#endif
|
||||
|
||||
// anv: for enemy taunts
|
||||
@@ -3939,7 +3940,7 @@ BOOLEAN HandleSoldierDeath( SOLDIERTYPE *pSoldier , BOOLEAN *pfMadeCorpse )
|
||||
gMercProfiles[ MercPtrs[ ubAttacker ]->ubProfile ].records.usKillsOthers++;
|
||||
|
||||
// Flugente: dynamic opinions
|
||||
HandleDynamicOpinionCivKill( MercPtrs[ubAttacker] );
|
||||
HandleDynamicOpinionChange( MercPtrs[ubAttacker], OPINIONEVENT_CIVKILLER, TRUE, TRUE );
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
+4256
-4254
File diff suppressed because it is too large
Load Diff
@@ -6,6 +6,10 @@
|
||||
#define OLD_MAXPATROLGRIDS 10
|
||||
#define MAXPATROLGRIDS OLD_MAXPATROLGRIDS
|
||||
|
||||
// WANNE: Yes I know, we support up to 254 profiles, but because of compatibility, profile Id = 200
|
||||
// is not a valid profil. We in MercProfiles.xml, the profile id = 200 should not be used!
|
||||
#define NO_PROFILE 200
|
||||
|
||||
#include "Animation Cache.h"
|
||||
#include "Timer Control.h"
|
||||
#include "vobject.h"
|
||||
@@ -41,10 +45,6 @@ extern UINT16 CivLastNames[MAXCIVLASTNAMES][10];
|
||||
|
||||
#define LOCKED_NO_NEWGRIDNO 2
|
||||
|
||||
// WANNE: Yes I know, we support up to 254 profiles, but because of compatibility, profile Id = 200
|
||||
// is not a valid profil. We in MercProfiles.xml, the profile id = 200 should not be used!
|
||||
#define NO_PROFILE 200
|
||||
|
||||
#define BATTLE_SND_LOWER_VOLUME 1
|
||||
|
||||
#define TAKE_DAMAGE_GUNFIRE 1
|
||||
|
||||
@@ -809,6 +809,8 @@ BOOLEAN LoadMercProfiles(void)
|
||||
gMercProfiles[uiLoop].usBackground = 0;
|
||||
|
||||
memset( &gMercProfiles[uiLoop].usDynamicOpinionFlagmask, 0, sizeof(gMercProfiles[uiLoop].usDynamicOpinionFlagmask) );
|
||||
|
||||
memset( &gMercProfiles[uiLoop].sDynamicOpinionLongTerm, 0, sizeof(gMercProfiles[uiLoop].sDynamicOpinionLongTerm) );
|
||||
}
|
||||
|
||||
// WANNE - BMP: DONE!
|
||||
|
||||
@@ -402,6 +402,10 @@
|
||||
RelativePath=".\Drugs And Alcohol.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\DynamicDialogue.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\End Game.h"
|
||||
>
|
||||
@@ -748,6 +752,10 @@
|
||||
RelativePath=".\Drugs And Alcohol.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\DynamicDialogue.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\End Game.cpp"
|
||||
>
|
||||
|
||||
@@ -406,6 +406,10 @@
|
||||
RelativePath="Drugs And Alcohol.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="DynamicDialogue.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="End Game.h"
|
||||
>
|
||||
@@ -750,6 +754,10 @@
|
||||
RelativePath="Drugs And Alcohol.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="DynamicDialogue.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="End Game.cpp"
|
||||
>
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
<ClInclude Include="Dialogue Control.h" />
|
||||
<ClInclude Include="DisplayCover.h" />
|
||||
<ClInclude Include="Drugs And Alcohol.h" />
|
||||
<ClInclude Include="DynamicDialogue.h" />
|
||||
<ClInclude Include="End Game.h" />
|
||||
<ClInclude Include="Enemy Soldier Save.h" />
|
||||
<ClInclude Include="EnemyItemDrops.h" />
|
||||
@@ -125,6 +126,7 @@
|
||||
<ClCompile Include="Dialogue Control.cpp" />
|
||||
<ClCompile Include="DisplayCover.cpp" />
|
||||
<ClCompile Include="Drugs And Alcohol.cpp" />
|
||||
<ClInclude Include="DynamicDialogue.cpp" />
|
||||
<ClCompile Include="End Game.cpp" />
|
||||
<ClCompile Include="Enemy Soldier Save.cpp" />
|
||||
<ClCompile Include="EnemyItemDrops.cpp" />
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
<ClInclude Include="Dialogue Control.h" />
|
||||
<ClInclude Include="DisplayCover.h" />
|
||||
<ClInclude Include="Drugs And Alcohol.h" />
|
||||
<ClInclude Include="DynamicDialogue.h" />
|
||||
<ClInclude Include="End Game.h" />
|
||||
<ClInclude Include="Enemy Soldier Save.h" />
|
||||
<ClInclude Include="EnemyItemDrops.h" />
|
||||
@@ -105,7 +106,7 @@
|
||||
<ClInclude Include="TeamTurns.h" />
|
||||
<ClInclude Include="UI Cursors.h" />
|
||||
<ClInclude Include="Vehicles.h" />
|
||||
<ClInclude Include="VehicleMenu.h" />
|
||||
<ClInclude Include="VehicleMenu.h" />
|
||||
<ClInclude Include="Weapons.h" />
|
||||
<ClInclude Include="World Items.h" />
|
||||
<ClInclude Include="XML.h" />
|
||||
@@ -126,6 +127,7 @@
|
||||
<ClCompile Include="Dialogue Control.cpp" />
|
||||
<ClCompile Include="DisplayCover.cpp" />
|
||||
<ClCompile Include="Drugs And Alcohol.cpp" />
|
||||
<ClCompile Include="DynamicDialogue.cpp" />
|
||||
<ClCompile Include="End Game.cpp" />
|
||||
<ClCompile Include="Enemy Soldier Save.cpp" />
|
||||
<ClCompile Include="EnemyItemDrops.cpp" />
|
||||
@@ -188,7 +190,7 @@
|
||||
<ClCompile Include="Turn Based Input.cpp" />
|
||||
<ClCompile Include="UI Cursors.cpp" />
|
||||
<ClCompile Include="Vehicles.cpp" />
|
||||
<ClCompile Include="VehicleMenu.cpp" />
|
||||
<ClCompile Include="VehicleMenu.cpp" />
|
||||
<ClCompile Include="Weapons.cpp" />
|
||||
<ClCompile Include="World Items.cpp" />
|
||||
<ClCompile Include="XML_AmmoStrings.cpp" />
|
||||
@@ -219,13 +221,13 @@
|
||||
<ClCompile Include="XML_IMPItemChoices.cpp" />
|
||||
<ClCompile Include="XML_IncompatibleAttachments.cpp" />
|
||||
<ClCompile Include="XML_ItemAdjustments.cpp" />
|
||||
<ClCompile Include="XML_Keys.cpp" />
|
||||
<ClCompile Include="XML_Keys.cpp" />
|
||||
<ClCompile Include="XML_Launchable.cpp" />
|
||||
<ClCompile Include="XML_LBEPocket.cpp" />
|
||||
<ClCompile Include="XML_LBEPocketPopup.cpp" />
|
||||
<ClCompile Include="XML_LoadBearingEquipment.cpp" />
|
||||
<ClCompile Include="XML_LoadScreenHints.cpp" />
|
||||
<ClCompile Include="XML_Locks.cpp" />
|
||||
<ClCompile Include="XML_Locks.cpp" />
|
||||
<ClCompile Include="XML_Magazine.cpp" />
|
||||
<ClCompile Include="XML_Merchants.cpp" />
|
||||
<ClCompile Include="XML_MercStartingGear.cpp" />
|
||||
@@ -243,7 +245,7 @@
|
||||
<ClCompile Include="XML_Sounds.cpp" />
|
||||
<ClCompile Include="XML_SpreadPatterns.cpp" />
|
||||
<ClCompile Include="XML_Taunts.cpp" />
|
||||
<ClCompile Include="XML_AdditionalTileProperties.cpp" />
|
||||
<ClCompile Include="XML_AdditionalTileProperties.cpp" />
|
||||
<ClCompile Include="XML_TonyInventory.cpp" />
|
||||
<ClCompile Include="XML_Vehicles.cpp" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
<ClInclude Include="Vehicles.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="VehicleMenu.h">
|
||||
<ClInclude Include="VehicleMenu.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Weapons.h">
|
||||
@@ -270,6 +270,9 @@
|
||||
<ClInclude Include="SkillMenu.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="DynamicDialogue.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Air Raid.cpp">
|
||||
@@ -488,7 +491,7 @@
|
||||
<ClCompile Include="Vehicles.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="VehicleMenu.cpp">
|
||||
<ClCompile Include="VehicleMenu.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Weapons.cpp">
|
||||
@@ -665,14 +668,17 @@
|
||||
<ClCompile Include="RandomMerc.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="XML_AdditionalTileProperties.cpp">
|
||||
<ClCompile Include="XML_AdditionalTileProperties.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="XML_Locks.cpp">
|
||||
<ClCompile Include="XML_Locks.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="XML_Keys.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="DynamicDialogue.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -308,7 +308,7 @@ typedef enum
|
||||
} RacistLevels;
|
||||
|
||||
// Flugente: dynamic opinons: number of profile flagmasks
|
||||
#define OPINION_FLAGMASKS_NUMBER 3
|
||||
#define OPINION_FLAGMASKS_NUMBER 5
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -958,6 +958,8 @@ public:
|
||||
// Flugente: flagmasks for dynamic opinions on each and every other person. Yes, this is significant in size
|
||||
UINT32 usDynamicOpinionFlagmask[NUM_PROFILES][OPINION_FLAGMASKS_NUMBER];
|
||||
|
||||
INT8 sDynamicOpinionLongTerm[NUM_PROFILES];
|
||||
|
||||
}; // MERCPROFILESTRUCT;
|
||||
|
||||
// WANNE - BMP: DONE!
|
||||
|
||||
Reference in New Issue
Block a user