From 305cb3092e2eae464cb12edde1535f12172b82e6 Mon Sep 17 00:00:00 2001 From: FlightControl_Master Date: Mon, 9 Oct 2017 13:10:42 +0200 Subject: [PATCH] Patch 2.2.2: Updated Scoring * Disabled the logic of Fratricide until a DCS bug gets fixed by ED. There is no workaround possible. Units containing a player cannot be destroyed using Unit:destroy() API in multi player when the player is seated in a Unit from a Client connected PC to the Server. * By default, hit messages are disabled. They can be enabled by using SCORING:SetMessagesHit(). --- .../Moose/Functional/Scoring.lua | 10 +- Moose Mission Setup/Moose.lua | 12 +- Moose Mission Setup/Moose_.lua | 18 +- docs/Documentation/AI_A2A_Cap.html | 178 ++++++++--------- docs/Documentation/AI_A2A_GCI.html | 150 +++++++------- docs/Documentation/AI_A2A_Patrol.html | 104 +++++----- docs/Documentation/AI_Patrol.html | 3 - docs/Documentation/Base.html | 184 ++++++++++++++++++ docs/Documentation/Cargo.html | 1 + docs/Documentation/Detection.html | 2 + docs/Documentation/Fsm.html | 3 +- docs/Documentation/Positionable.html | 1 + docs/Documentation/Scoring.html | 4 +- docs/Documentation/Settings.html | 2 +- docs/Documentation/Spawn.html | 2 +- docs/Documentation/Task_Cargo.html | 1 + docs/Documentation/index.html | 4 +- 17 files changed, 432 insertions(+), 247 deletions(-) diff --git a/Moose Development/Moose/Functional/Scoring.lua b/Moose Development/Moose/Functional/Scoring.lua index 40c434f33..7a69a4721 100644 --- a/Moose Development/Moose/Functional/Scoring.lua +++ b/Moose Development/Moose/Functional/Scoring.lua @@ -102,7 +102,9 @@ -- A mission has goals and achievements. The scoring system provides an API to set additional scores when a goal or achievement event happens. -- Use the method @{#SCORING.AddGoalScore}() to add a score for a Player at any time in your mission. -- --- ## 1.5) Configure fratricide level. +-- ## 1.5) (Decommissioned) Configure fratricide level. +-- +-- **This functionality is decomissioned until the DCS bug concerning Unit:destroy() not being functional in multi player for player units has been fixed by ED**. -- -- When a player commits too much damage to friendlies, his penalty score will reach a certain level. -- Use the method @{#SCORING.SetFratricide}() to define the level when a player gets kicked. @@ -258,7 +260,7 @@ function SCORING:New( GameName ) -- Configure Messages self:SetMessagesToAll() - self:SetMessagesHit( true ) + self:SetMessagesHit( false ) self:SetMessagesDestroy( true ) self:SetMessagesScore( true ) self:SetMessagesZone( true ) @@ -616,6 +618,7 @@ function SCORING:_AddPlayerFromUnit( UnitData ) UnitName, _SCORINGCoalition[UnitCoalition], _SCORINGCategory[UnitCategory], UnitData:GetTypeName() ) end end + self.Players[PlayerName].UnitName = UnitName self.Players[PlayerName].UnitCoalition = UnitCoalition self.Players[PlayerName].UnitCategory = UnitCategory @@ -624,6 +627,8 @@ function SCORING:_AddPlayerFromUnit( UnitData ) self.Players[PlayerName].ThreatLevel = UnitThreatLevel self.Players[PlayerName].ThreatType = UnitThreatType + -- TODO: DCS bug concerning Units with skill level client don't get destroyed in multi player. This logic is deactivated until this bug gets fixed. + --[[ if self.Players[PlayerName].Penalty > self.Fratricide * 0.50 then if self.Players[PlayerName].PenaltyWarning < 1 then MESSAGE:NewType( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "': WARNING! If you continue to commit FRATRICIDE and have a PENALTY score higher than " .. self.Fratricide .. ", you will be COURT MARTIALED and DISMISSED from this mission! \nYour total penalty is: " .. self.Players[PlayerName].Penalty, @@ -639,6 +644,7 @@ function SCORING:_AddPlayerFromUnit( UnitData ) ):ToAll() UnitData:GetGroup():Destroy() end + --]] end end diff --git a/Moose Mission Setup/Moose.lua b/Moose Mission Setup/Moose.lua index 3f4dc04c5..dbc890dd4 100644 --- a/Moose Mission Setup/Moose.lua +++ b/Moose Mission Setup/Moose.lua @@ -1,5 +1,5 @@ env.info( '*** MOOSE STATIC INCLUDE START *** ' ) -env.info( 'Moose Generation Timestamp: 20171006_1228' ) +env.info( 'Moose Generation Timestamp: 20171009_1307' ) --- Various routines -- @module routines @@ -25532,7 +25532,9 @@ end -- A mission has goals and achievements. The scoring system provides an API to set additional scores when a goal or achievement event happens. -- Use the method @{#SCORING.AddGoalScore}() to add a score for a Player at any time in your mission. -- --- ## 1.5) Configure fratricide level. +-- ## 1.5) (Decommissioned) Configure fratricide level. +-- +-- **This functionality is decomissioned until the DCS bug concerning Unit:destroy() not being functional in multi player for player units has been fixed by ED**. -- -- When a player commits too much damage to friendlies, his penalty score will reach a certain level. -- Use the method @{#SCORING.SetFratricide}() to define the level when a player gets kicked. @@ -25688,7 +25690,7 @@ function SCORING:New( GameName ) -- Configure Messages self:SetMessagesToAll() - self:SetMessagesHit( true ) + self:SetMessagesHit( false ) self:SetMessagesDestroy( true ) self:SetMessagesScore( true ) self:SetMessagesZone( true ) @@ -26046,6 +26048,7 @@ function SCORING:_AddPlayerFromUnit( UnitData ) UnitName, _SCORINGCoalition[UnitCoalition], _SCORINGCategory[UnitCategory], UnitData:GetTypeName() ) end end + self.Players[PlayerName].UnitName = UnitName self.Players[PlayerName].UnitCoalition = UnitCoalition self.Players[PlayerName].UnitCategory = UnitCategory @@ -26054,6 +26057,8 @@ function SCORING:_AddPlayerFromUnit( UnitData ) self.Players[PlayerName].ThreatLevel = UnitThreatLevel self.Players[PlayerName].ThreatType = UnitThreatType + -- TODO: DCS bug concerning Units with skill level client don't get destroyed in multi player. This logic is deactivated until this bug gets fixed. + --[[ if self.Players[PlayerName].Penalty > self.Fratricide * 0.50 then if self.Players[PlayerName].PenaltyWarning < 1 then MESSAGE:NewType( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "': WARNING! If you continue to commit FRATRICIDE and have a PENALTY score higher than " .. self.Fratricide .. ", you will be COURT MARTIALED and DISMISSED from this mission! \nYour total penalty is: " .. self.Players[PlayerName].Penalty, @@ -26069,6 +26074,7 @@ function SCORING:_AddPlayerFromUnit( UnitData ) ):ToAll() UnitData:GetGroup():Destroy() end + --]] end end diff --git a/Moose Mission Setup/Moose_.lua b/Moose Mission Setup/Moose_.lua index 24bc41e6d..b7c84dece 100644 --- a/Moose Mission Setup/Moose_.lua +++ b/Moose Mission Setup/Moose_.lua @@ -1,5 +1,5 @@ env.info('*** MOOSE STATIC INCLUDE START *** ') -env.info('Moose Generation Timestamp: 20171006_1228') +env.info('Moose Generation Timestamp: 20171009_1307') env.setErrorMessageBoxEnabled(false) routines={} routines.majorVersion=3 @@ -12344,7 +12344,7 @@ end self.ScoringObjects={} self.ScoringZones={} self:SetMessagesToAll() -self:SetMessagesHit(true) +self:SetMessagesHit(false) self:SetMessagesDestroy(true) self:SetMessagesScore(true) self:SetMessagesZone(true) @@ -12507,20 +12507,6 @@ self.Players[PlayerName].UnitType=UnitTypeName self.Players[PlayerName].UNIT=UnitData self.Players[PlayerName].ThreatLevel=UnitThreatLevel self.Players[PlayerName].ThreatType=UnitThreatType -if self.Players[PlayerName].Penalty>self.Fratricide*0.50 then -if self.Players[PlayerName].PenaltyWarning<1 then -MESSAGE:NewType(self.DisplayMessagePrefix.."Player '"..PlayerName.."': WARNING! If you continue to commit FRATRICIDE and have a PENALTY score higher than "..self.Fratricide..", you will be COURT MARTIALED and DISMISSED from this mission! \nYour total penalty is: "..self.Players[PlayerName].Penalty, -MESSAGE.Type.Information -):ToAll() -self.Players[PlayerName].PenaltyWarning=self.Players[PlayerName].PenaltyWarning+1 -end -end -if self.Players[PlayerName].Penalty>self.Fratricide then -MESSAGE:NewType(self.DisplayMessagePrefix.."Player '"..PlayerName.."' committed FRATRICIDE, he will be COURT MARTIALED and is DISMISSED from this mission!", -MESSAGE.Type.Information -):ToAll() -UnitData:GetGroup():Destroy() -end end end function SCORING:AddGoalScore(PlayerUnit,GoalTag,Text,Score) diff --git a/docs/Documentation/AI_A2A_Cap.html b/docs/Documentation/AI_A2A_Cap.html index 9ac845f20..fd55e3d9f 100644 --- a/docs/Documentation/AI_A2A_Cap.html +++ b/docs/Documentation/AI_A2A_Cap.html @@ -112,7 +112,7 @@
-

AI CAP classes makes AI Controllables execute a Combat Air Patrol.

+

AI CAP classes makes AI Groups execute a Combat Air Patrol.

@@ -146,7 +146,7 @@

AIA2ACAP class, extends AICAP#AIPATROL_ZONE

-

The AIA2ACAP class implements the core functions to patrol a Zone by an AI Controllable or Group +

The AIA2ACAP class implements the core functions to patrol a Zone by an AI Group or Group and automatically engage any airborne enemies that are within a certain range or within a certain zone.

@@ -172,7 +172,7 @@ and automatically engage any airborne enemies that are within a certain range or - AI_A2A_CAP.AttackRoute(AIGroup, Fsm) + AI_A2A_CAP.AttackRoute(AICap, Fsm) @@ -232,73 +232,73 @@ and automatically engage any airborne enemies that are within a certain range or - AI_A2A_CAP:New(AIGroup, PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, EngageMinSpeed, EngageMaxSpeed, PatrolAltType) + AI_A2A_CAP:New(AICap, PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, EngageMinSpeed, EngageMaxSpeed, PatrolAltType)

Creates a new AIA2ACAP object

- AI_A2A_CAP:OnAfterAbort(Controllable, From, Event, To) + AI_A2A_CAP:OnAfterAbort(AICap, From, Event, To)

OnAfter Transition Handler for Event Abort.

- AI_A2A_CAP:OnAfterAccomplish(Controllable, From, Event, To) + AI_A2A_CAP:OnAfterAccomplish(AICap, From, Event, To)

OnAfter Transition Handler for Event Accomplish.

- AI_A2A_CAP:OnAfterDestroy(Controllable, From, Event, To) + AI_A2A_CAP:OnAfterDestroy(AICap, From, Event, To)

OnAfter Transition Handler for Event Destroy.

- AI_A2A_CAP:OnAfterEngage(Controllable, From, Event, To) + AI_A2A_CAP:OnAfterEngage(AICap, From, Event, To)

OnAfter Transition Handler for Event Engage.

- AI_A2A_CAP:OnAfterFired(Controllable, From, Event, To) + AI_A2A_CAP:OnAfterFired(AICap, From, Event, To)

OnAfter Transition Handler for Event Fired.

- AI_A2A_CAP:OnBeforeAbort(Controllable, From, Event, To) + AI_A2A_CAP:OnBeforeAbort(AICap, From, Event, To)

OnBefore Transition Handler for Event Abort.

- AI_A2A_CAP:OnBeforeAccomplish(Controllable, From, Event, To) + AI_A2A_CAP:OnBeforeAccomplish(AICap, From, Event, To)

OnBefore Transition Handler for Event Accomplish.

- AI_A2A_CAP:OnBeforeDestroy(Controllable, From, Event, To) + AI_A2A_CAP:OnBeforeDestroy(AICap, From, Event, To)

OnBefore Transition Handler for Event Destroy.

- AI_A2A_CAP:OnBeforeEngage(Controllable, From, Event, To) + AI_A2A_CAP:OnBeforeEngage(AICap, From, Event, To)

OnBefore Transition Handler for Event Engage.

- AI_A2A_CAP:OnBeforeFired(Controllable, From, Event, To) + AI_A2A_CAP:OnBeforeFired(AICap, From, Event, To)

OnBefore Transition Handler for Event Fired.

- AI_A2A_CAP:OnEnterEngaging(Controllable, From, Event, To) + AI_A2A_CAP:OnEnterEngaging(AICap, From, Event, To)

OnEnter Transition Handler for State Engaging.

@@ -310,13 +310,13 @@ and automatically engage any airborne enemies that are within a certain range or - AI_A2A_CAP:OnLeaveEngaging(Controllable, From, Event, To) + AI_A2A_CAP:OnLeaveEngaging(AICap, From, Event, To)

OnLeave Transition Handler for State Engaging.

- AI_A2A_CAP.Resume(AIGroup) + AI_A2A_CAP.Resume(AICap) @@ -364,43 +364,43 @@ and automatically engage any airborne enemies that are within a certain range or - AI_A2A_CAP:onafterAbort(AIGroup, From, Event, To) + AI_A2A_CAP:onafterAbort(AICap, From, Event, To) - AI_A2A_CAP:onafterAccomplish(Controllable, From, Event, To) + AI_A2A_CAP:onafterAccomplish(AICap, From, Event, To) - AI_A2A_CAP:onafterDestroy(Controllable, From, Event, To, EventData) + AI_A2A_CAP:onafterDestroy(AICap, From, Event, To, EventData) - AI_A2A_CAP:onafterEngage(AIGroup, From, Event, To, AttackSetUnit) + AI_A2A_CAP:onafterEngage(AICap, From, Event, To, AttackSetUnit) - AI_A2A_CAP:onafterPatrol(AIGroup, From, Event, To) + AI_A2A_CAP:onafterPatrol(AICap, From, Event, To)

onafter State Transition for Event Patrol.

- AI_A2A_CAP:onafterStart(AIGroup, From, Event, To) + AI_A2A_CAP:onafterStart(AICap, From, Event, To)

onafter State Transition for Event Patrol.

- AI_A2A_CAP:onbeforeEngage(AIGroup, From, Event, To) + AI_A2A_CAP:onbeforeEngage(AICap, From, Event, To) @@ -420,7 +420,7 @@ and automatically engage any airborne enemies that are within a certain range or

AIA2ACAP class, extends AICAP#AIPATROL_ZONE

-

The AIA2ACAP class implements the core functions to patrol a Zone by an AI Controllable or Group +

The AIA2ACAP class implements the core functions to patrol a Zone by an AI Group or Group and automatically engage any airborne enemies that are within a certain range or within a certain zone.

@@ -560,7 +560,7 @@ Use the method AICap#AI -AI_A2A_CAP.AttackRoute(AIGroup, Fsm) +AI_A2A_CAP.AttackRoute(AICap, Fsm)
@@ -571,7 +571,7 @@ Use the method AICap#AI
  • -

    Wrapper.Group#GROUP AIGroup :

    +

    Wrapper.Group#GROUP AICap :

  • @@ -709,7 +709,7 @@ Use the method AICap#AI -AI_A2A_CAP:New(AIGroup, PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, EngageMinSpeed, EngageMaxSpeed, PatrolAltType) +AI_A2A_CAP:New(AICap, PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, EngageMinSpeed, EngageMaxSpeed, PatrolAltType)
    @@ -720,7 +720,7 @@ Use the method AICap#AI
  • -

    Wrapper.Group#GROUP AIGroup :

    +

    Wrapper.Group#GROUP AICap :

  • @@ -744,25 +744,25 @@ The highest altitude in meters where to execute the patrol.

  • Dcs.DCSTypes#Speed PatrolMinSpeed : -The minimum speed of the Controllable in km/h.

    +The minimum speed of the Group in km/h.

  • Dcs.DCSTypes#Speed PatrolMaxSpeed : -The maximum speed of the Controllable in km/h.

    +The maximum speed of the Group in km/h.

  • Dcs.DCSTypes#Speed EngageMinSpeed : -The minimum speed of the Controllable in km/h when engaging a target.

    +The minimum speed of the Group in km/h when engaging a target.

  • Dcs.DCSTypes#Speed EngageMaxSpeed : -The maximum speed of the Controllable in km/h when engaging a target.

    +The maximum speed of the Group in km/h when engaging a target.

  • @@ -783,7 +783,7 @@ The altitude type ("RADIO"=="AGL", "BARO"=="ASL"). Defaults to RADIO

    -AI_A2A_CAP:OnAfterAbort(Controllable, From, Event, To) +AI_A2A_CAP:OnAfterAbort(AICap, From, Event, To)
    @@ -794,8 +794,8 @@ The altitude type ("RADIO"=="AGL", "BARO"=="ASL"). Defaults to RADIO