diff --git a/Core/Base/Event-Handling/EVT-001 - UNIT OnEventShot Stability Test/MOOSE_Spawn_Test.lua b/Core/Base/Event-Handling/EVT-001 - UNIT OnEventShot Stability Test/MOOSE_Spawn_Test.lua index 096919fa7f..b927ecf71d 100644 --- a/Core/Base/Event-Handling/EVT-001 - UNIT OnEventShot Stability Test/MOOSE_Spawn_Test.lua +++ b/Core/Base/Event-Handling/EVT-001 - UNIT OnEventShot Stability Test/MOOSE_Spawn_Test.lua @@ -1,4 +1,4 @@ -env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-17T14:20:51+02:00-2836d7a40f138255016eaa64009328d4d129e93f ***') +env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-18T18:19:05+02:00-c2933b6bed7d0609a24316bc6f575200248a29e1 ***') if not MOOSE_DEVELOPMENT_FOLDER then MOOSE_DEVELOPMENT_FOLDER='Scripts' end @@ -7472,7 +7472,9 @@ end if Event.dynamiccargo then Event.IniDynamicCargo=Event.dynamiccargo Event.IniDynamicCargoName=Event.IniDynamicCargo.StaticName -Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") +if Event.IniDynamicCargo.Owner or Event.IniUnitName then +Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or"None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+") +end end if Event.zone then Event.Zone=Event.zone @@ -23444,6 +23446,7 @@ POSITIONABLE.CargoBayCapacityValues={ ["HL_KORD"]=6*POSITIONABLE.DefaultInfantryWeight, ["HL_DSHK"]=6*POSITIONABLE.DefaultInfantryWeight, ["CCKW_353"]=16*POSITIONABLE.DefaultInfantryWeight, +["MaxxPro_MRAP"]=7*POSITIONABLE.DefaultInfantryWeight, } } function POSITIONABLE:SetCargoBayWeightLimit(WeightLimit) @@ -69550,6 +69553,34 @@ precepitation=1 else precepitation=3 end +elseif cloudspreset:find("RainyPreset4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset5")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset6")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("NEWRAINPRESET4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end elseif cloudspreset:find("RainyPreset")then clouddens=9 if temperature>5 then @@ -85645,7 +85676,7 @@ OFFENSIVE="Offensive", AGGRESSIVE="Aggressive", TOTALWAR="Total War" } -CHIEF.version="0.6.0" +CHIEF.version="0.6.1" function CHIEF:New(Coalition,AgentSet,Alias) Alias=Alias or"CHIEF" if type(Coalition)=="string"then @@ -86734,6 +86765,7 @@ end if MissionType==AUFTRAG.Type.ARMOREDGUARD then RangeMax=UTILS.NMToMeters(50) end +self:T(self.lid..string.format("Recruiting assets for zone %s",StratZone.opszone:GetName())) self:T(self.lid.."Missiontype="..MissionType) self:T({categories=Categories}) self:T({attributes=Attributes}) @@ -86745,11 +86777,15 @@ self:T2(self.lid..string.format("Recruited %d assets for %s mission STRATEGIC zo local TargetZone=StratZone.opszone.zone local TargetCoord=TargetZone:GetCoordinate() local transport=nil +local Ntransports=0 if Resource.carrierNmin and Resource.carrierNmax and Resource.carrierNmax>0 then +self:T(self.lid..string.format("Recruiting carrier assets: Nmin=%s, Nmax=%s",tostring(Resource.carrierNmin),tostring(Resource.carrierNmax))) local cargoassets=CHIEF._FilterAssets(assets,Resource.Categories,Resource.Attributes,Resource.Properties) if#cargoassets>0 then recruited,transport=LEGION.AssignAssetsForTransport(self.commander,self.commander.legions,cargoassets, Resource.carrierNmin,Resource.carrierNmax,TargetZone,nil,Resource.carrierCategories,Resource.carrierAttributes,Resource.carrierProperties) +Ntransports=transport~=nil and#transport.assets or 0 +self:T(self.lid..string.format("Recruited %d transport carrier assets success=%s",Ntransports,tostring(recruited))) end end if not recruited then @@ -86808,8 +86844,9 @@ if mission then mission:_AddAssets(assets) self:MissionAssign(mission,legions) StratZone.opszone:_AddMission(self.coalition,MissionType,mission) +mission:SetName(string.format("Stratzone %s-%d",StratZone.opszone:GetName(),mission.auftragsnummer)) Resource.mission=mission -if transport then +if transport and Ntransports>0 then mission.opstransport=transport transport.opszone=StratZone.opszone transport.chief=self @@ -95637,6 +95674,9 @@ table.insert(Assets,asset) end end end +if#Assets==0 then +return false,{},{} +end LEGION._OptimizeAssetSelection(Assets,MissionTypeOpt,TargetVec2,false,TotalWeight) for _,_asset in pairs(Assets)do local asset=_asset diff --git a/Core/Base/Event-Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/MOOSE_Spawn_Test.lua b/Core/Base/Event-Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/MOOSE_Spawn_Test.lua index 096919fa7f..b927ecf71d 100644 --- a/Core/Base/Event-Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/MOOSE_Spawn_Test.lua +++ b/Core/Base/Event-Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/MOOSE_Spawn_Test.lua @@ -1,4 +1,4 @@ -env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-17T14:20:51+02:00-2836d7a40f138255016eaa64009328d4d129e93f ***') +env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-18T18:19:05+02:00-c2933b6bed7d0609a24316bc6f575200248a29e1 ***') if not MOOSE_DEVELOPMENT_FOLDER then MOOSE_DEVELOPMENT_FOLDER='Scripts' end @@ -7472,7 +7472,9 @@ end if Event.dynamiccargo then Event.IniDynamicCargo=Event.dynamiccargo Event.IniDynamicCargoName=Event.IniDynamicCargo.StaticName -Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") +if Event.IniDynamicCargo.Owner or Event.IniUnitName then +Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or"None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+") +end end if Event.zone then Event.Zone=Event.zone @@ -23444,6 +23446,7 @@ POSITIONABLE.CargoBayCapacityValues={ ["HL_KORD"]=6*POSITIONABLE.DefaultInfantryWeight, ["HL_DSHK"]=6*POSITIONABLE.DefaultInfantryWeight, ["CCKW_353"]=16*POSITIONABLE.DefaultInfantryWeight, +["MaxxPro_MRAP"]=7*POSITIONABLE.DefaultInfantryWeight, } } function POSITIONABLE:SetCargoBayWeightLimit(WeightLimit) @@ -69550,6 +69553,34 @@ precepitation=1 else precepitation=3 end +elseif cloudspreset:find("RainyPreset4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset5")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset6")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("NEWRAINPRESET4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end elseif cloudspreset:find("RainyPreset")then clouddens=9 if temperature>5 then @@ -85645,7 +85676,7 @@ OFFENSIVE="Offensive", AGGRESSIVE="Aggressive", TOTALWAR="Total War" } -CHIEF.version="0.6.0" +CHIEF.version="0.6.1" function CHIEF:New(Coalition,AgentSet,Alias) Alias=Alias or"CHIEF" if type(Coalition)=="string"then @@ -86734,6 +86765,7 @@ end if MissionType==AUFTRAG.Type.ARMOREDGUARD then RangeMax=UTILS.NMToMeters(50) end +self:T(self.lid..string.format("Recruiting assets for zone %s",StratZone.opszone:GetName())) self:T(self.lid.."Missiontype="..MissionType) self:T({categories=Categories}) self:T({attributes=Attributes}) @@ -86745,11 +86777,15 @@ self:T2(self.lid..string.format("Recruited %d assets for %s mission STRATEGIC zo local TargetZone=StratZone.opszone.zone local TargetCoord=TargetZone:GetCoordinate() local transport=nil +local Ntransports=0 if Resource.carrierNmin and Resource.carrierNmax and Resource.carrierNmax>0 then +self:T(self.lid..string.format("Recruiting carrier assets: Nmin=%s, Nmax=%s",tostring(Resource.carrierNmin),tostring(Resource.carrierNmax))) local cargoassets=CHIEF._FilterAssets(assets,Resource.Categories,Resource.Attributes,Resource.Properties) if#cargoassets>0 then recruited,transport=LEGION.AssignAssetsForTransport(self.commander,self.commander.legions,cargoassets, Resource.carrierNmin,Resource.carrierNmax,TargetZone,nil,Resource.carrierCategories,Resource.carrierAttributes,Resource.carrierProperties) +Ntransports=transport~=nil and#transport.assets or 0 +self:T(self.lid..string.format("Recruited %d transport carrier assets success=%s",Ntransports,tostring(recruited))) end end if not recruited then @@ -86808,8 +86844,9 @@ if mission then mission:_AddAssets(assets) self:MissionAssign(mission,legions) StratZone.opszone:_AddMission(self.coalition,MissionType,mission) +mission:SetName(string.format("Stratzone %s-%d",StratZone.opszone:GetName(),mission.auftragsnummer)) Resource.mission=mission -if transport then +if transport and Ntransports>0 then mission.opstransport=transport transport.opszone=StratZone.opszone transport.chief=self @@ -95637,6 +95674,9 @@ table.insert(Assets,asset) end end end +if#Assets==0 then +return false,{},{} +end LEGION._OptimizeAssetSelection(Assets,MissionTypeOpt,TargetVec2,false,TotalWeight) for _,_asset in pairs(Assets)do local asset=_asset diff --git a/Core/Base/Event-Handling/EVT-100 - UNIT OnEventShot Example/MOOSE_Spawn_Test.lua b/Core/Base/Event-Handling/EVT-100 - UNIT OnEventShot Example/MOOSE_Spawn_Test.lua index 096919fa7f..b927ecf71d 100644 --- a/Core/Base/Event-Handling/EVT-100 - UNIT OnEventShot Example/MOOSE_Spawn_Test.lua +++ b/Core/Base/Event-Handling/EVT-100 - UNIT OnEventShot Example/MOOSE_Spawn_Test.lua @@ -1,4 +1,4 @@ -env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-17T14:20:51+02:00-2836d7a40f138255016eaa64009328d4d129e93f ***') +env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-18T18:19:05+02:00-c2933b6bed7d0609a24316bc6f575200248a29e1 ***') if not MOOSE_DEVELOPMENT_FOLDER then MOOSE_DEVELOPMENT_FOLDER='Scripts' end @@ -7472,7 +7472,9 @@ end if Event.dynamiccargo then Event.IniDynamicCargo=Event.dynamiccargo Event.IniDynamicCargoName=Event.IniDynamicCargo.StaticName -Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") +if Event.IniDynamicCargo.Owner or Event.IniUnitName then +Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or"None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+") +end end if Event.zone then Event.Zone=Event.zone @@ -23444,6 +23446,7 @@ POSITIONABLE.CargoBayCapacityValues={ ["HL_KORD"]=6*POSITIONABLE.DefaultInfantryWeight, ["HL_DSHK"]=6*POSITIONABLE.DefaultInfantryWeight, ["CCKW_353"]=16*POSITIONABLE.DefaultInfantryWeight, +["MaxxPro_MRAP"]=7*POSITIONABLE.DefaultInfantryWeight, } } function POSITIONABLE:SetCargoBayWeightLimit(WeightLimit) @@ -69550,6 +69553,34 @@ precepitation=1 else precepitation=3 end +elseif cloudspreset:find("RainyPreset4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset5")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset6")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("NEWRAINPRESET4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end elseif cloudspreset:find("RainyPreset")then clouddens=9 if temperature>5 then @@ -85645,7 +85676,7 @@ OFFENSIVE="Offensive", AGGRESSIVE="Aggressive", TOTALWAR="Total War" } -CHIEF.version="0.6.0" +CHIEF.version="0.6.1" function CHIEF:New(Coalition,AgentSet,Alias) Alias=Alias or"CHIEF" if type(Coalition)=="string"then @@ -86734,6 +86765,7 @@ end if MissionType==AUFTRAG.Type.ARMOREDGUARD then RangeMax=UTILS.NMToMeters(50) end +self:T(self.lid..string.format("Recruiting assets for zone %s",StratZone.opszone:GetName())) self:T(self.lid.."Missiontype="..MissionType) self:T({categories=Categories}) self:T({attributes=Attributes}) @@ -86745,11 +86777,15 @@ self:T2(self.lid..string.format("Recruited %d assets for %s mission STRATEGIC zo local TargetZone=StratZone.opszone.zone local TargetCoord=TargetZone:GetCoordinate() local transport=nil +local Ntransports=0 if Resource.carrierNmin and Resource.carrierNmax and Resource.carrierNmax>0 then +self:T(self.lid..string.format("Recruiting carrier assets: Nmin=%s, Nmax=%s",tostring(Resource.carrierNmin),tostring(Resource.carrierNmax))) local cargoassets=CHIEF._FilterAssets(assets,Resource.Categories,Resource.Attributes,Resource.Properties) if#cargoassets>0 then recruited,transport=LEGION.AssignAssetsForTransport(self.commander,self.commander.legions,cargoassets, Resource.carrierNmin,Resource.carrierNmax,TargetZone,nil,Resource.carrierCategories,Resource.carrierAttributes,Resource.carrierProperties) +Ntransports=transport~=nil and#transport.assets or 0 +self:T(self.lid..string.format("Recruited %d transport carrier assets success=%s",Ntransports,tostring(recruited))) end end if not recruited then @@ -86808,8 +86844,9 @@ if mission then mission:_AddAssets(assets) self:MissionAssign(mission,legions) StratZone.opszone:_AddMission(self.coalition,MissionType,mission) +mission:SetName(string.format("Stratzone %s-%d",StratZone.opszone:GetName(),mission.auftragsnummer)) Resource.mission=mission -if transport then +if transport and Ntransports>0 then mission.opstransport=transport transport.opszone=StratZone.opszone transport.chief=self @@ -95637,6 +95674,9 @@ table.insert(Assets,asset) end end end +if#Assets==0 then +return false,{},{} +end LEGION._OptimizeAssetSelection(Assets,MissionTypeOpt,TargetVec2,false,TotalWeight) for _,_asset in pairs(Assets)do local asset=_asset diff --git a/Core/Base/Event-Handling/EVT-101 - UNIT OnEventHit Example/MOOSE_Spawn_Test.lua b/Core/Base/Event-Handling/EVT-101 - UNIT OnEventHit Example/MOOSE_Spawn_Test.lua index 096919fa7f..b927ecf71d 100644 --- a/Core/Base/Event-Handling/EVT-101 - UNIT OnEventHit Example/MOOSE_Spawn_Test.lua +++ b/Core/Base/Event-Handling/EVT-101 - UNIT OnEventHit Example/MOOSE_Spawn_Test.lua @@ -1,4 +1,4 @@ -env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-17T14:20:51+02:00-2836d7a40f138255016eaa64009328d4d129e93f ***') +env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-18T18:19:05+02:00-c2933b6bed7d0609a24316bc6f575200248a29e1 ***') if not MOOSE_DEVELOPMENT_FOLDER then MOOSE_DEVELOPMENT_FOLDER='Scripts' end @@ -7472,7 +7472,9 @@ end if Event.dynamiccargo then Event.IniDynamicCargo=Event.dynamiccargo Event.IniDynamicCargoName=Event.IniDynamicCargo.StaticName -Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") +if Event.IniDynamicCargo.Owner or Event.IniUnitName then +Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or"None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+") +end end if Event.zone then Event.Zone=Event.zone @@ -23444,6 +23446,7 @@ POSITIONABLE.CargoBayCapacityValues={ ["HL_KORD"]=6*POSITIONABLE.DefaultInfantryWeight, ["HL_DSHK"]=6*POSITIONABLE.DefaultInfantryWeight, ["CCKW_353"]=16*POSITIONABLE.DefaultInfantryWeight, +["MaxxPro_MRAP"]=7*POSITIONABLE.DefaultInfantryWeight, } } function POSITIONABLE:SetCargoBayWeightLimit(WeightLimit) @@ -69550,6 +69553,34 @@ precepitation=1 else precepitation=3 end +elseif cloudspreset:find("RainyPreset4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset5")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset6")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("NEWRAINPRESET4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end elseif cloudspreset:find("RainyPreset")then clouddens=9 if temperature>5 then @@ -85645,7 +85676,7 @@ OFFENSIVE="Offensive", AGGRESSIVE="Aggressive", TOTALWAR="Total War" } -CHIEF.version="0.6.0" +CHIEF.version="0.6.1" function CHIEF:New(Coalition,AgentSet,Alias) Alias=Alias or"CHIEF" if type(Coalition)=="string"then @@ -86734,6 +86765,7 @@ end if MissionType==AUFTRAG.Type.ARMOREDGUARD then RangeMax=UTILS.NMToMeters(50) end +self:T(self.lid..string.format("Recruiting assets for zone %s",StratZone.opszone:GetName())) self:T(self.lid.."Missiontype="..MissionType) self:T({categories=Categories}) self:T({attributes=Attributes}) @@ -86745,11 +86777,15 @@ self:T2(self.lid..string.format("Recruited %d assets for %s mission STRATEGIC zo local TargetZone=StratZone.opszone.zone local TargetCoord=TargetZone:GetCoordinate() local transport=nil +local Ntransports=0 if Resource.carrierNmin and Resource.carrierNmax and Resource.carrierNmax>0 then +self:T(self.lid..string.format("Recruiting carrier assets: Nmin=%s, Nmax=%s",tostring(Resource.carrierNmin),tostring(Resource.carrierNmax))) local cargoassets=CHIEF._FilterAssets(assets,Resource.Categories,Resource.Attributes,Resource.Properties) if#cargoassets>0 then recruited,transport=LEGION.AssignAssetsForTransport(self.commander,self.commander.legions,cargoassets, Resource.carrierNmin,Resource.carrierNmax,TargetZone,nil,Resource.carrierCategories,Resource.carrierAttributes,Resource.carrierProperties) +Ntransports=transport~=nil and#transport.assets or 0 +self:T(self.lid..string.format("Recruited %d transport carrier assets success=%s",Ntransports,tostring(recruited))) end end if not recruited then @@ -86808,8 +86844,9 @@ if mission then mission:_AddAssets(assets) self:MissionAssign(mission,legions) StratZone.opszone:_AddMission(self.coalition,MissionType,mission) +mission:SetName(string.format("Stratzone %s-%d",StratZone.opszone:GetName(),mission.auftragsnummer)) Resource.mission=mission -if transport then +if transport and Ntransports>0 then mission.opstransport=transport transport.opszone=StratZone.opszone transport.chief=self @@ -95637,6 +95674,9 @@ table.insert(Assets,asset) end end end +if#Assets==0 then +return false,{},{} +end LEGION._OptimizeAssetSelection(Assets,MissionTypeOpt,TargetVec2,false,TotalWeight) for _,_asset in pairs(Assets)do local asset=_asset diff --git a/Core/Base/Event-Handling/EVT-102 - UNIT OnEventTakeoff Example/MOOSE_Spawn_Test.lua b/Core/Base/Event-Handling/EVT-102 - UNIT OnEventTakeoff Example/MOOSE_Spawn_Test.lua index 096919fa7f..b927ecf71d 100644 --- a/Core/Base/Event-Handling/EVT-102 - UNIT OnEventTakeoff Example/MOOSE_Spawn_Test.lua +++ b/Core/Base/Event-Handling/EVT-102 - UNIT OnEventTakeoff Example/MOOSE_Spawn_Test.lua @@ -1,4 +1,4 @@ -env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-17T14:20:51+02:00-2836d7a40f138255016eaa64009328d4d129e93f ***') +env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-18T18:19:05+02:00-c2933b6bed7d0609a24316bc6f575200248a29e1 ***') if not MOOSE_DEVELOPMENT_FOLDER then MOOSE_DEVELOPMENT_FOLDER='Scripts' end @@ -7472,7 +7472,9 @@ end if Event.dynamiccargo then Event.IniDynamicCargo=Event.dynamiccargo Event.IniDynamicCargoName=Event.IniDynamicCargo.StaticName -Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") +if Event.IniDynamicCargo.Owner or Event.IniUnitName then +Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or"None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+") +end end if Event.zone then Event.Zone=Event.zone @@ -23444,6 +23446,7 @@ POSITIONABLE.CargoBayCapacityValues={ ["HL_KORD"]=6*POSITIONABLE.DefaultInfantryWeight, ["HL_DSHK"]=6*POSITIONABLE.DefaultInfantryWeight, ["CCKW_353"]=16*POSITIONABLE.DefaultInfantryWeight, +["MaxxPro_MRAP"]=7*POSITIONABLE.DefaultInfantryWeight, } } function POSITIONABLE:SetCargoBayWeightLimit(WeightLimit) @@ -69550,6 +69553,34 @@ precepitation=1 else precepitation=3 end +elseif cloudspreset:find("RainyPreset4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset5")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset6")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("NEWRAINPRESET4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end elseif cloudspreset:find("RainyPreset")then clouddens=9 if temperature>5 then @@ -85645,7 +85676,7 @@ OFFENSIVE="Offensive", AGGRESSIVE="Aggressive", TOTALWAR="Total War" } -CHIEF.version="0.6.0" +CHIEF.version="0.6.1" function CHIEF:New(Coalition,AgentSet,Alias) Alias=Alias or"CHIEF" if type(Coalition)=="string"then @@ -86734,6 +86765,7 @@ end if MissionType==AUFTRAG.Type.ARMOREDGUARD then RangeMax=UTILS.NMToMeters(50) end +self:T(self.lid..string.format("Recruiting assets for zone %s",StratZone.opszone:GetName())) self:T(self.lid.."Missiontype="..MissionType) self:T({categories=Categories}) self:T({attributes=Attributes}) @@ -86745,11 +86777,15 @@ self:T2(self.lid..string.format("Recruited %d assets for %s mission STRATEGIC zo local TargetZone=StratZone.opszone.zone local TargetCoord=TargetZone:GetCoordinate() local transport=nil +local Ntransports=0 if Resource.carrierNmin and Resource.carrierNmax and Resource.carrierNmax>0 then +self:T(self.lid..string.format("Recruiting carrier assets: Nmin=%s, Nmax=%s",tostring(Resource.carrierNmin),tostring(Resource.carrierNmax))) local cargoassets=CHIEF._FilterAssets(assets,Resource.Categories,Resource.Attributes,Resource.Properties) if#cargoassets>0 then recruited,transport=LEGION.AssignAssetsForTransport(self.commander,self.commander.legions,cargoassets, Resource.carrierNmin,Resource.carrierNmax,TargetZone,nil,Resource.carrierCategories,Resource.carrierAttributes,Resource.carrierProperties) +Ntransports=transport~=nil and#transport.assets or 0 +self:T(self.lid..string.format("Recruited %d transport carrier assets success=%s",Ntransports,tostring(recruited))) end end if not recruited then @@ -86808,8 +86844,9 @@ if mission then mission:_AddAssets(assets) self:MissionAssign(mission,legions) StratZone.opszone:_AddMission(self.coalition,MissionType,mission) +mission:SetName(string.format("Stratzone %s-%d",StratZone.opszone:GetName(),mission.auftragsnummer)) Resource.mission=mission -if transport then +if transport and Ntransports>0 then mission.opstransport=transport transport.opszone=StratZone.opszone transport.chief=self @@ -95637,6 +95674,9 @@ table.insert(Assets,asset) end end end +if#Assets==0 then +return false,{},{} +end LEGION._OptimizeAssetSelection(Assets,MissionTypeOpt,TargetVec2,false,TotalWeight) for _,_asset in pairs(Assets)do local asset=_asset diff --git a/Core/Base/Event-Handling/EVT-103 - UNIT OnEventLand Example/MOOSE_Spawn_Test.lua b/Core/Base/Event-Handling/EVT-103 - UNIT OnEventLand Example/MOOSE_Spawn_Test.lua index 096919fa7f..b927ecf71d 100644 --- a/Core/Base/Event-Handling/EVT-103 - UNIT OnEventLand Example/MOOSE_Spawn_Test.lua +++ b/Core/Base/Event-Handling/EVT-103 - UNIT OnEventLand Example/MOOSE_Spawn_Test.lua @@ -1,4 +1,4 @@ -env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-17T14:20:51+02:00-2836d7a40f138255016eaa64009328d4d129e93f ***') +env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-18T18:19:05+02:00-c2933b6bed7d0609a24316bc6f575200248a29e1 ***') if not MOOSE_DEVELOPMENT_FOLDER then MOOSE_DEVELOPMENT_FOLDER='Scripts' end @@ -7472,7 +7472,9 @@ end if Event.dynamiccargo then Event.IniDynamicCargo=Event.dynamiccargo Event.IniDynamicCargoName=Event.IniDynamicCargo.StaticName -Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") +if Event.IniDynamicCargo.Owner or Event.IniUnitName then +Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or"None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+") +end end if Event.zone then Event.Zone=Event.zone @@ -23444,6 +23446,7 @@ POSITIONABLE.CargoBayCapacityValues={ ["HL_KORD"]=6*POSITIONABLE.DefaultInfantryWeight, ["HL_DSHK"]=6*POSITIONABLE.DefaultInfantryWeight, ["CCKW_353"]=16*POSITIONABLE.DefaultInfantryWeight, +["MaxxPro_MRAP"]=7*POSITIONABLE.DefaultInfantryWeight, } } function POSITIONABLE:SetCargoBayWeightLimit(WeightLimit) @@ -69550,6 +69553,34 @@ precepitation=1 else precepitation=3 end +elseif cloudspreset:find("RainyPreset4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset5")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset6")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("NEWRAINPRESET4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end elseif cloudspreset:find("RainyPreset")then clouddens=9 if temperature>5 then @@ -85645,7 +85676,7 @@ OFFENSIVE="Offensive", AGGRESSIVE="Aggressive", TOTALWAR="Total War" } -CHIEF.version="0.6.0" +CHIEF.version="0.6.1" function CHIEF:New(Coalition,AgentSet,Alias) Alias=Alias or"CHIEF" if type(Coalition)=="string"then @@ -86734,6 +86765,7 @@ end if MissionType==AUFTRAG.Type.ARMOREDGUARD then RangeMax=UTILS.NMToMeters(50) end +self:T(self.lid..string.format("Recruiting assets for zone %s",StratZone.opszone:GetName())) self:T(self.lid.."Missiontype="..MissionType) self:T({categories=Categories}) self:T({attributes=Attributes}) @@ -86745,11 +86777,15 @@ self:T2(self.lid..string.format("Recruited %d assets for %s mission STRATEGIC zo local TargetZone=StratZone.opszone.zone local TargetCoord=TargetZone:GetCoordinate() local transport=nil +local Ntransports=0 if Resource.carrierNmin and Resource.carrierNmax and Resource.carrierNmax>0 then +self:T(self.lid..string.format("Recruiting carrier assets: Nmin=%s, Nmax=%s",tostring(Resource.carrierNmin),tostring(Resource.carrierNmax))) local cargoassets=CHIEF._FilterAssets(assets,Resource.Categories,Resource.Attributes,Resource.Properties) if#cargoassets>0 then recruited,transport=LEGION.AssignAssetsForTransport(self.commander,self.commander.legions,cargoassets, Resource.carrierNmin,Resource.carrierNmax,TargetZone,nil,Resource.carrierCategories,Resource.carrierAttributes,Resource.carrierProperties) +Ntransports=transport~=nil and#transport.assets or 0 +self:T(self.lid..string.format("Recruited %d transport carrier assets success=%s",Ntransports,tostring(recruited))) end end if not recruited then @@ -86808,8 +86844,9 @@ if mission then mission:_AddAssets(assets) self:MissionAssign(mission,legions) StratZone.opszone:_AddMission(self.coalition,MissionType,mission) +mission:SetName(string.format("Stratzone %s-%d",StratZone.opszone:GetName(),mission.auftragsnummer)) Resource.mission=mission -if transport then +if transport and Ntransports>0 then mission.opstransport=transport transport.opszone=StratZone.opszone transport.chief=self @@ -95637,6 +95674,9 @@ table.insert(Assets,asset) end end end +if#Assets==0 then +return false,{},{} +end LEGION._OptimizeAssetSelection(Assets,MissionTypeOpt,TargetVec2,false,TotalWeight) for _,_asset in pairs(Assets)do local asset=_asset diff --git a/Core/Base/Event-Handling/EVT-104 - UNIT OnEventCrash Example/MOOSE_Spawn_Test.lua b/Core/Base/Event-Handling/EVT-104 - UNIT OnEventCrash Example/MOOSE_Spawn_Test.lua index 096919fa7f..b927ecf71d 100644 --- a/Core/Base/Event-Handling/EVT-104 - UNIT OnEventCrash Example/MOOSE_Spawn_Test.lua +++ b/Core/Base/Event-Handling/EVT-104 - UNIT OnEventCrash Example/MOOSE_Spawn_Test.lua @@ -1,4 +1,4 @@ -env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-17T14:20:51+02:00-2836d7a40f138255016eaa64009328d4d129e93f ***') +env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-18T18:19:05+02:00-c2933b6bed7d0609a24316bc6f575200248a29e1 ***') if not MOOSE_DEVELOPMENT_FOLDER then MOOSE_DEVELOPMENT_FOLDER='Scripts' end @@ -7472,7 +7472,9 @@ end if Event.dynamiccargo then Event.IniDynamicCargo=Event.dynamiccargo Event.IniDynamicCargoName=Event.IniDynamicCargo.StaticName -Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") +if Event.IniDynamicCargo.Owner or Event.IniUnitName then +Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or"None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+") +end end if Event.zone then Event.Zone=Event.zone @@ -23444,6 +23446,7 @@ POSITIONABLE.CargoBayCapacityValues={ ["HL_KORD"]=6*POSITIONABLE.DefaultInfantryWeight, ["HL_DSHK"]=6*POSITIONABLE.DefaultInfantryWeight, ["CCKW_353"]=16*POSITIONABLE.DefaultInfantryWeight, +["MaxxPro_MRAP"]=7*POSITIONABLE.DefaultInfantryWeight, } } function POSITIONABLE:SetCargoBayWeightLimit(WeightLimit) @@ -69550,6 +69553,34 @@ precepitation=1 else precepitation=3 end +elseif cloudspreset:find("RainyPreset4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset5")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset6")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("NEWRAINPRESET4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end elseif cloudspreset:find("RainyPreset")then clouddens=9 if temperature>5 then @@ -85645,7 +85676,7 @@ OFFENSIVE="Offensive", AGGRESSIVE="Aggressive", TOTALWAR="Total War" } -CHIEF.version="0.6.0" +CHIEF.version="0.6.1" function CHIEF:New(Coalition,AgentSet,Alias) Alias=Alias or"CHIEF" if type(Coalition)=="string"then @@ -86734,6 +86765,7 @@ end if MissionType==AUFTRAG.Type.ARMOREDGUARD then RangeMax=UTILS.NMToMeters(50) end +self:T(self.lid..string.format("Recruiting assets for zone %s",StratZone.opszone:GetName())) self:T(self.lid.."Missiontype="..MissionType) self:T({categories=Categories}) self:T({attributes=Attributes}) @@ -86745,11 +86777,15 @@ self:T2(self.lid..string.format("Recruited %d assets for %s mission STRATEGIC zo local TargetZone=StratZone.opszone.zone local TargetCoord=TargetZone:GetCoordinate() local transport=nil +local Ntransports=0 if Resource.carrierNmin and Resource.carrierNmax and Resource.carrierNmax>0 then +self:T(self.lid..string.format("Recruiting carrier assets: Nmin=%s, Nmax=%s",tostring(Resource.carrierNmin),tostring(Resource.carrierNmax))) local cargoassets=CHIEF._FilterAssets(assets,Resource.Categories,Resource.Attributes,Resource.Properties) if#cargoassets>0 then recruited,transport=LEGION.AssignAssetsForTransport(self.commander,self.commander.legions,cargoassets, Resource.carrierNmin,Resource.carrierNmax,TargetZone,nil,Resource.carrierCategories,Resource.carrierAttributes,Resource.carrierProperties) +Ntransports=transport~=nil and#transport.assets or 0 +self:T(self.lid..string.format("Recruited %d transport carrier assets success=%s",Ntransports,tostring(recruited))) end end if not recruited then @@ -86808,8 +86844,9 @@ if mission then mission:_AddAssets(assets) self:MissionAssign(mission,legions) StratZone.opszone:_AddMission(self.coalition,MissionType,mission) +mission:SetName(string.format("Stratzone %s-%d",StratZone.opszone:GetName(),mission.auftragsnummer)) Resource.mission=mission -if transport then +if transport and Ntransports>0 then mission.opstransport=transport transport.opszone=StratZone.opszone transport.chief=self @@ -95637,6 +95674,9 @@ table.insert(Assets,asset) end end end +if#Assets==0 then +return false,{},{} +end LEGION._OptimizeAssetSelection(Assets,MissionTypeOpt,TargetVec2,false,TotalWeight) for _,_asset in pairs(Assets)do local asset=_asset diff --git a/Core/Base/Event-Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/MOOSE_Spawn_Test.lua b/Core/Base/Event-Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/MOOSE_Spawn_Test.lua index 096919fa7f..b927ecf71d 100644 --- a/Core/Base/Event-Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/MOOSE_Spawn_Test.lua +++ b/Core/Base/Event-Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/MOOSE_Spawn_Test.lua @@ -1,4 +1,4 @@ -env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-17T14:20:51+02:00-2836d7a40f138255016eaa64009328d4d129e93f ***') +env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-18T18:19:05+02:00-c2933b6bed7d0609a24316bc6f575200248a29e1 ***') if not MOOSE_DEVELOPMENT_FOLDER then MOOSE_DEVELOPMENT_FOLDER='Scripts' end @@ -7472,7 +7472,9 @@ end if Event.dynamiccargo then Event.IniDynamicCargo=Event.dynamiccargo Event.IniDynamicCargoName=Event.IniDynamicCargo.StaticName -Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") +if Event.IniDynamicCargo.Owner or Event.IniUnitName then +Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or"None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+") +end end if Event.zone then Event.Zone=Event.zone @@ -23444,6 +23446,7 @@ POSITIONABLE.CargoBayCapacityValues={ ["HL_KORD"]=6*POSITIONABLE.DefaultInfantryWeight, ["HL_DSHK"]=6*POSITIONABLE.DefaultInfantryWeight, ["CCKW_353"]=16*POSITIONABLE.DefaultInfantryWeight, +["MaxxPro_MRAP"]=7*POSITIONABLE.DefaultInfantryWeight, } } function POSITIONABLE:SetCargoBayWeightLimit(WeightLimit) @@ -69550,6 +69553,34 @@ precepitation=1 else precepitation=3 end +elseif cloudspreset:find("RainyPreset4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset5")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset6")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("NEWRAINPRESET4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end elseif cloudspreset:find("RainyPreset")then clouddens=9 if temperature>5 then @@ -85645,7 +85676,7 @@ OFFENSIVE="Offensive", AGGRESSIVE="Aggressive", TOTALWAR="Total War" } -CHIEF.version="0.6.0" +CHIEF.version="0.6.1" function CHIEF:New(Coalition,AgentSet,Alias) Alias=Alias or"CHIEF" if type(Coalition)=="string"then @@ -86734,6 +86765,7 @@ end if MissionType==AUFTRAG.Type.ARMOREDGUARD then RangeMax=UTILS.NMToMeters(50) end +self:T(self.lid..string.format("Recruiting assets for zone %s",StratZone.opszone:GetName())) self:T(self.lid.."Missiontype="..MissionType) self:T({categories=Categories}) self:T({attributes=Attributes}) @@ -86745,11 +86777,15 @@ self:T2(self.lid..string.format("Recruited %d assets for %s mission STRATEGIC zo local TargetZone=StratZone.opszone.zone local TargetCoord=TargetZone:GetCoordinate() local transport=nil +local Ntransports=0 if Resource.carrierNmin and Resource.carrierNmax and Resource.carrierNmax>0 then +self:T(self.lid..string.format("Recruiting carrier assets: Nmin=%s, Nmax=%s",tostring(Resource.carrierNmin),tostring(Resource.carrierNmax))) local cargoassets=CHIEF._FilterAssets(assets,Resource.Categories,Resource.Attributes,Resource.Properties) if#cargoassets>0 then recruited,transport=LEGION.AssignAssetsForTransport(self.commander,self.commander.legions,cargoassets, Resource.carrierNmin,Resource.carrierNmax,TargetZone,nil,Resource.carrierCategories,Resource.carrierAttributes,Resource.carrierProperties) +Ntransports=transport~=nil and#transport.assets or 0 +self:T(self.lid..string.format("Recruited %d transport carrier assets success=%s",Ntransports,tostring(recruited))) end end if not recruited then @@ -86808,8 +86844,9 @@ if mission then mission:_AddAssets(assets) self:MissionAssign(mission,legions) StratZone.opszone:_AddMission(self.coalition,MissionType,mission) +mission:SetName(string.format("Stratzone %s-%d",StratZone.opszone:GetName(),mission.auftragsnummer)) Resource.mission=mission -if transport then +if transport and Ntransports>0 then mission.opstransport=transport transport.opszone=StratZone.opszone transport.chief=self @@ -95637,6 +95674,9 @@ table.insert(Assets,asset) end end end +if#Assets==0 then +return false,{},{} +end LEGION._OptimizeAssetSelection(Assets,MissionTypeOpt,TargetVec2,false,TotalWeight) for _,_asset in pairs(Assets)do local asset=_asset diff --git a/Core/Base/Event-Handling/EVT-200 - GROUP OnEventShot Example/MOOSE_Spawn_Test.lua b/Core/Base/Event-Handling/EVT-200 - GROUP OnEventShot Example/MOOSE_Spawn_Test.lua index 096919fa7f..b927ecf71d 100644 --- a/Core/Base/Event-Handling/EVT-200 - GROUP OnEventShot Example/MOOSE_Spawn_Test.lua +++ b/Core/Base/Event-Handling/EVT-200 - GROUP OnEventShot Example/MOOSE_Spawn_Test.lua @@ -1,4 +1,4 @@ -env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-17T14:20:51+02:00-2836d7a40f138255016eaa64009328d4d129e93f ***') +env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-18T18:19:05+02:00-c2933b6bed7d0609a24316bc6f575200248a29e1 ***') if not MOOSE_DEVELOPMENT_FOLDER then MOOSE_DEVELOPMENT_FOLDER='Scripts' end @@ -7472,7 +7472,9 @@ end if Event.dynamiccargo then Event.IniDynamicCargo=Event.dynamiccargo Event.IniDynamicCargoName=Event.IniDynamicCargo.StaticName -Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") +if Event.IniDynamicCargo.Owner or Event.IniUnitName then +Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or"None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+") +end end if Event.zone then Event.Zone=Event.zone @@ -23444,6 +23446,7 @@ POSITIONABLE.CargoBayCapacityValues={ ["HL_KORD"]=6*POSITIONABLE.DefaultInfantryWeight, ["HL_DSHK"]=6*POSITIONABLE.DefaultInfantryWeight, ["CCKW_353"]=16*POSITIONABLE.DefaultInfantryWeight, +["MaxxPro_MRAP"]=7*POSITIONABLE.DefaultInfantryWeight, } } function POSITIONABLE:SetCargoBayWeightLimit(WeightLimit) @@ -69550,6 +69553,34 @@ precepitation=1 else precepitation=3 end +elseif cloudspreset:find("RainyPreset4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset5")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset6")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("NEWRAINPRESET4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end elseif cloudspreset:find("RainyPreset")then clouddens=9 if temperature>5 then @@ -85645,7 +85676,7 @@ OFFENSIVE="Offensive", AGGRESSIVE="Aggressive", TOTALWAR="Total War" } -CHIEF.version="0.6.0" +CHIEF.version="0.6.1" function CHIEF:New(Coalition,AgentSet,Alias) Alias=Alias or"CHIEF" if type(Coalition)=="string"then @@ -86734,6 +86765,7 @@ end if MissionType==AUFTRAG.Type.ARMOREDGUARD then RangeMax=UTILS.NMToMeters(50) end +self:T(self.lid..string.format("Recruiting assets for zone %s",StratZone.opszone:GetName())) self:T(self.lid.."Missiontype="..MissionType) self:T({categories=Categories}) self:T({attributes=Attributes}) @@ -86745,11 +86777,15 @@ self:T2(self.lid..string.format("Recruited %d assets for %s mission STRATEGIC zo local TargetZone=StratZone.opszone.zone local TargetCoord=TargetZone:GetCoordinate() local transport=nil +local Ntransports=0 if Resource.carrierNmin and Resource.carrierNmax and Resource.carrierNmax>0 then +self:T(self.lid..string.format("Recruiting carrier assets: Nmin=%s, Nmax=%s",tostring(Resource.carrierNmin),tostring(Resource.carrierNmax))) local cargoassets=CHIEF._FilterAssets(assets,Resource.Categories,Resource.Attributes,Resource.Properties) if#cargoassets>0 then recruited,transport=LEGION.AssignAssetsForTransport(self.commander,self.commander.legions,cargoassets, Resource.carrierNmin,Resource.carrierNmax,TargetZone,nil,Resource.carrierCategories,Resource.carrierAttributes,Resource.carrierProperties) +Ntransports=transport~=nil and#transport.assets or 0 +self:T(self.lid..string.format("Recruited %d transport carrier assets success=%s",Ntransports,tostring(recruited))) end end if not recruited then @@ -86808,8 +86844,9 @@ if mission then mission:_AddAssets(assets) self:MissionAssign(mission,legions) StratZone.opszone:_AddMission(self.coalition,MissionType,mission) +mission:SetName(string.format("Stratzone %s-%d",StratZone.opszone:GetName(),mission.auftragsnummer)) Resource.mission=mission -if transport then +if transport and Ntransports>0 then mission.opstransport=transport transport.opszone=StratZone.opszone transport.chief=self @@ -95637,6 +95674,9 @@ table.insert(Assets,asset) end end end +if#Assets==0 then +return false,{},{} +end LEGION._OptimizeAssetSelection(Assets,MissionTypeOpt,TargetVec2,false,TotalWeight) for _,_asset in pairs(Assets)do local asset=_asset diff --git a/Core/Base/Event-Handling/EVT-201 - GROUP OnEventHit Example/MOOSE_Spawn_Test.lua b/Core/Base/Event-Handling/EVT-201 - GROUP OnEventHit Example/MOOSE_Spawn_Test.lua index 096919fa7f..b927ecf71d 100644 --- a/Core/Base/Event-Handling/EVT-201 - GROUP OnEventHit Example/MOOSE_Spawn_Test.lua +++ b/Core/Base/Event-Handling/EVT-201 - GROUP OnEventHit Example/MOOSE_Spawn_Test.lua @@ -1,4 +1,4 @@ -env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-17T14:20:51+02:00-2836d7a40f138255016eaa64009328d4d129e93f ***') +env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-18T18:19:05+02:00-c2933b6bed7d0609a24316bc6f575200248a29e1 ***') if not MOOSE_DEVELOPMENT_FOLDER then MOOSE_DEVELOPMENT_FOLDER='Scripts' end @@ -7472,7 +7472,9 @@ end if Event.dynamiccargo then Event.IniDynamicCargo=Event.dynamiccargo Event.IniDynamicCargoName=Event.IniDynamicCargo.StaticName -Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") +if Event.IniDynamicCargo.Owner or Event.IniUnitName then +Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or"None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+") +end end if Event.zone then Event.Zone=Event.zone @@ -23444,6 +23446,7 @@ POSITIONABLE.CargoBayCapacityValues={ ["HL_KORD"]=6*POSITIONABLE.DefaultInfantryWeight, ["HL_DSHK"]=6*POSITIONABLE.DefaultInfantryWeight, ["CCKW_353"]=16*POSITIONABLE.DefaultInfantryWeight, +["MaxxPro_MRAP"]=7*POSITIONABLE.DefaultInfantryWeight, } } function POSITIONABLE:SetCargoBayWeightLimit(WeightLimit) @@ -69550,6 +69553,34 @@ precepitation=1 else precepitation=3 end +elseif cloudspreset:find("RainyPreset4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset5")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset6")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("NEWRAINPRESET4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end elseif cloudspreset:find("RainyPreset")then clouddens=9 if temperature>5 then @@ -85645,7 +85676,7 @@ OFFENSIVE="Offensive", AGGRESSIVE="Aggressive", TOTALWAR="Total War" } -CHIEF.version="0.6.0" +CHIEF.version="0.6.1" function CHIEF:New(Coalition,AgentSet,Alias) Alias=Alias or"CHIEF" if type(Coalition)=="string"then @@ -86734,6 +86765,7 @@ end if MissionType==AUFTRAG.Type.ARMOREDGUARD then RangeMax=UTILS.NMToMeters(50) end +self:T(self.lid..string.format("Recruiting assets for zone %s",StratZone.opszone:GetName())) self:T(self.lid.."Missiontype="..MissionType) self:T({categories=Categories}) self:T({attributes=Attributes}) @@ -86745,11 +86777,15 @@ self:T2(self.lid..string.format("Recruited %d assets for %s mission STRATEGIC zo local TargetZone=StratZone.opszone.zone local TargetCoord=TargetZone:GetCoordinate() local transport=nil +local Ntransports=0 if Resource.carrierNmin and Resource.carrierNmax and Resource.carrierNmax>0 then +self:T(self.lid..string.format("Recruiting carrier assets: Nmin=%s, Nmax=%s",tostring(Resource.carrierNmin),tostring(Resource.carrierNmax))) local cargoassets=CHIEF._FilterAssets(assets,Resource.Categories,Resource.Attributes,Resource.Properties) if#cargoassets>0 then recruited,transport=LEGION.AssignAssetsForTransport(self.commander,self.commander.legions,cargoassets, Resource.carrierNmin,Resource.carrierNmax,TargetZone,nil,Resource.carrierCategories,Resource.carrierAttributes,Resource.carrierProperties) +Ntransports=transport~=nil and#transport.assets or 0 +self:T(self.lid..string.format("Recruited %d transport carrier assets success=%s",Ntransports,tostring(recruited))) end end if not recruited then @@ -86808,8 +86844,9 @@ if mission then mission:_AddAssets(assets) self:MissionAssign(mission,legions) StratZone.opszone:_AddMission(self.coalition,MissionType,mission) +mission:SetName(string.format("Stratzone %s-%d",StratZone.opszone:GetName(),mission.auftragsnummer)) Resource.mission=mission -if transport then +if transport and Ntransports>0 then mission.opstransport=transport transport.opszone=StratZone.opszone transport.chief=self @@ -95637,6 +95674,9 @@ table.insert(Assets,asset) end end end +if#Assets==0 then +return false,{},{} +end LEGION._OptimizeAssetSelection(Assets,MissionTypeOpt,TargetVec2,false,TotalWeight) for _,_asset in pairs(Assets)do local asset=_asset diff --git a/Core/Base/Event-Handling/EVT-204 - GROUP OnEventCrash Example/MOOSE_Spawn_Test.lua b/Core/Base/Event-Handling/EVT-204 - GROUP OnEventCrash Example/MOOSE_Spawn_Test.lua index 096919fa7f..b927ecf71d 100644 --- a/Core/Base/Event-Handling/EVT-204 - GROUP OnEventCrash Example/MOOSE_Spawn_Test.lua +++ b/Core/Base/Event-Handling/EVT-204 - GROUP OnEventCrash Example/MOOSE_Spawn_Test.lua @@ -1,4 +1,4 @@ -env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-17T14:20:51+02:00-2836d7a40f138255016eaa64009328d4d129e93f ***') +env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-18T18:19:05+02:00-c2933b6bed7d0609a24316bc6f575200248a29e1 ***') if not MOOSE_DEVELOPMENT_FOLDER then MOOSE_DEVELOPMENT_FOLDER='Scripts' end @@ -7472,7 +7472,9 @@ end if Event.dynamiccargo then Event.IniDynamicCargo=Event.dynamiccargo Event.IniDynamicCargoName=Event.IniDynamicCargo.StaticName -Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") +if Event.IniDynamicCargo.Owner or Event.IniUnitName then +Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or"None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+") +end end if Event.zone then Event.Zone=Event.zone @@ -23444,6 +23446,7 @@ POSITIONABLE.CargoBayCapacityValues={ ["HL_KORD"]=6*POSITIONABLE.DefaultInfantryWeight, ["HL_DSHK"]=6*POSITIONABLE.DefaultInfantryWeight, ["CCKW_353"]=16*POSITIONABLE.DefaultInfantryWeight, +["MaxxPro_MRAP"]=7*POSITIONABLE.DefaultInfantryWeight, } } function POSITIONABLE:SetCargoBayWeightLimit(WeightLimit) @@ -69550,6 +69553,34 @@ precepitation=1 else precepitation=3 end +elseif cloudspreset:find("RainyPreset4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset5")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset6")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("NEWRAINPRESET4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end elseif cloudspreset:find("RainyPreset")then clouddens=9 if temperature>5 then @@ -85645,7 +85676,7 @@ OFFENSIVE="Offensive", AGGRESSIVE="Aggressive", TOTALWAR="Total War" } -CHIEF.version="0.6.0" +CHIEF.version="0.6.1" function CHIEF:New(Coalition,AgentSet,Alias) Alias=Alias or"CHIEF" if type(Coalition)=="string"then @@ -86734,6 +86765,7 @@ end if MissionType==AUFTRAG.Type.ARMOREDGUARD then RangeMax=UTILS.NMToMeters(50) end +self:T(self.lid..string.format("Recruiting assets for zone %s",StratZone.opszone:GetName())) self:T(self.lid.."Missiontype="..MissionType) self:T({categories=Categories}) self:T({attributes=Attributes}) @@ -86745,11 +86777,15 @@ self:T2(self.lid..string.format("Recruited %d assets for %s mission STRATEGIC zo local TargetZone=StratZone.opszone.zone local TargetCoord=TargetZone:GetCoordinate() local transport=nil +local Ntransports=0 if Resource.carrierNmin and Resource.carrierNmax and Resource.carrierNmax>0 then +self:T(self.lid..string.format("Recruiting carrier assets: Nmin=%s, Nmax=%s",tostring(Resource.carrierNmin),tostring(Resource.carrierNmax))) local cargoassets=CHIEF._FilterAssets(assets,Resource.Categories,Resource.Attributes,Resource.Properties) if#cargoassets>0 then recruited,transport=LEGION.AssignAssetsForTransport(self.commander,self.commander.legions,cargoassets, Resource.carrierNmin,Resource.carrierNmax,TargetZone,nil,Resource.carrierCategories,Resource.carrierAttributes,Resource.carrierProperties) +Ntransports=transport~=nil and#transport.assets or 0 +self:T(self.lid..string.format("Recruited %d transport carrier assets success=%s",Ntransports,tostring(recruited))) end end if not recruited then @@ -86808,8 +86844,9 @@ if mission then mission:_AddAssets(assets) self:MissionAssign(mission,legions) StratZone.opszone:_AddMission(self.coalition,MissionType,mission) +mission:SetName(string.format("Stratzone %s-%d",StratZone.opszone:GetName(),mission.auftragsnummer)) Resource.mission=mission -if transport then +if transport and Ntransports>0 then mission.opstransport=transport transport.opszone=StratZone.opszone transport.chief=self @@ -95637,6 +95674,9 @@ table.insert(Assets,asset) end end end +if#Assets==0 then +return false,{},{} +end LEGION._OptimizeAssetSelection(Assets,MissionTypeOpt,TargetVec2,false,TotalWeight) for _,_asset in pairs(Assets)do local asset=_asset diff --git a/Core/Base/Event-Handling/EVT-205 - GROUP OnEventDead Example/MOOSE_Spawn_Test.lua b/Core/Base/Event-Handling/EVT-205 - GROUP OnEventDead Example/MOOSE_Spawn_Test.lua index 096919fa7f..b927ecf71d 100644 --- a/Core/Base/Event-Handling/EVT-205 - GROUP OnEventDead Example/MOOSE_Spawn_Test.lua +++ b/Core/Base/Event-Handling/EVT-205 - GROUP OnEventDead Example/MOOSE_Spawn_Test.lua @@ -1,4 +1,4 @@ -env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-17T14:20:51+02:00-2836d7a40f138255016eaa64009328d4d129e93f ***') +env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-18T18:19:05+02:00-c2933b6bed7d0609a24316bc6f575200248a29e1 ***') if not MOOSE_DEVELOPMENT_FOLDER then MOOSE_DEVELOPMENT_FOLDER='Scripts' end @@ -7472,7 +7472,9 @@ end if Event.dynamiccargo then Event.IniDynamicCargo=Event.dynamiccargo Event.IniDynamicCargoName=Event.IniDynamicCargo.StaticName -Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") +if Event.IniDynamicCargo.Owner or Event.IniUnitName then +Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or"None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+") +end end if Event.zone then Event.Zone=Event.zone @@ -23444,6 +23446,7 @@ POSITIONABLE.CargoBayCapacityValues={ ["HL_KORD"]=6*POSITIONABLE.DefaultInfantryWeight, ["HL_DSHK"]=6*POSITIONABLE.DefaultInfantryWeight, ["CCKW_353"]=16*POSITIONABLE.DefaultInfantryWeight, +["MaxxPro_MRAP"]=7*POSITIONABLE.DefaultInfantryWeight, } } function POSITIONABLE:SetCargoBayWeightLimit(WeightLimit) @@ -69550,6 +69553,34 @@ precepitation=1 else precepitation=3 end +elseif cloudspreset:find("RainyPreset4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset5")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset6")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("NEWRAINPRESET4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end elseif cloudspreset:find("RainyPreset")then clouddens=9 if temperature>5 then @@ -85645,7 +85676,7 @@ OFFENSIVE="Offensive", AGGRESSIVE="Aggressive", TOTALWAR="Total War" } -CHIEF.version="0.6.0" +CHIEF.version="0.6.1" function CHIEF:New(Coalition,AgentSet,Alias) Alias=Alias or"CHIEF" if type(Coalition)=="string"then @@ -86734,6 +86765,7 @@ end if MissionType==AUFTRAG.Type.ARMOREDGUARD then RangeMax=UTILS.NMToMeters(50) end +self:T(self.lid..string.format("Recruiting assets for zone %s",StratZone.opszone:GetName())) self:T(self.lid.."Missiontype="..MissionType) self:T({categories=Categories}) self:T({attributes=Attributes}) @@ -86745,11 +86777,15 @@ self:T2(self.lid..string.format("Recruited %d assets for %s mission STRATEGIC zo local TargetZone=StratZone.opszone.zone local TargetCoord=TargetZone:GetCoordinate() local transport=nil +local Ntransports=0 if Resource.carrierNmin and Resource.carrierNmax and Resource.carrierNmax>0 then +self:T(self.lid..string.format("Recruiting carrier assets: Nmin=%s, Nmax=%s",tostring(Resource.carrierNmin),tostring(Resource.carrierNmax))) local cargoassets=CHIEF._FilterAssets(assets,Resource.Categories,Resource.Attributes,Resource.Properties) if#cargoassets>0 then recruited,transport=LEGION.AssignAssetsForTransport(self.commander,self.commander.legions,cargoassets, Resource.carrierNmin,Resource.carrierNmax,TargetZone,nil,Resource.carrierCategories,Resource.carrierAttributes,Resource.carrierProperties) +Ntransports=transport~=nil and#transport.assets or 0 +self:T(self.lid..string.format("Recruited %d transport carrier assets success=%s",Ntransports,tostring(recruited))) end end if not recruited then @@ -86808,8 +86844,9 @@ if mission then mission:_AddAssets(assets) self:MissionAssign(mission,legions) StratZone.opszone:_AddMission(self.coalition,MissionType,mission) +mission:SetName(string.format("Stratzone %s-%d",StratZone.opszone:GetName(),mission.auftragsnummer)) Resource.mission=mission -if transport then +if transport and Ntransports>0 then mission.opstransport=transport transport.opszone=StratZone.opszone transport.chief=self @@ -95637,6 +95674,9 @@ table.insert(Assets,asset) end end end +if#Assets==0 then +return false,{},{} +end LEGION._OptimizeAssetSelection(Assets,MissionTypeOpt,TargetVec2,false,TotalWeight) for _,_asset in pairs(Assets)do local asset=_asset diff --git a/Core/Base/Event-Handling/EVT-401 - Generic OnEventHit Example/MOOSE_Spawn_Test.lua b/Core/Base/Event-Handling/EVT-401 - Generic OnEventHit Example/MOOSE_Spawn_Test.lua index 096919fa7f..b927ecf71d 100644 --- a/Core/Base/Event-Handling/EVT-401 - Generic OnEventHit Example/MOOSE_Spawn_Test.lua +++ b/Core/Base/Event-Handling/EVT-401 - Generic OnEventHit Example/MOOSE_Spawn_Test.lua @@ -1,4 +1,4 @@ -env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-17T14:20:51+02:00-2836d7a40f138255016eaa64009328d4d129e93f ***') +env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-18T18:19:05+02:00-c2933b6bed7d0609a24316bc6f575200248a29e1 ***') if not MOOSE_DEVELOPMENT_FOLDER then MOOSE_DEVELOPMENT_FOLDER='Scripts' end @@ -7472,7 +7472,9 @@ end if Event.dynamiccargo then Event.IniDynamicCargo=Event.dynamiccargo Event.IniDynamicCargoName=Event.IniDynamicCargo.StaticName -Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") +if Event.IniDynamicCargo.Owner or Event.IniUnitName then +Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or"None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+") +end end if Event.zone then Event.Zone=Event.zone @@ -23444,6 +23446,7 @@ POSITIONABLE.CargoBayCapacityValues={ ["HL_KORD"]=6*POSITIONABLE.DefaultInfantryWeight, ["HL_DSHK"]=6*POSITIONABLE.DefaultInfantryWeight, ["CCKW_353"]=16*POSITIONABLE.DefaultInfantryWeight, +["MaxxPro_MRAP"]=7*POSITIONABLE.DefaultInfantryWeight, } } function POSITIONABLE:SetCargoBayWeightLimit(WeightLimit) @@ -69550,6 +69553,34 @@ precepitation=1 else precepitation=3 end +elseif cloudspreset:find("RainyPreset4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset5")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset6")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("NEWRAINPRESET4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end elseif cloudspreset:find("RainyPreset")then clouddens=9 if temperature>5 then @@ -85645,7 +85676,7 @@ OFFENSIVE="Offensive", AGGRESSIVE="Aggressive", TOTALWAR="Total War" } -CHIEF.version="0.6.0" +CHIEF.version="0.6.1" function CHIEF:New(Coalition,AgentSet,Alias) Alias=Alias or"CHIEF" if type(Coalition)=="string"then @@ -86734,6 +86765,7 @@ end if MissionType==AUFTRAG.Type.ARMOREDGUARD then RangeMax=UTILS.NMToMeters(50) end +self:T(self.lid..string.format("Recruiting assets for zone %s",StratZone.opszone:GetName())) self:T(self.lid.."Missiontype="..MissionType) self:T({categories=Categories}) self:T({attributes=Attributes}) @@ -86745,11 +86777,15 @@ self:T2(self.lid..string.format("Recruited %d assets for %s mission STRATEGIC zo local TargetZone=StratZone.opszone.zone local TargetCoord=TargetZone:GetCoordinate() local transport=nil +local Ntransports=0 if Resource.carrierNmin and Resource.carrierNmax and Resource.carrierNmax>0 then +self:T(self.lid..string.format("Recruiting carrier assets: Nmin=%s, Nmax=%s",tostring(Resource.carrierNmin),tostring(Resource.carrierNmax))) local cargoassets=CHIEF._FilterAssets(assets,Resource.Categories,Resource.Attributes,Resource.Properties) if#cargoassets>0 then recruited,transport=LEGION.AssignAssetsForTransport(self.commander,self.commander.legions,cargoassets, Resource.carrierNmin,Resource.carrierNmax,TargetZone,nil,Resource.carrierCategories,Resource.carrierAttributes,Resource.carrierProperties) +Ntransports=transport~=nil and#transport.assets or 0 +self:T(self.lid..string.format("Recruited %d transport carrier assets success=%s",Ntransports,tostring(recruited))) end end if not recruited then @@ -86808,8 +86844,9 @@ if mission then mission:_AddAssets(assets) self:MissionAssign(mission,legions) StratZone.opszone:_AddMission(self.coalition,MissionType,mission) +mission:SetName(string.format("Stratzone %s-%d",StratZone.opszone:GetName(),mission.auftragsnummer)) Resource.mission=mission -if transport then +if transport and Ntransports>0 then mission.opstransport=transport transport.opszone=StratZone.opszone transport.chief=self @@ -95637,6 +95674,9 @@ table.insert(Assets,asset) end end end +if#Assets==0 then +return false,{},{} +end LEGION._OptimizeAssetSelection(Assets,MissionTypeOpt,TargetVec2,false,TotalWeight) for _,_asset in pairs(Assets)do local asset=_asset diff --git a/Core/Base/Event-Handling/EVT-402 - Generic OnEventMissionEnd Example/MOOSE_Spawn_Test.lua b/Core/Base/Event-Handling/EVT-402 - Generic OnEventMissionEnd Example/MOOSE_Spawn_Test.lua index 096919fa7f..b927ecf71d 100644 --- a/Core/Base/Event-Handling/EVT-402 - Generic OnEventMissionEnd Example/MOOSE_Spawn_Test.lua +++ b/Core/Base/Event-Handling/EVT-402 - Generic OnEventMissionEnd Example/MOOSE_Spawn_Test.lua @@ -1,4 +1,4 @@ -env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-17T14:20:51+02:00-2836d7a40f138255016eaa64009328d4d129e93f ***') +env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-18T18:19:05+02:00-c2933b6bed7d0609a24316bc6f575200248a29e1 ***') if not MOOSE_DEVELOPMENT_FOLDER then MOOSE_DEVELOPMENT_FOLDER='Scripts' end @@ -7472,7 +7472,9 @@ end if Event.dynamiccargo then Event.IniDynamicCargo=Event.dynamiccargo Event.IniDynamicCargoName=Event.IniDynamicCargo.StaticName -Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") +if Event.IniDynamicCargo.Owner or Event.IniUnitName then +Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or"None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+") +end end if Event.zone then Event.Zone=Event.zone @@ -23444,6 +23446,7 @@ POSITIONABLE.CargoBayCapacityValues={ ["HL_KORD"]=6*POSITIONABLE.DefaultInfantryWeight, ["HL_DSHK"]=6*POSITIONABLE.DefaultInfantryWeight, ["CCKW_353"]=16*POSITIONABLE.DefaultInfantryWeight, +["MaxxPro_MRAP"]=7*POSITIONABLE.DefaultInfantryWeight, } } function POSITIONABLE:SetCargoBayWeightLimit(WeightLimit) @@ -69550,6 +69553,34 @@ precepitation=1 else precepitation=3 end +elseif cloudspreset:find("RainyPreset4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset5")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset6")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("NEWRAINPRESET4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end elseif cloudspreset:find("RainyPreset")then clouddens=9 if temperature>5 then @@ -85645,7 +85676,7 @@ OFFENSIVE="Offensive", AGGRESSIVE="Aggressive", TOTALWAR="Total War" } -CHIEF.version="0.6.0" +CHIEF.version="0.6.1" function CHIEF:New(Coalition,AgentSet,Alias) Alias=Alias or"CHIEF" if type(Coalition)=="string"then @@ -86734,6 +86765,7 @@ end if MissionType==AUFTRAG.Type.ARMOREDGUARD then RangeMax=UTILS.NMToMeters(50) end +self:T(self.lid..string.format("Recruiting assets for zone %s",StratZone.opszone:GetName())) self:T(self.lid.."Missiontype="..MissionType) self:T({categories=Categories}) self:T({attributes=Attributes}) @@ -86745,11 +86777,15 @@ self:T2(self.lid..string.format("Recruited %d assets for %s mission STRATEGIC zo local TargetZone=StratZone.opszone.zone local TargetCoord=TargetZone:GetCoordinate() local transport=nil +local Ntransports=0 if Resource.carrierNmin and Resource.carrierNmax and Resource.carrierNmax>0 then +self:T(self.lid..string.format("Recruiting carrier assets: Nmin=%s, Nmax=%s",tostring(Resource.carrierNmin),tostring(Resource.carrierNmax))) local cargoassets=CHIEF._FilterAssets(assets,Resource.Categories,Resource.Attributes,Resource.Properties) if#cargoassets>0 then recruited,transport=LEGION.AssignAssetsForTransport(self.commander,self.commander.legions,cargoassets, Resource.carrierNmin,Resource.carrierNmax,TargetZone,nil,Resource.carrierCategories,Resource.carrierAttributes,Resource.carrierProperties) +Ntransports=transport~=nil and#transport.assets or 0 +self:T(self.lid..string.format("Recruited %d transport carrier assets success=%s",Ntransports,tostring(recruited))) end end if not recruited then @@ -86808,8 +86844,9 @@ if mission then mission:_AddAssets(assets) self:MissionAssign(mission,legions) StratZone.opszone:_AddMission(self.coalition,MissionType,mission) +mission:SetName(string.format("Stratzone %s-%d",StratZone.opszone:GetName(),mission.auftragsnummer)) Resource.mission=mission -if transport then +if transport and Ntransports>0 then mission.opstransport=transport transport.opszone=StratZone.opszone transport.chief=self @@ -95637,6 +95674,9 @@ table.insert(Assets,asset) end end end +if#Assets==0 then +return false,{},{} +end LEGION._OptimizeAssetSelection(Assets,MissionTypeOpt,TargetVec2,false,TotalWeight) for _,_asset in pairs(Assets)do local asset=_asset diff --git a/Core/Base/Event-Handling/EVT-403 - Generic OnEventBirth Example/MOOSE_Spawn_Test.lua b/Core/Base/Event-Handling/EVT-403 - Generic OnEventBirth Example/MOOSE_Spawn_Test.lua index 096919fa7f..b927ecf71d 100644 --- a/Core/Base/Event-Handling/EVT-403 - Generic OnEventBirth Example/MOOSE_Spawn_Test.lua +++ b/Core/Base/Event-Handling/EVT-403 - Generic OnEventBirth Example/MOOSE_Spawn_Test.lua @@ -1,4 +1,4 @@ -env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-17T14:20:51+02:00-2836d7a40f138255016eaa64009328d4d129e93f ***') +env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-18T18:19:05+02:00-c2933b6bed7d0609a24316bc6f575200248a29e1 ***') if not MOOSE_DEVELOPMENT_FOLDER then MOOSE_DEVELOPMENT_FOLDER='Scripts' end @@ -7472,7 +7472,9 @@ end if Event.dynamiccargo then Event.IniDynamicCargo=Event.dynamiccargo Event.IniDynamicCargoName=Event.IniDynamicCargo.StaticName -Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") +if Event.IniDynamicCargo.Owner or Event.IniUnitName then +Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or"None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+") +end end if Event.zone then Event.Zone=Event.zone @@ -23444,6 +23446,7 @@ POSITIONABLE.CargoBayCapacityValues={ ["HL_KORD"]=6*POSITIONABLE.DefaultInfantryWeight, ["HL_DSHK"]=6*POSITIONABLE.DefaultInfantryWeight, ["CCKW_353"]=16*POSITIONABLE.DefaultInfantryWeight, +["MaxxPro_MRAP"]=7*POSITIONABLE.DefaultInfantryWeight, } } function POSITIONABLE:SetCargoBayWeightLimit(WeightLimit) @@ -69550,6 +69553,34 @@ precepitation=1 else precepitation=3 end +elseif cloudspreset:find("RainyPreset4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset5")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset6")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("NEWRAINPRESET4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end elseif cloudspreset:find("RainyPreset")then clouddens=9 if temperature>5 then @@ -85645,7 +85676,7 @@ OFFENSIVE="Offensive", AGGRESSIVE="Aggressive", TOTALWAR="Total War" } -CHIEF.version="0.6.0" +CHIEF.version="0.6.1" function CHIEF:New(Coalition,AgentSet,Alias) Alias=Alias or"CHIEF" if type(Coalition)=="string"then @@ -86734,6 +86765,7 @@ end if MissionType==AUFTRAG.Type.ARMOREDGUARD then RangeMax=UTILS.NMToMeters(50) end +self:T(self.lid..string.format("Recruiting assets for zone %s",StratZone.opszone:GetName())) self:T(self.lid.."Missiontype="..MissionType) self:T({categories=Categories}) self:T({attributes=Attributes}) @@ -86745,11 +86777,15 @@ self:T2(self.lid..string.format("Recruited %d assets for %s mission STRATEGIC zo local TargetZone=StratZone.opszone.zone local TargetCoord=TargetZone:GetCoordinate() local transport=nil +local Ntransports=0 if Resource.carrierNmin and Resource.carrierNmax and Resource.carrierNmax>0 then +self:T(self.lid..string.format("Recruiting carrier assets: Nmin=%s, Nmax=%s",tostring(Resource.carrierNmin),tostring(Resource.carrierNmax))) local cargoassets=CHIEF._FilterAssets(assets,Resource.Categories,Resource.Attributes,Resource.Properties) if#cargoassets>0 then recruited,transport=LEGION.AssignAssetsForTransport(self.commander,self.commander.legions,cargoassets, Resource.carrierNmin,Resource.carrierNmax,TargetZone,nil,Resource.carrierCategories,Resource.carrierAttributes,Resource.carrierProperties) +Ntransports=transport~=nil and#transport.assets or 0 +self:T(self.lid..string.format("Recruited %d transport carrier assets success=%s",Ntransports,tostring(recruited))) end end if not recruited then @@ -86808,8 +86844,9 @@ if mission then mission:_AddAssets(assets) self:MissionAssign(mission,legions) StratZone.opszone:_AddMission(self.coalition,MissionType,mission) +mission:SetName(string.format("Stratzone %s-%d",StratZone.opszone:GetName(),mission.auftragsnummer)) Resource.mission=mission -if transport then +if transport and Ntransports>0 then mission.opstransport=transport transport.opszone=StratZone.opszone transport.chief=self @@ -95637,6 +95674,9 @@ table.insert(Assets,asset) end end end +if#Assets==0 then +return false,{},{} +end LEGION._OptimizeAssetSelection(Assets,MissionTypeOpt,TargetVec2,false,TotalWeight) for _,_asset in pairs(Assets)do local asset=_asset diff --git a/Core/Base/Event-Handling/EVT-500 - OnEventLand LandingChallenge/MOOSE_Spawn_Test.lua b/Core/Base/Event-Handling/EVT-500 - OnEventLand LandingChallenge/MOOSE_Spawn_Test.lua index 096919fa7f..b927ecf71d 100644 --- a/Core/Base/Event-Handling/EVT-500 - OnEventLand LandingChallenge/MOOSE_Spawn_Test.lua +++ b/Core/Base/Event-Handling/EVT-500 - OnEventLand LandingChallenge/MOOSE_Spawn_Test.lua @@ -1,4 +1,4 @@ -env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-17T14:20:51+02:00-2836d7a40f138255016eaa64009328d4d129e93f ***') +env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-18T18:19:05+02:00-c2933b6bed7d0609a24316bc6f575200248a29e1 ***') if not MOOSE_DEVELOPMENT_FOLDER then MOOSE_DEVELOPMENT_FOLDER='Scripts' end @@ -7472,7 +7472,9 @@ end if Event.dynamiccargo then Event.IniDynamicCargo=Event.dynamiccargo Event.IniDynamicCargoName=Event.IniDynamicCargo.StaticName -Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") +if Event.IniDynamicCargo.Owner or Event.IniUnitName then +Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or"None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+") +end end if Event.zone then Event.Zone=Event.zone @@ -23444,6 +23446,7 @@ POSITIONABLE.CargoBayCapacityValues={ ["HL_KORD"]=6*POSITIONABLE.DefaultInfantryWeight, ["HL_DSHK"]=6*POSITIONABLE.DefaultInfantryWeight, ["CCKW_353"]=16*POSITIONABLE.DefaultInfantryWeight, +["MaxxPro_MRAP"]=7*POSITIONABLE.DefaultInfantryWeight, } } function POSITIONABLE:SetCargoBayWeightLimit(WeightLimit) @@ -69550,6 +69553,34 @@ precepitation=1 else precepitation=3 end +elseif cloudspreset:find("RainyPreset4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset5")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset6")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("NEWRAINPRESET4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end elseif cloudspreset:find("RainyPreset")then clouddens=9 if temperature>5 then @@ -85645,7 +85676,7 @@ OFFENSIVE="Offensive", AGGRESSIVE="Aggressive", TOTALWAR="Total War" } -CHIEF.version="0.6.0" +CHIEF.version="0.6.1" function CHIEF:New(Coalition,AgentSet,Alias) Alias=Alias or"CHIEF" if type(Coalition)=="string"then @@ -86734,6 +86765,7 @@ end if MissionType==AUFTRAG.Type.ARMOREDGUARD then RangeMax=UTILS.NMToMeters(50) end +self:T(self.lid..string.format("Recruiting assets for zone %s",StratZone.opszone:GetName())) self:T(self.lid.."Missiontype="..MissionType) self:T({categories=Categories}) self:T({attributes=Attributes}) @@ -86745,11 +86777,15 @@ self:T2(self.lid..string.format("Recruited %d assets for %s mission STRATEGIC zo local TargetZone=StratZone.opszone.zone local TargetCoord=TargetZone:GetCoordinate() local transport=nil +local Ntransports=0 if Resource.carrierNmin and Resource.carrierNmax and Resource.carrierNmax>0 then +self:T(self.lid..string.format("Recruiting carrier assets: Nmin=%s, Nmax=%s",tostring(Resource.carrierNmin),tostring(Resource.carrierNmax))) local cargoassets=CHIEF._FilterAssets(assets,Resource.Categories,Resource.Attributes,Resource.Properties) if#cargoassets>0 then recruited,transport=LEGION.AssignAssetsForTransport(self.commander,self.commander.legions,cargoassets, Resource.carrierNmin,Resource.carrierNmax,TargetZone,nil,Resource.carrierCategories,Resource.carrierAttributes,Resource.carrierProperties) +Ntransports=transport~=nil and#transport.assets or 0 +self:T(self.lid..string.format("Recruited %d transport carrier assets success=%s",Ntransports,tostring(recruited))) end end if not recruited then @@ -86808,8 +86844,9 @@ if mission then mission:_AddAssets(assets) self:MissionAssign(mission,legions) StratZone.opszone:_AddMission(self.coalition,MissionType,mission) +mission:SetName(string.format("Stratzone %s-%d",StratZone.opszone:GetName(),mission.auftragsnummer)) Resource.mission=mission -if transport then +if transport and Ntransports>0 then mission.opstransport=transport transport.opszone=StratZone.opszone transport.chief=self @@ -95637,6 +95674,9 @@ table.insert(Assets,asset) end end end +if#Assets==0 then +return false,{},{} +end LEGION._OptimizeAssetSelection(Assets,MissionTypeOpt,TargetVec2,false,TotalWeight) for _,_asset in pairs(Assets)do local asset=_asset diff --git a/Core/Base/Event-Handling/EVT-501 - OnEventLand LandingChallengeComplex/MOOSE_Spawn_Test.lua b/Core/Base/Event-Handling/EVT-501 - OnEventLand LandingChallengeComplex/MOOSE_Spawn_Test.lua index 096919fa7f..b927ecf71d 100644 --- a/Core/Base/Event-Handling/EVT-501 - OnEventLand LandingChallengeComplex/MOOSE_Spawn_Test.lua +++ b/Core/Base/Event-Handling/EVT-501 - OnEventLand LandingChallengeComplex/MOOSE_Spawn_Test.lua @@ -1,4 +1,4 @@ -env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-17T14:20:51+02:00-2836d7a40f138255016eaa64009328d4d129e93f ***') +env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-18T18:19:05+02:00-c2933b6bed7d0609a24316bc6f575200248a29e1 ***') if not MOOSE_DEVELOPMENT_FOLDER then MOOSE_DEVELOPMENT_FOLDER='Scripts' end @@ -7472,7 +7472,9 @@ end if Event.dynamiccargo then Event.IniDynamicCargo=Event.dynamiccargo Event.IniDynamicCargoName=Event.IniDynamicCargo.StaticName -Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") +if Event.IniDynamicCargo.Owner or Event.IniUnitName then +Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or"None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+") +end end if Event.zone then Event.Zone=Event.zone @@ -23444,6 +23446,7 @@ POSITIONABLE.CargoBayCapacityValues={ ["HL_KORD"]=6*POSITIONABLE.DefaultInfantryWeight, ["HL_DSHK"]=6*POSITIONABLE.DefaultInfantryWeight, ["CCKW_353"]=16*POSITIONABLE.DefaultInfantryWeight, +["MaxxPro_MRAP"]=7*POSITIONABLE.DefaultInfantryWeight, } } function POSITIONABLE:SetCargoBayWeightLimit(WeightLimit) @@ -69550,6 +69553,34 @@ precepitation=1 else precepitation=3 end +elseif cloudspreset:find("RainyPreset4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset5")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset6")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("NEWRAINPRESET4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end elseif cloudspreset:find("RainyPreset")then clouddens=9 if temperature>5 then @@ -85645,7 +85676,7 @@ OFFENSIVE="Offensive", AGGRESSIVE="Aggressive", TOTALWAR="Total War" } -CHIEF.version="0.6.0" +CHIEF.version="0.6.1" function CHIEF:New(Coalition,AgentSet,Alias) Alias=Alias or"CHIEF" if type(Coalition)=="string"then @@ -86734,6 +86765,7 @@ end if MissionType==AUFTRAG.Type.ARMOREDGUARD then RangeMax=UTILS.NMToMeters(50) end +self:T(self.lid..string.format("Recruiting assets for zone %s",StratZone.opszone:GetName())) self:T(self.lid.."Missiontype="..MissionType) self:T({categories=Categories}) self:T({attributes=Attributes}) @@ -86745,11 +86777,15 @@ self:T2(self.lid..string.format("Recruited %d assets for %s mission STRATEGIC zo local TargetZone=StratZone.opszone.zone local TargetCoord=TargetZone:GetCoordinate() local transport=nil +local Ntransports=0 if Resource.carrierNmin and Resource.carrierNmax and Resource.carrierNmax>0 then +self:T(self.lid..string.format("Recruiting carrier assets: Nmin=%s, Nmax=%s",tostring(Resource.carrierNmin),tostring(Resource.carrierNmax))) local cargoassets=CHIEF._FilterAssets(assets,Resource.Categories,Resource.Attributes,Resource.Properties) if#cargoassets>0 then recruited,transport=LEGION.AssignAssetsForTransport(self.commander,self.commander.legions,cargoassets, Resource.carrierNmin,Resource.carrierNmax,TargetZone,nil,Resource.carrierCategories,Resource.carrierAttributes,Resource.carrierProperties) +Ntransports=transport~=nil and#transport.assets or 0 +self:T(self.lid..string.format("Recruited %d transport carrier assets success=%s",Ntransports,tostring(recruited))) end end if not recruited then @@ -86808,8 +86844,9 @@ if mission then mission:_AddAssets(assets) self:MissionAssign(mission,legions) StratZone.opszone:_AddMission(self.coalition,MissionType,mission) +mission:SetName(string.format("Stratzone %s-%d",StratZone.opszone:GetName(),mission.auftragsnummer)) Resource.mission=mission -if transport then +if transport and Ntransports>0 then mission.opstransport=transport transport.opszone=StratZone.opszone transport.chief=self @@ -95637,6 +95674,9 @@ table.insert(Assets,asset) end end end +if#Assets==0 then +return false,{},{} +end LEGION._OptimizeAssetSelection(Assets,MissionTypeOpt,TargetVec2,false,TotalWeight) for _,_asset in pairs(Assets)do local asset=_asset diff --git a/Core/Base/Event-Handling/EVT-600 - OnEventHit Example with a Set of Units/MOOSE_Spawn_Test.lua b/Core/Base/Event-Handling/EVT-600 - OnEventHit Example with a Set of Units/MOOSE_Spawn_Test.lua index 096919fa7f..b927ecf71d 100644 --- a/Core/Base/Event-Handling/EVT-600 - OnEventHit Example with a Set of Units/MOOSE_Spawn_Test.lua +++ b/Core/Base/Event-Handling/EVT-600 - OnEventHit Example with a Set of Units/MOOSE_Spawn_Test.lua @@ -1,4 +1,4 @@ -env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-17T14:20:51+02:00-2836d7a40f138255016eaa64009328d4d129e93f ***') +env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-18T18:19:05+02:00-c2933b6bed7d0609a24316bc6f575200248a29e1 ***') if not MOOSE_DEVELOPMENT_FOLDER then MOOSE_DEVELOPMENT_FOLDER='Scripts' end @@ -7472,7 +7472,9 @@ end if Event.dynamiccargo then Event.IniDynamicCargo=Event.dynamiccargo Event.IniDynamicCargoName=Event.IniDynamicCargo.StaticName -Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") +if Event.IniDynamicCargo.Owner or Event.IniUnitName then +Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or"None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+") +end end if Event.zone then Event.Zone=Event.zone @@ -23444,6 +23446,7 @@ POSITIONABLE.CargoBayCapacityValues={ ["HL_KORD"]=6*POSITIONABLE.DefaultInfantryWeight, ["HL_DSHK"]=6*POSITIONABLE.DefaultInfantryWeight, ["CCKW_353"]=16*POSITIONABLE.DefaultInfantryWeight, +["MaxxPro_MRAP"]=7*POSITIONABLE.DefaultInfantryWeight, } } function POSITIONABLE:SetCargoBayWeightLimit(WeightLimit) @@ -69550,6 +69553,34 @@ precepitation=1 else precepitation=3 end +elseif cloudspreset:find("RainyPreset4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset5")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset6")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("NEWRAINPRESET4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end elseif cloudspreset:find("RainyPreset")then clouddens=9 if temperature>5 then @@ -85645,7 +85676,7 @@ OFFENSIVE="Offensive", AGGRESSIVE="Aggressive", TOTALWAR="Total War" } -CHIEF.version="0.6.0" +CHIEF.version="0.6.1" function CHIEF:New(Coalition,AgentSet,Alias) Alias=Alias or"CHIEF" if type(Coalition)=="string"then @@ -86734,6 +86765,7 @@ end if MissionType==AUFTRAG.Type.ARMOREDGUARD then RangeMax=UTILS.NMToMeters(50) end +self:T(self.lid..string.format("Recruiting assets for zone %s",StratZone.opszone:GetName())) self:T(self.lid.."Missiontype="..MissionType) self:T({categories=Categories}) self:T({attributes=Attributes}) @@ -86745,11 +86777,15 @@ self:T2(self.lid..string.format("Recruited %d assets for %s mission STRATEGIC zo local TargetZone=StratZone.opszone.zone local TargetCoord=TargetZone:GetCoordinate() local transport=nil +local Ntransports=0 if Resource.carrierNmin and Resource.carrierNmax and Resource.carrierNmax>0 then +self:T(self.lid..string.format("Recruiting carrier assets: Nmin=%s, Nmax=%s",tostring(Resource.carrierNmin),tostring(Resource.carrierNmax))) local cargoassets=CHIEF._FilterAssets(assets,Resource.Categories,Resource.Attributes,Resource.Properties) if#cargoassets>0 then recruited,transport=LEGION.AssignAssetsForTransport(self.commander,self.commander.legions,cargoassets, Resource.carrierNmin,Resource.carrierNmax,TargetZone,nil,Resource.carrierCategories,Resource.carrierAttributes,Resource.carrierProperties) +Ntransports=transport~=nil and#transport.assets or 0 +self:T(self.lid..string.format("Recruited %d transport carrier assets success=%s",Ntransports,tostring(recruited))) end end if not recruited then @@ -86808,8 +86844,9 @@ if mission then mission:_AddAssets(assets) self:MissionAssign(mission,legions) StratZone.opszone:_AddMission(self.coalition,MissionType,mission) +mission:SetName(string.format("Stratzone %s-%d",StratZone.opszone:GetName(),mission.auftragsnummer)) Resource.mission=mission -if transport then +if transport and Ntransports>0 then mission.opstransport=transport transport.opszone=StratZone.opszone transport.chief=self @@ -95637,6 +95674,9 @@ table.insert(Assets,asset) end end end +if#Assets==0 then +return false,{},{} +end LEGION._OptimizeAssetSelection(Assets,MissionTypeOpt,TargetVec2,false,TotalWeight) for _,_asset in pairs(Assets)do local asset=_asset diff --git a/Core/Spawn/SPA-011 - Ground Ops - Simple Spawning/MOOSE_Spawn_Test.lua b/Core/Spawn/SPA-011 - Ground Ops - Simple Spawning/MOOSE_Spawn_Test.lua index 096919fa7f..b927ecf71d 100644 --- a/Core/Spawn/SPA-011 - Ground Ops - Simple Spawning/MOOSE_Spawn_Test.lua +++ b/Core/Spawn/SPA-011 - Ground Ops - Simple Spawning/MOOSE_Spawn_Test.lua @@ -1,4 +1,4 @@ -env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-17T14:20:51+02:00-2836d7a40f138255016eaa64009328d4d129e93f ***') +env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-18T18:19:05+02:00-c2933b6bed7d0609a24316bc6f575200248a29e1 ***') if not MOOSE_DEVELOPMENT_FOLDER then MOOSE_DEVELOPMENT_FOLDER='Scripts' end @@ -7472,7 +7472,9 @@ end if Event.dynamiccargo then Event.IniDynamicCargo=Event.dynamiccargo Event.IniDynamicCargoName=Event.IniDynamicCargo.StaticName -Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") +if Event.IniDynamicCargo.Owner or Event.IniUnitName then +Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or"None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+") +end end if Event.zone then Event.Zone=Event.zone @@ -23444,6 +23446,7 @@ POSITIONABLE.CargoBayCapacityValues={ ["HL_KORD"]=6*POSITIONABLE.DefaultInfantryWeight, ["HL_DSHK"]=6*POSITIONABLE.DefaultInfantryWeight, ["CCKW_353"]=16*POSITIONABLE.DefaultInfantryWeight, +["MaxxPro_MRAP"]=7*POSITIONABLE.DefaultInfantryWeight, } } function POSITIONABLE:SetCargoBayWeightLimit(WeightLimit) @@ -69550,6 +69553,34 @@ precepitation=1 else precepitation=3 end +elseif cloudspreset:find("RainyPreset4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset5")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset6")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("NEWRAINPRESET4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end elseif cloudspreset:find("RainyPreset")then clouddens=9 if temperature>5 then @@ -85645,7 +85676,7 @@ OFFENSIVE="Offensive", AGGRESSIVE="Aggressive", TOTALWAR="Total War" } -CHIEF.version="0.6.0" +CHIEF.version="0.6.1" function CHIEF:New(Coalition,AgentSet,Alias) Alias=Alias or"CHIEF" if type(Coalition)=="string"then @@ -86734,6 +86765,7 @@ end if MissionType==AUFTRAG.Type.ARMOREDGUARD then RangeMax=UTILS.NMToMeters(50) end +self:T(self.lid..string.format("Recruiting assets for zone %s",StratZone.opszone:GetName())) self:T(self.lid.."Missiontype="..MissionType) self:T({categories=Categories}) self:T({attributes=Attributes}) @@ -86745,11 +86777,15 @@ self:T2(self.lid..string.format("Recruited %d assets for %s mission STRATEGIC zo local TargetZone=StratZone.opszone.zone local TargetCoord=TargetZone:GetCoordinate() local transport=nil +local Ntransports=0 if Resource.carrierNmin and Resource.carrierNmax and Resource.carrierNmax>0 then +self:T(self.lid..string.format("Recruiting carrier assets: Nmin=%s, Nmax=%s",tostring(Resource.carrierNmin),tostring(Resource.carrierNmax))) local cargoassets=CHIEF._FilterAssets(assets,Resource.Categories,Resource.Attributes,Resource.Properties) if#cargoassets>0 then recruited,transport=LEGION.AssignAssetsForTransport(self.commander,self.commander.legions,cargoassets, Resource.carrierNmin,Resource.carrierNmax,TargetZone,nil,Resource.carrierCategories,Resource.carrierAttributes,Resource.carrierProperties) +Ntransports=transport~=nil and#transport.assets or 0 +self:T(self.lid..string.format("Recruited %d transport carrier assets success=%s",Ntransports,tostring(recruited))) end end if not recruited then @@ -86808,8 +86844,9 @@ if mission then mission:_AddAssets(assets) self:MissionAssign(mission,legions) StratZone.opszone:_AddMission(self.coalition,MissionType,mission) +mission:SetName(string.format("Stratzone %s-%d",StratZone.opszone:GetName(),mission.auftragsnummer)) Resource.mission=mission -if transport then +if transport and Ntransports>0 then mission.opstransport=transport transport.opszone=StratZone.opszone transport.chief=self @@ -95637,6 +95674,9 @@ table.insert(Assets,asset) end end end +if#Assets==0 then +return false,{},{} +end LEGION._OptimizeAssetSelection(Assets,MissionTypeOpt,TargetVec2,false,TotalWeight) for _,_asset in pairs(Assets)do local asset=_asset diff --git a/Core/Spawn/SPA-012 - Ground Ops - Multiple Spawns/MOOSE_Spawn_Test.lua b/Core/Spawn/SPA-012 - Ground Ops - Multiple Spawns/MOOSE_Spawn_Test.lua index 096919fa7f..b927ecf71d 100644 --- a/Core/Spawn/SPA-012 - Ground Ops - Multiple Spawns/MOOSE_Spawn_Test.lua +++ b/Core/Spawn/SPA-012 - Ground Ops - Multiple Spawns/MOOSE_Spawn_Test.lua @@ -1,4 +1,4 @@ -env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-17T14:20:51+02:00-2836d7a40f138255016eaa64009328d4d129e93f ***') +env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-18T18:19:05+02:00-c2933b6bed7d0609a24316bc6f575200248a29e1 ***') if not MOOSE_DEVELOPMENT_FOLDER then MOOSE_DEVELOPMENT_FOLDER='Scripts' end @@ -7472,7 +7472,9 @@ end if Event.dynamiccargo then Event.IniDynamicCargo=Event.dynamiccargo Event.IniDynamicCargoName=Event.IniDynamicCargo.StaticName -Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") +if Event.IniDynamicCargo.Owner or Event.IniUnitName then +Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or"None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+") +end end if Event.zone then Event.Zone=Event.zone @@ -23444,6 +23446,7 @@ POSITIONABLE.CargoBayCapacityValues={ ["HL_KORD"]=6*POSITIONABLE.DefaultInfantryWeight, ["HL_DSHK"]=6*POSITIONABLE.DefaultInfantryWeight, ["CCKW_353"]=16*POSITIONABLE.DefaultInfantryWeight, +["MaxxPro_MRAP"]=7*POSITIONABLE.DefaultInfantryWeight, } } function POSITIONABLE:SetCargoBayWeightLimit(WeightLimit) @@ -69550,6 +69553,34 @@ precepitation=1 else precepitation=3 end +elseif cloudspreset:find("RainyPreset4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset5")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset6")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("NEWRAINPRESET4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end elseif cloudspreset:find("RainyPreset")then clouddens=9 if temperature>5 then @@ -85645,7 +85676,7 @@ OFFENSIVE="Offensive", AGGRESSIVE="Aggressive", TOTALWAR="Total War" } -CHIEF.version="0.6.0" +CHIEF.version="0.6.1" function CHIEF:New(Coalition,AgentSet,Alias) Alias=Alias or"CHIEF" if type(Coalition)=="string"then @@ -86734,6 +86765,7 @@ end if MissionType==AUFTRAG.Type.ARMOREDGUARD then RangeMax=UTILS.NMToMeters(50) end +self:T(self.lid..string.format("Recruiting assets for zone %s",StratZone.opszone:GetName())) self:T(self.lid.."Missiontype="..MissionType) self:T({categories=Categories}) self:T({attributes=Attributes}) @@ -86745,11 +86777,15 @@ self:T2(self.lid..string.format("Recruited %d assets for %s mission STRATEGIC zo local TargetZone=StratZone.opszone.zone local TargetCoord=TargetZone:GetCoordinate() local transport=nil +local Ntransports=0 if Resource.carrierNmin and Resource.carrierNmax and Resource.carrierNmax>0 then +self:T(self.lid..string.format("Recruiting carrier assets: Nmin=%s, Nmax=%s",tostring(Resource.carrierNmin),tostring(Resource.carrierNmax))) local cargoassets=CHIEF._FilterAssets(assets,Resource.Categories,Resource.Attributes,Resource.Properties) if#cargoassets>0 then recruited,transport=LEGION.AssignAssetsForTransport(self.commander,self.commander.legions,cargoassets, Resource.carrierNmin,Resource.carrierNmax,TargetZone,nil,Resource.carrierCategories,Resource.carrierAttributes,Resource.carrierProperties) +Ntransports=transport~=nil and#transport.assets or 0 +self:T(self.lid..string.format("Recruited %d transport carrier assets success=%s",Ntransports,tostring(recruited))) end end if not recruited then @@ -86808,8 +86844,9 @@ if mission then mission:_AddAssets(assets) self:MissionAssign(mission,legions) StratZone.opszone:_AddMission(self.coalition,MissionType,mission) +mission:SetName(string.format("Stratzone %s-%d",StratZone.opszone:GetName(),mission.auftragsnummer)) Resource.mission=mission -if transport then +if transport and Ntransports>0 then mission.opstransport=transport transport.opszone=StratZone.opszone transport.chief=self @@ -95637,6 +95674,9 @@ table.insert(Assets,asset) end end end +if#Assets==0 then +return false,{},{} +end LEGION._OptimizeAssetSelection(Assets,MissionTypeOpt,TargetVec2,false,TotalWeight) for _,_asset in pairs(Assets)do local asset=_asset diff --git a/Core/Spawn/SPA-013 - Ground Ops - Scheduled Spawns/MOOSE_Spawn_Test.lua b/Core/Spawn/SPA-013 - Ground Ops - Scheduled Spawns/MOOSE_Spawn_Test.lua index 096919fa7f..b927ecf71d 100644 --- a/Core/Spawn/SPA-013 - Ground Ops - Scheduled Spawns/MOOSE_Spawn_Test.lua +++ b/Core/Spawn/SPA-013 - Ground Ops - Scheduled Spawns/MOOSE_Spawn_Test.lua @@ -1,4 +1,4 @@ -env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-17T14:20:51+02:00-2836d7a40f138255016eaa64009328d4d129e93f ***') +env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-18T18:19:05+02:00-c2933b6bed7d0609a24316bc6f575200248a29e1 ***') if not MOOSE_DEVELOPMENT_FOLDER then MOOSE_DEVELOPMENT_FOLDER='Scripts' end @@ -7472,7 +7472,9 @@ end if Event.dynamiccargo then Event.IniDynamicCargo=Event.dynamiccargo Event.IniDynamicCargoName=Event.IniDynamicCargo.StaticName -Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") +if Event.IniDynamicCargo.Owner or Event.IniUnitName then +Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or"None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+") +end end if Event.zone then Event.Zone=Event.zone @@ -23444,6 +23446,7 @@ POSITIONABLE.CargoBayCapacityValues={ ["HL_KORD"]=6*POSITIONABLE.DefaultInfantryWeight, ["HL_DSHK"]=6*POSITIONABLE.DefaultInfantryWeight, ["CCKW_353"]=16*POSITIONABLE.DefaultInfantryWeight, +["MaxxPro_MRAP"]=7*POSITIONABLE.DefaultInfantryWeight, } } function POSITIONABLE:SetCargoBayWeightLimit(WeightLimit) @@ -69550,6 +69553,34 @@ precepitation=1 else precepitation=3 end +elseif cloudspreset:find("RainyPreset4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset5")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset6")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("NEWRAINPRESET4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end elseif cloudspreset:find("RainyPreset")then clouddens=9 if temperature>5 then @@ -85645,7 +85676,7 @@ OFFENSIVE="Offensive", AGGRESSIVE="Aggressive", TOTALWAR="Total War" } -CHIEF.version="0.6.0" +CHIEF.version="0.6.1" function CHIEF:New(Coalition,AgentSet,Alias) Alias=Alias or"CHIEF" if type(Coalition)=="string"then @@ -86734,6 +86765,7 @@ end if MissionType==AUFTRAG.Type.ARMOREDGUARD then RangeMax=UTILS.NMToMeters(50) end +self:T(self.lid..string.format("Recruiting assets for zone %s",StratZone.opszone:GetName())) self:T(self.lid.."Missiontype="..MissionType) self:T({categories=Categories}) self:T({attributes=Attributes}) @@ -86745,11 +86777,15 @@ self:T2(self.lid..string.format("Recruited %d assets for %s mission STRATEGIC zo local TargetZone=StratZone.opszone.zone local TargetCoord=TargetZone:GetCoordinate() local transport=nil +local Ntransports=0 if Resource.carrierNmin and Resource.carrierNmax and Resource.carrierNmax>0 then +self:T(self.lid..string.format("Recruiting carrier assets: Nmin=%s, Nmax=%s",tostring(Resource.carrierNmin),tostring(Resource.carrierNmax))) local cargoassets=CHIEF._FilterAssets(assets,Resource.Categories,Resource.Attributes,Resource.Properties) if#cargoassets>0 then recruited,transport=LEGION.AssignAssetsForTransport(self.commander,self.commander.legions,cargoassets, Resource.carrierNmin,Resource.carrierNmax,TargetZone,nil,Resource.carrierCategories,Resource.carrierAttributes,Resource.carrierProperties) +Ntransports=transport~=nil and#transport.assets or 0 +self:T(self.lid..string.format("Recruited %d transport carrier assets success=%s",Ntransports,tostring(recruited))) end end if not recruited then @@ -86808,8 +86844,9 @@ if mission then mission:_AddAssets(assets) self:MissionAssign(mission,legions) StratZone.opszone:_AddMission(self.coalition,MissionType,mission) +mission:SetName(string.format("Stratzone %s-%d",StratZone.opszone:GetName(),mission.auftragsnummer)) Resource.mission=mission -if transport then +if transport and Ntransports>0 then mission.opstransport=transport transport.opszone=StratZone.opszone transport.chief=self @@ -95637,6 +95674,9 @@ table.insert(Assets,asset) end end end +if#Assets==0 then +return false,{},{} +end LEGION._OptimizeAssetSelection(Assets,MissionTypeOpt,TargetVec2,false,TotalWeight) for _,_asset in pairs(Assets)do local asset=_asset diff --git a/Core/Spawn/SPA-014 - Ground Ops - Scheduled Spawns Limited/MOOSE_Spawn_Test.lua b/Core/Spawn/SPA-014 - Ground Ops - Scheduled Spawns Limited/MOOSE_Spawn_Test.lua index 096919fa7f..b927ecf71d 100644 --- a/Core/Spawn/SPA-014 - Ground Ops - Scheduled Spawns Limited/MOOSE_Spawn_Test.lua +++ b/Core/Spawn/SPA-014 - Ground Ops - Scheduled Spawns Limited/MOOSE_Spawn_Test.lua @@ -1,4 +1,4 @@ -env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-17T14:20:51+02:00-2836d7a40f138255016eaa64009328d4d129e93f ***') +env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-18T18:19:05+02:00-c2933b6bed7d0609a24316bc6f575200248a29e1 ***') if not MOOSE_DEVELOPMENT_FOLDER then MOOSE_DEVELOPMENT_FOLDER='Scripts' end @@ -7472,7 +7472,9 @@ end if Event.dynamiccargo then Event.IniDynamicCargo=Event.dynamiccargo Event.IniDynamicCargoName=Event.IniDynamicCargo.StaticName -Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") +if Event.IniDynamicCargo.Owner or Event.IniUnitName then +Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or"None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+") +end end if Event.zone then Event.Zone=Event.zone @@ -23444,6 +23446,7 @@ POSITIONABLE.CargoBayCapacityValues={ ["HL_KORD"]=6*POSITIONABLE.DefaultInfantryWeight, ["HL_DSHK"]=6*POSITIONABLE.DefaultInfantryWeight, ["CCKW_353"]=16*POSITIONABLE.DefaultInfantryWeight, +["MaxxPro_MRAP"]=7*POSITIONABLE.DefaultInfantryWeight, } } function POSITIONABLE:SetCargoBayWeightLimit(WeightLimit) @@ -69550,6 +69553,34 @@ precepitation=1 else precepitation=3 end +elseif cloudspreset:find("RainyPreset4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset5")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset6")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("NEWRAINPRESET4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end elseif cloudspreset:find("RainyPreset")then clouddens=9 if temperature>5 then @@ -85645,7 +85676,7 @@ OFFENSIVE="Offensive", AGGRESSIVE="Aggressive", TOTALWAR="Total War" } -CHIEF.version="0.6.0" +CHIEF.version="0.6.1" function CHIEF:New(Coalition,AgentSet,Alias) Alias=Alias or"CHIEF" if type(Coalition)=="string"then @@ -86734,6 +86765,7 @@ end if MissionType==AUFTRAG.Type.ARMOREDGUARD then RangeMax=UTILS.NMToMeters(50) end +self:T(self.lid..string.format("Recruiting assets for zone %s",StratZone.opszone:GetName())) self:T(self.lid.."Missiontype="..MissionType) self:T({categories=Categories}) self:T({attributes=Attributes}) @@ -86745,11 +86777,15 @@ self:T2(self.lid..string.format("Recruited %d assets for %s mission STRATEGIC zo local TargetZone=StratZone.opszone.zone local TargetCoord=TargetZone:GetCoordinate() local transport=nil +local Ntransports=0 if Resource.carrierNmin and Resource.carrierNmax and Resource.carrierNmax>0 then +self:T(self.lid..string.format("Recruiting carrier assets: Nmin=%s, Nmax=%s",tostring(Resource.carrierNmin),tostring(Resource.carrierNmax))) local cargoassets=CHIEF._FilterAssets(assets,Resource.Categories,Resource.Attributes,Resource.Properties) if#cargoassets>0 then recruited,transport=LEGION.AssignAssetsForTransport(self.commander,self.commander.legions,cargoassets, Resource.carrierNmin,Resource.carrierNmax,TargetZone,nil,Resource.carrierCategories,Resource.carrierAttributes,Resource.carrierProperties) +Ntransports=transport~=nil and#transport.assets or 0 +self:T(self.lid..string.format("Recruited %d transport carrier assets success=%s",Ntransports,tostring(recruited))) end end if not recruited then @@ -86808,8 +86844,9 @@ if mission then mission:_AddAssets(assets) self:MissionAssign(mission,legions) StratZone.opszone:_AddMission(self.coalition,MissionType,mission) +mission:SetName(string.format("Stratzone %s-%d",StratZone.opszone:GetName(),mission.auftragsnummer)) Resource.mission=mission -if transport then +if transport and Ntransports>0 then mission.opstransport=transport transport.opszone=StratZone.opszone transport.chief=self @@ -95637,6 +95674,9 @@ table.insert(Assets,asset) end end end +if#Assets==0 then +return false,{},{} +end LEGION._OptimizeAssetSelection(Assets,MissionTypeOpt,TargetVec2,false,TotalWeight) for _,_asset in pairs(Assets)do local asset=_asset diff --git a/Core/Spawn/SPA-015 - Ground Ops - Randomize Route/MOOSE_Spawn_Test.lua b/Core/Spawn/SPA-015 - Ground Ops - Randomize Route/MOOSE_Spawn_Test.lua index 096919fa7f..b927ecf71d 100644 --- a/Core/Spawn/SPA-015 - Ground Ops - Randomize Route/MOOSE_Spawn_Test.lua +++ b/Core/Spawn/SPA-015 - Ground Ops - Randomize Route/MOOSE_Spawn_Test.lua @@ -1,4 +1,4 @@ -env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-17T14:20:51+02:00-2836d7a40f138255016eaa64009328d4d129e93f ***') +env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-18T18:19:05+02:00-c2933b6bed7d0609a24316bc6f575200248a29e1 ***') if not MOOSE_DEVELOPMENT_FOLDER then MOOSE_DEVELOPMENT_FOLDER='Scripts' end @@ -7472,7 +7472,9 @@ end if Event.dynamiccargo then Event.IniDynamicCargo=Event.dynamiccargo Event.IniDynamicCargoName=Event.IniDynamicCargo.StaticName -Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") +if Event.IniDynamicCargo.Owner or Event.IniUnitName then +Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or"None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+") +end end if Event.zone then Event.Zone=Event.zone @@ -23444,6 +23446,7 @@ POSITIONABLE.CargoBayCapacityValues={ ["HL_KORD"]=6*POSITIONABLE.DefaultInfantryWeight, ["HL_DSHK"]=6*POSITIONABLE.DefaultInfantryWeight, ["CCKW_353"]=16*POSITIONABLE.DefaultInfantryWeight, +["MaxxPro_MRAP"]=7*POSITIONABLE.DefaultInfantryWeight, } } function POSITIONABLE:SetCargoBayWeightLimit(WeightLimit) @@ -69550,6 +69553,34 @@ precepitation=1 else precepitation=3 end +elseif cloudspreset:find("RainyPreset4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset5")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset6")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("NEWRAINPRESET4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end elseif cloudspreset:find("RainyPreset")then clouddens=9 if temperature>5 then @@ -85645,7 +85676,7 @@ OFFENSIVE="Offensive", AGGRESSIVE="Aggressive", TOTALWAR="Total War" } -CHIEF.version="0.6.0" +CHIEF.version="0.6.1" function CHIEF:New(Coalition,AgentSet,Alias) Alias=Alias or"CHIEF" if type(Coalition)=="string"then @@ -86734,6 +86765,7 @@ end if MissionType==AUFTRAG.Type.ARMOREDGUARD then RangeMax=UTILS.NMToMeters(50) end +self:T(self.lid..string.format("Recruiting assets for zone %s",StratZone.opszone:GetName())) self:T(self.lid.."Missiontype="..MissionType) self:T({categories=Categories}) self:T({attributes=Attributes}) @@ -86745,11 +86777,15 @@ self:T2(self.lid..string.format("Recruited %d assets for %s mission STRATEGIC zo local TargetZone=StratZone.opszone.zone local TargetCoord=TargetZone:GetCoordinate() local transport=nil +local Ntransports=0 if Resource.carrierNmin and Resource.carrierNmax and Resource.carrierNmax>0 then +self:T(self.lid..string.format("Recruiting carrier assets: Nmin=%s, Nmax=%s",tostring(Resource.carrierNmin),tostring(Resource.carrierNmax))) local cargoassets=CHIEF._FilterAssets(assets,Resource.Categories,Resource.Attributes,Resource.Properties) if#cargoassets>0 then recruited,transport=LEGION.AssignAssetsForTransport(self.commander,self.commander.legions,cargoassets, Resource.carrierNmin,Resource.carrierNmax,TargetZone,nil,Resource.carrierCategories,Resource.carrierAttributes,Resource.carrierProperties) +Ntransports=transport~=nil and#transport.assets or 0 +self:T(self.lid..string.format("Recruited %d transport carrier assets success=%s",Ntransports,tostring(recruited))) end end if not recruited then @@ -86808,8 +86844,9 @@ if mission then mission:_AddAssets(assets) self:MissionAssign(mission,legions) StratZone.opszone:_AddMission(self.coalition,MissionType,mission) +mission:SetName(string.format("Stratzone %s-%d",StratZone.opszone:GetName(),mission.auftragsnummer)) Resource.mission=mission -if transport then +if transport and Ntransports>0 then mission.opstransport=transport transport.opszone=StratZone.opszone transport.chief=self @@ -95637,6 +95674,9 @@ table.insert(Assets,asset) end end end +if#Assets==0 then +return false,{},{} +end LEGION._OptimizeAssetSelection(Assets,MissionTypeOpt,TargetVec2,false,TotalWeight) for _,_asset in pairs(Assets)do local asset=_asset diff --git a/Core/Spawn/SPA-016 - Ground Ops - Randomize Zones/MOOSE_Spawn_Test.lua b/Core/Spawn/SPA-016 - Ground Ops - Randomize Zones/MOOSE_Spawn_Test.lua index 096919fa7f..b927ecf71d 100644 --- a/Core/Spawn/SPA-016 - Ground Ops - Randomize Zones/MOOSE_Spawn_Test.lua +++ b/Core/Spawn/SPA-016 - Ground Ops - Randomize Zones/MOOSE_Spawn_Test.lua @@ -1,4 +1,4 @@ -env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-17T14:20:51+02:00-2836d7a40f138255016eaa64009328d4d129e93f ***') +env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-18T18:19:05+02:00-c2933b6bed7d0609a24316bc6f575200248a29e1 ***') if not MOOSE_DEVELOPMENT_FOLDER then MOOSE_DEVELOPMENT_FOLDER='Scripts' end @@ -7472,7 +7472,9 @@ end if Event.dynamiccargo then Event.IniDynamicCargo=Event.dynamiccargo Event.IniDynamicCargoName=Event.IniDynamicCargo.StaticName -Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") +if Event.IniDynamicCargo.Owner or Event.IniUnitName then +Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or"None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+") +end end if Event.zone then Event.Zone=Event.zone @@ -23444,6 +23446,7 @@ POSITIONABLE.CargoBayCapacityValues={ ["HL_KORD"]=6*POSITIONABLE.DefaultInfantryWeight, ["HL_DSHK"]=6*POSITIONABLE.DefaultInfantryWeight, ["CCKW_353"]=16*POSITIONABLE.DefaultInfantryWeight, +["MaxxPro_MRAP"]=7*POSITIONABLE.DefaultInfantryWeight, } } function POSITIONABLE:SetCargoBayWeightLimit(WeightLimit) @@ -69550,6 +69553,34 @@ precepitation=1 else precepitation=3 end +elseif cloudspreset:find("RainyPreset4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset5")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset6")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("NEWRAINPRESET4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end elseif cloudspreset:find("RainyPreset")then clouddens=9 if temperature>5 then @@ -85645,7 +85676,7 @@ OFFENSIVE="Offensive", AGGRESSIVE="Aggressive", TOTALWAR="Total War" } -CHIEF.version="0.6.0" +CHIEF.version="0.6.1" function CHIEF:New(Coalition,AgentSet,Alias) Alias=Alias or"CHIEF" if type(Coalition)=="string"then @@ -86734,6 +86765,7 @@ end if MissionType==AUFTRAG.Type.ARMOREDGUARD then RangeMax=UTILS.NMToMeters(50) end +self:T(self.lid..string.format("Recruiting assets for zone %s",StratZone.opszone:GetName())) self:T(self.lid.."Missiontype="..MissionType) self:T({categories=Categories}) self:T({attributes=Attributes}) @@ -86745,11 +86777,15 @@ self:T2(self.lid..string.format("Recruited %d assets for %s mission STRATEGIC zo local TargetZone=StratZone.opszone.zone local TargetCoord=TargetZone:GetCoordinate() local transport=nil +local Ntransports=0 if Resource.carrierNmin and Resource.carrierNmax and Resource.carrierNmax>0 then +self:T(self.lid..string.format("Recruiting carrier assets: Nmin=%s, Nmax=%s",tostring(Resource.carrierNmin),tostring(Resource.carrierNmax))) local cargoassets=CHIEF._FilterAssets(assets,Resource.Categories,Resource.Attributes,Resource.Properties) if#cargoassets>0 then recruited,transport=LEGION.AssignAssetsForTransport(self.commander,self.commander.legions,cargoassets, Resource.carrierNmin,Resource.carrierNmax,TargetZone,nil,Resource.carrierCategories,Resource.carrierAttributes,Resource.carrierProperties) +Ntransports=transport~=nil and#transport.assets or 0 +self:T(self.lid..string.format("Recruited %d transport carrier assets success=%s",Ntransports,tostring(recruited))) end end if not recruited then @@ -86808,8 +86844,9 @@ if mission then mission:_AddAssets(assets) self:MissionAssign(mission,legions) StratZone.opszone:_AddMission(self.coalition,MissionType,mission) +mission:SetName(string.format("Stratzone %s-%d",StratZone.opszone:GetName(),mission.auftragsnummer)) Resource.mission=mission -if transport then +if transport and Ntransports>0 then mission.opstransport=transport transport.opszone=StratZone.opszone transport.chief=self @@ -95637,6 +95674,9 @@ table.insert(Assets,asset) end end end +if#Assets==0 then +return false,{},{} +end LEGION._OptimizeAssetSelection(Assets,MissionTypeOpt,TargetVec2,false,TotalWeight) for _,_asset in pairs(Assets)do local asset=_asset diff --git a/Core/Spawn/SPA-018 - Ground Ops - Randomize Templates/MOOSE_Spawn_Test.lua b/Core/Spawn/SPA-018 - Ground Ops - Randomize Templates/MOOSE_Spawn_Test.lua index 096919fa7f..b927ecf71d 100644 --- a/Core/Spawn/SPA-018 - Ground Ops - Randomize Templates/MOOSE_Spawn_Test.lua +++ b/Core/Spawn/SPA-018 - Ground Ops - Randomize Templates/MOOSE_Spawn_Test.lua @@ -1,4 +1,4 @@ -env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-17T14:20:51+02:00-2836d7a40f138255016eaa64009328d4d129e93f ***') +env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-18T18:19:05+02:00-c2933b6bed7d0609a24316bc6f575200248a29e1 ***') if not MOOSE_DEVELOPMENT_FOLDER then MOOSE_DEVELOPMENT_FOLDER='Scripts' end @@ -7472,7 +7472,9 @@ end if Event.dynamiccargo then Event.IniDynamicCargo=Event.dynamiccargo Event.IniDynamicCargoName=Event.IniDynamicCargo.StaticName -Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") +if Event.IniDynamicCargo.Owner or Event.IniUnitName then +Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or"None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+") +end end if Event.zone then Event.Zone=Event.zone @@ -23444,6 +23446,7 @@ POSITIONABLE.CargoBayCapacityValues={ ["HL_KORD"]=6*POSITIONABLE.DefaultInfantryWeight, ["HL_DSHK"]=6*POSITIONABLE.DefaultInfantryWeight, ["CCKW_353"]=16*POSITIONABLE.DefaultInfantryWeight, +["MaxxPro_MRAP"]=7*POSITIONABLE.DefaultInfantryWeight, } } function POSITIONABLE:SetCargoBayWeightLimit(WeightLimit) @@ -69550,6 +69553,34 @@ precepitation=1 else precepitation=3 end +elseif cloudspreset:find("RainyPreset4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset5")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset6")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("NEWRAINPRESET4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end elseif cloudspreset:find("RainyPreset")then clouddens=9 if temperature>5 then @@ -85645,7 +85676,7 @@ OFFENSIVE="Offensive", AGGRESSIVE="Aggressive", TOTALWAR="Total War" } -CHIEF.version="0.6.0" +CHIEF.version="0.6.1" function CHIEF:New(Coalition,AgentSet,Alias) Alias=Alias or"CHIEF" if type(Coalition)=="string"then @@ -86734,6 +86765,7 @@ end if MissionType==AUFTRAG.Type.ARMOREDGUARD then RangeMax=UTILS.NMToMeters(50) end +self:T(self.lid..string.format("Recruiting assets for zone %s",StratZone.opszone:GetName())) self:T(self.lid.."Missiontype="..MissionType) self:T({categories=Categories}) self:T({attributes=Attributes}) @@ -86745,11 +86777,15 @@ self:T2(self.lid..string.format("Recruited %d assets for %s mission STRATEGIC zo local TargetZone=StratZone.opszone.zone local TargetCoord=TargetZone:GetCoordinate() local transport=nil +local Ntransports=0 if Resource.carrierNmin and Resource.carrierNmax and Resource.carrierNmax>0 then +self:T(self.lid..string.format("Recruiting carrier assets: Nmin=%s, Nmax=%s",tostring(Resource.carrierNmin),tostring(Resource.carrierNmax))) local cargoassets=CHIEF._FilterAssets(assets,Resource.Categories,Resource.Attributes,Resource.Properties) if#cargoassets>0 then recruited,transport=LEGION.AssignAssetsForTransport(self.commander,self.commander.legions,cargoassets, Resource.carrierNmin,Resource.carrierNmax,TargetZone,nil,Resource.carrierCategories,Resource.carrierAttributes,Resource.carrierProperties) +Ntransports=transport~=nil and#transport.assets or 0 +self:T(self.lid..string.format("Recruited %d transport carrier assets success=%s",Ntransports,tostring(recruited))) end end if not recruited then @@ -86808,8 +86844,9 @@ if mission then mission:_AddAssets(assets) self:MissionAssign(mission,legions) StratZone.opszone:_AddMission(self.coalition,MissionType,mission) +mission:SetName(string.format("Stratzone %s-%d",StratZone.opszone:GetName(),mission.auftragsnummer)) Resource.mission=mission -if transport then +if transport and Ntransports>0 then mission.opstransport=transport transport.opszone=StratZone.opszone transport.chief=self @@ -95637,6 +95674,9 @@ table.insert(Assets,asset) end end end +if#Assets==0 then +return false,{},{} +end LEGION._OptimizeAssetSelection(Assets,MissionTypeOpt,TargetVec2,false,TotalWeight) for _,_asset in pairs(Assets)do local asset=_asset diff --git a/Core/Spawn/SPA-019 - Ground Ops - Randomize Templates without Waypoints/MOOSE_Spawn_Test.lua b/Core/Spawn/SPA-019 - Ground Ops - Randomize Templates without Waypoints/MOOSE_Spawn_Test.lua index 096919fa7f..b927ecf71d 100644 --- a/Core/Spawn/SPA-019 - Ground Ops - Randomize Templates without Waypoints/MOOSE_Spawn_Test.lua +++ b/Core/Spawn/SPA-019 - Ground Ops - Randomize Templates without Waypoints/MOOSE_Spawn_Test.lua @@ -1,4 +1,4 @@ -env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-17T14:20:51+02:00-2836d7a40f138255016eaa64009328d4d129e93f ***') +env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-18T18:19:05+02:00-c2933b6bed7d0609a24316bc6f575200248a29e1 ***') if not MOOSE_DEVELOPMENT_FOLDER then MOOSE_DEVELOPMENT_FOLDER='Scripts' end @@ -7472,7 +7472,9 @@ end if Event.dynamiccargo then Event.IniDynamicCargo=Event.dynamiccargo Event.IniDynamicCargoName=Event.IniDynamicCargo.StaticName -Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") +if Event.IniDynamicCargo.Owner or Event.IniUnitName then +Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or"None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+") +end end if Event.zone then Event.Zone=Event.zone @@ -23444,6 +23446,7 @@ POSITIONABLE.CargoBayCapacityValues={ ["HL_KORD"]=6*POSITIONABLE.DefaultInfantryWeight, ["HL_DSHK"]=6*POSITIONABLE.DefaultInfantryWeight, ["CCKW_353"]=16*POSITIONABLE.DefaultInfantryWeight, +["MaxxPro_MRAP"]=7*POSITIONABLE.DefaultInfantryWeight, } } function POSITIONABLE:SetCargoBayWeightLimit(WeightLimit) @@ -69550,6 +69553,34 @@ precepitation=1 else precepitation=3 end +elseif cloudspreset:find("RainyPreset4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset5")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset6")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("NEWRAINPRESET4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end elseif cloudspreset:find("RainyPreset")then clouddens=9 if temperature>5 then @@ -85645,7 +85676,7 @@ OFFENSIVE="Offensive", AGGRESSIVE="Aggressive", TOTALWAR="Total War" } -CHIEF.version="0.6.0" +CHIEF.version="0.6.1" function CHIEF:New(Coalition,AgentSet,Alias) Alias=Alias or"CHIEF" if type(Coalition)=="string"then @@ -86734,6 +86765,7 @@ end if MissionType==AUFTRAG.Type.ARMOREDGUARD then RangeMax=UTILS.NMToMeters(50) end +self:T(self.lid..string.format("Recruiting assets for zone %s",StratZone.opszone:GetName())) self:T(self.lid.."Missiontype="..MissionType) self:T({categories=Categories}) self:T({attributes=Attributes}) @@ -86745,11 +86777,15 @@ self:T2(self.lid..string.format("Recruited %d assets for %s mission STRATEGIC zo local TargetZone=StratZone.opszone.zone local TargetCoord=TargetZone:GetCoordinate() local transport=nil +local Ntransports=0 if Resource.carrierNmin and Resource.carrierNmax and Resource.carrierNmax>0 then +self:T(self.lid..string.format("Recruiting carrier assets: Nmin=%s, Nmax=%s",tostring(Resource.carrierNmin),tostring(Resource.carrierNmax))) local cargoassets=CHIEF._FilterAssets(assets,Resource.Categories,Resource.Attributes,Resource.Properties) if#cargoassets>0 then recruited,transport=LEGION.AssignAssetsForTransport(self.commander,self.commander.legions,cargoassets, Resource.carrierNmin,Resource.carrierNmax,TargetZone,nil,Resource.carrierCategories,Resource.carrierAttributes,Resource.carrierProperties) +Ntransports=transport~=nil and#transport.assets or 0 +self:T(self.lid..string.format("Recruited %d transport carrier assets success=%s",Ntransports,tostring(recruited))) end end if not recruited then @@ -86808,8 +86844,9 @@ if mission then mission:_AddAssets(assets) self:MissionAssign(mission,legions) StratZone.opszone:_AddMission(self.coalition,MissionType,mission) +mission:SetName(string.format("Stratzone %s-%d",StratZone.opszone:GetName(),mission.auftragsnummer)) Resource.mission=mission -if transport then +if transport and Ntransports>0 then mission.opstransport=transport transport.opszone=StratZone.opszone transport.chief=self @@ -95637,6 +95674,9 @@ table.insert(Assets,asset) end end end +if#Assets==0 then +return false,{},{} +end LEGION._OptimizeAssetSelection(Assets,MissionTypeOpt,TargetVec2,false,TotalWeight) for _,_asset in pairs(Assets)do local asset=_asset diff --git a/Core/Spawn/SPA-020 - Ground Ops - Randomize Templates in Zones no WP/MOOSE_Spawn_Test.lua b/Core/Spawn/SPA-020 - Ground Ops - Randomize Templates in Zones no WP/MOOSE_Spawn_Test.lua index 096919fa7f..b927ecf71d 100644 --- a/Core/Spawn/SPA-020 - Ground Ops - Randomize Templates in Zones no WP/MOOSE_Spawn_Test.lua +++ b/Core/Spawn/SPA-020 - Ground Ops - Randomize Templates in Zones no WP/MOOSE_Spawn_Test.lua @@ -1,4 +1,4 @@ -env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-17T14:20:51+02:00-2836d7a40f138255016eaa64009328d4d129e93f ***') +env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-18T18:19:05+02:00-c2933b6bed7d0609a24316bc6f575200248a29e1 ***') if not MOOSE_DEVELOPMENT_FOLDER then MOOSE_DEVELOPMENT_FOLDER='Scripts' end @@ -7472,7 +7472,9 @@ end if Event.dynamiccargo then Event.IniDynamicCargo=Event.dynamiccargo Event.IniDynamicCargoName=Event.IniDynamicCargo.StaticName -Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") +if Event.IniDynamicCargo.Owner or Event.IniUnitName then +Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or"None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+") +end end if Event.zone then Event.Zone=Event.zone @@ -23444,6 +23446,7 @@ POSITIONABLE.CargoBayCapacityValues={ ["HL_KORD"]=6*POSITIONABLE.DefaultInfantryWeight, ["HL_DSHK"]=6*POSITIONABLE.DefaultInfantryWeight, ["CCKW_353"]=16*POSITIONABLE.DefaultInfantryWeight, +["MaxxPro_MRAP"]=7*POSITIONABLE.DefaultInfantryWeight, } } function POSITIONABLE:SetCargoBayWeightLimit(WeightLimit) @@ -69550,6 +69553,34 @@ precepitation=1 else precepitation=3 end +elseif cloudspreset:find("RainyPreset4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset5")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset6")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("NEWRAINPRESET4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end elseif cloudspreset:find("RainyPreset")then clouddens=9 if temperature>5 then @@ -85645,7 +85676,7 @@ OFFENSIVE="Offensive", AGGRESSIVE="Aggressive", TOTALWAR="Total War" } -CHIEF.version="0.6.0" +CHIEF.version="0.6.1" function CHIEF:New(Coalition,AgentSet,Alias) Alias=Alias or"CHIEF" if type(Coalition)=="string"then @@ -86734,6 +86765,7 @@ end if MissionType==AUFTRAG.Type.ARMOREDGUARD then RangeMax=UTILS.NMToMeters(50) end +self:T(self.lid..string.format("Recruiting assets for zone %s",StratZone.opszone:GetName())) self:T(self.lid.."Missiontype="..MissionType) self:T({categories=Categories}) self:T({attributes=Attributes}) @@ -86745,11 +86777,15 @@ self:T2(self.lid..string.format("Recruited %d assets for %s mission STRATEGIC zo local TargetZone=StratZone.opszone.zone local TargetCoord=TargetZone:GetCoordinate() local transport=nil +local Ntransports=0 if Resource.carrierNmin and Resource.carrierNmax and Resource.carrierNmax>0 then +self:T(self.lid..string.format("Recruiting carrier assets: Nmin=%s, Nmax=%s",tostring(Resource.carrierNmin),tostring(Resource.carrierNmax))) local cargoassets=CHIEF._FilterAssets(assets,Resource.Categories,Resource.Attributes,Resource.Properties) if#cargoassets>0 then recruited,transport=LEGION.AssignAssetsForTransport(self.commander,self.commander.legions,cargoassets, Resource.carrierNmin,Resource.carrierNmax,TargetZone,nil,Resource.carrierCategories,Resource.carrierAttributes,Resource.carrierProperties) +Ntransports=transport~=nil and#transport.assets or 0 +self:T(self.lid..string.format("Recruited %d transport carrier assets success=%s",Ntransports,tostring(recruited))) end end if not recruited then @@ -86808,8 +86844,9 @@ if mission then mission:_AddAssets(assets) self:MissionAssign(mission,legions) StratZone.opszone:_AddMission(self.coalition,MissionType,mission) +mission:SetName(string.format("Stratzone %s-%d",StratZone.opszone:GetName(),mission.auftragsnummer)) Resource.mission=mission -if transport then +if transport and Ntransports>0 then mission.opstransport=transport transport.opszone=StratZone.opszone transport.chief=self @@ -95637,6 +95674,9 @@ table.insert(Assets,asset) end end end +if#Assets==0 then +return false,{},{} +end LEGION._OptimizeAssetSelection(Assets,MissionTypeOpt,TargetVec2,false,TotalWeight) for _,_asset in pairs(Assets)do local asset=_asset diff --git a/Core/Spawn/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names/MOOSE_Spawn_Test.lua b/Core/Spawn/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names/MOOSE_Spawn_Test.lua index 096919fa7f..b927ecf71d 100644 --- a/Core/Spawn/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names/MOOSE_Spawn_Test.lua +++ b/Core/Spawn/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names/MOOSE_Spawn_Test.lua @@ -1,4 +1,4 @@ -env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-17T14:20:51+02:00-2836d7a40f138255016eaa64009328d4d129e93f ***') +env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-18T18:19:05+02:00-c2933b6bed7d0609a24316bc6f575200248a29e1 ***') if not MOOSE_DEVELOPMENT_FOLDER then MOOSE_DEVELOPMENT_FOLDER='Scripts' end @@ -7472,7 +7472,9 @@ end if Event.dynamiccargo then Event.IniDynamicCargo=Event.dynamiccargo Event.IniDynamicCargoName=Event.IniDynamicCargo.StaticName -Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") +if Event.IniDynamicCargo.Owner or Event.IniUnitName then +Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or"None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+") +end end if Event.zone then Event.Zone=Event.zone @@ -23444,6 +23446,7 @@ POSITIONABLE.CargoBayCapacityValues={ ["HL_KORD"]=6*POSITIONABLE.DefaultInfantryWeight, ["HL_DSHK"]=6*POSITIONABLE.DefaultInfantryWeight, ["CCKW_353"]=16*POSITIONABLE.DefaultInfantryWeight, +["MaxxPro_MRAP"]=7*POSITIONABLE.DefaultInfantryWeight, } } function POSITIONABLE:SetCargoBayWeightLimit(WeightLimit) @@ -69550,6 +69553,34 @@ precepitation=1 else precepitation=3 end +elseif cloudspreset:find("RainyPreset4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset5")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset6")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("NEWRAINPRESET4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end elseif cloudspreset:find("RainyPreset")then clouddens=9 if temperature>5 then @@ -85645,7 +85676,7 @@ OFFENSIVE="Offensive", AGGRESSIVE="Aggressive", TOTALWAR="Total War" } -CHIEF.version="0.6.0" +CHIEF.version="0.6.1" function CHIEF:New(Coalition,AgentSet,Alias) Alias=Alias or"CHIEF" if type(Coalition)=="string"then @@ -86734,6 +86765,7 @@ end if MissionType==AUFTRAG.Type.ARMOREDGUARD then RangeMax=UTILS.NMToMeters(50) end +self:T(self.lid..string.format("Recruiting assets for zone %s",StratZone.opszone:GetName())) self:T(self.lid.."Missiontype="..MissionType) self:T({categories=Categories}) self:T({attributes=Attributes}) @@ -86745,11 +86777,15 @@ self:T2(self.lid..string.format("Recruited %d assets for %s mission STRATEGIC zo local TargetZone=StratZone.opszone.zone local TargetCoord=TargetZone:GetCoordinate() local transport=nil +local Ntransports=0 if Resource.carrierNmin and Resource.carrierNmax and Resource.carrierNmax>0 then +self:T(self.lid..string.format("Recruiting carrier assets: Nmin=%s, Nmax=%s",tostring(Resource.carrierNmin),tostring(Resource.carrierNmax))) local cargoassets=CHIEF._FilterAssets(assets,Resource.Categories,Resource.Attributes,Resource.Properties) if#cargoassets>0 then recruited,transport=LEGION.AssignAssetsForTransport(self.commander,self.commander.legions,cargoassets, Resource.carrierNmin,Resource.carrierNmax,TargetZone,nil,Resource.carrierCategories,Resource.carrierAttributes,Resource.carrierProperties) +Ntransports=transport~=nil and#transport.assets or 0 +self:T(self.lid..string.format("Recruited %d transport carrier assets success=%s",Ntransports,tostring(recruited))) end end if not recruited then @@ -86808,8 +86844,9 @@ if mission then mission:_AddAssets(assets) self:MissionAssign(mission,legions) StratZone.opszone:_AddMission(self.coalition,MissionType,mission) +mission:SetName(string.format("Stratzone %s-%d",StratZone.opszone:GetName(),mission.auftragsnummer)) Resource.mission=mission -if transport then +if transport and Ntransports>0 then mission.opstransport=transport transport.opszone=StratZone.opszone transport.chief=self @@ -95637,6 +95674,9 @@ table.insert(Assets,asset) end end end +if#Assets==0 then +return false,{},{} +end LEGION._OptimizeAssetSelection(Assets,MissionTypeOpt,TargetVec2,false,TotalWeight) for _,_asset in pairs(Assets)do local asset=_asset diff --git a/Core/Spawn/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/MOOSE_Spawn_Test.lua b/Core/Spawn/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/MOOSE_Spawn_Test.lua index 096919fa7f..b927ecf71d 100644 --- a/Core/Spawn/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/MOOSE_Spawn_Test.lua +++ b/Core/Spawn/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/MOOSE_Spawn_Test.lua @@ -1,4 +1,4 @@ -env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-17T14:20:51+02:00-2836d7a40f138255016eaa64009328d4d129e93f ***') +env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-18T18:19:05+02:00-c2933b6bed7d0609a24316bc6f575200248a29e1 ***') if not MOOSE_DEVELOPMENT_FOLDER then MOOSE_DEVELOPMENT_FOLDER='Scripts' end @@ -7472,7 +7472,9 @@ end if Event.dynamiccargo then Event.IniDynamicCargo=Event.dynamiccargo Event.IniDynamicCargoName=Event.IniDynamicCargo.StaticName -Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") +if Event.IniDynamicCargo.Owner or Event.IniUnitName then +Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or"None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+") +end end if Event.zone then Event.Zone=Event.zone @@ -23444,6 +23446,7 @@ POSITIONABLE.CargoBayCapacityValues={ ["HL_KORD"]=6*POSITIONABLE.DefaultInfantryWeight, ["HL_DSHK"]=6*POSITIONABLE.DefaultInfantryWeight, ["CCKW_353"]=16*POSITIONABLE.DefaultInfantryWeight, +["MaxxPro_MRAP"]=7*POSITIONABLE.DefaultInfantryWeight, } } function POSITIONABLE:SetCargoBayWeightLimit(WeightLimit) @@ -69550,6 +69553,34 @@ precepitation=1 else precepitation=3 end +elseif cloudspreset:find("RainyPreset4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset5")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset6")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("NEWRAINPRESET4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end elseif cloudspreset:find("RainyPreset")then clouddens=9 if temperature>5 then @@ -85645,7 +85676,7 @@ OFFENSIVE="Offensive", AGGRESSIVE="Aggressive", TOTALWAR="Total War" } -CHIEF.version="0.6.0" +CHIEF.version="0.6.1" function CHIEF:New(Coalition,AgentSet,Alias) Alias=Alias or"CHIEF" if type(Coalition)=="string"then @@ -86734,6 +86765,7 @@ end if MissionType==AUFTRAG.Type.ARMOREDGUARD then RangeMax=UTILS.NMToMeters(50) end +self:T(self.lid..string.format("Recruiting assets for zone %s",StratZone.opszone:GetName())) self:T(self.lid.."Missiontype="..MissionType) self:T({categories=Categories}) self:T({attributes=Attributes}) @@ -86745,11 +86777,15 @@ self:T2(self.lid..string.format("Recruited %d assets for %s mission STRATEGIC zo local TargetZone=StratZone.opszone.zone local TargetCoord=TargetZone:GetCoordinate() local transport=nil +local Ntransports=0 if Resource.carrierNmin and Resource.carrierNmax and Resource.carrierNmax>0 then +self:T(self.lid..string.format("Recruiting carrier assets: Nmin=%s, Nmax=%s",tostring(Resource.carrierNmin),tostring(Resource.carrierNmax))) local cargoassets=CHIEF._FilterAssets(assets,Resource.Categories,Resource.Attributes,Resource.Properties) if#cargoassets>0 then recruited,transport=LEGION.AssignAssetsForTransport(self.commander,self.commander.legions,cargoassets, Resource.carrierNmin,Resource.carrierNmax,TargetZone,nil,Resource.carrierCategories,Resource.carrierAttributes,Resource.carrierProperties) +Ntransports=transport~=nil and#transport.assets or 0 +self:T(self.lid..string.format("Recruited %d transport carrier assets success=%s",Ntransports,tostring(recruited))) end end if not recruited then @@ -86808,8 +86844,9 @@ if mission then mission:_AddAssets(assets) self:MissionAssign(mission,legions) StratZone.opszone:_AddMission(self.coalition,MissionType,mission) +mission:SetName(string.format("Stratzone %s-%d",StratZone.opszone:GetName(),mission.auftragsnummer)) Resource.mission=mission -if transport then +if transport and Ntransports>0 then mission.opstransport=transport transport.opszone=StratZone.opszone transport.chief=self @@ -95637,6 +95674,9 @@ table.insert(Assets,asset) end end end +if#Assets==0 then +return false,{},{} +end LEGION._OptimizeAssetSelection(Assets,MissionTypeOpt,TargetVec2,false,TotalWeight) for _,_asset in pairs(Assets)do local asset=_asset diff --git a/Core/Spawn/SPA-023 - Ground Ops - SpawnStart and SpawnStop/MOOSE_Spawn_Test.lua b/Core/Spawn/SPA-023 - Ground Ops - SpawnStart and SpawnStop/MOOSE_Spawn_Test.lua index 096919fa7f..b927ecf71d 100644 --- a/Core/Spawn/SPA-023 - Ground Ops - SpawnStart and SpawnStop/MOOSE_Spawn_Test.lua +++ b/Core/Spawn/SPA-023 - Ground Ops - SpawnStart and SpawnStop/MOOSE_Spawn_Test.lua @@ -1,4 +1,4 @@ -env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-17T14:20:51+02:00-2836d7a40f138255016eaa64009328d4d129e93f ***') +env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-18T18:19:05+02:00-c2933b6bed7d0609a24316bc6f575200248a29e1 ***') if not MOOSE_DEVELOPMENT_FOLDER then MOOSE_DEVELOPMENT_FOLDER='Scripts' end @@ -7472,7 +7472,9 @@ end if Event.dynamiccargo then Event.IniDynamicCargo=Event.dynamiccargo Event.IniDynamicCargoName=Event.IniDynamicCargo.StaticName -Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") +if Event.IniDynamicCargo.Owner or Event.IniUnitName then +Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or"None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+") +end end if Event.zone then Event.Zone=Event.zone @@ -23444,6 +23446,7 @@ POSITIONABLE.CargoBayCapacityValues={ ["HL_KORD"]=6*POSITIONABLE.DefaultInfantryWeight, ["HL_DSHK"]=6*POSITIONABLE.DefaultInfantryWeight, ["CCKW_353"]=16*POSITIONABLE.DefaultInfantryWeight, +["MaxxPro_MRAP"]=7*POSITIONABLE.DefaultInfantryWeight, } } function POSITIONABLE:SetCargoBayWeightLimit(WeightLimit) @@ -69550,6 +69553,34 @@ precepitation=1 else precepitation=3 end +elseif cloudspreset:find("RainyPreset4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset5")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset6")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("NEWRAINPRESET4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end elseif cloudspreset:find("RainyPreset")then clouddens=9 if temperature>5 then @@ -85645,7 +85676,7 @@ OFFENSIVE="Offensive", AGGRESSIVE="Aggressive", TOTALWAR="Total War" } -CHIEF.version="0.6.0" +CHIEF.version="0.6.1" function CHIEF:New(Coalition,AgentSet,Alias) Alias=Alias or"CHIEF" if type(Coalition)=="string"then @@ -86734,6 +86765,7 @@ end if MissionType==AUFTRAG.Type.ARMOREDGUARD then RangeMax=UTILS.NMToMeters(50) end +self:T(self.lid..string.format("Recruiting assets for zone %s",StratZone.opszone:GetName())) self:T(self.lid.."Missiontype="..MissionType) self:T({categories=Categories}) self:T({attributes=Attributes}) @@ -86745,11 +86777,15 @@ self:T2(self.lid..string.format("Recruited %d assets for %s mission STRATEGIC zo local TargetZone=StratZone.opszone.zone local TargetCoord=TargetZone:GetCoordinate() local transport=nil +local Ntransports=0 if Resource.carrierNmin and Resource.carrierNmax and Resource.carrierNmax>0 then +self:T(self.lid..string.format("Recruiting carrier assets: Nmin=%s, Nmax=%s",tostring(Resource.carrierNmin),tostring(Resource.carrierNmax))) local cargoassets=CHIEF._FilterAssets(assets,Resource.Categories,Resource.Attributes,Resource.Properties) if#cargoassets>0 then recruited,transport=LEGION.AssignAssetsForTransport(self.commander,self.commander.legions,cargoassets, Resource.carrierNmin,Resource.carrierNmax,TargetZone,nil,Resource.carrierCategories,Resource.carrierAttributes,Resource.carrierProperties) +Ntransports=transport~=nil and#transport.assets or 0 +self:T(self.lid..string.format("Recruited %d transport carrier assets success=%s",Ntransports,tostring(recruited))) end end if not recruited then @@ -86808,8 +86844,9 @@ if mission then mission:_AddAssets(assets) self:MissionAssign(mission,legions) StratZone.opszone:_AddMission(self.coalition,MissionType,mission) +mission:SetName(string.format("Stratzone %s-%d",StratZone.opszone:GetName(),mission.auftragsnummer)) Resource.mission=mission -if transport then +if transport and Ntransports>0 then mission.opstransport=transport transport.opszone=StratZone.opszone transport.chief=self @@ -95637,6 +95674,9 @@ table.insert(Assets,asset) end end end +if#Assets==0 then +return false,{},{} +end LEGION._OptimizeAssetSelection(Assets,MissionTypeOpt,TargetVec2,false,TotalWeight) for _,_asset in pairs(Assets)do local asset=_asset diff --git a/Core/Spawn/SPA-024 - Ground Ops - Arrays Normandy/MOOSE_Spawn_Test.lua b/Core/Spawn/SPA-024 - Ground Ops - Arrays Normandy/MOOSE_Spawn_Test.lua index 096919fa7f..b927ecf71d 100644 --- a/Core/Spawn/SPA-024 - Ground Ops - Arrays Normandy/MOOSE_Spawn_Test.lua +++ b/Core/Spawn/SPA-024 - Ground Ops - Arrays Normandy/MOOSE_Spawn_Test.lua @@ -1,4 +1,4 @@ -env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-17T14:20:51+02:00-2836d7a40f138255016eaa64009328d4d129e93f ***') +env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-18T18:19:05+02:00-c2933b6bed7d0609a24316bc6f575200248a29e1 ***') if not MOOSE_DEVELOPMENT_FOLDER then MOOSE_DEVELOPMENT_FOLDER='Scripts' end @@ -7472,7 +7472,9 @@ end if Event.dynamiccargo then Event.IniDynamicCargo=Event.dynamiccargo Event.IniDynamicCargoName=Event.IniDynamicCargo.StaticName -Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") +if Event.IniDynamicCargo.Owner or Event.IniUnitName then +Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or"None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+") +end end if Event.zone then Event.Zone=Event.zone @@ -23444,6 +23446,7 @@ POSITIONABLE.CargoBayCapacityValues={ ["HL_KORD"]=6*POSITIONABLE.DefaultInfantryWeight, ["HL_DSHK"]=6*POSITIONABLE.DefaultInfantryWeight, ["CCKW_353"]=16*POSITIONABLE.DefaultInfantryWeight, +["MaxxPro_MRAP"]=7*POSITIONABLE.DefaultInfantryWeight, } } function POSITIONABLE:SetCargoBayWeightLimit(WeightLimit) @@ -69550,6 +69553,34 @@ precepitation=1 else precepitation=3 end +elseif cloudspreset:find("RainyPreset4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset5")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset6")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("NEWRAINPRESET4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end elseif cloudspreset:find("RainyPreset")then clouddens=9 if temperature>5 then @@ -85645,7 +85676,7 @@ OFFENSIVE="Offensive", AGGRESSIVE="Aggressive", TOTALWAR="Total War" } -CHIEF.version="0.6.0" +CHIEF.version="0.6.1" function CHIEF:New(Coalition,AgentSet,Alias) Alias=Alias or"CHIEF" if type(Coalition)=="string"then @@ -86734,6 +86765,7 @@ end if MissionType==AUFTRAG.Type.ARMOREDGUARD then RangeMax=UTILS.NMToMeters(50) end +self:T(self.lid..string.format("Recruiting assets for zone %s",StratZone.opszone:GetName())) self:T(self.lid.."Missiontype="..MissionType) self:T({categories=Categories}) self:T({attributes=Attributes}) @@ -86745,11 +86777,15 @@ self:T2(self.lid..string.format("Recruited %d assets for %s mission STRATEGIC zo local TargetZone=StratZone.opszone.zone local TargetCoord=TargetZone:GetCoordinate() local transport=nil +local Ntransports=0 if Resource.carrierNmin and Resource.carrierNmax and Resource.carrierNmax>0 then +self:T(self.lid..string.format("Recruiting carrier assets: Nmin=%s, Nmax=%s",tostring(Resource.carrierNmin),tostring(Resource.carrierNmax))) local cargoassets=CHIEF._FilterAssets(assets,Resource.Categories,Resource.Attributes,Resource.Properties) if#cargoassets>0 then recruited,transport=LEGION.AssignAssetsForTransport(self.commander,self.commander.legions,cargoassets, Resource.carrierNmin,Resource.carrierNmax,TargetZone,nil,Resource.carrierCategories,Resource.carrierAttributes,Resource.carrierProperties) +Ntransports=transport~=nil and#transport.assets or 0 +self:T(self.lid..string.format("Recruited %d transport carrier assets success=%s",Ntransports,tostring(recruited))) end end if not recruited then @@ -86808,8 +86844,9 @@ if mission then mission:_AddAssets(assets) self:MissionAssign(mission,legions) StratZone.opszone:_AddMission(self.coalition,MissionType,mission) +mission:SetName(string.format("Stratzone %s-%d",StratZone.opszone:GetName(),mission.auftragsnummer)) Resource.mission=mission -if transport then +if transport and Ntransports>0 then mission.opstransport=transport transport.opszone=StratZone.opszone transport.chief=self @@ -95637,6 +95674,9 @@ table.insert(Assets,asset) end end end +if#Assets==0 then +return false,{},{} +end LEGION._OptimizeAssetSelection(Assets,MissionTypeOpt,TargetVec2,false,TotalWeight) for _,_asset in pairs(Assets)do local asset=_asset diff --git a/Core/Spawn/SPA-024 - Ground Ops - Arrays/MOOSE_Spawn_Test.lua b/Core/Spawn/SPA-024 - Ground Ops - Arrays/MOOSE_Spawn_Test.lua index 096919fa7f..b927ecf71d 100644 --- a/Core/Spawn/SPA-024 - Ground Ops - Arrays/MOOSE_Spawn_Test.lua +++ b/Core/Spawn/SPA-024 - Ground Ops - Arrays/MOOSE_Spawn_Test.lua @@ -1,4 +1,4 @@ -env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-17T14:20:51+02:00-2836d7a40f138255016eaa64009328d4d129e93f ***') +env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-18T18:19:05+02:00-c2933b6bed7d0609a24316bc6f575200248a29e1 ***') if not MOOSE_DEVELOPMENT_FOLDER then MOOSE_DEVELOPMENT_FOLDER='Scripts' end @@ -7472,7 +7472,9 @@ end if Event.dynamiccargo then Event.IniDynamicCargo=Event.dynamiccargo Event.IniDynamicCargoName=Event.IniDynamicCargo.StaticName -Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") +if Event.IniDynamicCargo.Owner or Event.IniUnitName then +Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or"None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+") +end end if Event.zone then Event.Zone=Event.zone @@ -23444,6 +23446,7 @@ POSITIONABLE.CargoBayCapacityValues={ ["HL_KORD"]=6*POSITIONABLE.DefaultInfantryWeight, ["HL_DSHK"]=6*POSITIONABLE.DefaultInfantryWeight, ["CCKW_353"]=16*POSITIONABLE.DefaultInfantryWeight, +["MaxxPro_MRAP"]=7*POSITIONABLE.DefaultInfantryWeight, } } function POSITIONABLE:SetCargoBayWeightLimit(WeightLimit) @@ -69550,6 +69553,34 @@ precepitation=1 else precepitation=3 end +elseif cloudspreset:find("RainyPreset4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset5")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset6")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("NEWRAINPRESET4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end elseif cloudspreset:find("RainyPreset")then clouddens=9 if temperature>5 then @@ -85645,7 +85676,7 @@ OFFENSIVE="Offensive", AGGRESSIVE="Aggressive", TOTALWAR="Total War" } -CHIEF.version="0.6.0" +CHIEF.version="0.6.1" function CHIEF:New(Coalition,AgentSet,Alias) Alias=Alias or"CHIEF" if type(Coalition)=="string"then @@ -86734,6 +86765,7 @@ end if MissionType==AUFTRAG.Type.ARMOREDGUARD then RangeMax=UTILS.NMToMeters(50) end +self:T(self.lid..string.format("Recruiting assets for zone %s",StratZone.opszone:GetName())) self:T(self.lid.."Missiontype="..MissionType) self:T({categories=Categories}) self:T({attributes=Attributes}) @@ -86745,11 +86777,15 @@ self:T2(self.lid..string.format("Recruited %d assets for %s mission STRATEGIC zo local TargetZone=StratZone.opszone.zone local TargetCoord=TargetZone:GetCoordinate() local transport=nil +local Ntransports=0 if Resource.carrierNmin and Resource.carrierNmax and Resource.carrierNmax>0 then +self:T(self.lid..string.format("Recruiting carrier assets: Nmin=%s, Nmax=%s",tostring(Resource.carrierNmin),tostring(Resource.carrierNmax))) local cargoassets=CHIEF._FilterAssets(assets,Resource.Categories,Resource.Attributes,Resource.Properties) if#cargoassets>0 then recruited,transport=LEGION.AssignAssetsForTransport(self.commander,self.commander.legions,cargoassets, Resource.carrierNmin,Resource.carrierNmax,TargetZone,nil,Resource.carrierCategories,Resource.carrierAttributes,Resource.carrierProperties) +Ntransports=transport~=nil and#transport.assets or 0 +self:T(self.lid..string.format("Recruited %d transport carrier assets success=%s",Ntransports,tostring(recruited))) end end if not recruited then @@ -86808,8 +86844,9 @@ if mission then mission:_AddAssets(assets) self:MissionAssign(mission,legions) StratZone.opszone:_AddMission(self.coalition,MissionType,mission) +mission:SetName(string.format("Stratzone %s-%d",StratZone.opszone:GetName(),mission.auftragsnummer)) Resource.mission=mission -if transport then +if transport and Ntransports>0 then mission.opstransport=transport transport.opszone=StratZone.opszone transport.chief=self @@ -95637,6 +95674,9 @@ table.insert(Assets,asset) end end end +if#Assets==0 then +return false,{},{} +end LEGION._OptimizeAssetSelection(Assets,MissionTypeOpt,TargetVec2,false,TotalWeight) for _,_asset in pairs(Assets)do local asset=_asset diff --git a/Core/Spawn/SPA-025 - Ground Ops - Spawn Hidden/MOOSE_Spawn_Test.lua b/Core/Spawn/SPA-025 - Ground Ops - Spawn Hidden/MOOSE_Spawn_Test.lua index 096919fa7f..b927ecf71d 100644 --- a/Core/Spawn/SPA-025 - Ground Ops - Spawn Hidden/MOOSE_Spawn_Test.lua +++ b/Core/Spawn/SPA-025 - Ground Ops - Spawn Hidden/MOOSE_Spawn_Test.lua @@ -1,4 +1,4 @@ -env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-17T14:20:51+02:00-2836d7a40f138255016eaa64009328d4d129e93f ***') +env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-18T18:19:05+02:00-c2933b6bed7d0609a24316bc6f575200248a29e1 ***') if not MOOSE_DEVELOPMENT_FOLDER then MOOSE_DEVELOPMENT_FOLDER='Scripts' end @@ -7472,7 +7472,9 @@ end if Event.dynamiccargo then Event.IniDynamicCargo=Event.dynamiccargo Event.IniDynamicCargoName=Event.IniDynamicCargo.StaticName -Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") +if Event.IniDynamicCargo.Owner or Event.IniUnitName then +Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or"None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+") +end end if Event.zone then Event.Zone=Event.zone @@ -23444,6 +23446,7 @@ POSITIONABLE.CargoBayCapacityValues={ ["HL_KORD"]=6*POSITIONABLE.DefaultInfantryWeight, ["HL_DSHK"]=6*POSITIONABLE.DefaultInfantryWeight, ["CCKW_353"]=16*POSITIONABLE.DefaultInfantryWeight, +["MaxxPro_MRAP"]=7*POSITIONABLE.DefaultInfantryWeight, } } function POSITIONABLE:SetCargoBayWeightLimit(WeightLimit) @@ -69550,6 +69553,34 @@ precepitation=1 else precepitation=3 end +elseif cloudspreset:find("RainyPreset4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset5")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset6")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("NEWRAINPRESET4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end elseif cloudspreset:find("RainyPreset")then clouddens=9 if temperature>5 then @@ -85645,7 +85676,7 @@ OFFENSIVE="Offensive", AGGRESSIVE="Aggressive", TOTALWAR="Total War" } -CHIEF.version="0.6.0" +CHIEF.version="0.6.1" function CHIEF:New(Coalition,AgentSet,Alias) Alias=Alias or"CHIEF" if type(Coalition)=="string"then @@ -86734,6 +86765,7 @@ end if MissionType==AUFTRAG.Type.ARMOREDGUARD then RangeMax=UTILS.NMToMeters(50) end +self:T(self.lid..string.format("Recruiting assets for zone %s",StratZone.opszone:GetName())) self:T(self.lid.."Missiontype="..MissionType) self:T({categories=Categories}) self:T({attributes=Attributes}) @@ -86745,11 +86777,15 @@ self:T2(self.lid..string.format("Recruited %d assets for %s mission STRATEGIC zo local TargetZone=StratZone.opszone.zone local TargetCoord=TargetZone:GetCoordinate() local transport=nil +local Ntransports=0 if Resource.carrierNmin and Resource.carrierNmax and Resource.carrierNmax>0 then +self:T(self.lid..string.format("Recruiting carrier assets: Nmin=%s, Nmax=%s",tostring(Resource.carrierNmin),tostring(Resource.carrierNmax))) local cargoassets=CHIEF._FilterAssets(assets,Resource.Categories,Resource.Attributes,Resource.Properties) if#cargoassets>0 then recruited,transport=LEGION.AssignAssetsForTransport(self.commander,self.commander.legions,cargoassets, Resource.carrierNmin,Resource.carrierNmax,TargetZone,nil,Resource.carrierCategories,Resource.carrierAttributes,Resource.carrierProperties) +Ntransports=transport~=nil and#transport.assets or 0 +self:T(self.lid..string.format("Recruited %d transport carrier assets success=%s",Ntransports,tostring(recruited))) end end if not recruited then @@ -86808,8 +86844,9 @@ if mission then mission:_AddAssets(assets) self:MissionAssign(mission,legions) StratZone.opszone:_AddMission(self.coalition,MissionType,mission) +mission:SetName(string.format("Stratzone %s-%d",StratZone.opszone:GetName(),mission.auftragsnummer)) Resource.mission=mission -if transport then +if transport and Ntransports>0 then mission.opstransport=transport transport.opszone=StratZone.opszone transport.chief=self @@ -95637,6 +95674,9 @@ table.insert(Assets,asset) end end end +if#Assets==0 then +return false,{},{} +end LEGION._OptimizeAssetSelection(Assets,MissionTypeOpt,TargetVec2,false,TotalWeight) for _,_asset in pairs(Assets)do local asset=_asset diff --git a/Core/Spawn/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/MOOSE_Spawn_Test.lua b/Core/Spawn/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/MOOSE_Spawn_Test.lua index 096919fa7f..b927ecf71d 100644 --- a/Core/Spawn/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/MOOSE_Spawn_Test.lua +++ b/Core/Spawn/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/MOOSE_Spawn_Test.lua @@ -1,4 +1,4 @@ -env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-17T14:20:51+02:00-2836d7a40f138255016eaa64009328d4d129e93f ***') +env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-18T18:19:05+02:00-c2933b6bed7d0609a24316bc6f575200248a29e1 ***') if not MOOSE_DEVELOPMENT_FOLDER then MOOSE_DEVELOPMENT_FOLDER='Scripts' end @@ -7472,7 +7472,9 @@ end if Event.dynamiccargo then Event.IniDynamicCargo=Event.dynamiccargo Event.IniDynamicCargoName=Event.IniDynamicCargo.StaticName -Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") +if Event.IniDynamicCargo.Owner or Event.IniUnitName then +Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or"None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+") +end end if Event.zone then Event.Zone=Event.zone @@ -23444,6 +23446,7 @@ POSITIONABLE.CargoBayCapacityValues={ ["HL_KORD"]=6*POSITIONABLE.DefaultInfantryWeight, ["HL_DSHK"]=6*POSITIONABLE.DefaultInfantryWeight, ["CCKW_353"]=16*POSITIONABLE.DefaultInfantryWeight, +["MaxxPro_MRAP"]=7*POSITIONABLE.DefaultInfantryWeight, } } function POSITIONABLE:SetCargoBayWeightLimit(WeightLimit) @@ -69550,6 +69553,34 @@ precepitation=1 else precepitation=3 end +elseif cloudspreset:find("RainyPreset4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset5")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset6")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("NEWRAINPRESET4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end elseif cloudspreset:find("RainyPreset")then clouddens=9 if temperature>5 then @@ -85645,7 +85676,7 @@ OFFENSIVE="Offensive", AGGRESSIVE="Aggressive", TOTALWAR="Total War" } -CHIEF.version="0.6.0" +CHIEF.version="0.6.1" function CHIEF:New(Coalition,AgentSet,Alias) Alias=Alias or"CHIEF" if type(Coalition)=="string"then @@ -86734,6 +86765,7 @@ end if MissionType==AUFTRAG.Type.ARMOREDGUARD then RangeMax=UTILS.NMToMeters(50) end +self:T(self.lid..string.format("Recruiting assets for zone %s",StratZone.opszone:GetName())) self:T(self.lid.."Missiontype="..MissionType) self:T({categories=Categories}) self:T({attributes=Attributes}) @@ -86745,11 +86777,15 @@ self:T2(self.lid..string.format("Recruited %d assets for %s mission STRATEGIC zo local TargetZone=StratZone.opszone.zone local TargetCoord=TargetZone:GetCoordinate() local transport=nil +local Ntransports=0 if Resource.carrierNmin and Resource.carrierNmax and Resource.carrierNmax>0 then +self:T(self.lid..string.format("Recruiting carrier assets: Nmin=%s, Nmax=%s",tostring(Resource.carrierNmin),tostring(Resource.carrierNmax))) local cargoassets=CHIEF._FilterAssets(assets,Resource.Categories,Resource.Attributes,Resource.Properties) if#cargoassets>0 then recruited,transport=LEGION.AssignAssetsForTransport(self.commander,self.commander.legions,cargoassets, Resource.carrierNmin,Resource.carrierNmax,TargetZone,nil,Resource.carrierCategories,Resource.carrierAttributes,Resource.carrierProperties) +Ntransports=transport~=nil and#transport.assets or 0 +self:T(self.lid..string.format("Recruited %d transport carrier assets success=%s",Ntransports,tostring(recruited))) end end if not recruited then @@ -86808,8 +86844,9 @@ if mission then mission:_AddAssets(assets) self:MissionAssign(mission,legions) StratZone.opszone:_AddMission(self.coalition,MissionType,mission) +mission:SetName(string.format("Stratzone %s-%d",StratZone.opszone:GetName(),mission.auftragsnummer)) Resource.mission=mission -if transport then +if transport and Ntransports>0 then mission.opstransport=transport transport.opszone=StratZone.opszone transport.chief=self @@ -95637,6 +95674,9 @@ table.insert(Assets,asset) end end end +if#Assets==0 then +return false,{},{} +end LEGION._OptimizeAssetSelection(Assets,MissionTypeOpt,TargetVec2,false,TotalWeight) for _,_asset in pairs(Assets)do local asset=_asset diff --git a/Core/Spawn/SPA-027 - Ground Ops - Respawning After Destroy/MOOSE_Spawn_Test.lua b/Core/Spawn/SPA-027 - Ground Ops - Respawning After Destroy/MOOSE_Spawn_Test.lua index 096919fa7f..b927ecf71d 100644 --- a/Core/Spawn/SPA-027 - Ground Ops - Respawning After Destroy/MOOSE_Spawn_Test.lua +++ b/Core/Spawn/SPA-027 - Ground Ops - Respawning After Destroy/MOOSE_Spawn_Test.lua @@ -1,4 +1,4 @@ -env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-17T14:20:51+02:00-2836d7a40f138255016eaa64009328d4d129e93f ***') +env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-18T18:19:05+02:00-c2933b6bed7d0609a24316bc6f575200248a29e1 ***') if not MOOSE_DEVELOPMENT_FOLDER then MOOSE_DEVELOPMENT_FOLDER='Scripts' end @@ -7472,7 +7472,9 @@ end if Event.dynamiccargo then Event.IniDynamicCargo=Event.dynamiccargo Event.IniDynamicCargoName=Event.IniDynamicCargo.StaticName -Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") +if Event.IniDynamicCargo.Owner or Event.IniUnitName then +Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or"None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+") +end end if Event.zone then Event.Zone=Event.zone @@ -23444,6 +23446,7 @@ POSITIONABLE.CargoBayCapacityValues={ ["HL_KORD"]=6*POSITIONABLE.DefaultInfantryWeight, ["HL_DSHK"]=6*POSITIONABLE.DefaultInfantryWeight, ["CCKW_353"]=16*POSITIONABLE.DefaultInfantryWeight, +["MaxxPro_MRAP"]=7*POSITIONABLE.DefaultInfantryWeight, } } function POSITIONABLE:SetCargoBayWeightLimit(WeightLimit) @@ -69550,6 +69553,34 @@ precepitation=1 else precepitation=3 end +elseif cloudspreset:find("RainyPreset4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset5")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset6")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("NEWRAINPRESET4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end elseif cloudspreset:find("RainyPreset")then clouddens=9 if temperature>5 then @@ -85645,7 +85676,7 @@ OFFENSIVE="Offensive", AGGRESSIVE="Aggressive", TOTALWAR="Total War" } -CHIEF.version="0.6.0" +CHIEF.version="0.6.1" function CHIEF:New(Coalition,AgentSet,Alias) Alias=Alias or"CHIEF" if type(Coalition)=="string"then @@ -86734,6 +86765,7 @@ end if MissionType==AUFTRAG.Type.ARMOREDGUARD then RangeMax=UTILS.NMToMeters(50) end +self:T(self.lid..string.format("Recruiting assets for zone %s",StratZone.opszone:GetName())) self:T(self.lid.."Missiontype="..MissionType) self:T({categories=Categories}) self:T({attributes=Attributes}) @@ -86745,11 +86777,15 @@ self:T2(self.lid..string.format("Recruited %d assets for %s mission STRATEGIC zo local TargetZone=StratZone.opszone.zone local TargetCoord=TargetZone:GetCoordinate() local transport=nil +local Ntransports=0 if Resource.carrierNmin and Resource.carrierNmax and Resource.carrierNmax>0 then +self:T(self.lid..string.format("Recruiting carrier assets: Nmin=%s, Nmax=%s",tostring(Resource.carrierNmin),tostring(Resource.carrierNmax))) local cargoassets=CHIEF._FilterAssets(assets,Resource.Categories,Resource.Attributes,Resource.Properties) if#cargoassets>0 then recruited,transport=LEGION.AssignAssetsForTransport(self.commander,self.commander.legions,cargoassets, Resource.carrierNmin,Resource.carrierNmax,TargetZone,nil,Resource.carrierCategories,Resource.carrierAttributes,Resource.carrierProperties) +Ntransports=transport~=nil and#transport.assets or 0 +self:T(self.lid..string.format("Recruited %d transport carrier assets success=%s",Ntransports,tostring(recruited))) end end if not recruited then @@ -86808,8 +86844,9 @@ if mission then mission:_AddAssets(assets) self:MissionAssign(mission,legions) StratZone.opszone:_AddMission(self.coalition,MissionType,mission) +mission:SetName(string.format("Stratzone %s-%d",StratZone.opszone:GetName(),mission.auftragsnummer)) Resource.mission=mission -if transport then +if transport and Ntransports>0 then mission.opstransport=transport transport.opszone=StratZone.opszone transport.chief=self @@ -95637,6 +95674,9 @@ table.insert(Assets,asset) end end end +if#Assets==0 then +return false,{},{} +end LEGION._OptimizeAssetSelection(Assets,MissionTypeOpt,TargetVec2,false,TotalWeight) for _,_asset in pairs(Assets)do local asset=_asset diff --git a/Core/Spawn/SPA-110 - Limit Spawning/MOOSE_Spawn_Test.lua b/Core/Spawn/SPA-110 - Limit Spawning/MOOSE_Spawn_Test.lua index 096919fa7f..b927ecf71d 100644 --- a/Core/Spawn/SPA-110 - Limit Spawning/MOOSE_Spawn_Test.lua +++ b/Core/Spawn/SPA-110 - Limit Spawning/MOOSE_Spawn_Test.lua @@ -1,4 +1,4 @@ -env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-17T14:20:51+02:00-2836d7a40f138255016eaa64009328d4d129e93f ***') +env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-18T18:19:05+02:00-c2933b6bed7d0609a24316bc6f575200248a29e1 ***') if not MOOSE_DEVELOPMENT_FOLDER then MOOSE_DEVELOPMENT_FOLDER='Scripts' end @@ -7472,7 +7472,9 @@ end if Event.dynamiccargo then Event.IniDynamicCargo=Event.dynamiccargo Event.IniDynamicCargoName=Event.IniDynamicCargo.StaticName -Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") +if Event.IniDynamicCargo.Owner or Event.IniUnitName then +Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or"None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+") +end end if Event.zone then Event.Zone=Event.zone @@ -23444,6 +23446,7 @@ POSITIONABLE.CargoBayCapacityValues={ ["HL_KORD"]=6*POSITIONABLE.DefaultInfantryWeight, ["HL_DSHK"]=6*POSITIONABLE.DefaultInfantryWeight, ["CCKW_353"]=16*POSITIONABLE.DefaultInfantryWeight, +["MaxxPro_MRAP"]=7*POSITIONABLE.DefaultInfantryWeight, } } function POSITIONABLE:SetCargoBayWeightLimit(WeightLimit) @@ -69550,6 +69553,34 @@ precepitation=1 else precepitation=3 end +elseif cloudspreset:find("RainyPreset4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset5")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset6")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("NEWRAINPRESET4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end elseif cloudspreset:find("RainyPreset")then clouddens=9 if temperature>5 then @@ -85645,7 +85676,7 @@ OFFENSIVE="Offensive", AGGRESSIVE="Aggressive", TOTALWAR="Total War" } -CHIEF.version="0.6.0" +CHIEF.version="0.6.1" function CHIEF:New(Coalition,AgentSet,Alias) Alias=Alias or"CHIEF" if type(Coalition)=="string"then @@ -86734,6 +86765,7 @@ end if MissionType==AUFTRAG.Type.ARMOREDGUARD then RangeMax=UTILS.NMToMeters(50) end +self:T(self.lid..string.format("Recruiting assets for zone %s",StratZone.opszone:GetName())) self:T(self.lid.."Missiontype="..MissionType) self:T({categories=Categories}) self:T({attributes=Attributes}) @@ -86745,11 +86777,15 @@ self:T2(self.lid..string.format("Recruited %d assets for %s mission STRATEGIC zo local TargetZone=StratZone.opszone.zone local TargetCoord=TargetZone:GetCoordinate() local transport=nil +local Ntransports=0 if Resource.carrierNmin and Resource.carrierNmax and Resource.carrierNmax>0 then +self:T(self.lid..string.format("Recruiting carrier assets: Nmin=%s, Nmax=%s",tostring(Resource.carrierNmin),tostring(Resource.carrierNmax))) local cargoassets=CHIEF._FilterAssets(assets,Resource.Categories,Resource.Attributes,Resource.Properties) if#cargoassets>0 then recruited,transport=LEGION.AssignAssetsForTransport(self.commander,self.commander.legions,cargoassets, Resource.carrierNmin,Resource.carrierNmax,TargetZone,nil,Resource.carrierCategories,Resource.carrierAttributes,Resource.carrierProperties) +Ntransports=transport~=nil and#transport.assets or 0 +self:T(self.lid..string.format("Recruited %d transport carrier assets success=%s",Ntransports,tostring(recruited))) end end if not recruited then @@ -86808,8 +86844,9 @@ if mission then mission:_AddAssets(assets) self:MissionAssign(mission,legions) StratZone.opszone:_AddMission(self.coalition,MissionType,mission) +mission:SetName(string.format("Stratzone %s-%d",StratZone.opszone:GetName(),mission.auftragsnummer)) Resource.mission=mission -if transport then +if transport and Ntransports>0 then mission.opstransport=transport transport.opszone=StratZone.opszone transport.chief=self @@ -95637,6 +95674,9 @@ table.insert(Assets,asset) end end end +if#Assets==0 then +return false,{},{} +end LEGION._OptimizeAssetSelection(Assets,MissionTypeOpt,TargetVec2,false,TotalWeight) for _,_asset in pairs(Assets)do local asset=_asset diff --git a/Core/Spawn/SPA-200 - Randomize Unit Types/MOOSE_Spawn_Test.lua b/Core/Spawn/SPA-200 - Randomize Unit Types/MOOSE_Spawn_Test.lua index 096919fa7f..b927ecf71d 100644 --- a/Core/Spawn/SPA-200 - Randomize Unit Types/MOOSE_Spawn_Test.lua +++ b/Core/Spawn/SPA-200 - Randomize Unit Types/MOOSE_Spawn_Test.lua @@ -1,4 +1,4 @@ -env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-17T14:20:51+02:00-2836d7a40f138255016eaa64009328d4d129e93f ***') +env.info('*** MOOSE GITHUB Commit Hash ID: 2024-08-18T18:19:05+02:00-c2933b6bed7d0609a24316bc6f575200248a29e1 ***') if not MOOSE_DEVELOPMENT_FOLDER then MOOSE_DEVELOPMENT_FOLDER='Scripts' end @@ -7472,7 +7472,9 @@ end if Event.dynamiccargo then Event.IniDynamicCargo=Event.dynamiccargo Event.IniDynamicCargoName=Event.IniDynamicCargo.StaticName -Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") +if Event.IniDynamicCargo.Owner or Event.IniUnitName then +Event.IniPlayerName=Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or"None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+") +end end if Event.zone then Event.Zone=Event.zone @@ -23444,6 +23446,7 @@ POSITIONABLE.CargoBayCapacityValues={ ["HL_KORD"]=6*POSITIONABLE.DefaultInfantryWeight, ["HL_DSHK"]=6*POSITIONABLE.DefaultInfantryWeight, ["CCKW_353"]=16*POSITIONABLE.DefaultInfantryWeight, +["MaxxPro_MRAP"]=7*POSITIONABLE.DefaultInfantryWeight, } } function POSITIONABLE:SetCargoBayWeightLimit(WeightLimit) @@ -69550,6 +69553,34 @@ precepitation=1 else precepitation=3 end +elseif cloudspreset:find("RainyPreset4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset5")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("RainyPreset6")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end +elseif cloudspreset:find("NEWRAINPRESET4")then +clouddens=5 +if temperature>5 then +precepitation=1 +else +precepitation=3 +end elseif cloudspreset:find("RainyPreset")then clouddens=9 if temperature>5 then @@ -85645,7 +85676,7 @@ OFFENSIVE="Offensive", AGGRESSIVE="Aggressive", TOTALWAR="Total War" } -CHIEF.version="0.6.0" +CHIEF.version="0.6.1" function CHIEF:New(Coalition,AgentSet,Alias) Alias=Alias or"CHIEF" if type(Coalition)=="string"then @@ -86734,6 +86765,7 @@ end if MissionType==AUFTRAG.Type.ARMOREDGUARD then RangeMax=UTILS.NMToMeters(50) end +self:T(self.lid..string.format("Recruiting assets for zone %s",StratZone.opszone:GetName())) self:T(self.lid.."Missiontype="..MissionType) self:T({categories=Categories}) self:T({attributes=Attributes}) @@ -86745,11 +86777,15 @@ self:T2(self.lid..string.format("Recruited %d assets for %s mission STRATEGIC zo local TargetZone=StratZone.opszone.zone local TargetCoord=TargetZone:GetCoordinate() local transport=nil +local Ntransports=0 if Resource.carrierNmin and Resource.carrierNmax and Resource.carrierNmax>0 then +self:T(self.lid..string.format("Recruiting carrier assets: Nmin=%s, Nmax=%s",tostring(Resource.carrierNmin),tostring(Resource.carrierNmax))) local cargoassets=CHIEF._FilterAssets(assets,Resource.Categories,Resource.Attributes,Resource.Properties) if#cargoassets>0 then recruited,transport=LEGION.AssignAssetsForTransport(self.commander,self.commander.legions,cargoassets, Resource.carrierNmin,Resource.carrierNmax,TargetZone,nil,Resource.carrierCategories,Resource.carrierAttributes,Resource.carrierProperties) +Ntransports=transport~=nil and#transport.assets or 0 +self:T(self.lid..string.format("Recruited %d transport carrier assets success=%s",Ntransports,tostring(recruited))) end end if not recruited then @@ -86808,8 +86844,9 @@ if mission then mission:_AddAssets(assets) self:MissionAssign(mission,legions) StratZone.opszone:_AddMission(self.coalition,MissionType,mission) +mission:SetName(string.format("Stratzone %s-%d",StratZone.opszone:GetName(),mission.auftragsnummer)) Resource.mission=mission -if transport then +if transport and Ntransports>0 then mission.opstransport=transport transport.opszone=StratZone.opszone transport.chief=self @@ -95637,6 +95674,9 @@ table.insert(Assets,asset) end end end +if#Assets==0 then +return false,{},{} +end LEGION._OptimizeAssetSelection(Assets,MissionTypeOpt,TargetVec2,false,TotalWeight) for _,_asset in pairs(Assets)do local asset=_asset diff --git a/Ops/CTLD/CTLD 120 - Chinook/CTLD-120 - Chinook.miz b/Ops/CTLD/CTLD 120 - Chinook/CTLD-120 - Chinook.miz index 1954920698..4057491ad2 100644 Binary files a/Ops/CTLD/CTLD 120 - Chinook/CTLD-120 - Chinook.miz and b/Ops/CTLD/CTLD 120 - Chinook/CTLD-120 - Chinook.miz differ