Viscous Fan Clutch

Discussion in 'Programming' started by jimmyking, Mar 1, 2024.

  1. jimmyking

    jimmyking
    Expand Collapse

    Joined:
    Mar 9, 2020
    Messages:
    93
    a simple clutch that is mechanical but not directly connected to the engine until engaged but is also viscous so it loosely spins when not engaged rev the engine, and it slowly reacts

    just like electric fans the clutch acts the same way to reach a defined temperature the clutch engages then the fan acts just like a normal mechanical fan

    could be more realistic if done properly but I don't have the skill to do so right now

    this mod adds a new radiatorFanType called "viscousfanclutch" which also allows it to use "radiatorFanTemperature" just like the electric fans
    it also adds "radiatorClutchFanSpin" which is used for props like fans

    I may continue to mess with this but it's just something I wanted to do as there's no such thing yet till now

    I have added my custom LUA file so it's technically my first Lua mod as well as a viscous fan clutch addon for Pickup and Roamer Parts radiators

    as of UPDATE:#4 there are now ways to manually engage the clutch

    Note, you need both the viscous fan clutch mod along with the addon for it to work currently
    how to select the custom clutch for Pickup and Roamer Parts under Radiator then under Rotation:
    upload_2024-9-27_14-54-53.png

    to get full use of the clutch it is recommended to Load Custom EngineThermals under Rotation

    no longer overrides the combustionEngineThermals.lua which means this can now be uploaded to the official responsory but not just yet

    added debug app

    It is a bit more realistic at least it doesn't snap speeds when engaging or disengaging

    updated custom combustionEngineThermals.lua (vFCcET.lua) from the last game update

    moved parts from PRP viscous fan clutch addon to viscous fan clutch:
    models and part of .jbeam so viscous fan clutch is more universal

    Added license file to stop people from uploading my mods to other sites

    Redone method for getting file as it now uses the Game Engine GetFileSize instead of dedicated GetFileSize extension

    Some changes for fan smoothness

    6/18/2025
    updated custom combustionEngineThermals.lua (vFCcET.lua) from the last game update

    fixed multiple possible errors for Lua and JavaScript

    added coolant coloring text as like what's on Engine Thermal Debug

    added a button to the debug app which now allows for manually engaging the clutch which I'm sure helps for tuning the clutch for vehicles

    this also means it can be toggled by console! by using
    Code:
    controller.getController("viscousFanClutch").manualEngage(boolean)
    or what I'll recommend is
    Code:
    extensions.vFCMgr.engage()
    a boolean is optional in the function otherwise will be toggled on or off by entering it
     

    Attached Files:

    #1 jimmyking, Mar 1, 2024
    Last edited: Jun 18, 2025
    • Like Like x 2
  2. brian_lee7294

    brian_lee7294
    Expand Collapse

    Joined:
    Nov 7, 2021
    Messages:
    44
    Nice mod, could you update this for 0.32 because I don't have 0.31 right now.
     
  3. jimmyking

    jimmyking
    Expand Collapse

    Joined:
    Mar 9, 2020
    Messages:
    93
    this should already be compatible with 0.32
     
  4. brian_lee7294

    brian_lee7294
    Expand Collapse

    Joined:
    Nov 7, 2021
    Messages:
    44
    Sweet. So, how do I find the mod in the menus?
     
  5. jimmyking

    jimmyking
    Expand Collapse

    Joined:
    Mar 9, 2020
    Messages:
    93
    There should be a How to use Spoiler for PRP now
     
  6. brian_lee7294

    brian_lee7294
    Expand Collapse

    Joined:
    Nov 7, 2021
    Messages:
    44
    I am using 0.32.5.0, but I still don't see the fan clutch settings in the menu.
     
  7. jimmyking

    jimmyking
    Expand Collapse

    Joined:
    Mar 9, 2020
    Messages:
    93
    UPDATE:#4 with fixes more!
     
  8. BeamHost123

    BeamHost123
    Expand Collapse

    Joined:
    Yesterday
    Messages:
    1
    Works great! Love it!
     
    #8 BeamHost123, Jul 26, 2025 at 2:50 AM
    Last edited: Jul 26, 2025 at 5:05 AM
  9. brian_lee7294

    brian_lee7294
    Expand Collapse

    Joined:
    Nov 7, 2021
    Messages:
    44
    How did you get it to work?
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice