rFactor2 Mod Manager failing to create mod from DatFile

Discussion in 'Technical & Support' started by B1K3R, Jan 5, 2017.

  1. Luc Devin

    Luc Devin Registered

    Joined:
    Jan 16, 2012
    Messages:
    1,133
    Likes Received:
    23
    Then try to create another mod in order to know if it is not this one that is corrupt.
    Or does not find it so that it should not be installed or not at the right place
     
  2. B1K3R

    B1K3R Registered

    Joined:
    Apr 6, 2012
    Messages:
    1,605
    Likes Received:
    88
    Well, everything is in order really as seen below. Mod created and installed, files there and server also started successfully.

    Its when the client joins the problem is....as the mod downloaded is not the one for that server, but the first one that I had created manually.


    upload_2017-1-11_11-21-17.png
     
  3. Wishmaster

    Wishmaster Registered

    Joined:
    Nov 30, 2012
    Messages:
    315
    Likes Received:
    32
    What is the entry in the player.json under GameDescription? Is there the name of the mod?
     
  4. B1K3R

    B1K3R Registered

    Joined:
    Apr 6, 2012
    Messages:
    1,605
    Likes Received:
    88
    Yes, I put the name of the mod, then when server is started it get automatically changed to the first installed mod.
     
  5. AceLain

    AceLain Registered

    Joined:
    Jan 13, 2012
    Messages:
    551
    Likes Received:
    43
    So the server has the right mod loaded, but when the player join, the mod that the player is downloading is wrong ?
     
  6. Ozzy

    Ozzy Registered

    Joined:
    Dec 18, 2013
    Messages:
    277
    Likes Received:
    26
    "Game Name: justrace.net#259" is only the server name. The Dedicated server does not specifiy which rfmod is loaded. :(

    Change the follwing two parameters in your 54394.json:
    "Game Description":"RaceEvent GT Series"
    "Game Version":"1.09"
    to the name and version of your rfmod:
    "Game Description":"justrace.net#259"
    "Game Version":"1.0"

    Without the version it won't work.

    Tested with normal dedicated server started through the launcher.
     
  7. B1K3R

    B1K3R Registered

    Joined:
    Apr 6, 2012
    Messages:
    1,605
    Likes Received:
    88
    Exactly :)
     
  8. B1K3R

    B1K3R Registered

    Joined:
    Apr 6, 2012
    Messages:
    1,605
    Likes Received:
    88
    I have tried that already dude as I mentioned in my previous post:

    https://forum.studio-397.com/index....to-create-mod-from-datfile.54152/#post-874174

    The only difference is that I started the server using OneClick
     
    Last edited: Jan 12, 2017
  9. B1K3R

    B1K3R Registered

    Joined:
    Apr 6, 2012
    Messages:
    1,605
    Likes Received:
    88
    This method does not seem to work anymore :( Has something changed in ModMgr?
     
  10. B1K3R

    B1K3R Registered

    Joined:
    Apr 6, 2012
    Messages:
    1,605
    Likes Received:
    88
    Pity really as rF2 is the only racing game where one cannot start a dedi server automatically based on an dynamically created car/track combo...
     
  11. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,346
    Likes Received:
    6,572
    What method? All you've quoted is your original post, and the thread doesn't really look like it ever got resolved. You should really explain what you mean a bit better.
     
  12. B1K3R

    B1K3R Registered

    Joined:
    Apr 6, 2012
    Messages:
    1,605
    Likes Received:
    88
    Hi Lazza, apologies, you're right sorry! So here is the full info about what I am doing:

    So at Justrace we automate all races, admin dont even need to go on the server. Schedules are created on a web based application and the servers are started automatically. We currently have Assetto Corsa, Raceroom and Automobilista fully functional and integrated.

    upload_2020-4-27_10-58-30.png

    rF2 had also been integrated some 4 years ago but was never enabled. Auto creation of rfmods, installation of mod and starting of Dedi server for that mod created on the fly was working nicely too. We want to enable rF2 now and start a community like we did for the other games, but the auto mod process stopped working somehow when I tried it again.

    This is what I used to do:

    1. First I create a default mas file (copy it from a default mas really)

    2. Then I create a .DAT file
    Code:
    [Package]
    Name=TatuusF4Croft_JR
    Type=0
    Version=1.0
    BaseVersion=1
    MinVersion=1
    Author=Mod Team
    Date=132323061006330000
    ID=e1857f6f-e9ae-4154-a1ba-7b364e714f21
    URL=www.justrace.net
    Desc=TatuusF4@Croft
    Category=0
    Origin=0
    Flags=0
    CurLocation=0
    NumLocations=1
    Location=E:\Program Files (x86)\Steam\SteamApps\common\rFactor 2\Packages\TatuusF4Croft_JR.rfmod
    CurRFM=0
    NumRFM=1
    RFM=E:\Program Files (x86)\Steam\SteamApps\common\rFactor 2\Justrace\PackageInfo\TatuusF4Croft_JR.mas
    NumTrackFiles=1
    Track="Croft Circuit v1.01sm,0" "Croft -- Road Course,1"
    NumVehicleFiles=1
    Vehicle="Tatuus_F4_2018 v1.07,0" "Tatuus F4-T014 #01,1" "Tatuus F4-T014 #02,1" "Tatuus F4-T014 #05,1" "Tatuus F4-T014 #06,1" "Tatuus F4-T014 #07,1" "Tatuus F4-T014 #09,1" "Tatuus F4-T014 #13,1" "Tatuus F4-T014 #16,1" "Tatuus F4-T014 #33,1" "Tatuus F4-T014 #34,1" "Tatuus F4-T014 #36,1" "Tatuus F4-T014 #45,1" "Tatuus F4-T014 #57,1" "Tatuus F4-T014 #80,1" "Tatuus F4-T014 #88,1"
    NumOtherFiles=0
    rFmFile=
    IconFile=
    SmallIconFile=
    
    CurPackage=0

    3. Then I create the mod like this
    Code:
    ModMgr.exe -c"E:\Program Files (x86)\Steam\SteamApps\common\rFactor 2\Installed" -b"E:\Program Files (x86)\Steam\SteamApps\common\rFactor 2\Justrace\PackageInfo\JR.dat" 0

    4. Then I install it like this
    Code:
    ModMgr.exe -q -iTatuusF4Croft_JR.rfmod" -p"E:\Program Files (x86)\Steam\SteamApps\common\rFactor 2\Packages"  -d"E:\Program Files (x86)\Steam\SteamApps\common\rFactor 2"  -c"E:\Program Files (x86)\Steam\SteamApps\common\rFactor 2\Installed"

    5. Then I start the server using this
    Code:
    E:\Program Files (x86)\Steam\SteamApps\common\rFactor 2\Bin64\rFactor2 Dedicated.exe +oneclick +Profile=JRProfile

    But STEP 3 is not working anymore whatever I tried as I get this error
    upload_2020-4-27_11-21-16.png


    I'd love to get rFactor 2 working as its one of my favorite SIMS and would like to start promoting it on JR but without this working I cannot.

    Thanks for any help! :)
     
    Damian and Corti like this.
  13. TheTrackAVL

    TheTrackAVL Registered

    Joined:
    Jan 17, 2021
    Messages:
    22
    Likes Received:
    7
    Sorry to resurrect the thread, but were you able to find the solution to this? I'm trying to do the same thing but for some reason, the super helpful "Error creating package file." isn't helping much.

    I've tried pulling directly from pkginfo.dat to confirm that my formatting was right on the dat file.

    Like you, I'm trying to dynamically create mods for dedicated servers.

    Thanks,
    Joel
     
  14. I am always a bit disappointed when people ask for support and do not post anything after getting support ... and obviously JR / B1K3R solved it.

    I found out that editing the .-dat file by using vi (UNiX) sometimes breaks it.

    Hope this helps.

    Or maybe you have solved this, too and might get in touch :)
     
    TheTrackAVL likes this.
  15. TheTrackAVL

    TheTrackAVL Registered

    Joined:
    Jan 17, 2021
    Messages:
    22
    Likes Received:
    7
    I haven't solved this yet. I've been working on other projects around automating rf2, but would love to get this working.

    I was trying to write a .dat file with a python script. I'm not sure what line endings are being used. That might be the issue with editing with vi. There might be a setting that causes vi to change line endings from dos/windows to unix on save. Not sure but that the first thing that behavior makes me thing of.

    The biggest challenge I have is that there is no messaging when things don't work. That makes it very difficult to troubleshoot.

    If Studio 397 isn't interested in supporting modmgr and mas2 (which I totally understand), it would be amazing if they would release the source for these two tools so we in the community can create more modern tooling.
     
    Deleted member 58016 and DanRZ like this.
  16. I am not sure what corrupts the file or data in it, but I think it is caused by vi or C&P in a way - it is hard to reproduce and to have the same environment on each attempt, but I am pretty sure about it.

    One big step before making rfmod files automatically is to figure out vehicles, their names and version numbers and the car label (e.g. car number and team name) and the same for tracks ...

    E.g. Monza_2021 v1.33,0 Monza,1 Monza_Grande,0 Monza_Junior,0 for selecting Monza and only the actual GP layout.
     
  17. TheTrackAVL

    TheTrackAVL Registered

    Joined:
    Jan 17, 2021
    Messages:
    22
    Likes Received:
    7
    Yes, that is a pain. I found the best way is to query the API and use it to populate a database. If you have rf2 running and are on all cars and tracks, you can hit http://ipaddress:5397/rest/race/car and it will return a json list of all cars/liveries available in the sim in the form of:

    Code:
     {
        "id": "e6ed070cd067d35269996b5bb9d2c6ba1fb3fd96",
        "name": "#03 Oscar Larrauri Daytona ยด91 1.",
        "description": "This vehicle has a Flat 6 engine and is manufactured by Porsche.",
        "bhp": "4 bhp",
        "usedIn": "1754",
        "configuration": "Lorem ipsum, Dolor sit amet",
        "fullPathTree": "MAK-Corp Mods, Prototypes, Group C, 1991 Season, Porsche 962C",
        "vehFile": "C:\\Program Files (x86)\\Steam\\steamapps\\common\\rFactor 2\\Installed\\Vehicles\\MAK-Corp_Group_C\\1.1\\91D_3_TORNO.VEH",
        "engine": "Flat 6",
        "manufacturer": "Porsche",
        "localizations": {},
        "categoryLocalizations": {},
        "image": "/rest/race/car/e6ed070cd067d35269996b5bb9d2c6ba1fb3fd96/image",
        "thumbnail": "/rest/race/car/e6ed070cd067d35269996b5bb9d2c6ba1fb3fd96/thumbnail"
      },
    Then hit up http://ipaddress:5397/rest/race/track to get all the tracks/layouts as:

    Code:
    {
        "id": "8f9e2e682b236072c92883e60d404e613c528065",
        "shortName": "HockenheimRing 1.5",
        "name": "HockenheimRing DTM",
        "sceneDesc": "HOCKENHEIMRINGDTM",
        "year": "1908-1909",
        "layout": "Lorem ipsum",
        "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris id felis eu est feugiat imperdiet eu ut ante. Nullam quis neque sed nunc convallis tincidunt. Morbi sagittis risus in massa volutpat feugiat. Vestibulum mollis ut magna ut sollicitudin. Vivamus tincidunt lobortis velit, sed accumsan sapien eleifend ac. Sed et fringilla nisl. Fusce non felis tortor. Proin fringilla sem ut erat sagittis, eget imperdiet nunc gravida. Cras eget est leo. Ut mollis efficitur ex a tristique. Nam faucibus dolor ut nunc dignissim pellentesque. Phasellus convallis sed eros convallis consequat. Nulla facilisi. Mauris vulputate vulputate purus, eget tempus ligula dignissim quis.",
        "length": "4.574 KM",
        "type": "Permanent Road Course",
        "localizations": {},
        "categoryLocalizations": {},
        "image": "/rest/race/track/8f9e2e682b236072c92883e60d404e613c528065/image",
        "thumbnail": "/rest/race/track/8f9e2e682b236072c92883e60d404e613c528065/thumbnail"
      },
    Put the data in whatever datastore suits you best and reference it when building stuff.

    This leverages the API that the UI is using.
     
    DanRZ and Deleted member 58016 like this.
  18. Thanks a lot for sharing this info - I tried querying the Steam Workshop like support.fidgrove.com does it, but had no success; this will fit my needs at first.

    It is not priority one to automate such things, but it will be handy over time I think.
     
  19. TheTrackAVL

    TheTrackAVL Registered

    Joined:
    Jan 17, 2021
    Messages:
    22
    Likes Received:
    7
    Yea, the API is a useful source as it is exactly what rf2 calls the things. I'm actually operating a sim center, so automating these kinds of things is really useful to me. Content management for 12 rigs + 2 spectators + a dedi server is a pain =).
     
  20. Just for information: Fidgrove added a CSV export to their site as requested - it helps a lot in order to reduce number of manual steps.
     

Share This Page