Suspensions' damages in damage.ini

Discussion in 'Car Modding' started by Piertaylor, Jan 10, 2018.

  1. Piertaylor

    Piertaylor Registered

    Joined:
    Sep 30, 2016
    Messages:
    10
    Likes Received:
    0
    Hi all,
    can you explain me how to set suspensions' damages in the damage.ini file?

    Cheers
     
  2. Bernd

    Bernd Registered

    Joined:
    Jul 9, 2013
    Messages:
    1,509
    Likes Received:
    755
    The easiest way to find it out is to look into the files of the skip barber, that you can find in the moddev vehicles folder of your rfactor 2 installation.
    The important entries are this ones
    In the damage.ini file:
    FLSuspIns=Debris5 // Instance (used for suspension movement on front-left wheel)
    FLSuspConn=(0.16,0.95) // Connection points for suspension movement (relative to inboard and outboard verts)
    FRSuspIns=Debris7 // Instance (used for suspension movement on front-right wheel)
    FRSuspConn=(0.16,0.95) // Connection points for suspension movement (relative to inboard and outboard verts)
    RLSuspIns=Debris6 // Instance (used for suspension movement on rear-left wheel)
    RLSuspConn=(0.08,0.94) // Connection points for suspension movement (relative to inboard and outboard verts)
    RRSuspIns=Debris8 // Instance (used for suspension movement on rear-right wheel)
    RRSuspConn=(0.08,0.94) // Connection points for suspension movement (relative to inboard and outboard verts)
    and
    Part5Postreq=Wheel0 // Define parts which break off together with the current part
    Part5Detach=4300 // Impulse to make part become debris (see .gen file)
    Part5Random=0.4 // Fraction of time part breaks off
    Part5Pos=(0,0,0) // If zero, automatically finds position of part from graphics to check for damage
    Part5MassInertia=(10, 1, 1, 1) // Mass and inertia
    Part5CollParams=(3600, 65, 0.6) // Spring/damper/friction
    Part6Postreq=Wheel2 // Define parts which break off together with the current part
    Part6Detach=4600 // Impulse to make part become debris (see .gen file)
    Part6Random=0.4 // Fraction of time part breaks off
    Part6Pos=(0,0,0) // If zero, automatically finds position of part from graphics to check for damage
    Part6MassInertia=(10, 1, 1, 1) // Mass and inertia
    Part6CollParams=(3600, 65, 0.6) // Spring/damper/friction
    Part7Postreq=Wheel1 // Define parts which break off together with the current part
    Part7Detach=4300 // Impulse to make part become debris (see .gen file)
    Part7Random=0.4 // Fraction of time part breaks off
    Part7Pos=(0,0,0) // If zero, automatically finds position of part from graphics to check for damage
    Part7MassInertia=(10, 1, 1, 1) // Mass and inertia
    Part7CollParams=(3600, 65, 0.6) // Spring/damper/friction
    Part8Postreq=Wheel3 // Define parts which break off together with the current part
    Part8Detach=4600 // Impulse to make part become debris (see .gen file)
    Part8Random=0.4 // Fraction of time part breaks off
    Part8Pos=(0,0,0) // If zero, automatically finds position of part from graphics to check for damage
    Part8MassInertia=(10, 1, 1, 1) // Mass and inertia
    Part8CollParams=(3600, 65, 0.6) // Spring/damper/friction


    and in the gen file:
    Instance=DEBRIS5
    {
    Moveable=True
    MeshFile=rter_lf_susp.gmt CollTarget=False HATTarget=False ShadowCaster=(True, Solid) LODIn=(0) LODOut=(40) Reflect=True
    MeshFile=rter_lf_susp_low.gmt CollTarget=False HATTarget=False ShadowCaster=(True, Solid) LODIn=(40) LODOut=(100) Reflect=True
    }

    Instance=DEBRIS6
    {
    Moveable=True
    MeshFile=rter_lr_susp.gmt CollTarget=False HATTarget=False ShadowCaster=(True, Solid) LODIn=(0) LODOut=(40) Reflect=True
    MeshFile=rter_lr_susp_low.gmt CollTarget=False HATTarget=False ShadowCaster=(True, Solid) LODIn=(40) LODOut=(100) Reflect=True
    }

    Instance=DEBRIS7
    {
    Moveable=True
    MeshFile=rter_rf_susp.gmt CollTarget=False HATTarget=False ShadowCaster=(True, Solid) LODIn=(0) LODOut=(40) Reflect=True
    MeshFile=rter_rf_susp_low.gmt CollTarget=False HATTarget=False ShadowCaster=(True, Solid) LODIn=(40) LODOut=(100) Reflect=True
    }

    Instance=DEBRIS8
    {
    Moveable=True
    MeshFile=rter_rr_susp.gmt CollTarget=False HATTarget=False ShadowCaster=(True, Solid) LODIn=(0) LODOut=(40) Reflect=True
    MeshFile=rter_rr_susp_low.gmt CollTarget=False HATTarget=False ShadowCaster=(True, Solid) LODIn=(40) LODOut=(100) Reflect=True
    }

    And take care that every debris instance (0-11) is only 1 time in the gen file.
    I guess you can take every debris instance that you like, if you define it properly in the damage.ini file.
     
  3. JorgeAH

    JorgeAH Registered

    Joined:
    Jan 25, 2018
    Messages:
    83
    Likes Received:
    5
    this code is for any special car or for all cars?
     
  4. Bernd

    Bernd Registered

    Joined:
    Jul 9, 2013
    Messages:
    1,509
    Likes Received:
    755
    It is from the skip barber, that is in the moddev folder, you have to adapt it to your car, that for example the gmt names are correct and you can modify the values and other things.
    I have posted it just to show the scheme, of which entries are in which files, that has to be used.
     

Share This Page