Problems with AI decal roads

Discussion in 'Content Creation' started by passengerpigeon, Aug 18, 2023.

  1. passengerpigeon

    passengerpigeon
    Expand Collapse

    Joined:
    Jan 22, 2017
    Messages:
    72
    I am trying to add AI support to the Driver 1 New York map by placing invisible decal roads on the existing terrain, however I have run into two problems with the one-way two-lane roads I have placed on either side of the Brooklyn Bridge - in the first image, cars are trying to cut a corner even though that is impossible, whereas in the second, cars going the other way refuse to pass the node highlighted in white (the drivability is set to 1 by the way) and always turn around. How can I fix these issues? I know the usual way to do AI support in mesh road maps such as conversions from other games has been "nodes", but the use of decal roads in the Rockport with Rosewood map has led me to believe that decal road AI on top of mesh roads could be supported now.
    2023-08-171.png
    2023-08-172.png
     
  2. el_ferrito

    el_ferrito
    Expand Collapse

    Joined:
    Sep 30, 2020
    Messages:
    432
    Perhaps the corner is just Try just adding a break and having them meet at a right angle. You might have to play with the overlap. It could work.

    In the second one it looks funny. There is an additional line on the wireframe. Try deleting that node, sometimes it places two together and screws everything up.
     
  3. Bauer33333

    Bauer33333
    Expand Collapse

    Joined:
    Jul 25, 2020
    Messages:
    260
    When you click on view in the upper bar you can turn on ai road visualization. Their nodes are sometimes different than the ones of the decal road and they have only straights connecting them, no curves like decal roads
     
    • Like Like x 1
  4. passengerpigeon

    passengerpigeon
    Expand Collapse

    Joined:
    Jan 22, 2017
    Messages:
    72
    Thanks for the advice; I solved the second problem in the end by relaying the road and trying to place the points as close together as possible so the terrain doesn't mess with anything. I solved the first problem by merging the two lanes of traffic into one and having the single lane loop as far from the barrier as possible. Also, where in the map folder is the decal road data stored? I'd like to share my work with the community, but since this map is ported from another game I'd rather upload just the relevant files for people to put into their own map copies than expose myself to copyright problems by redistributing the whole modified map.
     
  5. r3eckon

    r3eckon
    Expand Collapse

    Joined:
    Jun 15, 2013
    Messages:
    372
    As far as I know by zipping up the userfolder/levels/LEVEL NAME/ folder you're not redistributing the map itself, only the edits you made, which is why that folder is going to be much lighter than the level mod zip itself. If you only added things you can probably get away with only zipping the folder structure up to the simgroup (folder) that contains your edits along with the items.level.json file which is where the objects are defined. If you modified things (like kept the same decal road but changed it) then it's best to just zip the entire level edits folder otherwise the items.level.json files might have inconsistencies. You want the zip file to start with the levels folder as this is what's going to be loaded in the lua filesystem.

    Also, depending on the naming you might run into mod loading order problems. If your mod has a name that alphabetically comes before the mod it's trying to modify, there's a chance your edits will get hidden, because the mod's items.level.json file doesn't contain your edits. If that happens try prefixing your zip with Zs so it's forced to load last.

    Note that I might be wrong, this is only speaking from experience with releasing small modifications for other level mods so I may have missed a couple things.
     
  6. passengerpigeon

    passengerpigeon
    Expand Collapse

    Joined:
    Jan 22, 2017
    Messages:
    72
    I'm surprised it goes there by default and not in the actual map folder. How, then, would I put the decal road data back into the map directory if I did want to distribute a complete map? Also, how do I distribute the parking spaces .json file alongside the roads only - will saving it in the same folder as them work or does it need to be somewhere else?
     
  7. Bauer33333

    Bauer33333
    Expand Collapse

    Joined:
    Jul 25, 2020
    Messages:
    260
    You need to put your changes from the userfolder/levels folder into the folder where the map you did your edits on is, usually userfolder/mods/unpacked
    I would do a backup before overwriting the files.
    After you have overwritten the mod with your changes you can pack it with the mod manager ingame and you have a .zip you can distribute.
     
  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