Skip to content

How to make a mod

Thomas Nguyen edited this page Aug 26, 2021 · 8 revisions

EasyERPExplorer

  1. Start EasyERPExplorer.exe and you will see 2 windows, "Game Directory Explorer" and "Mods Explorer".
  2. Click on "Create new mod" in "Mods Explorer" window
  3. Type in the name of the new mod
  4. Click "Create"

At this point, you should see "Selected mod: <name of your mod>" and an empty tree view.

To add files to your mod, follow the steps below in "Game Directory Explorer" window:

  1. Click "Set F1 Game Folder". Paste the path of F1 game and click "Save" only need to do once

  1. Expand folders and find an ERP file you want to mod
  2. Click on the file. A popup will ask to confirm.
  3. Click yes to export files into your mod folder.

! Attention people: You should delete the files you don't mod to speed up import process, otherwise it will take ages to load all files!

Find & Replace text files

Follow the following steps to create/edit a task (at least read step 11):

  1. Select a mod from "Mods Explorer" window
  2. Click on "Edit Find&Replace" button

  1. A new window will pop up, showing a list of find & replace tasks. Click "Add ERP file" to create your first task.

  1. A new window will pop up, asking to fill in the ERP file relative path. For example: 2021_asset_groups\f1_2021_vehicle_package\teams\common.erp. Click "Save" to add a task. (Note: you might need to resize Find & Replace window to see the list after adding)
  2. Click on the the entry to expand further options
  3. Click "Add text file" button. Another window will show up to ask for text file name. This is the name of the .xml or .json file you wish to modify. For example: mercedes!!!temp000.vtf.xml (you can remove .xml or .json extension, although not recommended). Click "Save" to add to the list

  1. Click on the new entry to expand further options
  2. Click on "Add task" button. A window where you can define what to look for and replace with will show up.

  1. To understand what to put in these boxes, read below for notes on each input.
  2. Click save to add new entry.
  3. IMPORTANT Click "Save to File" button on top to save all your work. IF NOT ALL ENTRIES WILL NOT BE SAVED

Manual way

Where to put a mod

By default, a mod is a folder stored in _MODS folder where EasyERPMod is.

An example folder structure:

  • EasyERPMod
    • _MODS
      • mod_by_me
      • another_mod

To create a new mod, simply create a folder inside _MODS

ERP file replace

EasyERPMod simplify import/export process after you have exported the file you want. That means you will still rely on Ego ERP Archiver to find the file you want and export it.

For example, to replace an emblem texture file (.dds) in <steam>\F1 2021\2021_asset_groups\ui_package\texture_arrays\customisation\cstm_badge_large\emblem\emblem_chandelier.erp, extract texture file emblem_chandelier.ttf.dds to:

  • EasyERPMod
    • _MODS
      • mod_by_me name of your mod
        • 2021_asset_groups
          • ui_package
            • texture_arrays
              • customisation
                • cstm_badge_large
                  • emblem
                    • emblem_chandelier.erp this is a folder
                    • textures read below
                    • emblem_chandelier.ttf.dds

I know, I know. It looks ugly, but this allows modding ANY file in F1 game without having to worry about mistakenly replace an original file.

File types

EasyERPMod supports 3 file types, the example above shows textures folder where you put *.dds files, here are supported types and their corresponding folders:

  • Pkg Files: packages
  • Textures: textures
  • XML Files: xmls

Find & Replace text-based files

Another feature to quickly modify *.xml or *.json files is Find & Replace.

Every mod can contain a FindReplace.json file in the mod's root folder:

  • EasyERPMod
    • _MODS
      • mod_by_me
        • FindReplace.json

In this file, you can define in which ERP file and text file, a string is replaced by another.

The structure for the file is as follow:

[
  {
    "ErpFilePath": "<relative path to ERP file>",
    "Tasks": [
      {
        "FileName": "<text file name>",
        "Tasks": [
          {
            "SearchType": "<Regex or Exact>",
            "SearchFor": "<string to be replaced>",
            "ReplaceWith": "<string to replace>"
          },
          {
            ... Another SearchType, SearchFor, ReplaceWith object
          }
        ]
      },
      {
        ... Another FileName, Tasks array
      }
    ]
  },
  {
    ... Another ErpFilePath, Tasks array
  }
]

An example ERP file that modifies Ferrari car's slip stream:

[
  {
    "ErpFilePath": "2021_asset_groups\\f1_2021_vehicle_package\\teams\\ferrari\\wep\\ferrari.erp",
    "Tasks": [
      {
        "FileName": "ferrari!!!temp000.vtf.xml",
        "Tasks": [
          {
            "SearchType": "Regex",
            "SearchFor": "<m_aeroSlipStreamAirDensityScaleDrag value=\"[0-9.]+\" \\/>",
            "ReplaceWith": "<m_aeroSlipStreamAirDensityScaleDrag value=\"0.85\" />"
          }
        ]
      }
    ]
  }
]

Find & Replace notes

  • ErpFilePath is a string contains the path to an ERP file, relative to F1 game folder (remember to put double back-slash instead of one).
  • FileName is the XML or JSON file name, you can use Ego ERP Archiver to view the name. The extension (.xml, .json) is optional.
  • SearchType can be "Regex" or "Exact".
    • For "Regex", SearchFor is a string represent the expression. I recommend using RegExr to test yours. Regex can be useful if you don't know a part of the text you are looking for.
    • For "Exact", SearchFor is the exact string to look for in the file.
  • SearchFor IS case-sensitive
  • ReplaceWith is a string to replace the result of SearchFor. Note: no regex applied here -> no regex groups
Clone this wiki locally