plane icon Welcome to Microsoft Flight Simulator’s SDK Q&A Platform!

You have questions regarding the SDK? DevMode Tools? SimConnect? You would like to submit an idea for future improvements, seek help or exchange knowledge? You’re in the right place.

In the upcoming flighting, we've changed the behaviour of the content.xml file. If your addon uses this file, please read this article!

Please take a moment to read the platform’s guidelines before you get started!


Idea

Simbol avatar image
Simbol suggested CaptMatto edited

Enable the possibility to reset engine Hobbs hours

Dear Asobo,

We implement many types of maintenance modules to our airplanes, and under many circumstances due to simulated engine failures, etc. a new engine is simulated to be installed.

Unfortunately we cannot instruct MSFS that a particular engine running time needs to be put back to zero since there are not events available for this and the current A:Var GENERAL ENG HOBBS ELAPSED TIME is read only.

Can it be possible to either change this variable to be writable or include some mechanism to achieve the same goal?

Thanks in advance,
Simbol

aircraft
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

1 Comment

·
CaptMatto avatar image
CaptMatto commented CaptMatto edited

I'm using the same mechanism in the G36 Improvement Mod - and would love the ability to have this feature.

To get round it currently I built my own hobbs code which records time and sets it in the datastore. I'm using the moment js library to make handling time a little easier. The code for this is running in a gauge and the info is displayed in a custom window.

The power of this system is that it is livery specific, I've found that the Asobo hobbs variable records all hours across all the liveries installed, this differentiates between paints.

Hope this helps

var title = SimVar.GetSimVarValue("TITLE", "string");
var planeId = title.replace(/\s+/g, '_');

//HOBBS
var engStatus = SimVar.GetSimVarValue("ENG COMBUSTION:1", "bool");
var preStart = GetStoredData('G36XIP_HOBBS_'+planeId);
var hobbsStarter = GetStoredData('G36XIP_HOBBS_STARTER'+planeId);

if (engStatus == 1 && hobbsStarter == 0) {
   engStart = moment();
   var hobbsStarter = 1;
   SetStoredData('G36XIP_HOBBS_STARTER'+planeId, hobbsStarter.toString());
}

if (engStatus == 0 && hobbsStarter == 1) {
   var now = moment();
   var duration = now.diff(engStart, 'hours', true);
   var total = Number(preStart) + Number(duration);
   SetStoredData('G36XIP_HOBBS_'+planeId, total.toString());
   var starter = 0;
   SetStoredData('G36XIP_HOBBS_STARTER'+planeId, starter.toString());
}
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Write a Comment

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Your Opinion Counts

Share your great idea, or help out by voting for other people's ideas.