Modding Resources, tips and tricks!

Ole Marius Myrvold

JWB 96-13
Club Staff
Premium
Hi all! :)

As it is a new game, and a slightly different genre and build that most of the games on this site, there might be some newfound tricks to make modding faster, easier and/or better.
Personally I have more than enough to even try to understand how I might be able to mod the game, but I know that many of you guys are well underway with some cracking mods!
Anyway, sharing is caring, and making each other better is only positive in the long term, who knows what me might be able to achieve with this game! It is also easier to find for new modders, or old modders finding a new game if we are able to gather the brilliant research from you guys on one place :)

Keep up the magnificent work!

@thrashersfreak @Panamera4 @Colin O Callaghan @NemanjaSipka @TheFlamingRed @Mojojo999
 
Hello All,

My specialty would be in tweaking balance, difficulty and AI - which in terms of accessibility is one of the easiest things to access. Its nice to see the game has made huge amounts available to edit. A bit of me hopes that their workshop tool will be able to edit everything nicely, but I will (as always) assume that what they give us is limited to more cosmetic changes, such as texture colours, name and small stats editors. Hoping they surprise me though.

But my knowledge of Unity is... well near zero. So...

1. Does Anyone know where we can find/if we can edit some of the references that the game uses in the asset...For example, one of the strings I would edit would include "PSG_10004941" being refered to in one string (a Name ID). At the moment, I don't even know what "PSG_10004941" does or even where it is, but it would be useful to check and see if it needs to be edited too to better recognize my change?.

2. Someone on steam has made an injecting tool which turns on the AI for the team you control - which is a great tool in terms of if you want to check what the AI is doing, as you can really monitor it. I'll see if he's willing to come here to upload it (or at least allow me to).
 
@Ole Marius Myrvold
I advise you to post a walktrough of how to mod certain things.. Not everything cause that would just be to much for basic modders or people with interest in modding.
But for example point people to the right files to edit names and stats or abilities of certain parts or even change color schemes of certain parts.

Later on you can post things like changing sponsors, changing the .GIFs .PNGs or whatever MM uses just to get people hooked on modding and create creative products. It's easy to ask things of someone but sometimes you gotta lend them a hand as well. ;-)
This is how I got to modding for Pro Cycling Manager back in the day. Through reading extensive Walkthroughs and asking experienced modders when stuck.
A good walkthrough will also limit the amount of questions in your inbox, which will save you a gread boatload of time. ;-)

P.S. I have just looked into the resources.assets file within the installation folder and I have to say that at a first glance the game looks very editable. It's just that looking up code rules is a strain on the eyes.
So a walkthrough would help people for sure. Good luck!
 
Last edited:
Here's how you can view the game's source code:
  • Download ILSpy (decompiler for .NET/Mono assemblies that Unity uses) http://ilspy.net
  • Extract. Always extract.
  • Run ILSpy then go File->Open and you want to open the DLLs in Motorsport Mananger/MM_DATA/Managed/Assembly-CSharp.dll
  • You can open the other DLLs as well, but the majority of the game is in Assembly-CSharp.dll
  • Get to reading all the interesting classes
pPxbYOz.png

Y9c8lBp.png
 
Does any one know where default bio is I change it in teams.txt but in game it still have default @thrashersfreak @Panamera4 @Colin O Callaghan and also where can i change teams logo and car design liveries to be exact? I want to put Formula E in tear 3 but dont know where to find the default ones to change ??
I was looking for these. I think they are actually image files, I think the file was described in teams.text athe the end of the line, they are files PSG_10000 and so on, I can't find them though. I searched everywhere.
 
Here's how you can view the game's source code:
  • Download ILSpy (decompiler for .NET/Mono assemblies that Unity uses) http://ilspy.net
  • Extract. Always extract.
  • Run ILSpy then go File->Open and you want to open the DLLs in Motorsport Mananger/MM_DATA/Managed/Assembly-CSharp.dll
  • You can open the other DLLs as well, but the majority of the game is in Assembly-CSharp.dll
  • Get to reading all the interesting classes
pPxbYOz.png

Y9c8lBp.png

Ah, welcome Crashed!

That looks amazing! I guess we can't edit and save any changes we would want to make in these, which is why you use the injector in turning on the AI.

I've been trying to find a way to edit the 'starting classes'. At the moment, I can outpace the AI in the race, and outpace them in development. So I wanted to make a background which replaces the default,

I.e., instead of Ex-Driver with +30 moral, I would make 'Some name' with -30 moral
Instead of Ex-engineer with -1 day per part build time, I'd make it +1 day.
Instead of -5% outgoings, I'd make it +5% more money spent,
And then probably make Unknown, to have all these debuts,

However, these stats don't appear to be in the assets (unless I've missed them, in which case anyone, a point in the right direction would be awesome). So I assume they must be in the source code. I'll have to have a look on Monday when work is finished.
 
Hey all,

I am looking for a way to add teams to the existing ten teams. I want to make some old F1 seasons and those have 11-14 teams, and not just 10. I do not want to make an incomplete mod. For example, the 1994 F1 season has 14 teams and the 1997 F1 season has 11.

It is possible to add teams, as i have already seen someone do it, but he does not seem to be willing to share how he did it.

So, in short, how can i make new teams/drivers and add them to the existing series without overwriting the teams that are already ingame?
 
That looks amazing! I guess we can't edit and save any changes we would want to make in these, which is why you use the injector in turning on the AI.

You can with another tool: https://github.com/sailro/Reflexil/releases
Download "reflexil.for.ILSpy.2.1.AIO.bin.zip" and place the DLL in the same directory as ILSpy.
It will be extremely tedious though, because you have to replace the intermediate language code manually and can't just write CSharp code. Also if I understand Unity correctly (I have zero experience with it until now) a lot of values gets serialized/saved in your save game so if you make an edit using Reflexil to a default value it may get overwritten during loading from a save. This makes just injecting an assembly superior, because you can alter values in-memory and not worry about IL or stuff.

I've been trying to find a way to edit the 'starting classes'. At the moment, I can outpace the AI in the race, and outpace them in development. So I wanted to make a background which replaces the default,

The stats for backstories are hard-coded, see image:
l1R4yTI.png


They are serialized to the savefile, so in theory you could change the savefile to change these stats. Here's a quick python utility to read savefiles, be warned these saves are like 32 megabytes of json data:thumbsdown:. You may want to use a hex editor like HxD to traverse these. You will need to pip install lz4.
Code:
import struct
import json
import lz4


with open(r"Crashed - Octane Racing.sav", "rb") as f:
    magic = struct.unpack("i", f.read(4))[0]
    version = struct.unpack("i", f.read(4))[0]

    header_insize = struct.unpack("i", f.read(4))[0]
    header_outsize = struct.unpack("i", f.read(4))[0]
    data_insize = struct.unpack("i", f.read(4))[0]
    data_outsize = struct.unpack("i", f.read(4))[0]

    header = f.read(header_insize)
    header = lz4.decompress(struct.pack("i", header_outsize) + header)
    header = json.loads(header.decode("utf-8", "ignore"))

    data = f.read(data_insize)
    data = lz4.decompress(struct.pack("i", data_outsize) + data)
    data = json.loads(data.decode("utf-8", "ignore"))


print(magic, 1932684653)
print(version)
print("header_insize", header_insize)
print("header_outsize", header_outsize)
print("data_insize", data_insize)
print("data_outsize", data_outsize)

with open("header.json", "w") as f:
    f.write(json.dumps(data))

with open("data.json", "w") as f:
    f.write(json.dumps(data))

print(data.keys())
 
I would suggest you wait a little bit, I'm as interested as you in adding real teams to the game as are many people, but there's an incomplete modding system in the source files and the devs have said they're working on it. This modding system includes teams, so instead of going through a bunch of work to hackily add in teams you can wait for the devs to finish the mod system.

Code:
namespace ModdingSystem
{
    public class BasicMod
    {
        protected const string mModelsFolderName = "Models";

        protected const string mDatabasesFolderName = "Databases";

        protected const string mLogosFolderName = "Logos";

        protected const string mPortraitsFolderName = "Portraits";

        protected const string mVehicleSubfolderName = "Vehicle";

        protected const string mCarPartsSubfolderName = "CarParts";

        protected const string mHQsSubfolderName = "HQs";

        protected const string mSponsorSubfolderName = "Sponsors";

        protected const string mTeamSubfolderName = "Teams";

        protected const string mChampionshipSubfolderName = "Championships";

        protected const string mPlayerSubfolderName = "Player";

...etc
}
 
@Ole Marius Myrvold
I advise you to post a walktrough of how to mod certain things.. Not everything cause that would just be to much for basic modders or people with interest in modding.
But for example point people to the right files to edit names and stats or abilities of certain parts or even change color schemes of certain parts.

Later on you can post things like changing sponsors, changing the .GIFs .PNGs or whatever MM uses just to get people hooked on modding and create creative products. It's easy to ask things of someone but sometimes you gotta lend them a hand as well. ;-)
This is how I got to modding for Pro Cycling Manager back in the day. Through reading extensive Walkthroughs and asking experienced modders when stuck.
A good walkthrough will also limit the amount of questions in your inbox, which will save you a gread boatload of time. ;-)

P.S. I have just looked into the resources.assets file within the installation folder and I have to say that at a first glance the game looks very editable. It's just that looking up code rules is a strain on the eyes.
So a walkthrough would help people for sure. Good luck!

This was pretty purple not perfect pink, oh... :p

Anyway, I've only helped out on a couple of rFactor mods in my life, so I am not the one to write any walkthroughs, though having them would be a great thing. The reason why I made this thread, was that there was some questions and transferring of skills in another thread here, and it would be sad to have that knowledge go "to waste" buried in an unrelated thread.
My basic editing of PCM is restricted to adding me and some buddies to the game ;P also love the Lachi's Editor, but that's for another forum :)

Anyway, it seems like this thread is already starting to get some traction with modders making eachother better, it's lovely to see :)
 
Hi, can anyone please tell me which tool do you use to extract data from .assets files ? Till now I've only managed to edit drivers and teams name but I'm stucked with car logo.
thanks
 
Hey all,

I am looking for a way to add teams to the existing ten teams. I want to make some old F1 seasons and those have 11-14 teams, and not just 10. I do not want to make an incomplete mod. For example, the 1994 F1 season has 14 teams and the 1997 F1 season has 11.

It is possible to add teams, as i have already seen someone do it, but he does not seem to be willing to share how he did it.

So, in short, how can i make new teams/drivers and add them to the existing series without overwriting the teams that are already ingame?

Just as a little heads up. I haven't looked at the coding etc. but remember that teams are relegated and promoted in this game, adding, let's say 4 teams, so you have 14, might not cause team number 14 to be relegated. Also, it might be hard to have chairman/woman accept that you are 12th, and not 9th in the teams standings.
Then it is prize money payouts etc.

With that being said, the reason why I try to learn how to mod this game, is that I would love to be able to recreate 1996, with F3000, F3 and many young drivers from that era.
 
recreate 1996, with F3000, F3 and many young drivers from that era

Likewise, and for that we need 11 teams. And i'd rather remove the promotion/relegation thing, if possible. We may be able to make our own championships, so perhaps relegation won't be that much of an issue in the end. I am certain the other things (prize money etc) will be editable as well.

I am looking for a way to do it now, though, to test how it works out.
 
Back
Top