How to start programming mods for my summer car?

Hey, everyone, I am new too unity and C# but I have programmed in Java and even modified java based games.

How do you all start creating plugins? Like complex ones for example the coffie machine mod, or the colt 1911 mod.
 
I looked in to this like 30 minutes ago and found this:
https://github.com/piotrulos/MSCModLoader/wiki

I've worked with C# and Unity in the passed and thought I should give it a try. I've managed to find couple of mods from a user @Roman266 to check out and see how it all worked basicly. Very grateful!

Roman266 Mods:
https://github.com/GishaSeven/Plugins-for-MSC-ModLoader

Hope this helps you to get started :)

Im at this point where Im wondering how I'm supposed to access diffrent things?
Satsuma for example.. I'd have to search for it basicly:
GameObject.Find("SATSUMA(557kg, 248)")

But how do I find out that the satsuma object is named like this?
SATSUMA(557kg, 248)

And If I wanted to change, for example, the torque of the satsuma I could simply access the "Drivetrain" component and change it but it is quickly changed back...
If I change it and keep updating it in the update method I can see it switching between my information and the default information.. How can I resolve this? What keeps changing it back?

Sorry for "stealing your thread" a little but either you end up with the same questions as I have OR you actually find out how and could help me :)

Otherwise I'll create a thread of my own later :)

However, happy coding :)
 
Last edited:
Yeah, how do you know all the GameObjects? I was thinking that modding this game would be like modding a java built game you just import it to your project as a library like it is an API and then just use what you want but here I can't find anything.
 
Well.. You can use "components"/"scripts" attatched to objects in the world but you do not have full access to all files in the game (With just a mod). That's a limitation I've found...

That said, my first question was also "How to find gameobjects in scene and access diffrent things?" basicly.
My solution was to create a plugin to find all objects and then print them out in a txt file format.
Code:
GameObject[] allObjects = Object.FindObjectsOfType<GameObject>();
foreach (GameObject obj in allObjects)
{
    //Write object name to file
}
https://pastebin.com/pVqttvzH (Full source)

But it wasn't till' first today that I found the "[PLUGIN] Developer Toolkit 0.1":
http://www.racedepartment.com/downloads/plugin-developer-toolkit.17214/

That may help a lot when trying to find out where to find what and what to access :)

Currently looking in to this myself. Good plugin it seems :)

Still looking for how to use these Variables and Events though...
https://github.com/piotrulos/MSCModLoader/wiki/All-known-playmaker-Variables-and-Events
 
Last edited:
If you could, please provide some more information regarding how you are trying to access what and where?
From my experience of modding so far Im thinking you are trying to access a component since "CarDynamics" is NOT a GameObject in my list...

I found it and wrote this quickly. I have not tested it!
I can't tell you if it is a usable component or a class..
Code:
satsuma.GetComponent<CarDynamics>().methodToAccess
satsuma is my reference to the GameObject Im trying to access;
We access the component CarDynamics;
We access the variable or method IF it is publicly available;

Could you please try posting a bit of code next time?

Cheers ~N
 
guys a warning the game uses PlayMaker, which for moders complicates things a bit. satsuma use playmaker for get component use
satsuma.GetComponent<PlayMakerFSM>().FsmVariables.FindFsmBool("Range").Value
for example if you need modify to true or false gear range , but satsuma uses more than 1 component plamakerfsm you should first access the gear component and for that it is best to access the name of the playmakerfsm as for example ...
var satsuma = GameObject.Find("SATSUMA(557kg, 248)").gameobject;
var satsumacomponents = satsuma.GetComponents<PlayMakerFSM>();
foreach(var satsumacomponent in satsumacomponents)
{
if(satsumacomponent.name == "GearIndicator")
{
var range = satsumacomponent.FsmVariables.FindFsmBool("Range").Value;
}
}
I hope it will help! :)
 
in my IDE Visual Studio, it keeps telling me PlayMakerFSM could not be found and it asks me to check if I set it as a reference or a library. Lol I am a complete noob with C#.
click in reference and add playmaker same with mscloader for not error in visual studio , and for assets use same version unity with game my summer car use 5.0.0f4
 
Is there like A Teamspeak or something for modders? That would be really cool if someone made one and it had a channel specific for MSC. Like I feel like that is why people are scared of programming because there is not that much support. If it would not be for the Youtuber TheChernoProject I would have never got into computer programming as a hobby! :D
 
So now I am having the issue with this code that i have been playing around with:

PlayMakerFSM[] satsumacomponents;
Satsuma = GameObject.Find("SATSUMA(557kg, 248)");
satsumacomponents = Satsuma.GetComponents<PlayMakerFSM>();


for (int i = 0; i < satsumacomponents.Length; i++)
{

if (satsumacomponents.name == "GearIndicator")
{

ModConsole.Print("Component found!");

}
else
{
ModConsole.Print(satsumacomponents.name);
}

}


It just keeps printing out this: SATSUMA(557kg, 248

So it can't find anything else other then that what am I doing wrong?
 

Latest News

How long have you been simracing

  • < 1 year

    Votes: 350 15.6%
  • < 2 years

    Votes: 243 10.8%
  • < 3 years

    Votes: 241 10.7%
  • < 4 years

    Votes: 177 7.9%
  • < 5 years

    Votes: 299 13.3%
  • < 10 years

    Votes: 258 11.5%
  • < 15 years

    Votes: 165 7.3%
  • < 20 years

    Votes: 125 5.6%
  • < 25 years

    Votes: 99 4.4%
  • Ok, I am a dinosaur

    Votes: 291 12.9%
Back
Top