New Discovery!

gecko

Charter Member
I had the cfs3 exe open in a hex editor yesterday and found some buried features we didn't know we had. Near the bottom of the file there are a whole bunch of tags with the prefix kEvent, which are all the commands CFS3 recognizes. There are quite a few that aren't listed as available commands in the key configuration setup. Not all the new commands appear to work, but some of them do. Fuel selectors work, allowing better management of fuel tanks, magnetos can be operated independently of each other and a few others. Not sure what else I'll find, but it looks good for being able to better model some of the more complex aircraft systems.:jump:
 
cool, I also see cowl flaps in there . would be nice if they actually did something besides the animation
 
Wow Daniel, that sounds very interesting, well done on finding that! Of the ones you made work,how did you achieve it?
Cfs3 is lacking in the engine management department!
 
It may not be a bad idea to use Process Explorer to export the CFS3.exe strings in a list and do the same for any thing the the CFS3.exe is using.

I did this for CFS2 with the .exes, modules folder and sim1.sim file.
 
They only work on air-cooled engines, I've been trying to get a way for radiator flaps to work on liquid cooled engines without success, but maybe this will change that. We'll have to see how deep this rabbit hole goes.

To implement the new commands you have to take the event name (minus the kEvent_ tag) and add a new line for it to the events.xml in the main folder. Then this command will be available to be assigned in the key configuration menu.

Interestingly there are also system failure toggle commands in there, I tried, but I'm not sure if they work or not, I would need to know how they work in FS2004. This all does make me wonder how many of the external utilities that work in the FS series could work at least partially in CFS3. I'm sure there must be some, but nobody with those kinds of skills has looked into CFS3 so far.

I also wonder if this will make new cockpit animations work.
 
There are also some really weird ones in there:

kEvent_TossTheChicken
kEvent_ApplyShowyDamage

Other than that, it seems like it contains most commands that the civvie sims have. Even the Concorde visor command and some aircraft tug related stuff is listed. Just a selection:

kEvent_ToggleFlightRec
kEvent_JumpBehindAircraft
kEvent_WINGMENSYSTEM
kEVENT_WINGMAN_TASKMNGR_TOGGLE
kEvent_XPNDR
kEvent_EGT
kEvent_STROBES_TOGGLE
kEvent_STROBES_SET
kEvent_STROBES_ON
kEvent_STROBES_OFF
kEvent_ATC
kEvent_ADF
kEvent_HEADING_GYRO_SET
kEVENT_DME
kEvent_ANTI_ICE_TOGGLE
kEvent_ANTI_ICE_SET
kEvent_ANTI_ICE_ON
kEvent_ANTI_ICE_OFF
kEvent_ALL_LIGHTS_TOGGLE
kEvent_BAROMETRIC
kEvent_SPOILERS_TOGGLE
kEvent_LANDING_LIGHTS_TOGGLE
kEvent_LANDING_LIGHT_RIGHT
kEvent_LANDING_LIGHT_LEFT
kEvent_LANDING_LIGHT_HOME
kEvent_CENTER_NT361_CHECK
kEvent_SPOILERS_ARM_TOGGLE
kEvent_KOHLSMAN_SET
kEvent_KOHLSMAN_INC
kEvent_KOHLSMAN_DEC
kEvent_TRUE_AIRSPEED_CALIBRATE_INC
kEvent_TRUE_AIRSPEED_CALIBRATE_DEC
kEvent_CROSS_FEED_OFF
kEvent_CROSS_FEED_RIGHT_TO_LEFT
kEvent_CROSS_FEED_LEFT_TO_RIGHT
kEVENT_AUTOCOORD_TOGGLE
kEVENT_AUTOCOORD_OFF
kEVENT_AUTOCOORD_ON
kEvent_FUEL_SELECTOR_OFF
kEvent_FUEL_SELECTOR_LEFT
kEvent_FUEL_SELECTOR_LEFT_AUX
kEvent_FUEL_SELECTOR_RIGHT
kEvent_FUEL_SELECTOR_RIGHT_AUX
kEvent_FUEL_SELECTOR_ALL
kEvent_FUEL_SELECTOR_CENTER
kEvent_SMOKE_ON
kEvent_SMOKE_OFF
kEvent_SMOKE_SET
kEVENT_PITOT_HEAT_ON
kEVENT_PITOT_HEAT_OFF
kEVENT_PITOT_HEAT_SET
kEVENT_TOGGLE_BEACON_LIGHTS
kEvent_TOGGLE_ELECTRIC_VACUUM_PUMP
kEvent_TOGGLE_AVIONICS_MASTER
kEvent_TOGGLE_CONCORDE_NOSE_VISOR
kEvent_TUG_SPEED
kEvent_TUG_DISABLE
kEvent_TUG_HEADING

Apart from the better engine management, it seems we could perhaps have had a flightrecorder and more complex wingmen commands too. Seeing all this, I do get the feeling this really is the half-baked product some folks said it was... :sorrow:
 
To implement the new commands you have to take the event name (minus the kEvent_ tag) and add a new line for it to the events.xml in the main folder. Then this command will be available to be assigned in the key configuration menu.

I also wonder if this will make new cockpit animations work.

Fascinating stuff! What hex editor are you using Daniel? I could try and see if we can get any extra animations.
 
Free Hex Editor Neo is what I have. I'm particularly curious to see if the fuel selector animations work, and if fuel gauges can be made to read individual tanks instead of total quantity. I know there are primer and electrical fuel pump commands in there as well, not sure if they work or not as they probable need to be set up in the individual aircraft air files too.
 
Mmm..I have that one as well but couldn't see those, must be using it wrong!
I'll have some time at the weekend to take a look. Yes working fuel selectors is one I'd like to see too.
 
But would adding the key commands to events.xml also activate the associated functions and/or animations in the sim? I mean, it couldn't be as simple as that - waiting ten years or so, just to find out that adding a string to a file brings up a whole new bunch of functions? :adoration:. For example, the parking brake works (function) but the animation doesn't... The animations must also be programmed somewhere. And I have a feeling that they dropped a lot of those... But let's see what happens after adding a few interesting ones to the .xml!

BTW HexEditor XVI32 (freeware) also does the job.
 
I mean, it couldn't be as simple as that - waiting ten years or so, just to find out that adding a string to a file brings up a whole new bunch of functions?

Possibly Joost, Daniel already has made progress...:applause:

Not all the new commands appear to work, but some of them do. Fuel selectors work, allowing better management of fuel tanks, magnetos can be operated independently of each other and a few others.

So there's hope for a few others, fingers crossed!
 
Ok, but

Not to rain on anyone's parade but - if the export dll does not have these commands or gauge options, then there maybe an issue. That being said, if the export dll say for FS2004 could be used in some way or at least some of the code.......
 
I know the SDK mentions animations that we didn't have commands for, and now some of those commands we find actually work, the animation code may still be there too, but as Ted points out that isn't a given.

Ive looked the most into the fuel selector so far, and can confirm at least selector 1 is working. Turning it off will shut down the engine, and setting it to just one tank will cause the engine to shut down once it is empty, and setting it to a full one will allow it to start again. This is particularly good news for P-51 pilots, as the fuselage tank had to be drained first in order to make the aircraft controllable, and we haven't been able to do that until now.
 
Ive looked the most into the fuel selector so far, and can confirm at least selector 1 is working. Turning it off will shut down the engine, and setting it to just one tank will cause the engine to shut down once it is empty, and setting it to a full one will allow it to start again. This is particularly good news for P-51 pilots, as the fuselage tank had to be drained first in order to make the aircraft controllable, and we haven't been able to do that until now.

That is cool! I am gonna try that!!
 
CFS3.exe is also where the AI is!

I've managed to track some of it down as I've got a fairly good idea of what is going on regarding the AI.

If we can rewrite the CFS3.exe file, we'll have effectively recreated the game all together.
 
I am surprised....

.....that this conversation has not been closed by our moderators. If it is we will need to talk elsewhere. I am sure that the OFF folks have done this with help from M$.....(well not sure but speculating).
 
Back
Top