Help with tracking settings/variables.

Mynar

25RPM
Feb 19, 2019
38
4
40
I feel defeated. Any kind sole wish to help educate me on perhaps better and more advanced ways to track variables/settings?

Short Version,
"maxDriverFormTimeCost"
Ive searched the save and the csharp and just cannot find how this variable setting gets defined/set.

Long Version,
"maxDriverFormTimeCost" - I believe this will affect the time penalty for form which I believe to be set right now to 1 second.
I scoured the savegame file and cannot seem to identify a setting for this.
When I do a search for this term in dnSpy, I get one hit. Which is weird, because after doing a lot of searching i have found another reference to this phrase in an assembly, which dnSpy doesnt show me. Ive checked the search settings and they seem good.

The one it does find has the following,
[XmlElement("MaxDriverFormTimeCost")]
public float maxDriverFormTimeCost;

I tried this hoping it would just dump in a static line in the save, but it doesnt.

[XmlElement("MaxDriverFormTimeCost")]
public float maxDriverFormTimeCost = 0.42f;


The other reference I found was in 'DriverSessionForm', but that does not appear to be what I need.

Any help would be greatly appreciated,
Thanks.
 
Last edited:

Mynar

25RPM
Feb 19, 2019
38
4
40
Follow up...
I just wrote this yesterday, but if anyone still has an answer to this, I would still like to know where this setting gets set, but I did go a different route.

After two days and not finding my answer, I decided to just change the scale of the form system so that it now ranges from 3.3 to 9.8 (reserved the 10 for the 'in form' perk). This essentially achieved the same result for me and took me 15 minutes to do.

Why do this, well my little rant (humble opinion), I dont mind the form system, I just think it should reflect a couple positions of where you finish, not be one of the main criteria in a successful race. In my GT series, 1 second in qualifying is HUGE, so although I may be simplifying things, but heck, just leave the cars in the garage and see who wins the RNG form game and you win. For me, my form scale change has worked great and still leaves plenty of room for variability in the finishing order (quali and race).
 
Last edited:
Mar 26, 2018
26
4
42
MaxDriverFormTimeCost should be the difference between a driver with 0.0 form and a 10.0 in form. So if you set it to 10, then you are saying that a driver on form 0 will be 10 sec a lap slower than a driver with perfect form (10), which in my opinion is far too exaggerated.

This value can be found in the designdata files for each series, where you can also set how often the driver's form is updated. This is from my EnduranceDesignData for the True Endurance mod I made. This is for my "short" 6 hours race distnace. There are required entries for Medium and Long races as well
<MaxDriverFormTimeCost>0.75</MaxDriverFormTimeCost>
<TotalUpdateChunks>18</TotalUpdateChunks>
<TotalUpdateChunksQualifying>2</TotalUpdateChunksQualifying>
<ConsistencyMaxFormLoss>0.2</ConsistencyMaxFormLoss>
<ConsistencyMinFormLoss>0.05</ConsistencyMinFormLoss>​
 
Last edited:

Mynar

25RPM
Feb 19, 2019
38
4
40
MaxDriverFormTimeCost should be the difference between a driver with 0.0 form and a 10.0 in form. So if you set it to 10, then you are saying that a driver on form 0 will be 10 sec a lap slower than a driver with perfect form (10), which in my opinion is far too exaggerated.

This value can be found in the designdata files for each series, where you can also set how often the driver's form is updated. This is from my EnduranceDesignData for the True Endurance mod I made. This is for my "short" 6 hours race distnace. There are required entries for Medium and Long races as well
<MaxDriverFormTimeCost>0.75</MaxDriverFormTimeCost>
<TotalUpdateChunks>18</TotalUpdateChunks>
<TotalUpdateChunksQualifying>2</TotalUpdateChunksQualifying>
<ConsistencyMaxFormLoss>0.2</ConsistencyMaxFormLoss>
<ConsistencyMinFormLoss>0.05</ConsistencyMinFormLoss>​
Hey,
Thanks for the info. I apologize in advance for my own lack of knowledge of modding this game. My goal was to change the formtimecost from 1.0 to somwhere around .4 to .6
So my questions are as follows:
1) where are these files, I havent done it yet, but Im gonna assume I need to install the steam workshop stuff for this game, but then it follows...
2) Does making these adjustments to these files only apply to a new series/mod? Seems like most of the settings get baked into the savegame file.
I am trying to make an adjustment on a existing series, so I assumed that the settings were either in the savegame or the csharp.

Thanks.
 
Mar 26, 2018
26
4
42
Hey,
Thanks for the info. I apologize in advance for my own lack of knowledge of modding this game. My goal was to change the formtimecost from 1.0 to somwhere around .4 to .6
So my questions are as follows:
1) where are these files, I havent done it yet, but Im gonna assume I need to install the steam workshop stuff for this game, but then it follows...
2) Does making these adjustments to these files only apply to a new series/mod? Seems like most of the settings get baked into the savegame file.
I am trying to make an adjustment on a existing series, so I assumed that the settings were either in the savegame or the csharp.

Thanks.
the designdata.xml files are housed within resources.assets as text assets if you are not running any mods, otherwise you just need to go into the folder of the mod you are using to see if they have already edited the designdata file.

I have been told that the changes to the design data can be used on an existing save, but I have yet to see that happen. It likely means those changes only work on new careers.

editing the assembly-CSharp.dll would only be editing the core logic of the game and if there are values used in the dll, they are a default if there is not an override in a .txt or .xml file

The other thing that you can do in the design data file is shut off portions of the code you don't want to use in this case <DriverForm isActive="true">
you can switch the true to a false and it should ignore driver form altogether since you want such a small range (and keep in mind that is the difference between a 0 form driver and a 10 form driver; you generally won't see those extremes)
 
Last edited:

Mynar

25RPM
Feb 19, 2019
38
4
40
the designdata.xml files are housed within resources.assets as text assets if you are not running any mods, otherwise you just need to go into the folder of the mod you are using to see if they have already edited the designdata file.

I have been told that the changes to the design data can be used on an existing save, but I have yet to see that happen. It likely means those changes only work on new careers.

editing the assembly-CSharp.dll would only be editing the core logic of the game and if there are values used in the dll, they are a default if there is not an override in a .txt or .xml file

The other thing that you can do in the design data file is shut off portions of the code you don't want to use in this case <DriverForm isActive="true">
you can switch the true to a false and it should ignore driver form altogether since you want such a small range (and keep in mind that is the difference between a 0 form driver and a 10 form driver; you generally won't see those extremes)
Clearly, you have spent time on this subject and I appreciate your feedback! Thank you.
For me and my purposes, I think the changes I made to the form system ended up achieving the same results I was looking for and I am satisfied.

I actually dont mind the form system, I just wanted to lessen its effect. I agree that you dont usually see the extremes, but from my observations form was somewhere around a 6 avg with a +-3, and my changes were subtle (Id say a 7avg with a +-2).

Anyways, thanks again for the info, it was very helpful!
 

Mynar

25RPM
Feb 19, 2019
38
4
40
I personally, don't like to leave something I started open, so I actually did find 1/2 of what I was looking for. But it is an important half, that would have achieved what I had been looking to do.

In DriverSessionForm
// Token: 0x06002138 RID: 8504 RVA: 0x000E7074 File Offset: 0x000E5274
private void UpdateForm()
{
this.ClearTimeCost();
float num = 1f - this.mVehicle.driver.driverForm.GetCurrentForm(-1f);
base.IncreaseTimeCost(this.mCarPerformance.driverForm.maxDriverFormTimeCost * num);

So I never did find where the MaxDriverFormTimeCost gets set for a Vanilla game, but technically, you could just change the code in here from the variable to a whatever modifier you wanted (.7, .5, etc..).
 
Mar 26, 2018
26
4
42
So I never did find where the MaxDriverFormTimeCost gets set for a Vanilla game, but technically, you could just change the code in here from the variable to a whatever modifier you wanted (.7, .5, etc..).
It gets set via the respective XXXdesigndata.xml file (where XXX is either SingleSeater, GT, or Endurance).

If you have just the vanilla game, those files are bundled inside the >200MB resources.assets file. You would need to extract the .xml using the unity asset bundle extractor, edit, save and then insert the edited file to get it to recognize it.
 

Mynar

25RPM
Feb 19, 2019
38
4
40
Ahh, cool after your initial response, I was kinda thinking it was something like that. I think I remember reading a comment from flamingred talking about how not all the settings get baked into the save file and some stuff still gets pulled from the assets. This is clearly one. Thanks man. Id say this thread is complete with multiple different answers and potential ways for anyone interested in messing with formtimecost
 
Last edited: