diff --git a/GameSettings.cpp b/GameSettings.cpp index 305a7eaf4..9361c6550 100644 --- a/GameSettings.cpp +++ b/GameSettings.cpp @@ -3608,6 +3608,7 @@ void LoadMoraleSettings() gDynamicOpinionEvent[OPINIONEVENT_FRAGTHIEF].sOpinionModifier = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_FRAGTHIEF", -2, -50, 0 ); gDynamicOpinionEvent[OPINIONEVENT_BATTLE_ASSIST].sOpinionModifier = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_BATTLE_ASSIST", 1, 0, 50 ); gDynamicOpinionEvent[OPINIONEVENT_BATTLE_TOOK_PRISONER].sOpinionModifier = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_BATTLE_TOOK_PRISONER", 3, 0, 50 ); + gDynamicOpinionEvent[OPINIONEVENT_CIV_ATTACKER].sOpinionModifier = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_CIV_ATTACKER", -3, -50, 0 ); } void LoadReputationSettings() diff --git a/Tactical/DynamicDialogue.cpp b/Tactical/DynamicDialogue.cpp index 7f840fdc6..b29693d3f 100644 --- a/Tactical/DynamicDialogue.cpp +++ b/Tactical/DynamicDialogue.cpp @@ -1200,6 +1200,7 @@ void AddOpinionEvent( UINT8 usProfileA, UINT8 usProfileB, UINT8 usEvent, BOOLEAN case OPINIONEVENT_FRAGTHIEF: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][4] |= OPINIONFLAG_STAGE1_FRAGTHIEF; break; case OPINIONEVENT_BATTLE_ASSIST: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][4] |= OPINIONFLAG_STAGE1_BATTLE_ASSIST; break; case OPINIONEVENT_BATTLE_TOOK_PRISONER: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][4] |= OPINIONFLAG_STAGE1_BATTLE_TOOK_PRISONER; break; + case OPINIONEVENT_CIV_ATTACKER: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][4] |= OPINIONFLAG_STAGE1_CIV_ATTACKER; break; default: break; } @@ -1566,6 +1567,13 @@ INT8 GetDynamicOpinion( UINT8 usProfileA, UINT8 usProfileB, UINT8 usEvent ) if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][4] & OPINIONFLAG_STAGE4_BATTLE_TOOK_PRISONER ) ++numflags; break; + case OPINIONEVENT_CIV_ATTACKER: + if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][4] & OPINIONFLAG_STAGE1_CIV_ATTACKER ) ++numflags; + if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][4] & OPINIONFLAG_STAGE2_CIV_ATTACKER ) ++numflags; + if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][4] & OPINIONFLAG_STAGE3_CIV_ATTACKER ) ++numflags; + if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][4] & OPINIONFLAG_STAGE4_CIV_ATTACKER ) ++numflags; + break; + default: break; } @@ -2077,6 +2085,7 @@ void HandleDynamicOpinionChange( SOLDIERTYPE* pSoldier, UINT8 usEvent, BOOLEAN f case OPINIONEVENT_BATTLE_TOOK_PRISONER: case OPINIONEVENT_FRAGTHIEF: case OPINIONEVENT_BATTLE_ASSIST: + case OPINIONEVENT_CIV_ATTACKER: break; case OPINIONEVENT_SLOWSUSDOWN: @@ -2287,6 +2296,14 @@ void HandleDynamicOpinionChange( SOLDIERTYPE* pSoldier, UINT8 usEvent, BOOLEAN f continue; break; + case OPINIONEVENT_CIV_ATTACKER: + // psychos or malicious characters dont care + if ( gMercProfiles[pTeamSoldier->ubProfile].bCharacterTrait == CHAR_TRAIT_MALICIOUS || + gMercProfiles[pTeamSoldier->ubProfile].bDisability == PSYCHO || + MercUnderTheInfluence( pTeamSoldier, DRUG_TYPE_PSYCHO ) ) + continue; + break; + default: // either unknown event, or event is handled elsewhere - exit return; diff --git a/Tactical/DynamicDialogue.h b/Tactical/DynamicDialogue.h index 513509bd9..c4f0484dc 100644 --- a/Tactical/DynamicDialogue.h +++ b/Tactical/DynamicDialogue.h @@ -66,6 +66,7 @@ enum OPINIONEVENT_FRAGTHIEF, // other guy stole our kill OPINIONEVENT_BATTLE_ASSIST, // other guy assisted us in battle OPINIONEVENT_BATTLE_TOOK_PRISONER, // other guy chose to take prisoners instead of killing the enemy + OPINIONEVENT_CIV_ATTACKER, // other guy attacks a non-hostile civilian OPINIONEVENT_MAX }; @@ -286,10 +287,10 @@ extern DynamicOpinionEvent gDynamicOpinionEvent[OPINIONEVENT_MAX]; #define OPINIONFLAG_STAGE3_BATTLE_TOOK_PRISONER 0x04000000 //67108864 #define OPINIONFLAG_STAGE4_BATTLE_TOOK_PRISONER 0x08000000 //134217728 -/*#define OPINIONFLAG_STAGE1_BRUTAL_GOOD 0x10000000 //268435456 // other guy killed someone in a brutal fashion, and we like that -#define OPINIONFLAG_STAGE2_BRUTAL_GOOD 0x20000000 //536870912 -#define OPINIONFLAG_STAGE3_BRUTAL_GOOD 0x40000000 //1073741824 -#define OPINIONFLAG_STAGE4_BRUTAL_GOOD 0x80000000 //2147483648*/ +#define OPINIONFLAG_STAGE1_CIV_ATTACKER 0x10000000 //268435456 // other guy attacks a non-hostile civilian +#define OPINIONFLAG_STAGE2_CIV_ATTACKER 0x20000000 //536870912 +#define OPINIONFLAG_STAGE3_CIV_ATTACKER 0x40000000 //1073741824 +#define OPINIONFLAG_STAGE4_CIV_ATTACKER 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 diff --git a/Tactical/Morale.cpp b/Tactical/Morale.cpp index 76675b318..f0ceb78f9 100644 --- a/Tactical/Morale.cpp +++ b/Tactical/Morale.cpp @@ -116,6 +116,7 @@ MoraleEvent gbMoraleEvent[NUM_MORALE_EVENTS] = // Flugente: dynamic opinions DynamicOpinionEvent gDynamicOpinionEvent[OPINIONEVENT_MAX] = { + // ubEventId sOpinionModifier fSameSector fSameAssignment fAwake fSquadsOnly { OPINIONEVENT_FRIENDLYFIRE, -10, TRUE, FALSE, FALSE, FALSE }, { OPINIONEVENT_SNITCHSOLDMEOUT, -3, FALSE, FALSE, FALSE, FALSE }, { OPINIONEVENT_SNITCHINTERFERENCE, -5, FALSE, FALSE, FALSE, FALSE }, @@ -150,11 +151,12 @@ DynamicOpinionEvent gDynamicOpinionEvent[OPINIONEVENT_MAX] = {OPINIONEVENT_BRUTAL_GOOD, 1, TRUE, FALSE, TRUE, FALSE}, {OPINIONEVENT_BRUTAL_BAD, -2, TRUE, FALSE, TRUE, FALSE}, {OPINIONEVENT_TEACHER, 1, TRUE, FALSE, FALSE, FALSE}, - { OPINIONEVENT_BESTCOMMANDEREVER, 8, TRUE, FALSE, FALSE, TRUE }, - { OPINIONEVENT_BATTLE_SAVIOUR, 6, TRUE, FALSE, FALSE, TRUE}, - { OPINIONEVENT_FRAGTHIEF, -2, TRUE, FALSE, FALSE, TRUE}, - { OPINIONEVENT_BATTLE_ASSIST, -1, TRUE, FALSE, FALSE, TRUE}, - { OPINIONEVENT_BATTLE_TOOK_PRISONER, 3, TRUE, FALSE, FALSE, TRUE} + {OPINIONEVENT_BESTCOMMANDEREVER, 8, TRUE, FALSE, FALSE, TRUE }, + {OPINIONEVENT_BATTLE_SAVIOUR, 6, TRUE, FALSE, FALSE, TRUE}, + {OPINIONEVENT_FRAGTHIEF, -2, TRUE, FALSE, FALSE, TRUE}, + {OPINIONEVENT_BATTLE_ASSIST, -1, TRUE, FALSE, FALSE, TRUE}, + {OPINIONEVENT_BATTLE_TOOK_PRISONER, 3, TRUE, FALSE, FALSE, TRUE}, + {OPINIONEVENT_CIV_ATTACKER, -3, TRUE, FALSE, FALSE, FALSE} }; BOOLEAN gfSomeoneSaidMoraleQuote = FALSE; diff --git a/Tactical/Soldier Control.cpp b/Tactical/Soldier Control.cpp index 5e2307750..2ff220c31 100644 --- a/Tactical/Soldier Control.cpp +++ b/Tactical/Soldier Control.cpp @@ -9780,6 +9780,15 @@ UINT8 SOLDIERTYPE::SoldierTakeDamage( INT8 bHeight, INT16 sLifeDeduct, INT16 sBr if ( ubAttacker != NOBODY && MercPtrs[ubAttacker] ) { AddOpinionEvent( this->ubProfile, MercPtrs[ubAttacker]->ubProfile, OPINIONEVENT_FRIENDLYFIRE ); + + // if this is a civilian, other mercs can complain about mercs shooting innocents + // Flugente: dynamic opinions: if this guy is not hostile towards us, then some mercs will complain about killing civilians + if ( this->aiData.bNeutral || this->bSide == MercPtrs[ubAttacker]->bSide ) + { + // not for killing animals though... + if ( this->ubBodyType != CROW && this->ubBodyType != COW ) + HandleDynamicOpinionChange( MercPtrs[ubAttacker], OPINIONEVENT_CIV_ATTACKER, TRUE, TRUE ); + } } // CJC Jan 21 99: add check to see if we are hurting an enemy in an enemy-controlled @@ -22856,7 +22865,7 @@ void HandleVolunteerRecruitment( SOLDIERTYPE* pRecruiter, SOLDIERTYPE* pTarget ) return; } - // recruiter ability + // several factors determine whether we can successfully recruit this guy FLOAT leadershipfactor = EffectiveLeadership( pRecruiter ) / 100.0; // bonus for assertive characters diff --git a/Utils/Text.h b/Utils/Text.h index 72b185622..56486b58e 100644 --- a/Utils/Text.h +++ b/Utils/Text.h @@ -2865,7 +2865,7 @@ extern STR16 szTacticalCoverDialogPrintString[]; // OPINIONEVENT_MAX is 39 // DOST_MAX is 17 -extern STR16 szDynamicDialogueText[39][17]; +extern STR16 szDynamicDialogueText[40][17]; // Flugente: dynamic dialogue extern STR16 szDynamicDialogueText_DOST_VICTIM_TO_INTERJECTOR_DENY[]; diff --git a/Utils/_ChineseText.cpp b/Utils/_ChineseText.cpp index dd4659b50..147ece209 100644 --- a/Utils/_ChineseText.cpp +++ b/Utils/_ChineseText.cpp @@ -9182,7 +9182,7 @@ STR16 szTacticalCoverDialogPrintString[]= }; // TODO.Translate -STR16 szDynamicDialogueText[39][17] = // TODO.Translate +STR16 szDynamicDialogueText[40][17] = // TODO.Translate { // OPINIONEVENT_FRIENDLYFIRE L"What the hell! $CAUSE$ attacked me!", @@ -9924,6 +9924,25 @@ STR16 szDynamicDialogueText[39][17] = // TODO.Translate L"", L"", L"", + + // OPINIONEVENT_CIV_ATTACKER + L"Watch it, $CAUSE$! They are on our side!", + L"", + L"", + L"That's just a scratch, they'll live.", + L"Oops.", + L"", + L"", + L"$VICTIM$ is angry: $CAUSE$ injured a civilian. What do you do?", + L"Well, this can happen. As long as they live it's okay.", + L"This won't look good in the after-action report.", + L"What are you doing? Watch it, $CAUSE$!", + L"Don't worry. Happens to me too all the time.", + L"Maintain fire discipline! After this is over, $VICTIM$ and $CAUSE$ will take care of the wounded.", + L"If $CAUSE$ had intended it, they would be dead, so no worries here.", + L"", + L"", + L"", }; diff --git a/Utils/_DutchText.cpp b/Utils/_DutchText.cpp index b69996a17..ebca6876c 100644 --- a/Utils/_DutchText.cpp +++ b/Utils/_DutchText.cpp @@ -9193,7 +9193,7 @@ STR16 szTacticalCoverDialogPrintString[]= }; // TODO.Translate -STR16 szDynamicDialogueText[39][17] = // TODO.Translate +STR16 szDynamicDialogueText[40][17] = // TODO.Translate { // OPINIONEVENT_FRIENDLYFIRE L"What the hell! $CAUSE$ attacked me!", @@ -9935,6 +9935,25 @@ STR16 szDynamicDialogueText[39][17] = // TODO.Translate L"", L"", L"", + + // OPINIONEVENT_CIV_ATTACKER + L"Watch it, $CAUSE$! They are on our side!", + L"", + L"", + L"That's just a scratch, they'll live.", + L"Oops.", + L"", + L"", + L"$VICTIM$ is angry: $CAUSE$ injured a civilian. What do you do?", + L"Well, this can happen. As long as they live it's okay.", + L"This won't look good in the after-action report.", + L"What are you doing? Watch it, $CAUSE$!", + L"Don't worry. Happens to me too all the time.", + L"Maintain fire discipline! After this is over, $VICTIM$ and $CAUSE$ will take care of the wounded.", + L"If $CAUSE$ had intended it, they would be dead, so no worries here.", + L"", + L"", + L"", }; diff --git a/Utils/_EnglishText.cpp b/Utils/_EnglishText.cpp index c9de7e286..0d5b8521b 100644 --- a/Utils/_EnglishText.cpp +++ b/Utils/_EnglishText.cpp @@ -9074,6 +9074,7 @@ STR16 szMercCompareEventText[]= L"%s stole my kill", L"%s and me fought well together", L"%s made the enemy surrender", + L"%s injured civilians", }; STR16 szWHOWebSite[] = @@ -9231,7 +9232,7 @@ STR16 szTacticalCoverDialogPrintString[]= }; -STR16 szDynamicDialogueText[39][17] = +STR16 szDynamicDialogueText[40][17] = { // OPINIONEVENT_FRIENDLYFIRE L"What the hell! $CAUSE$ attacked me!", @@ -9973,6 +9974,25 @@ STR16 szDynamicDialogueText[39][17] = L"", L"", L"", + + // OPINIONEVENT_CIV_ATTACKER + L"Watch it, $CAUSE$! They are on our side!", + L"", + L"", + L"That's just a scratch, they'll live.", + L"Oops.", + L"", + L"", + L"$VICTIM$ is angry: $CAUSE$ injured a civilian. What do you do?", + L"Well, this can happen. As long as they live it's okay.", + L"This won't look good in the after-action report.", + L"What are you doing? Watch it, $CAUSE$!", + L"Don't worry. Happens to me too all the time.", + L"Maintain fire discipline! After this is over, $VICTIM$ and $CAUSE$ will take care of the wounded.", + L"If $CAUSE$ had intended it, they would be dead, so no worries here.", + L"", + L"", + L"", }; diff --git a/Utils/_FrenchText.cpp b/Utils/_FrenchText.cpp index 0f71a519a..799b5eb27 100644 --- a/Utils/_FrenchText.cpp +++ b/Utils/_FrenchText.cpp @@ -9179,7 +9179,7 @@ STR16 szTacticalCoverDialogPrintString[]= }; // TODO.Translate -STR16 szDynamicDialogueText[39][17] = // TODO.Translate +STR16 szDynamicDialogueText[40][17] = // TODO.Translate { // OPINIONEVENT_FRIENDLYFIRE L"What the hell! $CAUSE$ attacked me!", @@ -9921,6 +9921,25 @@ STR16 szDynamicDialogueText[39][17] = // TODO.Translate L"", L"", L"", + + // OPINIONEVENT_CIV_ATTACKER + L"Watch it, $CAUSE$! They are on our side!", + L"", + L"", + L"That's just a scratch, they'll live.", + L"Oops.", + L"", + L"", + L"$VICTIM$ is angry: $CAUSE$ injured a civilian. What do you do?", + L"Well, this can happen. As long as they live it's okay.", + L"This won't look good in the after-action report.", + L"What are you doing? Watch it, $CAUSE$!", + L"Don't worry. Happens to me too all the time.", + L"Maintain fire discipline! After this is over, $VICTIM$ and $CAUSE$ will take care of the wounded.", + L"If $CAUSE$ had intended it, they would be dead, so no worries here.", + L"", + L"", + L"", }; diff --git a/Utils/_GermanText.cpp b/Utils/_GermanText.cpp index 0cd74b8ec..a044d9f43 100644 --- a/Utils/_GermanText.cpp +++ b/Utils/_GermanText.cpp @@ -9010,7 +9010,7 @@ STR16 szTacticalCoverDialogPrintString[]= }; // TODO.Translate -STR16 szDynamicDialogueText[39][17] = // TODO.Translate +STR16 szDynamicDialogueText[40][17] = // TODO.Translate { // OPINIONEVENT_FRIENDLYFIRE L"What the hell! $CAUSE$ attacked me!", @@ -9752,6 +9752,25 @@ STR16 szDynamicDialogueText[39][17] = // TODO.Translate L"", L"", L"", + + // OPINIONEVENT_CIV_ATTACKER + L"Watch it, $CAUSE$! They are on our side!", + L"", + L"", + L"That's just a scratch, they'll live.", + L"Oops.", + L"", + L"", + L"$VICTIM$ is angry: $CAUSE$ injured a civilian. What do you do?", + L"Well, this can happen. As long as they live it's okay.", + L"This won't look good in the after-action report.", + L"What are you doing? Watch it, $CAUSE$!", + L"Don't worry. Happens to me too all the time.", + L"Maintain fire discipline! After this is over, $VICTIM$ and $CAUSE$ will take care of the wounded.", + L"If $CAUSE$ had intended it, they would be dead, so no worries here.", + L"", + L"", + L"", }; diff --git a/Utils/_ItalianText.cpp b/Utils/_ItalianText.cpp index 090949a04..2e40d5e13 100644 --- a/Utils/_ItalianText.cpp +++ b/Utils/_ItalianText.cpp @@ -9188,7 +9188,7 @@ STR16 szTacticalCoverDialogPrintString[]= }; // TODO.Translate -STR16 szDynamicDialogueText[39][17] = // TODO.Translate +STR16 szDynamicDialogueText[40][17] = // TODO.Translate { // OPINIONEVENT_FRIENDLYFIRE L"What the hell! $CAUSE$ attacked me!", @@ -9930,6 +9930,25 @@ STR16 szDynamicDialogueText[39][17] = // TODO.Translate L"", L"", L"", + + // OPINIONEVENT_CIV_ATTACKER + L"Watch it, $CAUSE$! They are on our side!", + L"", + L"", + L"That's just a scratch, they'll live.", + L"Oops.", + L"", + L"", + L"$VICTIM$ is angry: $CAUSE$ injured a civilian. What do you do?", + L"Well, this can happen. As long as they live it's okay.", + L"This won't look good in the after-action report.", + L"What are you doing? Watch it, $CAUSE$!", + L"Don't worry. Happens to me too all the time.", + L"Maintain fire discipline! After this is over, $VICTIM$ and $CAUSE$ will take care of the wounded.", + L"If $CAUSE$ had intended it, they would be dead, so no worries here.", + L"", + L"", + L"", }; diff --git a/Utils/_PolishText.cpp b/Utils/_PolishText.cpp index cd3bd15a6..c05c25004 100644 --- a/Utils/_PolishText.cpp +++ b/Utils/_PolishText.cpp @@ -9205,7 +9205,7 @@ STR16 szTacticalCoverDialogPrintString[]= }; // TODO.Translate -STR16 szDynamicDialogueText[39][17] = // TODO.Translate +STR16 szDynamicDialogueText[40][17] = // TODO.Translate { // OPINIONEVENT_FRIENDLYFIRE L"What the hell! $CAUSE$ attacked me!", @@ -9947,6 +9947,25 @@ STR16 szDynamicDialogueText[39][17] = // TODO.Translate L"", L"", L"", + + // OPINIONEVENT_CIV_ATTACKER + L"Watch it, $CAUSE$! They are on our side!", + L"", + L"", + L"That's just a scratch, they'll live.", + L"Oops.", + L"", + L"", + L"$VICTIM$ is angry: $CAUSE$ injured a civilian. What do you do?", + L"Well, this can happen. As long as they live it's okay.", + L"This won't look good in the after-action report.", + L"What are you doing? Watch it, $CAUSE$!", + L"Don't worry. Happens to me too all the time.", + L"Maintain fire discipline! After this is over, $VICTIM$ and $CAUSE$ will take care of the wounded.", + L"If $CAUSE$ had intended it, they would be dead, so no worries here.", + L"", + L"", + L"", }; diff --git a/Utils/_RussianText.cpp b/Utils/_RussianText.cpp index 33ab0b683..3e18ab1f6 100644 --- a/Utils/_RussianText.cpp +++ b/Utils/_RussianText.cpp @@ -9176,7 +9176,7 @@ STR16 szTacticalCoverDialogPrintString[]= }; // TODO.Translate -STR16 szDynamicDialogueText[39][17] = // TODO.Translate +STR16 szDynamicDialogueText[40][17] = // TODO.Translate { // OPINIONEVENT_FRIENDLYFIRE L"What the hell! $CAUSE$ attacked me!", @@ -9918,6 +9918,25 @@ STR16 szDynamicDialogueText[39][17] = // TODO.Translate L"", L"", L"", + + // OPINIONEVENT_CIV_ATTACKER + L"Watch it, $CAUSE$! They are on our side!", + L"", + L"", + L"That's just a scratch, they'll live.", + L"Oops.", + L"", + L"", + L"$VICTIM$ is angry: $CAUSE$ injured a civilian. What do you do?", + L"Well, this can happen. As long as they live it's okay.", + L"This won't look good in the after-action report.", + L"What are you doing? Watch it, $CAUSE$!", + L"Don't worry. Happens to me too all the time.", + L"Maintain fire discipline! After this is over, $VICTIM$ and $CAUSE$ will take care of the wounded.", + L"If $CAUSE$ had intended it, they would be dead, so no worries here.", + L"", + L"", + L"", };