-
Notifications
You must be signed in to change notification settings - Fork 0
How to make a mod
- Start
EasyERPExplorer.exe
and you will see 2 windows, "Game Directory Explorer" and "Mods Explorer". - Click on "Create new mod" in "Mods Explorer" window
- Type in the name of the new mod
- 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:
- Click "Set F1 Game Folder". Paste the path of F1 game and click "Save"
only need to do once
- Expand folders and find an ERP file you want to mod
- Click on the file. A popup will ask to confirm.
- 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!
Follow the following steps to create/edit a task (at least read step 11):
- Select a mod from "Mods Explorer" window
- Click on "Edit Find&Replace" button
- A new window will pop up, showing a list of find & replace tasks. Click "Add ERP file" to create your first task.
- 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) - Click on the the entry to expand further options
- 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
- Click on the new entry to expand further options
- Click on "Add task" button. A window where you can define what to look for and replace with will show up.
- To understand what to put in these boxes,
read below
for notes on each input. - Click save to add new entry.
- IMPORTANT Click "Save to File" button on top to save all your work. IF NOT ALL ENTRIES WILL NOT BE SAVED
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
- _MODS
To create a new mod, simply create a folder inside _MODS
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
- emblem_chandelier.erp
- emblem
- cstm_badge_large
- customisation
- texture_arrays
- ui_package
- 2021_asset_groups
- mod_by_me
- _MODS
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.
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
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
- mod_by_me
- _MODS
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\" />"
}
]
}
]
}
]
-
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.
- For "Regex",
-
SearchFor
IS case-sensitive -
ReplaceWith
is a string to replace the result ofSearchFor
. Note: no regex applied here -> no regex groups