Hey, sorry for not clearing this up the the video, but if your game doesn’t have inputlegacymodule, it means it’s already included in the normal unityenginecoremodule!
I’m just going to elaborate on this a bit more. Old unity versions (I think pre 2020) did not have an inputlegacymodule. A good way to see what version your game is is to open up the properties of the game’s exe file and look for a version number! Hope this helps
People like you who make videos like this just walking through a process that might seem very simple to an expert but is actually filled with a mountain of things immensely difficult to research are _genuinely_ MVPs. So, so, so much worth comes out of these things, and so many people will find even just a minor hobby they want to start that much more surmountable because of you. Thank you.
Suggestion to create virtual link to mod file. So Game-Mods folder can be empty, real file will be located in your scripting mods directory. Example: mklink "C:\SteamGame\Mods\mod.dll" "C:\MyMods\Game\bin\Release\mod.dll"
When I open the game, the melonloader directory gets deleted (empty). Is there a way to bypass the launcher anticheat or something? I'm not sure if read-mode only is recommended
How do you edit existing code in the game? For example in a game let’s say if I pull a leaver it will open a door but I want to change the existing code to not open a door and do something else
make a new script, do: public class [ScriptName] : LeverScript and then you can override functions if they are public, for example: public override void ActivateLever()
Installed. Told it the game. Farthest frontier. Went to nexus. had to manual DL. did search for game dir. no "mod" folder. the only thing melon wants to do is install and reinstall. Direction's unclear tongue stuck in ceiling fan. help?
Is there any way i can get into contact with you, ive been struggling with tutorial after tutorial , this one by far is the easiest to follow and understand plus got me the most results , the only thing that's going on is after the console reads successful loaded mod , it doesn't do what its supposed to , (close game on F key ) il pay you to set this same plugin up for the game im trying to mod so i can take care of the rest . i just need a plug in to my game that is successfully reading my code.
Hey great vid, but i have one problem. when I build, I get the following error: "The type 'object' is defined in an assembly that is not referenced. You must add a reference to assembly 'Il2Cppmscorlib, version=4.0.0.0, culture=neutral, PublicKeyToken=null'". Do you have any ideas on how to fix it?
Good tutorial bro, but I have a problem: When I create a project and add a reference (DLL), the Visual Studio crashes and closes. Can you give me a solution? I correctly installed the program and its net framework, those would not be the problem.
@@LucaDaBooka hey man. Found this for you. Its probably a lot easier/more helpful than melonloader and my video. ruclips.net/video/-FkgzHVxwQM/видео.html
Is it possible to replace the existing code with this? I've made a mod for Zompiercer that improves train movement. I simply opened the dll file with dnSpy, changed the code and saved. But it's not very handy to share with people. I want to do it as a mod.
Hi, i don't know if you're still reading comments here or if someone else can answer me. You mention you could make the character jump etc, but how would one do that? How can i use the functions that are already in the game without knowing where to find them or how they're called? Help would be appreciated
You can find what they’re called with unity explorer or dnspy. Once you have the name of the class and the script they’re in, you need to reference your assemblycsharp.DLL file found in your games managed folder. Once you’ve done that, you can call any script inside the game, such as the jump script
If I want to share a mod made with MelonLoader, does that person then have to use MelonLoader? I'm making a mod for WorldBox which many people use NCMS for, but I found NCMS to be too confusing. People also use BepInEx
Can you help me.. I can't do basic rotation around specific axis. I used: float rotationAmount = Mathf.Lerp(0, -4.0f, Time.deltaTime * 0.6f); boat.transform.Rotate(rotationAmount, 0, 0); But every time I move farther away from starting point, my boat nose go UP. I just need roll to left or right, on X axis... But I can't solve this mystery. chatGPT from my view is 10yo kid who can't provide correct answer, so I'm stuck.
Is there any way to replace models and copy/paste code or something without any knowledge? I made models/reskins and would like to just implement different looking things with the same function/code
is there a way to use custom server through melon loader? i am able to play it by putting the host file with the ip on my computer but when i open the game with melonloader it does not use the custom server.
i have a certificate downloaded and the server in the hosts file in my pc which is how they connect to the cutom server (if this helps someone answer my question)
its possible! you'd need to patch into the movement method to see what happens when the keys are pressed but you'd be able to replicate it within your script
What if i want to override classes of the game? Can i only add my own stuff, or is there a way to access the sourcecode of the game and change anything i like? Unity is C#, so i guess it is all just interpreted stuff, so is it possible or does unitiy prevent it somehow? What if i wanted to change not just code but also assets, like changing the original animation of a skill of an actor. Something like that.
yeah this video is pretty old and I've learned a lot more since then. You can patch into methods and override the code thats already inside. You can look on melonwiki for that. To add game assets you can use unity asset bundles and import them into the game. I've never tried with animations but Im sure it would work if you do it all right.
@@hazzyjc Thanks for that, yeah i really hope i will find enough time. I actually want to implement some changes which might are tricky. I would like to override/implement an equivalent to blend spaces of unreal engine into a unity game i like. It has crappy animations and if i could use unity blend trees, it would feel much more fluent to play. Im pretty sure, the devs didn't use it. And i would also like to change some skills of the game, which i don't like. And at last, i would like to improve the AI of most monsters. Yeah it is actually a lot to do, so i will check, if it is worth the effort
Any script related scene management will work, but I'm not sure what you mean by "change scenes in the game". If you mean that literally, you can indeed change which scene the game is in with "using UnityEngine.SceneManagement;" :)
@@ancolia8772 Yes! You can! Sorry for the delay, but this is actually something I recently figured out how to do. If you create a gameobject like this: "public gameObject myObject = GameObject.Find("The name of the object in the scene");" You can directly access any gameobject in the scene, including UI elements!
@@hazzyjc when i choose a game and press "install" button, instead of doing stuff it need to(like adding Mods folder or something like that) it gets me an error on my screen. It has a lot of text on it, and at the bottom of the text it says:"HKLM/Software\Microsoft\Fusion!EnableLog (DWORD)", what do i need to do with this?
Hello, does melon loader work with the newer unity versions? Im really desperate since I deleted my assets folder instead of the library folder lol, any response would be nice
yeah for il2cpp games (games that don't have assembly files) use il2cpp dumper, though because of the way the code has been compiled, you'll find most of it unreadable so to find out what things are you'll have to spend time messing around alot
Hey, awesome video! Are you also planning on making a video about loading custom assets using asset bundles? i tried to mess around with it a bit but couldnt get it to work in the standalone build, only in the editor...
Useless tutorial sadly, if you dont explain how to install Class Library the information can't be found. It's such a niche thing, and it cant be found in the visual studio installer.
A base install of .NET and visual studio includes the class library solution option. This isn't a "How to install .NET" tutorial, so look for one of those before you watch this one as I said at the start of the video
oof this game doesn't have inputlegacymodule, but I'll just try with the unity engine input dll and see if that works
Hey, sorry for not clearing this up the the video, but if your game doesn’t have inputlegacymodule, it means it’s already included in the normal unityenginecoremodule!
I’m just going to elaborate on this a bit more. Old unity versions (I think pre 2020) did not have an inputlegacymodule. A good way to see what version your game is is to open up the properties of the game’s exe file and look for a version number! Hope this helps
People like you who make videos like this just walking through a process that might seem very simple to an expert but is actually filled with a mountain of things immensely difficult to research are _genuinely_ MVPs. So, so, so much worth comes out of these things, and so many people will find even just a minor hobby they want to start that much more surmountable because of you. Thank you.
Amazing - Just what I was looking for. Thank you!
Thank you so much been looken for a video to help been wanting to do this for a while🙏
It'd be great if you did a tutorial on replacing/overriding methods
im trying to mod slime rancher 2 but i can't find the unity engine.dll anybodt knows why
same
Very good tutorial but when I try to load up the game it said "Internal Failure, Failed to load original dll". Does anyone know how to fix it?
Suggestion to create virtual link to mod file.
So Game-Mods folder can be empty, real file will be located in your scripting mods directory.
Example:
mklink "C:\SteamGame\Mods\mod.dll" "C:\MyMods\Game\bin\Release\mod.dll"
Does this work for il2cpp also?
yes
I cant find that class library thing on new project
does this also apply when making mods for lemonloader???
When I open the game, the melonloader directory gets deleted (empty). Is there a way to bypass the launcher anticheat or something? I'm not sure if read-mode only is recommended
How do you edit existing code in the game? For example in a game let’s say if I pull a leaver it will open a door but I want to change the existing code to not open a door and do something else
make a new script, do: public class [ScriptName] : LeverScript
and then you can override functions if they are public, for example:
public override void ActivateLever()
oh btw once you do that, make sure to delete the lever script from the object and add the new script you made
Installed. Told it the game. Farthest frontier. Went to nexus. had to manual DL. did search for game dir. no "mod" folder. the only thing melon wants to do is install and reinstall. Direction's unclear tongue stuck in ceiling fan. help?
how to make mod manager GUI? like checkbox or button for activating unlimited health or ammo ....
Great question! I’ve actually done this for a few games already, if you want a tutorial I’ll be happy to provide
@@hazzyjc yes , make a tutorial please
What do you do if it says "invalid unity game selected?
I need to find a video on making modded maps either making a whole new map or editing an original map scene
Is it possible to mod the code of mobile games with IL2CPP and code it in C# way?
You can mod IL2CPP games with this method, but mobile games I’m not sure of
Mobile is still being worked on, il2cpp is supported
I succesfully managed to install and run mods. My problem is that the game won't save any progress asap I close the game. Anyone know what to do?
late reply but you could always try writing your own save method. then you'd just load and save the extra mod data whenever you want
Standalone Quest Mods for Gorilla Tag finally return under my grasp. 😹😹
no they wont
when i install melonloader into the game it doesnt start up, it starts up normally without melonloader, help please
Is there any way i can get into contact with you, ive been struggling with tutorial after tutorial , this one by far is the easiest to follow and understand plus got me the most results , the only thing that's going on is after the console reads successful loaded mod , it doesn't do what its supposed to , (close game on F key ) il pay you to set this same plugin up for the game im trying to mod so i can take care of the rest . i just need a plug in to my game that is successfully reading my code.
The UnityEngine.*.dll files are not being generated. Any idea why?
my question too
check in the melon loader file then managed in melon loader file that's where mine was hope i helped.
when i search for class library i dont have any of those. how do i get them?
You have to add it via Visual studio installer
Hey, great tutorial! One question though, is it possible to see the game's code to know how to like, for example, add stuff to the map?
Yup! Look up “how to mod unity games” on yt and the first tutorial should be on how to do that! Make sure there one that you’re watching uses dnspy :)
"Failed to load Melon Assembly" FileLoadException problems, I may have missed some part of the tutorial sorry
1:23 what happens if you can’t find the EXE file?
Hey great vid, but i have one problem. when I build, I get the following error: "The type 'object' is defined in an assembly that is not referenced. You must add a reference to assembly 'Il2Cppmscorlib, version=4.0.0.0, culture=neutral, PublicKeyToken=null'". Do you have any ideas on how to fix it?
You need to add a reference for II2Cppmscorlib.dll and UnhollowerBaseLib.dll .
Good tutorial bro, but I have a problem: When I create a project and add a reference (DLL), the Visual Studio crashes and closes. Can you give me a solution? I correctly installed the program and its net framework, those would not be the problem.
How come when I put in the Solution next to "using" I still have the red line under the (typeof(TestMod),? At 6:55
is "TestMod" the name of your class? if not then thats why. It needs to be set to the name of your class
@@hazzyjc how do i find the name of my class?
Im trying to make a mod for bloons td6
@@LucaDaBooka its whatever you named your class...
@@LucaDaBooka hey man. Found this for you. Its probably a lot easier/more helpful than melonloader and my video. ruclips.net/video/-FkgzHVxwQM/видео.html
Is it possible to replace the existing code with this?
I've made a mod for Zompiercer that improves train movement. I simply opened the dll file with dnSpy, changed the code and saved. But it's not very handy to share with people. I want to do it as a mod.
you can patch into in-game scripts if you reference AssebmlyCsharp.dll in the games files. Theres documentation on the melonloader website
@@hazzyjc, thanks! I'll take a look.
@@hazzyjc hey can you help me it says its dangerous idk
It doesn't work for me. The version is different :(
Melon loader version 5.7 works
Hi, i don't know if you're still reading comments here or if someone else can answer me.
You mention you could make the character jump etc, but how would one do that?
How can i use the functions that are already in the game without knowing where to find them or how they're called?
Help would be appreciated
You can find what they’re called with unity explorer or dnspy. Once you have the name of the class and the script they’re in, you need to reference your assemblycsharp.DLL file found in your games managed folder. Once you’ve done that, you can call any script inside the game, such as the jump script
@@hazzyjc cool, thank you! My goal is to add keyboard support to Super Auto Pets, in case you know the game! ^^
i'm trying to put the sonic mod in spark so what do I type or add for that?
If I want to share a mod made with MelonLoader, does that person then have to use MelonLoader? I'm making a mod for WorldBox which many people use NCMS for, but I found NCMS to be too confusing. People also use BepInEx
my game doesnt have managed folder
Can you help me.. I can't do basic rotation around specific axis.
I used:
float rotationAmount = Mathf.Lerp(0, -4.0f, Time.deltaTime * 0.6f);
boat.transform.Rotate(rotationAmount, 0, 0);
But every time I move farther away from starting point, my boat nose go UP.
I just need roll to left or right, on X axis... But I can't solve this mystery.
chatGPT from my view is 10yo kid who can't provide correct answer, so I'm stuck.
Hi, what if i want to change the current coins in a game, how ca i do that? (offline game)
Weakly asking you a little white question, why did I report an error according to the tutorial, Compiler Error CS0118
I will use bepinex but is it going to be the same references that are going to be used?
Idk
mine is Il2Cpp and doesn't have references
So for Car Mechanic 2021, I’d need Visual Studio and .Net also?
sure
If I want to share the mod, will they also need MelonLoader? I'm trying to mod WorldBox.
Is there any way to replace models and copy/paste code or something without any knowledge? I made models/reskins and would like to just implement different looking things with the same function/code
is there a way to use custom server through melon loader? i am able to play it by putting the host file with the ip on my computer but when i open the game with melonloader it does not use the custom server.
Im not sure what you mean
i have a certificate downloaded and the server in the hosts file in my pc which is how they connect to the cutom server (if this helps someone answer my question)
can u help me to find managed folder of muse dash pls, that game is not have that folder
That means it’s an IL2CPP game. You can ask in the melonloader discord for help because idk how to mod those types of games
@@hazzyjc ty bro
is it possible to add remappable keybinds as a mod in a game? like instead of playing with arrow keys i can mod it so i can play with WASD
its possible! you'd need to patch into the movement method to see what happens when the keys are pressed but you'd be able to replicate it within your script
@@hazzyjc wow what a fast response thank you i might try tomorow.
@@hazzyjc and how exactly should he patch into the movement method or any other methods just in case? and tnx for the great tutorial
@@farianderson168 I have another tutorial on my page that covers patching
@@hazzyjc do you mean the part2 of UNITY MODDING WITH MELONLOADER ?
When I run MelonLoader my antivirus reports a virus, is there a virus or is it a false positive?
false positive
Don't use any version past 6.1 ML
What if i want to override classes of the game? Can i only add my own stuff, or is there a way to access the sourcecode of the game and change anything i like?
Unity is C#, so i guess it is all just interpreted stuff, so is it possible or does unitiy prevent it somehow?
What if i wanted to change not just code but also assets, like changing the original animation of a skill of an actor. Something like that.
yeah this video is pretty old and I've learned a lot more since then. You can patch into methods and override the code thats already inside. You can look on melonwiki for that. To add game assets you can use unity asset bundles and import them into the game. I've never tried with animations but Im sure it would work if you do it all right.
@@hazzyjc Thanks for that, yeah i really hope i will find enough time. I actually want to implement some changes which might are tricky. I would like to override/implement an equivalent to blend spaces of unreal engine into a unity game i like. It has crappy animations and if i could use unity blend trees, it would feel much more fluent to play. Im pretty sure, the devs didn't use it. And i would also like to change some skills of the game, which i don't like. And at last, i would like to improve the AI of most monsters. Yeah it is actually a lot to do, so i will check, if it is worth the effort
Hey, really nice tutorial, i only have found a problem. I can't find the modloader.dll, do you know why? please, im really interested
I found out it was for the version of melonloader. yei
@@Ӝ̵̨̄ЖЗмЖЗ̵Ӝ̵̨̄ where u find it out?
Oh alright! just one other question. Does melon loader allow you to change other things other than just the scripts such as the scenes in the game?
Any script related scene management will work, but I'm not sure what you mean by "change scenes in the game". If you mean that literally, you can indeed change which scene the game is in with "using UnityEngine.SceneManagement;" :)
@@hazzyjc sorry for confusion, I meant if I could edit the UI and other parts of scenes
@@ancolia8772 Yes! You can! Sorry for the delay, but this is actually something I recently figured out how to do. If you create a gameobject like this: "public gameObject myObject = GameObject.Find("The name of the object in the scene");" You can directly access any gameobject in the scene, including UI elements!
if latest doesnt works(game does not open) just downgrade one version.
How to fix it does an error when I install a game:hklm software microsoft fusion! Enable log what to do
English please
@@hazzyjc when i choose a game and press "install" button, instead of doing stuff it need to(like adding Mods folder or something like that) it gets me an error on my screen. It has a lot of text on it, and at the bottom of the text it says:"HKLM/Software\Microsoft\Fusion!EnableLog (DWORD)", what do i need to do with this?
@@ivqqnn you should ask in the melonloader discord, I have no clue
@@hazzyjc ill try, i want a mod soo bad for 4 days already but always this error i was reinstalling too
my game dosent have a maged file what do i do
what can i do if my game doesn't both unity .dll's? game is farthest frontier
Look at the pinned comment
Can i use melonloader on modding Android apks.
waw this is cool for Wasteland 3
Hello, does melon loader work with the newer unity versions? Im really desperate since I deleted my assets folder instead of the library folder lol, any response would be nice
Everything up to the 2021 versions should work!
Can you make a tutorial ´for with vs code
hey dude i cant seem to fing the managed folders or the unityengine file
The game might be IL2 you can find these files in the melonloader folder
I saw 2 in the melon loader but i didnt know which to pick because it didn’t say “unityengine” it had other stuff after it
appreciate it rlly!
Is there a way to modify or have access to the source code of a unity game? I tried using dnSpy but the file containing source code can't be opened.
Use Il2cpp Dumper
yeah for il2cpp games (games that don't have assembly files) use il2cpp dumper, though because of the way the code has been compiled, you'll find most of it unreadable so to find out what things are you'll have to spend time messing around alot
Hey, awesome video! Are you also planning on making a video about loading custom assets using asset bundles? i tried to mess around with it a bit but couldnt get it to work in the standalone build, only in the editor...
How do I add like objects?
how to get the function that makes the gravity low to use it in the mod?
not a function but you can do Physics.gravity = new Vector3(0, 0 0); in an OnSceneWasLoaded
hey dude do you know how i can switch from melon loader dll to a normal dll
they're normal dll files
And best way to extract functions or assets from game?
assetripper
can i use melon loader to swap/replace any mesh in game?
Not that im aware of. But you can import your own custom models
i can change any sound file? i using fall guys game its unity game
You cannot mod fall guys as it is a multiplayer game
@@hazzyjc i see i trying tô find The fall guys music to change but i cannot and its hard to change for me
it says its not downloaded by too much people and its dangerous
It works with unity webgl?
how about vrchat why nobody made tutorial for vrchat
I dont play vrchat ask in the melonloader discord they'll help you
@@hazzyjc okay
This is for pc games only, not all unity games
well yeah no shit
@@hazzyjc the title of the video says "how to mod ANY unity game"
works for il2cpp?
yeah but you may need to tweak it a bit I'm not sure
Can I use net.sdk?
using a dot net SDK should work
this is hard i want it for roblox
how mod unity apk game
You can’t, at least with this method
God so many steps as I just want to mod Signlis for the camera perspective
Just gave me a bunch of errors
Where are the errors?
Useless tutorial sadly, if you dont explain how to install Class Library the information can't be found. It's such a niche thing, and it cant be found in the visual studio installer.
@@Mrstefaaaaaan You don’t have .NET installed
@@hazzyjc Of course I have .NET installed, it has absolutely nothing to do with the problem.
A base install of .NET and visual studio includes the class library solution option. This isn't a "How to install .NET" tutorial, so look for one of those before you watch this one as I said at the start of the video
@@hazzyjc Well I have Visual Studio 2015/2017/2019/2022 and .NET 8, and it's not there!
tutorial for stumble guys???
cant/shouldt be modding online games