My Summer Car offers a unique and deeply engaging experience, and for those looking to expand upon it, modding is a fantastic avenue. If you’re eager to dive into the world of My Summer Car modding but feel unsure where to begin, especially when it comes to using the right tools, this guide is for you. We’ll break down the essential tools and provide a step-by-step introduction on how to use them to create your own modifications for My Summer Car.
Essential Tools for My Summer Car Modding
To effectively mod My Summer Car, you’ll need a few key tools in your arsenal. These tools will allow you to write code, load mods into the game, and inspect the game’s inner workings. Let’s explore each of them:
Visual Studio (IDE)
First and foremost, you’ll need a robust Integrated Development Environment (IDE). Visual Studio Community is a popular and free choice, widely used in the modding community. It provides a comprehensive environment for writing and managing your code.
Visual Studio offers features like code completion, debugging, and project management, which are invaluable for mod development.
MSCLoader (Mod Loader)
MSCLoader is the backbone of My Summer Car modding. Created by piotrulos, it’s a crucial tool that allows you to load your custom mods into the game. Think of it as the bridge between your creations and My Summer Car itself.
The MSCLoader Wiki is your go-to resource for understanding how to install and use MSCLoader. It’s essential reading to get your modding environment set up correctly.
Developer Toolkit (In-Game Object Inspector)
The Developer Toolkit plugin is a game-changer for modders. Created by zamp, this toolkit allows you to inspect game objects directly within My Summer Car. This means you can see the properties, components, and hierarchies of objects in real-time, which is incredibly helpful for understanding how the game world is structured and identifying what you need to modify.
With the Developer Toolkit, you no longer need to guess object names or component structures – you can see them firsthand within the game.
Assembly-CSharp.dll (Reference File)
For more advanced modding, especially when dealing with game components like the drivetrain, you’ll need a reference to the Assembly-CSharp.dll
file. This file contains the game’s code and allows your mods to interact with it.
You can find this file in your My Summer Car installation directory, typically located at: SteamsteamappscommonMy Summer Carmysummercar_DataManagedAssembly-CSharp.dll
.
Referencing this file in your Visual Studio project is crucial for accessing and manipulating game functionalities.
Getting Started: Setting Up Your Modding Environment
Now that you have your tools, let’s get your modding environment ready. Follow these steps to set up your workspace:
-
Install Visual Studio: Download and install Visual Studio Community from the provided link. Choose the Community edition for free access to all essential features.
-
Install MSCLoader: Follow the installation instructions on the MSCLoader Wiki. This typically involves placing the MSCLoader files into your My Summer Car game directory. Make sure to choose either the x86 or x64 version of Unity that matches your system. The wiki provides comprehensive instructions for both player and developer setup, which is highly recommended to read thoroughly.
-
Download and Install Developer Toolkit: Download the Developer Toolkit plugin and follow the installation instructions provided on the download page or within the plugin’s documentation. Usually, this involves placing the plugin DLL file into the
Mods
folder within your My Summer Car documents directory (DocumentsMySummerCarMods
). -
Create a New Mod Project: Utilize a mod project template to streamline the initial setup. A popular template is provided by piotrulos, the creator of MSCLoader. This template will give you a basic project structure ready for modding.
-
Reference Assembly-CSharp.dll (If Needed): If your mod requires interaction with game components (like drivetrain modifications), you’ll need to add a reference to
Assembly-CSharp.dll
in your Visual Studio project. In Visual Studio, in your project, go to “Dependencies” or “References,” right-click, and select “Add Reference.” Browse to theAssembly-CSharp.dll
file in your My Summer Car game directory and add it.
With these steps completed, you have a functional modding environment ready for creating and testing your My Summer Car mods.
Basic Modding Techniques: Using Tools to Make Changes
Now that your environment is set up, let’s explore some fundamental modding techniques using the tools we’ve discussed.
Accessing Game Objects (GameObject.Find)
In Unity, everything in the game world is a GameObject. To modify something, you first need to access its GameObject. You can do this using GameObject.Find()
.
For example, to get a reference to the Satsuma car, you can use the following C# code:
GameObject satsuma; // Declaring a GameObject variable
satsuma = GameObject.Find("SATSUMA(557kg, 248)"); // Finding the GameObject by its name
Image showing the Build Events tab in Visual Studio, highlighting the Post-Build Event Command Line where the copy command is entered.
This code snippet finds the GameObject named “SATSUMA(557kg, 248)” in the game scene and assigns it to the satsuma
variable. You can find the names of GameObjects using the Developer Toolkit in-game.
Modifying Object Properties (Transforms, Components)
Once you have a GameObject reference, you can modify its properties, such as its position, rotation, and scale (using its Transform component), or access other components attached to it.
To access the Transform component and modify the Satsuma’s position:
satsuma.transform.position = new Vector3(10f, 0f, 10f); // Setting a new position
To access a specific component, like the drivetrain
component on Satsuma:
drivetrain satsumaDriveTrain;
satsumaDriveTrain = satsuma.GetComponent<drivetrain>();
Now you can access and modify variables within the satsumaDriveTrain
component. Remember that you may need to reference Assembly-CSharp.dll
to access game-specific components like drivetrain
.
Working with PlayMaker FSM (Singleton Variables)
My Summer Car utilizes PlayMaker Finite State Machines (FSM) for game logic. To access global variables managed by PlayMaker, you can use PlayMakerGlobals
.
For example, to access player stats like fatigue, thirst, hunger, and stress:
float _fatigue, _thirst, _hunger, _stress;
string _carCurrent;
foreach (var flt in PlayMakerGlobals.Instance.Variables.FloatVariables)
{
switch (flt.Name)
{
case "PlayerCurrentVehicle": // This is actually a string
_carCurrent = flt.Value.ToString();
break;
case "PlayerFatigue":
_fatigue = flt.Value;
break;
case "PlayerThirst":
_thirst = flt.Value;
break;
case "PlayerHunger":
_hunger = flt.Value;
break;
case "PlayerStress":
_stress = flt.Value;
break;
}
}
This code iterates through PlayMaker’s global float variables and retrieves values based on their names. You can find a list of known PlayMaker variables and events on the MSCLoader Wiki.
Detecting Player State (Vehicle)
To detect if the player is currently driving a vehicle, you can check the “PlayerCurrentVehicle” PlayMaker global string variable:
if (PlayMakerGlobals.Instance.Variables.FindFsmString("PlayerCurrentVehicle").Value != "")
{
// Player is in drive mode
}
This code snippet checks if the “PlayerCurrentVehicle” string is not empty, indicating that the player is currently in a vehicle.
Importing Custom Assets (AssetBundles)
To add custom models or assets to My Summer Car, you can use AssetBundles. First, create your assets in Unity, then build them into an AssetBundle. In your mod, you can load and instantiate these assets:
AssetBundle assets;
GameObject turbo;
assets = LoadAssets.LoadBundle(this, "turbo.unity3d"); // Load the AssetBundle
turbo = assets.LoadAsset("turbo_prefab.prefab") as GameObject; // Load a specific prefab
assets.Unload(false); // Unload the AssetBundle to free memory
turbo = GameObject.Instantiate(turbo); // Instantiate the prefab in the game world
// Optional: Set parent, position, rotation, and scale
turbo.transform.SetParent(GameObject.Find("satsu").transform, false);
turbo.transform.localPosition = new Vector3(0.3f, 0.16f, 1.02f);
turbo.transform.localRotation = Quaternion.Euler(0f, 0f, 0f);
turbo.transform.localScale = new Vector3(0.0005f, 0.0005f, 0.0005f);
This code demonstrates how to load an AssetBundle, instantiate a prefab from it, and optionally set its parent, position, rotation, and scale.
Finding the Player Object
Finding the player GameObject can be slightly different because it spawns later in the game loading process. A reliable way to find the player is using GameObject.Find("PLAYER")
within the OnLoad
method of your mod, which is called after the game is fully loaded:
GameObject player = GameObject.Find("PLAYER"); // Finding the player GameObject
Workflow Tips and Avoiding Common Annoyances
Modding can be iterative, and there are a few tips to streamline your workflow and reduce frustration:
-
Automate Mod Copying: Manually copying your mod DLL to the
Mods
folder every time you build can become tedious. You can automate this process in Visual Studio using Post-Build Events.In your project properties, go to “Build Events” and add the following command to “Post-Build Event Command line”:
copy /Y "$(TargetDir)$(TargetName).dll" "C:UsersYOURUSERNAMEDocumentsMySummerCarMods"
Remember to replace
"C:UsersYOURUSERNAMEDocumentsMySummerCarMods"
with the actual path to your My Summer CarMods
folder.This command will automatically copy your mod DLL to the
Mods
folder after each successful build in Visual Studio. -
Game Restarts: Unfortunately, there is currently no way to avoid restarting the game to test your mods. This is a limitation of the current modding environment.
-
Dealing with Feedback: If you decide to share your mods, be prepared for feedback. Some users might encounter issues due to incorrect installation or other factors. Focus on constructive feedback and ignore negativity. If you enjoy modding, keep creating!
Conclusion
This guide provides a starting point for using tools to mod My Summer Car. By utilizing Visual Studio, MSCLoader, and the Developer Toolkit, you can begin to explore and modify the game in exciting ways. Remember to consult the MSCLoader Wiki and other resources for more in-depth information and advanced techniques. Dive in, experiment, and have fun creating your own unique additions to the world of My Summer Car!
Useful Links
- MSCLoader Wiki: https://github.com/piotrulos/MSCModLoader/wiki
- PlayMaker FSM Variables and Events: https://github.com/piotrulos/MSCModLoader/wiki/All-known-playmaker-Variables-and-Events
- zamp’s MSC Mods (Developer Toolkit Creator): https://github.com/zamp/MSC-Mods
- Roman266’s Plugins for MSC ModLoader: https://github.com/GishaSeven/Plugins-for-MSC-ModLoader
- tommojphillips’ ModAPI Wiki: https://github.com/tommojphillips/ModAPI/wiki
- tommojphillips’ AttachObjectDemo: https://github.com/tommojphillips/AttachObjectDemo