[REL] rFactor2 Series Creator (UI for creating vmods)

Discussion in 'Other' started by Noel Hibbard, Jun 5, 2015.

  1. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    Here is a tool used for creating vmods. You can run this tool from any folder you wish. The first time you run the tool it will prompt you to specify your core path. For example: C:\Program Files (x86)\rFactor2. Once you do that the tool generates an inventory of cars and tracks. The tool has several tabs. The Details, Vehicles, Locations, Sounds and Pace Car. The Details tab is where you specify the basic details about the vmod like Name, Version, ect. There are also paths to your custom DDS icon and rfm if you have one. If you don't have one, leave these fields alone and it will use the defaults. The output path will be the path where you want it to save the rfmod. The filename is generated automatically based on the Series Name and version number. For example, VEC_v15.0605.rfmod. If you have spaces in the Series Name they will automatically be replaced with "_" in the rfmod filename.

    The Vehicles tab displays a treeview identical to the one you see in the game when All Cars & Tracks is selected. You will not see the component names because the tool will work that out for you. The locations tab is just like the Vehicles tab. The sounds tab is a little different. This tab isn't a treeview. It is simply a list of sound component names and versions. Most cars these days have the sounds built into the vehicle component but if they do not, you will need to select the sounds in the sound tab. Later I may work on a way to automatically select sound cmps if needed.

    The Pace Car tab will show a treeview that is filtered to only display pace cars. Obviously you can only select one pace car on this list.

    There is also an Edit rFm button. This is for advanced users who need to do stuff like edit pit groups. The pace car doesn't need to be touched because the tool will modify that line for you. Most users will never need to click this button.

    Once you have everything setup the way you like, click the Save button and it will create the vmod.

    Hopefully this will make vmod creation easier for newcomers and even advanced users. If anyone has suggestions for how to make it better let me know.

    Notes:
    1. You will also notice an Open button. This button doesn't work yet. In the next release I want people to be able to browse for an rfmod file which will then fill in the details tab and select the cars and tracks that are available in your datapath. You can then make changes and resave the rfmod.
    2. The tool automatically locates your DataPath, MAS2 path and ModMgr path. It's well known that the MAS2 tool from current builds is buggy so a work around is to find a copy of the MAS2.exe that came with build 798 and place it in the same folder as CreateBuild.exe. The tool will look there first.


    I am sure this first build is full of bugs. Please report any you find.

    Version History:
    1.0.0.0 - First release
    1.0.0.1 -
    • Fixed bug were tool wouldn't find MAS2.exe properly.
    • Changed "Output File" to be "Output Path". Now you can only specify the output folder. The file name it generated automatically based on the mod name and version. I figured this would help prevent people from generating rfmod files with spaces in them.
    1.0.0.2 -
    • Fixed bug where the browse button for the output path didn't work.
    • Fixed bug where making changes to rFm didn't actually save.
    • Added some extra debugging to a file named rF2SeriesCreator.log which should help track down some other bugs.
    1.0.0.3 - Fixed bug which caused a crash if a veh file was missing requiered values for example "classes".
    1.0.0.4 - Fixed potential parsing error with some MFT files.
    1.0.0.5 - Fixed bug which cased a crash on a 0kb MFT file.
    1.0.0.6 -
    • Fixed bug with VEH files that don't use numbers for the car number.
    • Improved overall error handling. Now when content isn't properly handled by the tool it dumps the details to the log and keeps going but gives you a message at the end informing you that some content failed to load.
    1.1.0.0 -
    • Added an inventory cache so that the tool loads faster now. The first run will be slow as it builds this cache and if you add a bunch of new components it will run a little slow as it adds the new components to the cache. The cache is simply an SQLite database named inventory.sqlite. It stores this database in your DataPath. If you use this tool with multiple datapaths you will end up with inventory.sqlite in each datapath.
    • Because this new version uses SQLite it needs a dll named SQLite.Interop.dll. So rather than distributing a single EXE I am now distributing a zip file. Be sure to extract the exe and dll into the same folder.
    • The tool only displays the highest version number of each component now. So if you used this tool in the past and got strange errors from MAS2.exe stating that you have duplicate mas files, this should go away with this new version.
    1.1.0.1 - Included EventName as part of the primary key to fix the bug aerobaticrug reported. The database schema changed so when you run the tool it will claim the cache is corrupt. Simply click ok and then restart the app and it will build a new cache.
    1.1.0.2 - I'm an idiot. Try again.
    1.1.0.5 - Fixed bug causing the pace car selector to not work.

    Download:
    https://www.dropbox.com/s/50m3ejggqd6yohk/rF2SeriesCreator.zip?dl=0


    Click here to donate


    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
     
  2. AceLain

    AceLain Registered

    Joined:
    Jan 13, 2012
    Messages:
    551
    Likes Received:
    43

    Nice !

    I will try this !
     
  3. AceLain

    AceLain Registered

    Joined:
    Jan 13, 2012
    Messages:
    551
    Likes Received:
    43
    Just did a quick test and it seem to work.

    A quick idea:

    something that I always change in the RFM if the pitspeed limiter, and sometimes the default pratice time (especially if I want to have a practice longer than the 165min limit from the dedicated server)
    Maybe something like that could be integrated into the UI directly ?

    Just an idea though.
    And for some track, the speedlimit is overridded by the track itself (like sebring)

    EDIT: It look like that for now if I edit the RFM by clicking the button and changing value, these value don't save and are not include in the RFM for the mod (like if the OK button don't save)
     
  4. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    Hmm. I will check on the edit button.
     
  5. Leonardo1962

    Leonardo1962 Registered

    Joined:
    Feb 12, 2012
    Messages:
    247
    Likes Received:
    69
    Great idea Noel,

    Sounds good.
    I will test it as soon as possible.

    leonardo1962 (Peter)
     
  6. Woodee

    Woodee Registered

    Joined:
    Oct 4, 2010
    Messages:
    4,010
    Likes Received:
    1,071
    Thanks for your continued contributions Noel!
     
  7. alpha-bravo

    alpha-bravo Registered

    Joined:
    Dec 22, 2012
    Messages:
    1,374
    Likes Received:
    31
    Another usefull tool from Noel [emoji41]. Many thanks for that !
    Sry if it's a silly question but would it be possible to customize some AI settings with this tool ?
     
  8. Woodee

    Woodee Registered

    Joined:
    Oct 4, 2010
    Messages:
    4,010
    Likes Received:
    1,071
    The util seems to work, it is slow on every startup because of the scanning it does. If that can be reduced, or a button to say "rescan" when needed by the user.

    Also, perhaps having some of the fields pre-filled from past entries? Or a choice from past entries?
     
    Last edited by a moderator: Jun 6, 2015
  9. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    Yeah I plan to resolve all of these issues. I just wanted to get something basic out. I should have another release next week sometime.
     
  10. sherpa25

    sherpa25 Registered

    Joined:
    May 14, 2015
    Messages:
    234
    Likes Received:
    27
    Hi Noel, I get a JIT error (Unhandled exception- 'value cannot be null') at first startup, and then on succeeding start ups of the app. I've pointed it to my rF2 main folder. Anything I missed? Where does it save it's settings?
     
  11. Leonardo1962

    Leonardo1962 Registered

    Joined:
    Feb 12, 2012
    Messages:
    247
    Likes Received:
    69
    Yes, something goes wrong.
    It slows down everything.
    It teakes really a Long time. (i installed lots of tracks and vehicles).
    May be there are some very old bad mas file, that causes this Tool to stop working.
    A hint of last read mas file could help to identify the Bad file.
    After 20% the ~temp folder is missing and the Tool stop working.

    Thanks for improvements for this tool.

    Leonardo1962 (Peter)
     
  12. Anto870

    Anto870 Registered

    Joined:
    Sep 8, 2014
    Messages:
    126
    Likes Received:
    46
    I have this message error when load:

    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    System.ArgumentException: The path is not of a legal form.
    at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength)
    at System.IO.Path.GetDirectoryName(String path)
    at CreateMod.Form1.AddNodeWithPath(TreeNodeCollection nodes, String path, String sig)
    at CreateMod.Form1.inventory()
    at CreateMod.Form1.Form1_Shown(Object sender, EventArgs e)
    at System.Windows.Forms.Form.OnShown(EventArgs e)
    at System.Windows.Forms.Form.CallShownEvent()
    at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
    at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
    at System.Windows.Forms.Control.InvokeMarshaledCallbacks()


    ************** Loaded Assemblies **************
    mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.17929 built by: FX45RTMREL
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
    ----------------------------------------
    rF2SeriesCreator
    Assembly Version: 1.0.0.1
    Win32 Version: 1.0.0.1
    CodeBase: file:///C:/Users/Administrator/Desktop/rF2SeriesCreator.exe
    ----------------------------------------
    Microsoft.VisualBasic
    Assembly Version: 10.0.0.0
    Win32 Version: 11.0.50709.17929 built by: FX45RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
    ----------------------------------------
    System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.17929 built by: FX45RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.17929 built by: FX45RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
    ----------------------------------------
    System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.17929 built by: FX45RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.17929 built by: FX45RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System.Runtime.Remoting
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.17929 built by: FX45RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
    ----------------------------------------
    System.Data
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.17929 built by: FX45RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
    ----------------------------------------
    System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.17929 built by: FX45RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    System.Numerics
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.17929 built by: FX45RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
    ----------------------------------------

    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.

    For example:

    <configuration>
    <system.windows.forms jitDebugging="true" />
    </configuration>

    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.
     
  13. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    Yeah it takes a long time to scan for content but there isn't much I can do about that other than build a cache which is something I plan to do. I will add some logging so we can see what file in your install is killing it.
     
  14. sherpa25

    sherpa25 Registered

    Joined:
    May 14, 2015
    Messages:
    234
    Likes Received:
    27
    Does this also apply to my error reported above?
     
  15. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    The extra logging.. yeah, they should gather some more info on your error too. I should have another release in about 20mins. This morning I have fixed the browse button for the output path and now changes made in the "Edit rFm" button are persistent. Now I just need to add some logging and then I will release.
     
  16. sherpa25

    sherpa25 Registered

    Joined:
    May 14, 2015
    Messages:
    234
    Likes Received:
    27
    Sounds great. Will wait for the update. Thanks.
     
  17. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    1.0.0.2 release posted. Check first post for change long.
     
  18. sherpa25

    sherpa25 Registered

    Joined:
    May 14, 2015
    Messages:
    234
    Likes Received:
    27
    Thanks. Tried it but I get a similar 'null' error.

    Here's the error message, and the log's content as well.
    --------------------------------------
    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    System.ArgumentNullException: Value cannot be null.
    Parameter name: key
    at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
    at CreateMod.Form1.inventory()
    at CreateMod.Form1.bSettings_Click(Object sender, EventArgs e)
    at System.Windows.Forms.Control.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ButtonBase.WndProc(Message& m)
    at System.Windows.Forms.Button.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


    ************** Loaded Assemblies **************
    mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
    ----------------------------------------
    rF2SeriesCreator
    Assembly Version: 1.0.0.2
    Win32 Version: 1.0.0.2
    CodeBase: file:///K:/XBOX360%20AMODS/rFactor2/Apps/rF2SeriesCreator_v1.001.exe
    ----------------------------------------
    Microsoft.VisualBasic
    Assembly Version: 10.0.0.0
    Win32 Version: 12.0.51209.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
    ----------------------------------------
    System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34238 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
    ----------------------------------------
    System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34251 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System.Runtime.Remoting
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34245 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
    ----------------------------------------
    System.Data
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
    ----------------------------------------
    System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34234 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    System.Numerics
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
    ----------------------------------------

    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.

    For example:

    <configuration>
    <system.windows.forms jitDebugging="true" />
    </configuration>

    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.

    -------------- LOG ------------------
    Core: D:\XBOX360\rFactor2
    DataPath: D:\XBOX360\rFactor2
    MAS2.exe: D:\XBOX360\rFactor2\Support\Tools\MAS2.exe
    ModMrg.exe: D:\XBOX360\rFactor2\Bin32\ModMgr.exe
    Packages: D:\XBOX360\rFactor2\Packages

    Inventory:
    Inventory:
     
  19. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    But what do you get in the logfile?

    Edit: Duh.. I missed the log at the end.
     
  20. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    Okay, download the tool again and try again. I added even more logging.

    Thanks!
     

Share This Page