1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice
  3. Before reporting issues or bugs, please check the up-to-date Bug Reporting Thread for the current version.
    0.35 Bug Reporting thread
    Solutions and more information may already be available.

Changing map.json breaking the entire map?

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by DudeDudenson, Oct 18, 2017.

  1. DudeDudenson

    DudeDudenson
    Expand Collapse

    Joined:
    Oct 18, 2017
    Messages:
    10
    Hello fellow modders, i've been facing an issue that apparently no one in the history of this game ever had (i mean seriously every time i google an issue about this game there's 2 results without answers and nothing else)

    I've been trying to add an extra piece of AI for the spacejump on the map altitude 1.5, i've managed to add the waypoints no problem, but the second i swap in the new map.json file into the altitude.zip the map just breaks, the names, spawnpoints and previews go blank, and all the textures go missing

    Frankly i can't grasp my mind around modifying an AI file breaking the textures
    As you can see here all the waypoints are in (without modifying the map.json file)

    These are the contents of the map.json file i'm putting in the place of the original one

    {
    "segments" : {

    "pont_bois1" : {
    "nodes" : ["pont_bois_wp1", "pont_bois_wp2"],
    "drivability" : 1 ,
    }
    "pont_beton1" : {
    "nodes" : ["pont_beton_wp1", "pont_beton_wp3"],
    "drivability" : 1 ,
    }
    "pont_beton2" : {
    "nodes" : ["pont_beton_wp2", "pont_beton_wp4"],
    "drivability" : 1 ,
    }
    "pont_beton3" : {
    "nodes" : ["pont_beton_wp5", "pont_beton_wp6"],
    "drivability" : 1 ,
    }
    "pont_beton4" : {
    "nodes" : ["pont_beton_wp7", "pont_beton_wp8"],
    "drivability" : 1 ,
    }
    "pont_beton5" : {
    "nodes" : ["pont_beton_wp9", "pont_beton_wp10","pont_beton_wp11", "pont_beton_wp12", "pont_beton_wp13", "pont_beton_wp14", "pont_beton_wp15"],
    "drivability" : 1 ,
    }
    "pont_beton6" : {
    "nodes" : ["pont_beton_wp16", "pont_beton_wp17"],
    "drivability" : 1 ,
    }
    "pont_beton7" : {
    "nodes" : ["pont_beton_wp18", "pont_beton_wp19"],
    "drivability" : 1 ,
    }
    "pont_beton8" : {
    "nodes" : ["pont_beton_wp20", "pont_beton_wp21","pont_beton_wp22", "pont_beton_wp23", "pont_beton_wp24", "pont_beton_wp25", "pont_beton_wp26", "pont_beton_wp27", "pont_beton_wp28"],
    "drivability" : 1 ,
    }
    "saut1" : {
    "nodes" : ["saut_wp1", "saut_wp2"],
    "drivability" : 1 ,
    }
    "saut2" : {
    "nodes" : ["saut_wp3", "saut_wp4", "saut_wp5"],
    "drivability" : 1 ,
    }
    "virage_metal" : {
    "nodes" : ["virage_metal_wp1","virage_metal_wp2","virage_metal_wp3","virage_metal_wp4","virage_metal_wp5","virage_metal_wp6","virage_metal_wp7","virage_metal_wp8","virage_metal_wp9","virage_metal_wp10","virage_metal_wp11","virage_metal_wp12"],
    "drivability" : 1 ,
    }
    "tunel1" : {
    "nodes" : ["tunel_wp1","tunel_wp2","tunel_wp3", "tunel_wp4","tunel_wp5"],
    "drivability" : 1 ,
    }
    "tunel2" : {
    "nodes" : ["tunel_wp6","tunel_wp7", "tunel_wp8", "tunel_wp9","tunel_wp10","tunel_wp11","tunel_wp12"],
    "drivability" : 1 ,
    }
    "tunel3" : {
    "nodes" : ["tunel_wp13","tunel_wp14", "tunel_wp15", "tunel_wp16","tunel_wp17","tunel_wp18","tunel_wp19"],
    "drivability" : 1 ,
    }
    "tunel4" : {
    "nodes" : ["tunel_wp20","tunel_wp21", "tunel_wp22", "tunel_wp23","tunel_wp24","tunel_wp25","tunel_wp26"],
    "drivability" : 1 ,
    }
    "tunel5" : {
    "nodes" : ["tunel_wp27","tunel_wp28", "tunel_wp29", "tunel_wp30","tunel_wp31"],
    "drivability" : 1 ,
    }
    "tunel6" : {
    "nodes" : ["tunel_wp32","tunel_wp33", "tunel_wp34", "tunel_wp35","tunel_wp36"],
    "drivability" : 1 ,
    }
    "BigJump" : {
    "nodes" : ["JumpWPStart","JumpWP1","JumpWP2","JumpWP3","JumpWP4","JumpWP5","JumpWP6","JumpWP7","JumpWP8","JumpWP9","JumpWP10","JumpWP11","JumpWP12","JumpWP13","JumpWPEnd"],
    "drivability" : 1 ,
    }
    }
    }

    BigJump is the only thing i've added to it
    After replacing the original map.json with this map.json i get the following:


    As you can see the map and it's 3 variations are now completely broken down to the point to where the game even fails to read the description, this before i even try to open the map

    Once i open the map i start to get the failed to create resource error several hundred times for almost every single non vanilla file the map uses, i have to use an auto clicker to get past it, once i'm past it this is what i get:

    A world without textures, i've tried deleting the entire beamng folder in documents, reinstalling the game, redownloading the map, verifying integrity (everything checks out OK), but no matter what i do it remains broken, it's worth nothing that restoring the original map.json file itself doesn't revert the map to its working state, i have to replace the entire altitude.zip with the original one to get it working once more

    This feels like there's some integrity check made by the game that is failing, but i'm not sure, since i did the same exact modifications to the map insane testing (Added AI to the dirt track, had to add waypoints for some bridges) and it worked flawlessly

    Frankly i'm not sure what the hell i'm doing wrong and i'm running out of hair to pull
     
  2. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,696
    Use the 'CODE' tags to insert code.
    You should check if the resulting json is valid:
    https://jsonlint.com/
     
  3. DudeDudenson

    DudeDudenson
    Expand Collapse

    Joined:
    Oct 18, 2017
    Messages:
    10
    That page tells me that even the original json file is invalid, it's expecting a string after every comma when the default map.json files have the comma in there with the blank space after

    And sorry but the forum won't let me edit the original post to use the code BB tag, will use it in the future
     
    #3 DudeDudenson, Oct 18, 2017
    Last edited: Oct 18, 2017
  4. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,696
    Upload the .json file here please (Upload a file button)
     
  5. DudeDudenson

    DudeDudenson
    Expand Collapse

    Joined:
    Oct 18, 2017
    Messages:
    10
    I'm attaching a zip file with both the original map.json from the map and the one i'm trying to replace it with, i'm fairly confident the problem isn't with the file itself but rather with some sort of integrity check the game performs on some mods
     

    Attached Files:

  6. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,696
    Uhm, it could be that. We are checking.

    Are you placing the modified file back in the ZIP?
    Try to put it instead in Documents/BeamNG.Drive/levels/(create-a-folder-named-the-same-way-of-the-map)/
    And make sure that the mod's ZIP is 100% original (ie. no modified file in it)
     
  7. DudeDudenson

    DudeDudenson
    Expand Collapse

    Joined:
    Oct 18, 2017
    Messages:
    10
    Well that worked, i wasn't aware that the custom modifications took precedence over the original mod files, i'll do it that way in the future, altough if you could teach me how to later repackage it all into a single file i'd appreciate it



    Thanks for all your help

    EDIT: Is there any way to set a speed for that segment?
     
  8. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,696
    About the corrupted ZIP thing:
    What software are you using to edit the ZIP?
    I was informed some users had this problem, but it was caused by outdated zipping softwares (Winrar, etc).


    You cannot manually set the speed of a segment IIRC.
    It's auto-calculated by the AI.
     
  9. DudeDudenson

    DudeDudenson
    Expand Collapse

    Joined:
    Oct 18, 2017
    Messages:
    10
    I've been using windows 7's own zip drivers that let you acess zip files as if they were folders, i guess i should had tried to use 7zip, i'd be willing to test it if you want
     
  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