Skip to content

Repository files navigation

Motor Town Economy Modding

This is a quick guide on how to mod the economy in Motor Town, to update the existing economy mods or create your own.

It might also serve as a general guide to modding Unreal Engine 5 game values for beginners.

Requirements

You need a windows computer, with the game installed. Knowledge of basic command line use is helpful. The windows Terminal app is recommended. If you're new to those, google is your friend.

Tools

You will need the following tools, some are installed, some are portable exes, some are on the web. Go grab them now, or I'll reference them later on.

Step 1: Information Gathering

  • The Game directory is typically at C:\Program Files (x86)\Steam\steamapps\common\Motor Town
  • The Pak directory is at C:\Program Files (x86)\Steam\steamapps\common\Motor Town\MotorTown\Content\Paks
  • The main game pak file is MotorTown-Windows.pak
  • I used the mod iDontHaveTheTime as a reference to find out what the original mod author changed to modify the economy.

Get the game's AES Key

Original Guide

In explorer, open the [Game Directory]/MotorTown\Binaries\Win64 folder, find MotorTown-Win64-Shipping.exe.

Go to AES Dumpster

Drag and drop the exe onto AES Dumpster, it will scan the binary for AES keys.

The output will look something like this: AES Dumpster Output

Copy the key it finds, It's the 0x... string.

Store it in a notepad/text document somewhere, you will need it to unpack the game's pak file.

Get the game's engine major and minor version

Find the game's exe file in [Game Directory]/MotorTown\Binaries\Win64

Right click on MotorTown-Win64-Shipping.exe, select properties.

Go to the Details tab, look for "Product version".

In my case it was 5.5.4.0, the Major version is 5, the minor version is 5. Make a note of these numbers.

Engine Version

Check the original mod's pak file

I wanted to see what the original mod changed, so I downloaded the mod pak file from Nexus Mods. Then I used repak to check what files were changed in it.

  1. Install the latest version of repak using the msi from the releases page.
  2. Open a terminal window (Windows Terminal or cmd.exe)
  3. Change directory to where you downloaded the mod pak file.
    • cd C:\path\to\downloaded\mod
  4. Run the following command to check that the mod is not encrypted.
repak info ./iDontHaveTheTime-10x-714_P.pak
  1. If it says "encryption is enabled", you need to add the AES key to the following commands using the --aes-key option. Otherwise, leave it off

  2. Next, run the following command to list the contents of the pak file.

repak [--aes-key 0x...] list ./iDontHaveTheTime-10x-714_P.pak

The output will be something like this: Repak Output

This tells us the original mod author modified the two asset files:

  • MotorTown/Content/DataAsset/Cargos.uasset
  • MotorTown/Content/DataAsset/GameResource.uasset

That's likely the files we'll need to modify to change the economy.

Dump the games usmap file

We need the usmap file to be able to open and modify the uasset files in UAssetGUI.

Install and configure UE4SS

  1. Download and extract UE4SS from https://github.com/UE4SS-RE/RE-UE4SS/tags
  • Download the latest Experimental build
  • Download the zdev version
  1. Copy the files from the zip into the Game's EXE Folder.
  • [Game Directory]\MotorTown\Binaries\Win64
  • This is the same folder where MotorTown-Win64-Shipping.exe is located.

UE4SS Files

  1. Open the config file in notepad or a text editor
  • It's the file UE4SS-settings.ini in the ue4ss folder. Settings
  1. Set the EngineMajorVersion and EngineMinorVersion to the values you found earlier.

Engine Version Settings

  1. Check that the GUI Console is configured to show on launch GUI Console Setting

  2. Save and close the config file.

Dump the usmap

  1. Run the game in the usual way, for me that was clicking Play in Steam.

  2. The UE4SS GUI console should pop up.

  3. Click the "Dumpers" menu button.

  4. In the Dump menu, click the "Dump usmap" button. Dump usmap Button

  5. Wait for it to finish

    • You will see that is has output a file in the console log.
    • The file is in the ue4ss folder.

usmap Dumped usmap Location

  1. Close the game and the UE4SS GUI console.
  2. Copy the dumped usmap file to a safe location. You will need it later.
    • It's the one that has a .usmap extension.

Clean up UE4SS files

Then, back in the games EXE folder, delete the UE4SS files. That's dwmapi.dll and the ue4ss folder.

Cleaned UE4SS Files

If you are using UE4SS for other mods in the game, go and reinstall the ue4ss files again (not the zdev version).

Step 2: Scaffolding the mod

We now have all the information we need to gather the files for our mod.

Scaffolding our mod

  1. Create a new folder somewhere to build your mod in, give it a name that ends _P, for example my_economy_mod_P.
  2. Inside that folder, we need to use the same folder structure as in the game's pak file.
    • We know that the files we are changing are in the folder MotorTown/Content/DataAsset/
    • So create that folder structure inside your mod folder.

Mod Folder Structure

Unpack the game pak file

  1. Open a terminal window (cmd.exe or Windows Terminal)
  2. Change directory to the game's pak folder.
    • You can also right click in explorer and "open terminal here"
    • typically cd [Game Directory]/MotorTown/Content/Paks
  3. Run the following command to unpack the pak file to the ./unpacked folder.
    • replacing the AES key with the one you found earlier.
repak --aes-key 0x000 unpack -o unpacked ./MotorTown-Windows.pak
  1. Wait for it to finish.

Repak Unpack Unpacked Folder

Locate the files to modify

  1. Inside the unpacked folder, navigate to MotorTown/Content/DataAsset/
  2. You should see the two asset files we need to modify, and the corresponding uexp files. Files to Modify Files to Modify 2
  3. Copy those four files to your mod folder, into the same folder structure. Files in Mod Folder

Clean up the unpacked folder

Once you have the files copied to your mod folder, you can delete the unpacked folder. It's big and unnecessary, we only needed the asset and uexp files from the game version you are trying to mod.

Step 3: Modifying the files

Original Guide

We now have the files we need to modify in our mod folder. Next we need to open them up in UAssetGUI, modify the values, and save them back out.

Import the usmap into UAssetGUI

  1. Download the latest version of UAssetGUI from atenfyr/UAssetGUI/releases.
  2. Extract the zip to a folder somewhere.
  3. Run UAssetGUI.exe
  4. In UAssetGUI, go to Utils -> Import mappings...
  5. Browse to the usmap file you dumped earlier with UE4SS, select it and click Open.

Select the USMap and Engine Version

In UAssetGUI, in the top right corner, select the usmap file you imported earlier. and set the Engine Version to the major and minor version you found earlier.

UAssetGUI USMap and Engine Version

Open and edit the GameResource.uasset file

  1. Drag the GameResource.uasset file from your mod folder into UAssetGUI.
    • Or locate it in the file-> open menu.
  2. In the left pane, expand the Exported Data until you find BalanceTable. GameResource BalanceTable
  3. Update the values as desired.
    • For example, I'm doing 20x on the earnings for all jobs, so that's Taxi, Bus, Ambulance, and rescue/recovery in here.
  4. Once done, Save the file (File -> Save).

Before: GameResource Before

After (20x all job values): GameResource After

Open and edit the Cargos.uasset file

This one is very similar, but we're modifying the reward for transporting cargo.

  1. Drag the Cargos.uasset file from your mod folder into UAssetGUI.
    • Or locate it in the file-> open menu.
  2. In the left pane, expand the Exported Data until you find Table Info.
    • This is a list of all the cargo types in the game. Cargos Table Info
  3. Go through each cargo type from top to bottom in the left hand pane, and modify the payment values as desired.
    • The fields are:
      • PaymentPer1Km - Payment per kilometer
      • BasePayment - Flat rate for the cargo
      • ManualLoadingPayment - Extra payment for manual loading/unloading, I think this only affects steel coils.
  4. Once done, Save the file (File -> Save).

Example Before: Cargos Before

Example After (20x on Grocery Bag): Cargos After

This is tedious, there's 80-odd entries, but it's straightforward, and you're almost done.

Step 4: Packaging the mod!

Original Guide

Now you have a mod folder, with the modded asset files, and likely some .bak files.

Mod Folder

  1. Delete any .bak files in your mod folder. Delete BAK Files
  2. Go get UnrealPak by FluffyQuack from here
  3. Extract the UnrealPak zip to a folder somewhere.
  4. In explorer, drag your mod folder my_economy_mod_P onto UnrealPak-With-Compression.bat
  5. A terminal window will open and run the packaging process. UnrealPak Packaging
  6. When it finishes, you will find a pak file in the same folder as your mod folder. Mod Pak File

note: you can use repak for packaging too but I found UnrealPak easier.

Step 5: Installing and testing the mod

  1. Copy the mod pak file to the game's pak folder.
    • typically [Game Directory]\MotorTown\Content\Paks Copy Mod Pak
  2. Launch the game
  3. Go drive to a warehouse
  4. Check the payment for a cargo job is expected to be 20x the normal amount.
    • There's a warehouse over the road from the starter home

In Game Cargo Payment

Resources and What next

I learned this rapidly from this list of guides https://github.com/Dmgvol/UE_Modding.

If you want to delve deeper into Unreal Engine modding, check it out!

I found the following additional resources useful:

Thanks

To the original mod author for iDontHaveTheTime, and the authors of the tools I used.

About

A quick and dirty guide to economy modding in Motor Town

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors