Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Pilot fatigue and experience

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Pilot fatigue and experience Page: [1]
Login
Message << Older Topic   Newer Topic >>
Pilot fatigue and experience - 1/24/2020 9:47:00 PM   
simovitch


Posts: 4554
Joined: 2/14/2006
Status: online
These do not seem to be modeled in the game, or am I missing something? Low altitude flying, final approach/landing, and not to mention combat should have some effect on performance shouldn't it?


_____________________________

simovitch

Post #: 1
RE: Pilot fatigue and experience - 1/24/2020 9:56:57 PM   
Primarchx


Posts: 3047
Joined: 1/20/2013
Status: offline
There is a crew quality factor for platforms.

(in reply to simovitch)
Post #: 2
RE: Pilot fatigue and experience - 1/24/2020 10:23:27 PM   
thewood1

 

Posts: 4547
Joined: 11/27/2005
Status: online
Some of that is abstracted in the flight tempo settings.

(in reply to Primarchx)
Post #: 3
RE: Pilot fatigue and experience - 1/26/2020 1:44:56 PM   
apache85

 

Posts: 1838
Joined: 12/18/2014
From: Melbourne, Australia
Status: offline
At the risk of sounding like a broken record, I've done this before in specific scenarios using Lua. One had a maximum flight time in hours for different kinds of aircraft, if it was exceeded the pilot's proficiency level was reduced and after a while they started having a random chance of falling out of the sky.

You could definitely adapt this to low level flying or any other metric you like.

_____________________________


(in reply to thewood1)
Post #: 4
RE: Pilot fatigue and experience - 1/27/2020 9:27:35 AM   
apache85

 

Posts: 1838
Joined: 12/18/2014
From: Melbourne, Australia
Status: offline
Here is the code I used to represent aircrew fatigue in the scenario I mentioned; do be aware that some of the functions are defined in a different script so this won't work 'out of the box', and is more useful as inspiration or a roadmap to achieving this.

If anyone is having trouble implementing this into an otherwise finished and ready for release scenario I'd be happy to assist in getting it going for you.

quote:

---------------Fatigue
local function GetListOfAircraftOnSide(sideName)
local aircraftTable = {}
local sideUnits = VP_GetSide({side=sideName}).units
for k,v in ipairs (sideUnits) do
local unit = ScenEdit_GetUnit({guid=v.guid})
if unit.type == 'Aircraft' then
table.insert(aircraftTable,unit)
end
end
return aircraftTable
end

local function HrsToMins(numHrs)
local result = numHrs * 60
return result
end

local aircraftTypeList = {
{dbid=3446, fatigueThreshold=HrsToMins(16), exhaustionThreshold=HrsToMins(20), warningThreshold=HrsToMins(15)}, --Poseidon
{dbid=979, fatigueThreshold=HrsToMins(14), exhaustionThreshold=HrsToMins(18), warningThreshold=HrsToMins(13)}, --AP-3C
{dbid=1701, fatigueThreshold=HrsToMins(14), exhaustionThreshold=HrsToMins(18), warningThreshold=HrsToMins(13)}, --Hercules
{dbid=1782, fatigueThreshold=HrsToMins(16), exhaustionThreshold=HrsToMins(20), warningThreshold=HrsToMins(15)}, --C-17
{dbid=1827, fatigueThreshold=HrsToMins(16), exhaustionThreshold=HrsToMins(20), warningThreshold=HrsToMins(15)}, --KC-30
{dbid=940, fatigueThreshold=HrsToMins(16), exhaustionThreshold=HrsToMins(20), warningThreshold=HrsToMins(15)}, --Wedgetail
{dbid=2926, fatigueThreshold=HrsToMins(10), exhaustionThreshold=HrsToMins(14), warningThreshold=HrsToMins(9)}, --EA-18G
{dbid=1519, fatigueThreshold=HrsToMins(10), exhaustionThreshold=HrsToMins(14), warningThreshold=HrsToMins(9)}, --HAWK LIFT
{dbid=3857, fatigueThreshold=HrsToMins(10), exhaustionThreshold=HrsToMins(14), warningThreshold=HrsToMins(9)}, --F/A-18F
{dbid=3901, fatigueThreshold=HrsToMins(10), exhaustionThreshold=HrsToMins(14), warningThreshold=HrsToMins(9)}, --Lightning
{dbid=3911, fatigueThreshold=HrsToMins(10), exhaustionThreshold=HrsToMins(14), warningThreshold=HrsToMins(9)}, --F/A-18B
{dbid=3912, fatigueThreshold=HrsToMins(10), exhaustionThreshold=HrsToMins(14), warningThreshold=HrsToMins(9)}, --F/A-18A
}

function matchAircraftDBIDToType(dbid)
local result = nil
for k,v in ipairs (aircraftTypeList) do
if v.dbid == dbid then
result = v
end
end
return result
end

local sideAircraftList = GetListOfAircraftOnSide('Australia')

for k,aircraft in ipairs (sideAircraftList) do
local thisAircraftType = matchAircraftDBIDToType(aircraft.dbid)

if thisAircraftType ~= nil then
local airborneTimeInMinutes = ReturnTimeStringAsNumberOfMinutes(aircraft.airbornetime)
local aircraftProficiency = ReturnUnitProficiencyAsNumber (aircraft.guid)

if airborneTimeInMinutes > thisAircraftType.exhaustionThreshold and aircraftProficiency > 0 then
ScenEdit_SetUnit({guid = aircraft.guid, proficiency = 0})
local chance = math.random(1,100)
if chance == 100 then
ScenEdit_KillUnit({guid=aircraft.guid})
ChangeScore('Australia',-100,aircraft.name..' crashed due to fatigue. An inquiry into your actions has begun.')
ChangeAttrition('Australia',100)
end
elseif airborneTimeInMinutes > thisAircraftType.fatigueThreshold and aircraftProficiency > 1 then
ScenEdit_SetUnit({guid = aircraft.guid, proficiency = 1})
elseif aircraft.isOperating == false and aircraftProficiency < 2 then
ScenEdit_SetUnit({guid = aircraft.guid, proficiency = 2})
end
end
end


_____________________________


(in reply to apache85)
Post #: 5
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Pilot fatigue and experience Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.133