SteerLockSpecial entries in Upgrades file

Discussion in 'Car Modding' started by Lazza, Dec 17, 2020.

  1. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,382
    Likes Received:
    6,600
    (asked the same question in discord; will update if resolved)

    I have a car using the 'new' steering system, with the steering shaft HDV entries, SteeringInnerTable, etc. This includes a table of SteerLockSpecial entries via the physics spreadsheet, as below:

    Code:
    SteerLockSpecial=(0,"240 ","(4.4) deg","TurnsLockToLock=0.666667;SteeringFraction=0.222222")
    SteerLockSpecial=(1,"270 ","(5) deg","TurnsLockToLock=0.75;SteeringFraction=0.25")
    SteerLockSpecial=(2,"310 ","(5.7) deg","TurnsLockToLock=0.861111;SteeringFraction=0.287037")
    SteerLockSpecial=(3,"360 ","(6.7) deg","TurnsLockToLock=1;SteeringFraction=0.333333")
    SteerLockSpecial=(4,"380 ","(7) deg","TurnsLockToLock=1.055556;SteeringFraction=0.351852")
    SteerLockSpecial=(5,"450 ","(8.3) deg","TurnsLockToLock=1.25;SteeringFraction=0.416667")
    SteerLockSpecial=(6,"540 ","(10) deg","TurnsLockToLock=1.5;SteeringFraction=0.5")
    SteerLockSpecial=(7,"630 ","(12) deg","TurnsLockToLock=1.75;SteeringFraction=0.583333")
    SteerLockSpecial=(8,"720 ","(13) deg","TurnsLockToLock=2;SteeringFraction=0.666667")
    SteerLockSpecial=(9,"857 ","(16) deg","TurnsLockToLock=2.380556;SteeringFraction=0.793519")
    SteerLockSpecial=(10,"873 ","(16) deg","TurnsLockToLock=2.425;SteeringFraction=0.808333")
    SteerLockSpecial=(11,"900 ","(17) deg","TurnsLockToLock=2.5;SteeringFraction=0.833333")
    SteerLockSpecial=(12,"1080 ","(20) deg","TurnsLockToLock=3;SteeringFraction=1")
    
    As part of an upgrades file, I have these entries:

    Code:
        HDV=SteerLockRange=(20,0,8)
        HDV=SteerLockSetting=6
        HDV=SteerLockSpecial=(0,"240 ","(8) deg","TurnsLockToLock=0.666667;SteeringFraction=0.4")
        HDV=SteerLockSpecial=(1,"270 ","(9) deg","TurnsLockToLock=0.75;SteeringFraction=0.45")
        HDV=SteerLockSpecial=(2,"310 ","(10) deg","TurnsLockToLock=0.861111;SteeringFraction=0.516667")
        HDV=SteerLockSpecial=(3,"360 ","(12) deg","TurnsLockToLock=1;SteeringFraction=0.6")
        HDV=SteerLockSpecial=(4,"380 ","(13) deg","TurnsLockToLock=1.055556;SteeringFraction=0.633334")
        HDV=SteerLockSpecial=(5,"450 ","(15) deg","TurnsLockToLock=1.25;SteeringFraction=0.75")
        HDV=SteerLockSpecial=(6,"540 ","(18) deg","TurnsLockToLock=1.5;SteeringFraction=0.9")
        HDV=SteerLockSpecial=(7,"600 ","(20) deg","TurnsLockToLock=1.666667;SteeringFraction=1")
    
    These all 'take' properly in the game (devmode), with only the 8 options available in the garage and all text representations correct (so the steered angle is correct for the new entries, not the old).

    However, the SteeringFraction in the game is still using the old value for around half the values. The new value is applied to 240, 360, 450, 600. (so mostly, but not quite, every second one). If I pick 450, the telemetry shows a max steered angle of 15 deg. Pick 540, steered angle is 10. Pick 600, steered angle is 20. :confused:

    Both tables are spreadsheet generated with the same formula for each line, so no formatting issues. I tried changing the text on one of them (specifically, "450" -> "451") in case the game was somehow holding onto that, but no change. I've also tried putting more of the preceding [CONTROLS] entries from the HDV into the upgrade, despite those values not changing (but thinking the game might somehow be getting confused without them), but so far that hasn't worked either.

    The upgrade does also change the NominalMaxSteerTorque, and the SteeringShaftBaseLeft/Right positions, but if that were causing an issue it should happen for all entries. I'm only getting an issue on some of them which is confusing.

    Anyone have any idea what's going on here? Are there limitations or bugs when defining Special entries in Upgrades?
     
  2. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    4,008
    Likes Received:
    2,875
    Sometimes Upgrades don't work properly, when the Syntax is wrong.
    Did you start the Section for the Steering Entries with the Lines
    HDV=
    HDV=[CONTROLS]
    ..... Your Lines
    What you could try to check if the Upgrades work, is to completely remove all Steering Entries from the HDV and put them into the Upgrades.ini instead.
    If that doesn't work, there must be something wrong with the Syntax, i guess.

    EDIT What also doesn't work properly (i guess), is when there are more Special Entries in the HDV than in the Upgrades, which seems to be the Case.
     
    Last edited: Dec 17, 2020
    Lazza likes this.
  3. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,382
    Likes Received:
    6,600
    @redapg thanks for the input and ideas, when I get more time I'll expand on some of those and see what happens. I'm basically assuming I've got something slightly wrong somewhere, and was actually expecting I'd see it immediately after posting this thread, but so far I haven't :D

    For clarity, this is the complete upgrade HDV code, I'm going to paste this as normal text and highlight green the parts that are working correctly, and red those that aren't:

    HDV=[CONTROLS]
    HDV=NominalMaxSteeringTorque=18
    HDV=SteeringShaftBaseLeft=(0,0.0908638,-0.32543)
    HDV=SteeringShaftBaseRight=(0,0.0908638,-0.32543)
    HDV=SteerLockRange=(20,0,8)
    HDV=SteerLockSetting=6
    HDV=SteerLockSpecial=(0,"240 ","(8) deg","TurnsLockToLock=0.666667;SteeringFraction=0.4")
    HDV=SteerLockSpecial=(1,"270 ","(9) deg","TurnsLockToLock=0.75;
    SteeringFraction=0.45")
    HDV=SteerLockSpecial=(2,"310 ","(10) deg","TurnsLockToLock=0.861111;SteeringFraction=0.516667")
    HDV=SteerLockSpecial=(3,"360 ","(12) deg","TurnsLockToLock=1;SteeringFraction=0.6")
    HDV=SteerLockSpecial=(4,"380 ","(13) deg","TurnsLockToLock=1.055556;
    SteeringFraction=0.633334")
    HDV=SteerLockSpecial=(5,"450 ","(15) deg","TurnsLockToLock=1.25;SteeringFraction=0.75")
    HDV=SteerLockSpecial=(6,"540 ","(18) deg","TurnsLockToLock=1.5;
    SteeringFraction=0.9")
    HDV=SteerLockSpecial=(7,"600 ","(20) deg","TurnsLockToLock=1.666667;SteeringFraction=1")
    HDV=


    As you can see, nearly everything is working, which suggests the syntax is correct. Leading with a HDV= is something I do remember seeing way back in rF1, but from the examples and various mods (like CTDP F1 2006) I understood HDV= to only be necessary when moving from one HDV section to another, but tomorrow I'll happily play with this and other possibilities in an effort to find something that works. (I do tend to habitually end with HDV=, as a "just in case I add another section later" thing...)

    The different number of special lines I didn't really think about as being a possible cause, it does appear to all correlate correctly (if I try a SteerLockSpecial=(8, ...) line, it throws an error because it can see I only have 8 SteerLockRange settings in the upgrade, not more) so I'd consider that a bug if it's the cause, but I'll try having the same number as well.

    I'll also do some more checking on functionality and probably package the car as well to check the single player side.
     
    redapg likes this.
  4. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    4,008
    Likes Received:
    2,875
    Good Luck. :)
    I'll wait for your next Report.
    BTW Did you already try to use the partially not working Entries directly in the HDV?
     
  5. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,382
    Likes Received:
    6,600
    Not at that point, but just did a fair bit of throwing different things all over the place, and I'm more strongly suspecting something I've got somewhere is causing some issues, I just can't work out what...

    • starting with HDV=
    • Putting the entire start of the [CONTROLS] section in the upgrade (everything steering related, even if duplicating HDV values)
    • Add the whole steering related section of [CONTROLS] from the HDV into the upgrade as the first, default, upgrade (instead of just having no HDV entries, leaving the HDV as the default 'upgrade').
    • Replaced the existing HDV entries with the upgrade lines (minus 'HDV=') - worked fine.
    • Changed the upgrade steering lock range to match the HDV (13 options), by padding with extra entries at the end, then tried at the start as well (not fully tested all options... I don't have that much patience/time... but found some that weren't working)
    • Changed the upgrade values (locktolock, steeringfraction) to simple values like 0.5.
    • Finally, copied the first upgrade line ("240 ", but with simple values of 0.5 and 0.2) 8 times and just changed the index - so all 8 options have exactly the same values. On this one they all worked correctly except option 6. This is also the default setting, so I changed the default to 1 but option 6 still remained wrong (same lock and fraction as the original HDV), so no link there.
    That last one especially is leading me to think this isn't consistent, so if it's related to my files it'll be in the HDV. So more testing to do in there now.

    It's an interesting puzzle, just not sure if there's a solution yet. :D
     
  6. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    4,008
    Likes Received:
    2,875
    @Lazza May i suggest something?
    In your Case i would proceed in this Way:
    - Use a properly working Steering Section only in the HDV, without any Upgrade.
    - If that works without any Problem, completely remove all the Steering Entries from the HDV and put it into the
    Upgrades.ini.
    If that is properly done, it should work as before, when the Entries have been in the HDV only.
    Now, depending on if that works or not, it's easier to investigate, because there is no possible conflict between HDV and Upgrades.ini Entries anymore.

    EDIT I forgot to say that we used Steering Upgrades in our GP3 Mod and never noticed any Problems. You can check that out if you want.
     
    Last edited: Dec 18, 2020
  7. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,382
    Likes Received:
    6,600
    @redapg I may have buried something in the middle of my post - I moved the upgrade lines into the HDV, and they functioned as expected. So I've sort of done what you're suggesting, albeit in reverse.

    I will check out the GP3 mod, cheers!
     
  8. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    4,008
    Likes Received:
    2,875
    I did see it, but wasn't sure if you moved them into the HDV, but still kept them in the Upgrades.ini too.
    I wanted to ensure that the Entries are only in one of the Files, to avoid any Conflicts. :)
     
    Lazza likes this.
  9. Rastas

    Rastas Registered

    Joined:
    Feb 17, 2017
    Messages:
    597
    Likes Received:
    1,282
    I have like this in one of my drift mods and works great :)

    UpgradeType="Steering Lock"
    {
    UpgradeLevel="Stock Steering"
    {
    Description="Stock Steering lock Tuned up to 55"

    }
    UpgradeLevel="Wisefab steering"
    {
    Description="Wisefab upgrade kit for 60 of max steering lock"

    HDV=[CONTROLS]
    HDV=NominalMaxSteeringTorque=30
    HDV=TurnsLockToLock=2.5
    HDV=SteeringShaftBaseLeft=(0,-0.072659,-0.199998)
    HDV=SteeringShaftBaseRight=(0,-0.072659,-0.199998)
    HDV=SteeringShaftAxis=(0.121869,0,-0.992546)
    HDV=SteerLockCaption="WHEEL RANGE (LOCK)"
    HDV=SteerLockRange=(60,0,12)
    HDV=SteerLockSpecial=(0,"180 ","(12) deg","TurnsLockToLock=0.5;SteeringFraction=0.2")
    HDV=SteerLockSpecial=(1,"240 ","(16) deg","TurnsLockToLock=0.66667;SteeringFraction=0.266667")
    HDV=SteerLockSpecial=(2,"270 ","(18) deg","TurnsLockToLock=0.75;SteeringFraction=0.3")
    HDV=SteerLockSpecial=(3,"310 ","(20.7) deg","TurnsLockToLock=0.86111;SteeringFraction=0.344444")
    HDV=SteerLockSpecial=(4,"360 ","(24) deg","TurnsLockToLock=1;SteeringFraction=0.4")
    HDV=SteerLockSpecial=(5,"380 ","(25.3) deg","TurnsLockToLock=1.05556;SteeringFraction=0.422222")
    HDV=SteerLockSpecial=(6,"450 ","(30) deg","TurnsLockToLock=1.25;SteeringFraction=0.5")
    HDV=SteerLockSpecial=(7,"540 ","(36) deg","TurnsLockToLock=1.5;SteeringFraction=0.6")
    HDV=SteerLockSpecial=(8,"630 ","(42) deg","TurnsLockToLock=1.75;SteeringFraction=0.7")
    HDV=SteerLockSpecial=(9,"720 ","(48) deg","TurnsLockToLock=2;SteeringFraction=0.8")
    HDV=SteerLockSpecial=(10,"857 ","(57.1) deg","TurnsLockToLock=2.38056;SteeringFraction=0.952222")
    HDV=SteerLockSpecial=(11,"900 ","(60) deg","TurnsLockToLock=2.5;SteeringFraction=1")
    HDV=SteerLockSetting=11
    HDV=
    }
    }
     
    svictor and Lazza like this.
  10. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,382
    Likes Received:
    6,600
    Thanks guys,

    I won't say I've completely worked out what's going on, but the workaround is clear so I'll go with it.

    @redapg The GP3 mod changes the number of steering lock entries in the different upgrades (so confirms that's fine to do), but it also removes all the steering-related entries from the HDV completely. So all upgrades fully define the steering, and there are no HDV entries to cause interference.

    I tried that and it worked. So that's my solution - I'll just modify the spreadsheet so the standard values are going into the first upgrade, and not in the HDV output. (so the [CONTROLS] section in the HDV starts with OnboardBrakeBias)

    @Rastas your mod (I tested the R34 KWC) does indeed work, with the first upgrade being 'empty' and defined in the HDV, except that the SteeringInnerTables are not defined at all (actually commented out in the HDV). Makes me wonder what the game is using for the full-lock positions, maybe it just does a simple calc based on the other parameters. But I'll stick with using those and just put everything into the upgrades so that all options work correctly.

    I tried packaging up my original files just to make sure it wasn't a devmode oddity, and the upgrades went wrong in single player too. So I'm going to assume my other earlier tests would also be replicated in the game proper, meaning at this stage removing the steering entries from the HDV is the only solution I've identified for normal physics-spreadsheet output (though having to redirect those HDV entries to an upgrade, for this type of upgrade to work...)

    Cheers!

    *EDIT: Silly me! Rastas, omitting those SteeringInnerTable lines I think just makes the game use the old steering system (from re-reading the blog, I think they're the trigger to use it). So that would perhaps explain why it 'works' - it's just modifying the SteeringFraction on the old system. Could be wrong :p
     
    Last edited: Dec 19, 2020
    redapg likes this.
  11. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    4,008
    Likes Received:
    2,875
    In the GP3 Mod we also have no Steering Entries in the HDV.
    Do we have a Misunderstanding? :)
    Can it be that you also change Steering Entries for the different Upgrades, that affect the Steering Geometry (it sounds as if you use the Michael Borda Physics Spreadsheet)?
    If that is the Case, you should check if the Steering Entries in the Chassis.ini did also change.
    If yes, you also have to use different Chassis.ini Files, that overwrite the default one in the HDV, for each Steering Upgrade that has a different Steering Geometry.
    I didn't play around with it since a longer While, but in the Past, the HDV/Upgrades Steering Entries had to "match" the Chassis.ini Entries to work properly.
    And i think that it still is the Case.
    BTW I have 2 Tools on my Tools Site that can be used to create different Steering Entries for different Needs. ;)
     
  12. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,382
    Likes Received:
    6,600
    No, I think we have a misunderstanding now.

    I know. That's what I said...

    The geometry isn't changing. The effective diameter of the pinion is, but the underlying geometry is unchanged. That's why the upgrades now work correctly without extra chassis files.
     
  13. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    4,008
    Likes Received:
    2,875
    English is not my native Language, so such Things, where i understand something wrong, can always happen. :)
     
  14. Rastas

    Rastas Registered

    Joined:
    Feb 17, 2017
    Messages:
    597
    Likes Received:
    1,282
    I dont use the SteeringInnerTable because it causes glitches in high steering lock,but all the other parameters are working great :),alll calculations are made in Redapg site :)
     
  15. davehenrie

    davehenrie Registered

    Joined:
    Jul 6, 2016
    Messages:
    7,481
    Likes Received:
    4,395
    when will you'all just give in an start talkin' 'Merican, like the restofus? ;)
     
  16. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,382
    Likes Received:
    6,600
    Understood :p

    In simple terms, I'm now doing it exactly the same way as the GP3 mod.

    I may put that mod in devmode, move the first upgrade into the HDV, and see if a similar bug occurs.
     
  17. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,382
    Likes Received:
    6,600
    You would need to get the geometry just right for the new steering system to survive 60 degrees steered angle, yes :D

    Considering, as far as I know, the steering remains linear in drift setups and the physics blog talked about only a 1-2% improvement in physics with the new steering system, it's probably not worth worrying about and just stick to the old system like you are. The physics spreadsheet assumes the new steering so that's what I'm staying with.

    For me redapg's online tools aren't really useful, because they don't form part of my workflow. If I wanted to make a couple of changes to a mod, so wanted to simply edit some files, the tools would probably be easier than making up a spreadsheet to do the adjustments myself (and both of those are far superior to hand-editing).

    I much prefer making changes via spreadsheets, as it's easier to track previous versions via simple file backups and I can change anything 'live' and produce complete new files. I started with the physics spreadsheet and now have 5 cars all in there, so I can select which car I'm working on and all the pages get populated with its data. I can then export the entire engine or chassis&hdv files in a click, complete, ready to go. No editing required.

    Now, because of this thread, each of those cars now has a flag indicating whether to use this workaround, so cars without an alternate steering rack just output the normal HDV with steering entries intact, while the upgraded ones omit those entries from the HDV and I have another tab generating the complete Upgrades section so I can copy it out. (I could output an actual upgrades file, but I'm not doing the graphics and I'm sure most of these will have some graphics upgrades, so I'd be copying anyway; if I really wanted the long-term flexibility to make changes to the upgrades I would add a script in there that would open up the existing upgrades file and replace (or add) only the steering rack upgrade, but I don't foresee the need so don't have to do the work ;))
     
  18. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    4,008
    Likes Received:
    2,875
    WHAT???? :D
     
    philrob and Lazza like this.

Share This Page