QUESTION CANNOT HAVE 0 CARS IN RACE.INI, I'm doing something wrong

Discussion in 'Tracks' started by rageman002, Jun 23, 2022 at 7:37 AM.

  1. rageman002

    rageman002 New Member

    Joined:
    Oct 28, 2021
    Messages:
    16
    Likes Received:
    1
    Hi! I'm trying to add pits to an existing track, and I'm getting the error "CANNOT HAVE 0 CARS IN RACE.INI". Somewhere along the conversions, I'm messing something up and I can't figure it out.

    I tried searching for a solution, but I'm really really new at the whole 3d software, and I think I'm making a silly mistake somewhere. I tried straight up converting a track to .fbx, and then back to .kn5, without changing anything, and it STILL doesn't work, even if I don't actually modify anything.

    Here are the exact steps I'm doing:

    1. I copy the existing track.kn5 to a working folder
    2. Convert the track.kn5 file to a FBX file using "kn5conv.exe".
    3. Convert the track.fbx file to a FBX 2012 binary file using Autodesk's FBX Converter.
    4. Load the track in blender, everything appears properly, I can see the pit boxes and the starting grids
    so far everything seems to work
    5. I don't change anything, but immediately export to track.fbx
    6. Load the track.fbx in Assetto Corsa SDK, I can still see the pit boxes and start grids, named AC_PIT_0 and AC_START_0, all the way to 29.
    7. Export to track.kn5
    8. Load into a practice session, "CANNOT HAVE 0 CARS IN RACE.INI".

    I did try to change the ui.json to have 20 pits and it still gives me the same error. I also tried to rename the ai folder to ai.old, still the same issue. There is no models.ini file.

    The track works fine before I try to convert it, somewhere along the line I'm messing something up that breaks the track, any help would be appreciated.
     
  2. Johnr777

    Johnr777 Moderator

    Joined:
    Jul 26, 2017
    Messages:
    826
    Likes Received:
    520
    Curious why you need to use the autodesk converter, wont blender take the fbx from kn5conv?
     
  3. fughettaboutit

    fughettaboutit aka leBluem

    Joined:
    Jul 21, 2014
    Messages:
    767
    Likes Received:
    251
    Your kn5 is called like the track-folder it self? AC wont start without that.
     
  4. rageman002

    rageman002 New Member

    Joined:
    Oct 28, 2021
    Messages:
    16
    Likes Received:
    1
    kn5conv.exe makes an ASCII file, blender only supports binary, so I use the Autodesk software to convert it to FBX2012 binary.

    I kept the exact same name as the original kn5.

    I'm going to try to record a video of the whole process, I suspect it's a simple checkbox that I'm missing or something silly.
     
  5. rageman002

    rageman002 New Member

    Joined:
    Oct 28, 2021
    Messages:
    16
    Likes Received:
    1
    Ok so I recorded my entire process, keep in mind, I've been using blender/AC SDK for an entirety of ~24 hours, I have no idea what I'm doing.



    I also noticed that in log.txt I'm getting a lot of errors like this:
    ERROR: SURFACE NOT FOUND FOR OBJECT:1OFFTRACK
    ERROR: SURFACE NOT FOUND FOR OBJECT:1OFFTRACK
    ERROR: SURFACE NOT FOUND FOR OBJECT:1OFFTRACK
    ERROR: SURFACE NOT FOUND FOR OBJECT:1CARPET_SUB8
    ERROR: SURFACE NOT FOUND FOR OBJECT:1CARPET_SUB8
    ERROR: SURFACE NOT FOUND FOR OBJECT:1CARPET_SUB8
    ERROR: SURFACE NOT FOUND FOR OBJECT:1PITS_SUB5
    ERROR: SURFACE NOT FOUND FOR OBJECT:1PITS_SUB5
    ERROR: SURFACE NOT FOUND FOR OBJECT:1PITS_SUB5
    ERROR: SURFACE NOT FOUND FOR OBJECT:1ASPHALT_10_SUB0
    ERROR: SURFACE NOT FOUND FOR OBJECT:1ASPHALT_10_SUB0
    ERROR: SURFACE NOT FOUND FOR OBJECT:1ASPHALT_10_SUB0

    Any help would be much appreciated!
     
  6. fughettaboutit

    fughettaboutit aka leBluem

    Joined:
    Jul 21, 2014
    Messages:
    767
    Likes Received:
    251
    data\surfaces.ini, it has sections like that (you probably didnt change!?) ?

    [SURFACE_0]
    KEY=OFFTRACK
    ...

    [SURFACE_1]
    KEY=ASPHALT
    ...

    [SURFACE_2]
    KEY=CARPET
    ...
     
  7. rageman002

    rageman002 New Member

    Joined:
    Oct 28, 2021
    Messages:
    16
    Likes Received:
    1
    This is the content of my surfaces.ini:
    Code:
    [SURFACE_0]
    KEY=ROAD
    FRICTION=0.98
    DAMPING=0
    WAV=
    WAV_PITCH=0
    FF_EFFECT=NULL
    DIRT_ADDITIVE=0
    IS_VALID_TRACK=1
    BLACK_FLAG_TIME=0
    SIN_HEIGHT=0
    SIN_LENGTH=0
    IS_PITLANE=0
    VIBRATION_GAIN=0.0
    VIBRATION_LENGTH=0.0
    
    [SURFACE_1]
    KEY=GRASS
    FRICTION=0.6
    DAMPING=0
    WAV=grass.wav
    WAV_PITCH=0
    FF_EFFECT=NULL
    DIRT_ADDITIVE=0
    IS_VALID_TRACK=0
    BLACK_FLAG_TIME=10
    SIN_HEIGHT=0.03
    SIN_LENGTH=0.5
    IS_PITLANE=0
    VIBRATION_GAIN=0.2
    VIBRATION_LENGTH=0.6
    
    [SURFACE_2]
    KEY=PITROAD
    FRICTION=0.98
    DAMPING=0
    WAV=
    WAV_PITCH=0
    FF_EFFECT=NULL
    DIRT_ADDITIVE=0
    IS_VALID_TRACK=1
    BLACK_FLAG_TIME=0
    SIN_HEIGHT=0
    SIN_LENGTH=0
    IS_PITLANE=1
    VIBRATION_GAIN=0.0
    VIBRATION_LENGTH=0.0
    
    [SURFACE_3]
    KEY=RUMBLE
    FRICTION=0.95
    DAMPING=0
    WAV=kerb.wav
    WAV_PITCH=1.3
    FF_EFFECT=1
    DIRT_ADDITIVE=0
    BLACK_FLAG_TIME=0
    IS_VALID_TRACK=0
    SIN_HEIGHT=0
    SIN_LENGTH=0
    IS_PITLANE=0
    VIBRATION_GAIN=0.8
    VIBRATION_LENGTH=0.7
    
    [SURFACE_4]
    KEY=GRAVEL
    FRICTION=0.83
    DAMPING=0.15
    WAV=
    WAV_PITCH=0
    FF_EFFECT=NULL
    DIRT_ADDITIVE=1
    BLACK_FLAG_TIME=0
    IS_VALID_TRACK=0
    SIN_HEIGHT=0
    SIN_LENGTH=0
    IS_PITLANE=0
    VIBRATION_GAIN=0
    VIBRATION_LENGTH=0
    Since I didn't actually change anything, I shouldn't need to change this file, correct? Am I missing something?
     
  8. John Harding

    John Harding Member

    Joined:
    Aug 5, 2021
    Messages:
    53
    Likes Received:
    95
    I suspect the problem with the spawning lies with the naming. At about 3 minutes into your video, the spawn objects themselves are actually called "AC_PIT_0.001" within each collection. So you need to go back to Blender and rename these one by one, it might be something to do with the Autodesk converter whereby it can't handle the collection and objects being the same name or something similar.

    Here is a screengrab from my spawn objects in Pinwheel, note that in contrast to your fbx when opened in the editor, both names are the same (i.e. AC_PIT_4):

    [​IMG]
     
  9. fughettaboutit

    fughettaboutit aka leBluem

    Joined:
    Jul 21, 2014
    Messages:
    767
    Likes Received:
    251
    use this in console or as new text script
    select the objects you need
    Code:
    import bpy
    for ob in bpy.context.selected_objects:
        if ob.type == 'MESH':
            ob.name=str(ob.name).replace('.001', '')
            ob.data.name=ob.name
    print('done')
    
    or use this
    upload_2022-6-24_15-57-2.png
     
  10. rageman002

    rageman002 New Member

    Joined:
    Oct 28, 2021
    Messages:
    16
    Likes Received:
    1
    That was it! But it looks like it's my blender itself doing that, when I rename the bottom one and remove the .001, the top one (I don't know the proper names for those things) gets replaced with .001... There's probably a setting I need to change somewhere to fix that.

    When I do rename it, the track loads, but all the cars appear way below the map, I'm guessing due to the .001 still being there.
     
  11. John Harding

    John Harding Member

    Joined:
    Aug 5, 2021
    Messages:
    53
    Likes Received:
    95
    Just use on of the batch methods as @fughettaboutit suggests. As for the appearing below, it's probably due to the cars falling through the track as a mesh probably got renamed too, perhaps 1PITS_SUB5 or one of the ROAD surfaces. Worth just flicking through the 'how to make a track' guide by Luchian I would say to give yourself a base understanding first before tackling this!
     
  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