+= -= *= operator/operands in upgrades file

Discussion in 'Car Modding' started by jtbo, Jul 14, 2012.

  1. jtbo

    jtbo Registered

    Joined:
    Jan 12, 2012
    Messages:
    1,668
    Likes Received:
    48
    They work and they don't work, I do maybe something wrong again, most probably cause.

    Anyway, idea is simple, you make upgrade and instead of giving absolute value of 120 to replace value of 100, you can add it with +=20 or *=1.20, like I do here:

    Code:
    UpgradeType="Throttle linkage"
    { 
    
        UpgradeLevel="Original"
    	{	
    	HDV=[ENGINE]
    	HDV=GeneralTorqueMult*=0.750
    	HDV=GeneralPowerMult*=0.75
    	HDV=
    	}
    	UpgradeLevel="Bending trick"
    	{	
    	HDV=[ENGINE]
    	HDV=GeneralTorqueMult*=0.850
    	HDV=GeneralPowerMult*=0.85
    	HDV=
    	HDV=[DRIVELINE]
    	HDV=ClutchTorque*=1.15
    	HDV=
    	}
    }
    It does work well for engine power, but clutch torque seems not to be changing. Sorry about excessive empty HDV= markings, I guess those are only needed when you continue with another section, but I put always to end too as there has been issues of things not working without.

    So what I attempt to do is to have engine torque reduced by 25% with original setting and with bending trick setting I decrease engine power only 15% as my engine file is full powered and tuned version, exact percentages does not matter at this stage.

    Then with bending trick I want to increase clutch torque by 15% as my clutch is used to give impression of automatic and it has to be very close to engine torque to give correct illusion, but I can set that even to 2.0 and it does not affect anything, I even did remember to shutdown rfactor2 and start again as that is what it requires when modifying upgrades to upgrades to be noticed.

    Are those operators working only with some parameters, like torque curve or have I done things wrong way (which usually is the case)?

    Oh and when I set value to be absolute like =550 then it works just fine, only problem comes when I have two power increasing upgrades that can be chosen separately and I want to add both to total clutchtorque, so I would like to use += to do that, but so far no avail.
     
  2. MJP

    MJP Registered

    Joined:
    Oct 5, 2010
    Messages:
    988
    Likes Received:
    21
    I just copy+pasted your code to the megane upgrades file and it seems to work for me. I just changed the clutch torque multi to *=0.15 and I also tried -=500 (megane default is 590) so the changes would be really obvious and the car behaves as you'd expect.
     
  3. jtbo

    jtbo Registered

    Joined:
    Jan 12, 2012
    Messages:
    1,668
    Likes Received:
    48
    Thanks, that helps me to know that my thinking is correct and there must be some other issue with my upgrades, so I try to hunt that next :)
     

Share This Page