Sorry for being so late, Frank.
mm.. Actually, there is a 'second' place where you can read it.. less 'hacky' than a memory search..
Once you know the player's PLR file location (ScoringInfoV1->mPlrFileName) you can go that same folder and look for a special file:
tempGarage.svm
That file is a read-only version of the garage setup in use by the player. In use I mean player is on track (out of monitor mode) and the file is updated everytime the player joins or exit the track.
You will find there all the settings available in the garage as regular strings with a special format (among additional information), and you may read this file as a regular ini file with the GetPrivateProfileString() method depending on the garage parameter's category.
In your case:
[ENGINE]
//RevLimitSetting=0//7,200
//EngineBoostSetting=0//1
When the line is commented, the default value is in use, when it is uncommented, that means the player changed the value, and the value can be read as: SpinnerIndex//ShowValue
Unfortunatelly, as this value can be changed while on track, you have to take care of player's changing the engine boost value, and for that you have to do one more thing to control it and it is to use the great forgotten:
InternalsPlugin::CheckHWControl( const char *const controlName, float &fRetVal )
You must look for: Control - Increment Boost and Control - Decrement Boost.
Note that you can't edit them, but there function is there and you can read when the player is increasing or decreasing the boost mapping. the RetVal is the value you need to take to know if the player is changing it.
However you haven't finished yet. You need to know the limits of the engine boost control, and that requires more additional job..
- by reading the tempGarage.svm you will find what upgrades the player has selected.
- by reading the tempGarage.svm you will now what .VEH file is the player using
With this information you can now be sure what HDV file is in use and look for it and read the value of:
[ENGINE]
Normal=xxxx.xx
This file describes the engine and there you can find the boost mapping settings:
EngineMapSetting=12
EngineBoostRange=(0 , 1, 12)
Not sure if you want to do this, but this way you don't need to take of executable versions and nobody would blame about memory sniffing. Now, does it worth the pain?
