• Welcome, Guest. Please login.
 
October 14, 2024, 05:11:55 AM

News:

MX Bikes beta19 available! :)


Project OEM: BikeEd, EngnEd and .cfg for accurate factory specs.

Started by Asdrael, February 06, 2017, 12:13:11 PM

Previous topic - Next topic

Asdrael

OEM is short for original equipment manufacturer and is often used in the spare parts market to indicate parts made by the manufacturer at the original specifications.

Since we have what is probably the most accuracy moddable game engine for dirt bikes in MXBikes, the opportunity to import in game new models using as much of the manufacturer's data as possible is there.

After spending a long time gathering the data on Yamaha dirtbikes, messing around in BikEd, fiddling with EngnEd and generally throwing stuff into the .cfg files, I think I figured out a decent way to import in MXB all the real relevant values. Here is a lengthy tutorial to do the same, made using the 1.22 BikEd and 1.0 EngnEd at the time of MXB Beta5. It is lenghty. 33 pages in word. But, imo, very well worth it when you have the end results - you will be positively surprised if you follow this.

-now updated for Beta8 release-

What this is not is a guide on how to import a 3D model. I can't do it properly so other people will be miles better than me for that.

We'll be touching (each section is a post, click for direct link):


Chapter I : Chassis and geometry

      1.    Geometry data and general frame adjustement
              a.         Gathering data
              b.         Frame adjustements

      2.   Fork setup
              a.   Your BikeEd, Test and Params windows
              b.   Your Fork Geometry points and moving them around

      3.   The Rear Shock
              a.   Textbook
              b.   Real data and Photoshop
              c.   Fine tuning the shock

      4.   The wheelbase

      5.   Finishing touches
              a.   Checklist
              b.   damping, rebound and springs: the .cfg file

      6.   Troubleshooting - Geometry


Chapter II : Engine modifications

      1.   Gathering data

      2.   yourbike.cfg and sfx.cfg

      3.   Making yourbike.engn and my toolkit
              a.   Engine and .engn file
              b.   Checklist

      4.   Troubleshooting - Engine
             


Chapter III : Polishing yourbike.cfg


              a.   Lock angle
              b.   Weight and fuel
              c.   Brakes
              d.   The .ini file


General tips and tricks and FAQ


Update list.
Donate to me -> feed my coffee addiction -> get more mods!
OEM bikes pack
MXBikes Discord

Asdrael

Chapter I : Chassis and geometry

There are 4 golden rules:
    • Start from the geometry of the standard model PiBoSo has made.
    • If it is on the manufacturer spec list, it should be in your BikeEd specs.
    • If you have no idea what does what, set it at one extreme, try it in game, rince and repeat.
    • YOU CANNOT UNDO IN BIKE ED SO SAVE OFTEN!

    From there, I proceed in several steps.

    1. Geometry data and general frame adjustement

    a. Gathering data

    Load up the manufacturer's webpage. Go to the model. Navigate to the spec(ification) list/sheet. You should end up with those values:
    • [Rake angle (26 to 29deg)
    • Fork Offset (if you find it, otherwise 25mm is true most of the time)
    • Suspension travel (around 315mm)
    • Trail (100-130 mm)
    • Rear shock travel (around 315mm)
    • Swing arm length (good luck finding it, if you don't, 590-600mm is what PiBoSo uses and fits 1:1 models normally)
    • Wheelbase (usually between 1400 and 1600mm)
    This is your roadmap. Cherish it, treasure it, because soon you'll want to burn it. From now on, this will be call OEM specs.

    b. Frame adjustments. ~ 2min

    Adjust the light blue Stand and Stand 2 to set up how the bike will rest on the in game stand. Keep it more or less horizontal.
    Clearance in light blue should be in the middle of those 2 Stands cursors.

    Do not touch the Aerodynamic Centers.

    Adjust the light blue Seat Height soi it touches the seat around the middle of its surface.


    Donate to me -> feed my coffee addiction -> get more mods!
    OEM bikes pack
    MXBikes Discord

    Asdrael

    2. Fork setup ~ 15min

    a. Your BikeEd, Test and Params windows.


    Time to fire up BikeEd and load your .geom.

    Start by clicking on Draw and remove the collision bubbles.

    Pretty much self explanatory there.

    Start by setting the Front Tyre Radius to 0.335, rear to 0.325. This will help getting accurate values later on and represents the diameter of the wheel+tyre.

    Rake Angle Min AND Max should be OEM spec. Both values are equal with MX Bikes. This is the angle at which the fork is set.
    Rake Offset is set to 0 on most MX bikes.
    Front Suspension Length: This is, in meter, the fork travel range. Set to OEM specs.

    Now that the values are set, on to understanding and moving the .geom points. You will need to keep an eye on your lower right and watch those values:



    b. Your Fork Geometry points and moving them around.



    I proceed like this, in this order. You will notice some items are linked, hence why you should do it like this.

    1. Steer pink: moves the whole front geometry and define the position on the rotation axis of the direction column.
    -> Position it around the middle of the frame direction column.

    2. Steer grey: moves the whole front 3D model.
    -> Adjust this so the upper fork model fits around its intended frame location.

    3. FSusp Upper Yellow: this is the position of the fork for the physics engine.
    -> It appears its vertical position is of no importance. I move this around to bring FSusp Lower at the lower end of the top section of the fork to give me an indication of the total travel, as the length of the yellow bit is your complete fork travel. Move if from left to right to change your Fork Offset and put it at the correct value (usually 25mm).

    4. FSusp grey: this is the lower fork model.
    -> move this so the lower fork model starts sinking into the upper fork model.

    5. FWheel pink: this is the axle of the Wheel model. Put it where it belongs on your model.

    You should now have the correct Fork Offset measurement, and when moving the Front Suspension cursor in the test window, you should check that your models don't collide. Put your front tyre radius at -0.335 (MINUS) and move the cursor again. The red cross, symbolizing the top of the tyre, should not pop above the fender, but just graze it.

    If your model was perfectly made, your Trail measurement should be correct. If not, you shouldn't be too far off. If you are, well, your Wheel axle clamps are most likely the wrong size.

    To adjust trail once the fork offset is correct, you have two options:
    - moving the FWheel forward or backward into its axle slot within tolerance limits.
    - moving the FSusp model forward, backward, up or down within tolerance limits. This will change the offset as well and you'll need to adjust the pink and grey cursors afterwards.

    Both will achieve what you want, but induce a small "wierdness" in the model. I'd recommend moving each by a few mm if you need a total of 10mm correction. More than that, your model isn't good enough for OEM specs.

    6. FSusp green. This is the center of mass for the lower part of the fork.
    -> move this so it's around halfway on the lower fork model, but it should be in the axis of the yellow fork travel indicator!

    7. Steer green. This is the center of mass for the upper part of the fork, presumably including fender, commands and handlebar.
    -> move this so it's in the axis of the yellow fork travel indicator, and up to around the lower part of the lower fork clamp.

    For those green mass cursor, it's gut feeling. The Steer mass has a significant impact on front end stability. If it is not in the axis of the yellow fork travel, your handling will be shit!
    Donate to me -> feed my coffee addiction -> get more mods!
    OEM bikes pack
    MXBikes Discord

    Asdrael

      Step 3: The Rear Shock.

      SAVE YOUR GEOM NOW!!


      Also known as "the destroyer of Worlds", it makes or break a model, it makes or break a soul.

      Start off by enabling Rear Suspension update in the Params window. You will see a graph appear:


      You will be staring at this for the next hour or two.

      This is the displacement graph. Long story short: it tells you how your suspension will behave.
      - The number (here 330mm) is your shock travel. You cannot set this up directly, it is a result of all the other parameters. Evidently, your goal is to set it at the OEM spec.
      - The graph is how much the movement of the swing arm is translated to the spring. What you want is something as shown: more or less linear from ~4 to ~2. It will vary depending on your geometry but should be in that ballpark (let's say 3.5-4 to 1.5-2).

      Everytime you move a piece of the rear shock, those values will change. All of them. All the time.

      So there are two different ways to go at it.

      a. Textbook.

      Spend an eternity looking for all the suspensions linkage dimension, if possible angle and joint location with frame and swingarm. Keep those fixed, hope for the best, fiddle around for correct values.

      Hoh, and good luck with that.

      b. Real data and Photoshop. ~ 1h

      The important bits are as follow:

      Rear Suspension Length: around 0.11. No idea where to find the OEM spec, so use something around the stock one. It will dictate the length of the yellow RSusp Upper - Lower bit.

      Min Length: This value can be found in the users manual of the bike usually. If not, 0.4 is a good value to start with.

      Rocker length: measured from the pink Rocker to Rocker-Rod Link cursor (presumably). Around 140mm, depending on the manufacturer. Most data can be found here: http://motocrossactionmag.com/news/this-much-we-know-mxas-guide-to-shock-linkage-lengths . Trick: move the suspension so this link is horizontal. Measure distance. Set it by moving Rocker back and forth along the horizontal axis.

      Now, for the geometry cursors.
      1. put the pink RWheel Joints around the rear wheel axle location. (min is tower the frame, max away from the frame). It defines the location of the wheel and is important further down in the Wheelbase changes.

      2. pink RSusp Joint Min and Max: this is where the physics will have the swingarm rotate.
      -> put this more or less where it's supposed to be on your frame. They should be at the same position.

      3. Grey RSusp: the position of the model.
      -> I start off with something that "looks ok" and gives me around 590mm swingarm length. Still looking for the OEM specs.

      At that stage your swing arm and suspension will have moved. Do not fret, we'll fix that. You can move the cursor Rear Suspension in the Test window to check that your model rotates correctly. Your graph and travel values are completly off now though.

      4. yellow RSusp Upper: where the top of the rear suspension connects to the chassis.
      -> set it according to model. It's for the physics engine and has no incidence on the 3D model (but a decent one on your suspension settings). This will can be used, once you have a matching graph and travel value, to set the maximum angle your swingarm will take by moving it left or right.

      Now the fun part begins. We'll be moving all of this and try to get something very close to the correct graph. Try moving the following piece while staying in the ballpark of the travel value and graph goal. I'm guessing we could dig purely the OEM specs for all of this but, F that.

      You will also notice that the angle of the swingarm is changing. Our secondary goal here is to have a max of around 20 degrees and a min of around -11 deg. It is however relatively easy to set without other interférences using the pink top part of the suspension in yellow.

      - RSusp lower in yellow: massive influence on graph shape, moderate on travel.
      - pink Rocker and blue Rocker-Rod: massive influence on the slope of the graph, moderate on its shape, limited on travel.Remember the factory size so always move Rocker and Rocker-Rod together. I'd advise against moving that once it's set.
      - pink Rod: Massive influence on angle, graph slope, moderate on length. At maximum extension of the rear suspension, it should be close to vertical.
      - Good trick: Move both yellow RSusp lower and upper to move around the angles without changing too much the graph min/max values and travel distance.


      Now there is a trick. When you move this around (SAVE BEFORE YOU DOOOOO), you will change all the parameters. But it you change the Min Length in the Params window, you impact graph min/max and travel values. Increasing the Min Length typically "pushes the graph up" and increases travel and angles.

      You will need to spend some time fiddling around until you manage to find a spot that checks all those boxes, in order of imprtance:
      • A suitable graph, somewhat linear from 4 to 2.
      • Correct OEM spec travel value and Rocker Rod link length.
      • Correct Rear Suspension Length and Min Length, +- 5%
      • Correct max and min Swingarm Angle (+18 to +20 ; -9 to -12 ; ).
      Get used to the effect of each cursor, get a good feel for those. It's not that hard, but it takes a bit. Once you have the hang of it, you can dial in a deecnt rear suspension in less than an hour within the tolerance values I gave. Sometimes stuff will get out of whack. Reload, retry.

      Once you have the correct shock profile, you can move the green Rear cursor to around the middle of the Swingarm. This is the center of mass for the rear geometry.

      I tend to overlook this whole part those days. I use the photoshop technique directly, I developped a good eye for it and it goes much faster if you don't need to export/import 50 times.

      c. Fine tuning the shock~ 1h

      You can try out the bike in game, and see how it behaves. It will probably be pretty good at that stage. An important part for the rear feel is to put the two blue link supports (Rocker and Rocker Rod) in a similar position as for the 250xf. When you move the suspension cursor in the Test window, one cross will move. Both should roughly overlap around the middle of the travel of the shock for ok behaviour. Rince and repeat until you get a proper behaviour in game.

      Now, there is the photoshop loop. What you need to do is start from a decent modelisation of your geometry first - or the MXM geometry which is a decent start, then find a picture of the bike you are modeling (the stock picture from the manufacturer website is great for that), showing the side with the apprent linkage rod. Proceed like this:
      - Put the picture in photoshop.
      - Measure the swingarm angle of the picture (it can usually be anywhere between 18 and 14°).
      - Use the same angle on your BikeEd using the Rear Suspension cursor in the Test window. Deactivate Rear Suspension Update!
      - Screenshot your BikeEd window.
      - Remove the grey in PS.
      - Overlap the picture and the BikeEd screenie, using the rear shock geometry as a reference.
      - Rescale as needed.
      - Note where everything should be.
      - Back in BikeEd, readjust the pieces following the new info you got.
      - Reactivate Rear Suspension Update
      - Double check the Rod Linkage length
      - adjust the RSusp cursor to get back a proper travel first, angle second. OR put the RSusp upper cursor more or less around where it's supposed to be. Play around with Rear Suspension Length and Min Length MODERATLY (-+5% around 0.115 and 0.4 respectively if you don't have those OEM specs). Get around a good graph and travel. Fine tune by moving RSusp Upper a tad and changing Shock Length a tad <-- my method of choice.
      - Rince and repeat until you get a good match. Like this (click to enlarge):



      - Try out the model ingame, should ride well enough. Hopefully. If not, try moving the Blue cursors without changing the rest of the geometry for a massive impact.

      It will never be 100%. In my example, my swingarm is a tad long and the shock itself is too long. I couldn't make it work with a shorter one with the information I had at hand. Mssing data, and too much interaction for it. Set your tolerance treshold and don't spend 5h for 2% accuracy more. I did it (several times) and you won't feel the difference.

      Now, you'll see that your wheelbase is off. And might be by a rather big margin. It's however rather easy to correct once everything else is perfect.
      [/list]
      Donate to me -> feed my coffee addiction -> get more mods!
      OEM bikes pack
      MXBikes Discord

      Asdrael

        4. The wheelbase ~ 30min

        Now that both your fork and suspensions are tuned, you need to set the distance between your wheels. If you started from the MSM .geom files you shouldn't be that far off (give or take 10 cm max). At least if you model is decently scaled - if not, you might want to resize it one way or the other (a good way to check the scaling is ding the photoshop method on the linkage rod, since it's an easily accessible exact measurement - if you scale your BikeEd screen cap according to the linkage rod and the bike appears too big/small, re-export it after rescaling it.)

        Wheelbase is important for stability, handling, traction and overall behaviour of the bike.

        There are several ways to fix it.
        • Moving the pink Wheels cursor - careful that you will need to very slightly readjust the suspension you are touching the wheel of (check the Trail for front and travel + angle for back, correct accordingly). Also check your swing arm length.
          Difficulty: easy. Adjustement range: +- 10mm each without model misalignment
        • Moving the whole fork. Simply drag the 2 pink cursors in any direction (yes up and down too). This will however change the behaviour of the bike, so be conservative or be prepared to adjust the steering mass position (the green Steering).
          Difficulty: easy. Adjustement range until it's noticeable in behaviour : 10mm. If you are prepared to work on the behaviour, 30mm.
        • Moving the lower part of the fork. Just grab the grey cursor of the lower part of the fork and move it - any direction will do. Check the trail and model obvious misalignment!
          Difficulty: medium. Adjustement range: 5mm and it's too obvious.
        • Moving the whole rear shock. A pain in the ass as some components are linked, some are not. You'll need note what moves when, deactivate rear suspension update, move the model (grey cursor) and then the components not linked to the model. And then, recheck your shock travel, graph and angles. Same comment on behaviour as for fork applies - this time, rather move the chassis weight to correct.
          Difficulty: hard. Adjustment range: Adjustement range until it's noticeable in behaviour : 10mm. If you are prepared to work on the behaviour, 30mm.
        Donate to me -> feed my coffee addiction -> get more mods!
        OEM bikes pack
        MXBikes Discord

        Asdrael

        5. Finishing touches ~ 30min

        Once I'm done I overlay my geometry on a real picture just to make sure. I also run this:

        a.Checklist

        • Check all my OEM specs. Are they here?
        • Does the model balance look ok? In game, in the test mode, the dry sag should be between 30 and 40mm if you use every setting on medium. The rear fender should be slightly higher than the front fender.
        • Does the rider sag look ok? 100+-15mm rear, 65+-10 front with default settings. If not, check your rider weight position, then your shock geometry and values.
        • How does the bike run? Time to check if you need to move the masses. Chassis mass if the bike is obviously front or back heavy. Steering mass if the bike is too stable / not stable enough (move up and down).
        b. Suspensions damping, rebound and springs: the .cfg file

        Use the stock values from stock bikes.

        Since the geometry has an influence on suspension behaviour it might not be 100% perfect, but shouldn't be too bad. You will want to look up the standard settings for Spring Rate front and rear and rear preload. Punch those in.

        c.Weight Distribution

        Now that your suspension geometry is immaculate, you need to think about distributing mass on your bike. As a general rule, dirt bikes have 50 to 53% rear weight bias. This means more than half the weight is toward the back. This is important to give a "dirt bike feel" to the model, and helps with correcting sag values. Also, its height is important for stability, maniabilty and overall behaviour during center of inertia movement (think SX).

        As for Rider weight, it is best to locate it more or less above the bikes own center of mass. This helps balance and rider strenght when riding. It has the downfall however of messing up slightly with Sag measurement during testing (a sag measurement position is slightly more at the back than a neutral riding position). Compromises...

        I have made and excel sheet to help you position both Chassis weight and Rider weight (green cursors). This is to use once everything is on point for the rest of the geometry in BikeEd. Remember - once you change the actual chassis weight in the yourbike.cfg, you have to reallocate both Rider and Chassis weight!



        Weight distribution excel: https://mega.nz/#!ZRQEyATI!umhU7vGahZFoydVY92e7V0Yn7Yp5BMp51rzGojQT_Ck

        Load up your bike in game, check if front or rear isn't way too high. If so, might want to slightly move the fork / change rear suspension angle. Once done, go in game, in the pits, Test mode. Your dry/rider sag values should hopefully be decent enough!

        Aaaaaannnnddd that's it. I'll populate this with a "troubleshooting" and update the posts as questions arise. Good luck! (and release finished content, I had to type this guide as I was constantly updating the YZF and I think I shouldn't have released it so soon. Still learning).
        Donate to me -> feed my coffee addiction -> get more mods!
        OEM bikes pack
        MXBikes Discord

        Asdrael

          6. Troubleshooting - geometry

          My shock geometry is correct but I can't land a good angle?
          - check your shock values. If you haven't found the OEM ones, you should be around Rear Suspension Length ~1.1-1.2 and Min Length ~0.4 +-5%.
          - small increments (valid for 1 to 2° MAX): move the RSusp Upper left and right. Slightly.
          - bigger increments: move the blue Rocker-Rod and Rod-Rocker (bring them closer together or apart) while being careful about keeping the geometry. It will change you travel value, which you'll have to correct with RSusp Upper.

          All the shock geometry is fine, but my graph dips significantly at the end (toward the "2")?
          Your rear suspension length is too high for your geometry. Bring it down by 5%, increase Min Length to correct travel.[/list]

          In game, my rear wheel has no grip?
          - Double check your rear shock angle at full extension. Anything above 20° tends to do that. Try to bring it down to 19.5°.
          - You actually somehow set the shock properly right? No typos in the geom file? Decent sag values?

          In game, the front slides all the time.
          - Triple check rake angle, fork offset, Trail. Try as hard as you can to get manufacturer values for those, they go hand in hand.
          - Your fork has a wrong position. Move it around, being careful to keep your wheelbase.
          - Your fork/chassis weight is wrongly positioned.
          Donate to me -> feed my coffee addiction -> get more mods!
          OEM bikes pack
          MXBikes Discord

          Asdrael

          Chapter II : Engine Modifications

          All of this will be using the standard MSM files as bases to modify, except for the 125 engine which will have its own values. So go ahead and extract the different .engn right away from the bikes.pkz.

          Start by making a copy of the complete folder bike you want to modify. Rename it properly so you don't lose the original files and can compare the two at any time.

          We will be touching 3 to 4 files:
          • yourbike.cfg
          • sfx.cfg
          • yourbike.engn
          • yourbike.ini
          I will use the KXF250 2017 as an example throughout this tutorial. Disclaimer: some values will be guessed, some others copied from MSM due to lack to information.

          1. Gathering data ~ 10min

          To proceed properly, you need all of the important engine data. Start off by downloading the User's Manual, which can be found on google pretty easily. Correct model, correct year. Other good sources to trust are VitalMX and MotoUSA.com. There you will find those important values (bold for mandatory data), usually in the specification section:
          • Your primary and secondary drive ratios. Also called primary and secondary reduction ratios.
          • Your gear ratios. Also called Gearing whatever.
          • Your rev limiter RPM value. Obviously only for 4 strokes. Harder to find, not usually in the manual, sometimes in the online tests. If the engine you are trying to model hasn't changed in the past few years, try looking at previous years. If out of luck: 14000rpm for a 250F, 11500rpm for a 450F.
          • Your Torque/HP curve, or dyno. I favour the ones found in the VitalMX shootouts in the usable RPM range, and pick info from the MotoUSA ones outside of it. More on that later, but get and download those two at least. For 4 strokes, Torque or HP. For 2 strokes, you'll generally only find HP curves.
          • Idle rpm.
          • Stall rpm.
          Example of what I'm looking for:





          Donate to me -> feed my coffee addiction -> get more mods!
          OEM bikes pack
          MXBikes Discord

          Asdrael

          2. yourbike.cfg and sfx.cfg

          You just want to punch in the numbers you have found in yourbike.cfg, first of all:

          Primary drive ratio. Put the values there:

          Ratio0 = 24, 73

          Secondary drive ratio: Select the correct size there. Remember: counting starts at zero, so if you want to select gear2, put “2”.
          driveline
          {
          FirstAxisInertia = 0.0025
          SecondAxisInertia = 0.00075
          Efficiency = 0.92

          FSprocket
          {
          gear0 = 11
          gear1 = 12
          gear2 = 13
          gear3 = 14
          gear4 = 15
          gear5 = 16
          }
          FSprocketSetting = 2

          RSprocket
          {
          gear0 = 38
          gear1 = 40
          gear2 = 42
          gear3 = 45
          gear4 = 48
          gear5 = 49
          gear6 = 50
          gear7 = 51
          gear8 = 52
          }
          RSprocketSetting = 6


          Gear ratios: Be careful, manufacturer often write it the other way as PiBoSo. Change the number of gear as needed. Gear0 is the first gear. Gear0 = 0 means the first gear will use ratio0.
          gearbox
          {
          gearing
          {
          ratio0 = 14, 30
          ratio1 = 16, 28
          ratio2 = 18, 26
          ratio3 = 17, 21
          ratio4 = 22, 23
          }

          NumGears = 5
          Gear0 = 0
          Gear1 = 1
          Gear2 = 2
          Gear3 = 3
          Gear4 = 4


          Rev limiter value: to be added here
          NumLimiter = 1
          Limiter0 = 14000


          I now add 300rpm for 250f and 500rpm to 450f rev limiter OEM values. This is because of how I found the limiter in game to work compared to IRL (in game it's like hitting a wall, IRL it's more of a soft cut).

          Clutch torque value:
          To avoid clutch slippage, you need to consider the torque it receives with your engine. If you have a value too low, you will hit the limiter randomly due to the clutch freaking out when you hit your sweet engine spot.
          I use the following formula: Max engine torque x Primary drive ratio x 1.3. You should get around 130 for a 250f and 180 for a 450f.
          Clutch
          {
          MaxTorque = 130
          Mapping = 2
          DeadZone = 0.25
          }
          .

          For the 450F this is still experimental but I strongly suggest changing your engine inertia to 0.006 instead of the stock 0.005. This is because the inertia goes like this for the MSN engines: 250f 0.004 , 350f 0.005, 450f 0.005 - which seems a typo. Experimenting, 0.006 feels MUCH better.
          Donate to me -> feed my coffee addiction -> get more mods!
          OEM bikes pack
          MXBikes Discord

          Asdrael

          3. Making yourbike.engn and my toolkit


          a. Engine and .engn file.

          Before rushing into EngnEd, take a step back. You actually don’t need it. The .engn file is just a text file with an easy format.
          id = msm 250xf
          torque
          {
          numpoints = 11
          point0 = 0.625000, 0.230062
          point1 = 33.750000, 14.378834
          point2 = 66.875000, 15.912578
          point3 = 99.375000, 18.788345
          point4 = 141.250000, 26.380367
          point5 = 166.875015, 25.115030
          point6 = 199.999985, 23.389570
          point7 = 233.125015, 19.938650
          point8 = 251.250000, 5.559817
          point9 = 266.875000, 2.108894
          point10 = 298.125000, 0.000000
          }
          brake
          {
          numpoints = 8
          point0 = 0.625000, -0.766873
          point1 = 34.375000, -3.834359
          point2 = 68.750000, -6.748467
          point3 = 100.625000, -10.122699
          point4 = 134.375000, -13.036810
          point5 = 199.375000, -18.558281
          point6 = 233.125015, -21.779144
          point7 = 300.000000, -28.680981
          }


          Start by changing the bike id to yours. The Torque values are throttle open, brake throttle closed. As a general rule – don’t mess with the brake values at all (unless on 2 strokes, details further down).

          Before you go ahead guessing, a quick bit of explanations.

          PiBoSo using the international metric system. The first value colum is “RPS” or revolution per second. RPS = RPM/60. The second colum is Torque in Nm. Now, most American websites use the heathen imperial system and display Torque in lbs.ft. So you need to turn a Torque (lbs.ft)/RPM curve in Torque(Nm)/RPS. Or if you have the HP/RPM, turn it into a Torque(lbs.ft)/RPS. Then divide by your engine efficiency (0.92 here), because the .engn file is at the crankshaft, while dynos at the rear wheel. Calculators... out!
          Nah, just kidding. I made a toolkit.

          Download this: https://mega.nz/#!5NRCGY6B!bsxJ_ddmHudSAG8YvdEtypggu6YAnJOkivDrTjSX2dw

          It contains 2 files.
          • A .psd file with big axis for you to overlay your data on (after detouring it, matching the origin and resizing it of course). Will make it easier to read your values.
          • An excel file. In GREEN is the stuff you need to punch in. In RED the stuff you copy paste to the .engn file (and then reformat by removing the useless tabs, putting a coma space between RPS and Torque values).
            There are 250F, 450F, both Torque and HP based. Also, a 125 2 stroke with a custom Brake curve, and a 250 2 stroke (both HP based). Everything is heavily annotated.
          You’ll notice that the 125 2 stroke has brake torque values – use those. For the 250 2 stroke, start from PiBoSo’s and adjust slightly to get the same overall feel (small positive bump around 2k rpm, more or less zero till 5k rpm, then gradually falling until peak hp rpm).

          Now just go – read the values in your graph. Put them in the excel. Take the red stuff, put it in the .engn file. Important notes in bold (those are like, important).

          With the KXF250 2017 I could only find the HP.curves. No worries. I’ll start with putting my curves in my .psd:


          Detouring, resizing and general alignment:


          Punching values in the excel: Disregard abrupt changes in the 4 strokes graph, they come from the dyno technique. Here, below 5k rpm and above 12k rpm are NOT how a 4 stroke behaves. They come from triggering the equipement, and then rolling off the throttle after the peak. I let my formulas do the work for the values outside of these bounds. Try to be precise down to 0.1hp/torque but we might slightly adjust afterwards.


          Copy paste into the engine file and run Engn.exe to open your file. format is pointX[space]=[space]numberwithpointfordecimals[coma][space]numberwithpointfordecimals so trim it down as needed – excel exports with tabs to separate cells.



          Not bad. I’m getting 40 hp there. The real one is at 36.35. Remember the efficiency of the drive train, set at 0.92 – so we actually have 0.92*39.5 = 36.34 at the rear wheel! Not bad. But the graph has some rough edges between 13 and 14k and a dip at 5k. Do not drag and move points in Engn.exe you will do more harm than good. Go back to your excel, adjust by 0.1 to 0.3 increments and reimport the value (the one you modified only) until it gets better. Also the post 14000 stuff was due to me badly formatting my paste. Check twice! Last advice: do not disregard post-limiter curve.

          All done:


          Overlaying with the initial data to make sure (checking 5k to 12k rpm):


          Dipping a tad much at 13k. Fixing that, and moving on! Note that the brake torque is standard and works well enough.

          b. Checklist

          • Primary and secondary drive ratios
          • Gear ratios
          • Limiter value
          • Engine graph overlay keeping in mind the efficiency
          For the 250 2 strokes, I recommend going with an engine inertia of 0.004. It gives more oumph and more of a 2 strokes feel.

          What this does in game is add breaking torque and engine inertia - obviously. The throttle response is more linear, it "feels" like more torque (even with the the engine hp curve!), and the front behaves much more predictably.

          Congratulations, you have imported your engine! Don’t forget to load up the game, and check the values as well. First gear should get you to around 60km/h. Your gear graph should look cranted, with each step smaller as speed increases.

          Donate to me -> feed my coffee addiction -> get more mods!
          OEM bikes pack
          MXBikes Discord

          Asdrael

          4.   Troubleshooting - Engine
          Donate to me -> feed my coffee addiction -> get more mods!
          OEM bikes pack
          MXBikes Discord

          Asdrael

          Chapter III : Polishing yourbike.cfg

          The last stretch to a complete OEM version of the bike you are making. This is important and should not be overlooked.

          We will be fixing the weight, fuel, brakes, lock angle and every detail you can find (usually not much more).

          Lock angle

          For the lock angle, if you find it, put it in at this spot:
          steer
          {
          Mass = 10.5
          InertiaBox = 0.3, 0.8, 0.1

          offset
          {
          range = -0.005, 0.001, 0.005
          setting = 5
          }

          Lock = 42


          If you can't find it, 42 is always the answer to everything. Especially here.

          Weight and fuel

          Fuel tank
          Find your fuel tank capacity in liters (usually 6.5-9 depending on bike, 2 strokes have a bigger tank). Punch this here:
          fueltank
          {
          CapacityRange = 1, 0.5, 6.5
          CapacitySetting = 11
          Length = 0.3
          Width = 0.15
          }


          Don't forget to adapt your capacity setting if you change your tank capacity.

          Weight and inertia

          PiBoSo uses kg.

          1.   Start by adding all the weight of your configuration file (every that is "mass") and add 17.5 (for the wheels). This is now M(ref dry), and represent the weight of the stock bike with no fuel.

          2.   Find your bike weight and note if it's "dry" or "wet", meaning with all oil and fuel level up. If you find the dry weight, great. Usually it's wet, especially in reviews and shootout. You'll need to calculate the dry weight from the wet weight, as follows:
          M(bike dry) = M(bike wet) – [FuelCapacity * 0.74]

          0.74 being the density of regular fuel in average conditions.
          3. Now you can either modify all the weights and their inertia slightly (lol good luck), or you can estimate most if not all of the weight difference will be on the chassis.
          Find these lines:
          chassis
          {
          Mass = 61.01
          Inertia = 3.74, 2.07, 2.07
          }

          Values will of course vary depending on model.
          And adjust the mass as follows :
          (new mass) = (old mass) –M(ref dry) + M(bike dry)
          Then, adjust the inertia as follows:
          (new inertia) = (old inertia) * (new mass) / (old mass)
          So if your bike mass is lower than the stock one, you should have less inertia.

          Brakes

          There is a front and a rear brake. It's the same principle as the weight. Look for this (careful, front and rear):
          Brake
          {
          RiderMaxForce = 25
          DeadZone = 0.01
          MasterCylinder0
          {
          name = default
          Diameter = 0.011
          }
          mastercylindersetting = 0
          Leverage0
          {
          Name = default
          ratio = 10
          }
          leveragesetting = 0
          disc0
          {
          name = Steel 220mm
          Mass = 0.54
          PressureToTorque = 0.132
          OptTemp = 500
          TempFactor = 1000
          Heating = 0.001
          CoolingBase = 0.5
          CoolingFactor = 0.28
          }
          discsetting = 0
          }
          }


          Change the name to what you need it to be – the diameter is the important bit. Then, you need to change the Torque.
          (new torque) = (old torque) * (new diameter) / (cold diameter)
          The bigger the diameter the higher the torque.

          The .ini file

          Last thing to do!

          Go into your ini. Careful with your model name, correct the weight, power, number of gears.

          If you have been through all this, successfully imported all values, you are deemed worth of changing the bike catergory by adding a space and OEM ;)
          MX1 OEM
          MX2 OEM

          Let's rock real bikes now!
          Donate to me -> feed my coffee addiction -> get more mods!
          OEM bikes pack
          MXBikes Discord

          Asdrael

          General tips and tricks and FAQ
          Donate to me -> feed my coffee addiction -> get more mods!
          OEM bikes pack
          MXBikes Discord

          Asdrael

          Update list
          Donate to me -> feed my coffee addiction -> get more mods!
          OEM bikes pack
          MXBikes Discord

          Asdrael

          Take your time reading, have fun.

          I'm open to all questions, comment, etc. Please post it here and I'll try to fill up the sections with your input.
          Donate to me -> feed my coffee addiction -> get more mods!
          OEM bikes pack
          MXBikes Discord