Car Mechanic Simulator 2018

Car Mechanic Simulator 2018

View Stats:
MinSin Apr 8, 2018 @ 12:47pm
Repair All Parts (incl. MODDED PARTS) | 100% Repair Chance, Any Condition
I made these modifications by modifying the DLL file with a program called dnSpy

Game version 1.5.25.4

Updated 02.03.2019


What I did was remove the condition "GameInventory.Get().GetItemProperty(item.ID).RepairGroup != 0" this only makes unrepairable parts repairable, windows, exhaust, pistons, etc. the part still needs to be over 15%, not a License Plate and you need the perk for body parts.
Download[www.dropbox.com]


for the 100% all condition I removed all conditions but "item.Condition < condition2" this checks that the part is not at 100% already
and for the 100% chance I changed the repair function "RepairItemOnRepairTable()" to just set the item to 100%, I changed "float num2 = Repair(itemOnRepairTable.Condition);" to "float num2 = 1f;".
This version makes all repair perks obsolete
Download[www.dropbox.com]

Installation:
Download the file you want. Drop it into 'Car Mechanic Simulator 2018\cms2018_Data\Managed' folder, overwrite the original one. Make sure to backup the original file.

Disclaimer:
This mod changes core game files and might break unforeseen things in the game.
If there is a game update the file will most likely be replaced and using an outdated mod like this will most likely break your game.
If you "need" this mod to play the game I suggest disabling automated updates and update the game after the mod is updated.

Credit:
This is a continuation of nray's project with only slight changes, I do not think it would be possible for me to make this mod if he did not point the way.
Link to nray's thread
This similar mod for CMS15.
This guy for the original 100% chance mod, and for pointing nray in the right direction.

I cannot make any promises of long term maintaining this project, but I will keep an eye on the thread even when I’m not playing, so if there is and update please do post it here.
Last edited by MinSin; Mar 2, 2019 @ 6:10am
< >
Showing 1-15 of 129 comments
Mikenekro Apr 8, 2018 @ 3:40pm 
Just to let you know, If you want to control the repair success percentage for each perk so the perks don't become useless, you can find each perks hardcoded percentages in the following function: Assembly-CSharp-firstpass.dll -> (Class) UpgradeSystem -> (Public Float function) GetFixChance().

There you will see conditions for each of the repair perks and can change them individually.

Edit:
If you want to make a version that allows repairs below 15% as well here's 2 places you can change that 15% (both functions are in the UIManager class):

1. Look in the SubmitInRepairTableMenu() function for the "if (Mathf.Approximately(num, 1f) || num < 0.15f)" condition and change 0.15f to the lower repair value. This looks like it is for removing the item after a failed repair so this one you can leave alone if you want failed repairs to disappear (probably just in the current menu, might be different after re-loading the menu or game).

2. Look in the CreateDownMenuFromItems(string, string[], bool) function for the line "list = Inventory.Get().GetItemsWithConditionBetween(0.15f, 1f);" and change 0.15f to the value you want.


I haven't thoroughly tested any of these so they might work differently but I'm fairly certain that they work.
Last edited by Mikenekro; Apr 8, 2018 @ 3:58pm
MinSin Apr 9, 2018 @ 11:32am 
Thank you for the feedback mikenekro, i made the repair any condition mod like this because i find it to cross the cheating line,
If people request the mod to only apply 100% repair chance on the last perk i will make use of the information you provide
Mikenekro Apr 9, 2018 @ 6:17pm 
No problem. I started programming in Unity almost 10 years ago (Back in v3) so if you have questions on how Unity handles certain things just let me know.
Dot9 Apr 11, 2018 @ 8:25pm 
Great work MinSin. Thanks for carrying the torch.

Mods, Any chance we can get this thread pinned? Esp if the mod updates with each patch.
nAS.K.O™ Apr 12, 2018 @ 4:23am 
Fantastic! :steamhappy:
Thank you MinSin! :smilebeer:
I tried both versions and works like a charm :ribbonstar:
Dot9 Apr 16, 2018 @ 9:43pm 
bump.... still think this should be pinned
[88th] Snipah Apr 16, 2018 @ 10:54pm 
I still agree, pls pin the MOD
Im A M1stake Apr 17, 2018 @ 5:04pm 
What file do I go in? Trying to figure it out.
Spitball Apr 17, 2018 @ 9:12pm 
Originally posted by bryon_nordeoff:
What file do I go in? Trying to figure it out.

This is the path to the game folders: Local Disk (C) > Program Files (x86) > Steam > steamapps > common > Car Mechanic Simulator 2018 > cms2018_Data > Managed

Right Click on Car Mechanic Simulator 2018 in your Steam Game Library, Click on Properties. Click the Local Files Tab. Click Browse Local Files..., and Double Click on cms2018_Data. You will see the folder Managed, Double Click this folder and create a New Folder named backup. Click on the file Assembly-CSharp-firstpass.dll. Do CTRL X, and Double Click on the new backup folder you just created, do CTRL V. This will place the original file in the backup folder. Go back one and make sure you are in the Managed folder, you should see the game files and the new backup folder. Open a New File Explorer. Go to where you saved the downloaded file Assembly-CSharp-firstpass.dll from this post and Click on it, do CTRL C, Go back to the first File Explorer and do CTRL V. You are done.
Last edited by Spitball; Apr 20, 2018 @ 9:36am
dwite40 Apr 18, 2018 @ 10:33am 
So now all parts should repair to 100% with one click at the repair table.
Spitball Apr 18, 2018 @ 10:55am 
Originally posted by dwite40:
So now all parts should repair to 100% with one click at the repair table.

Well, no. It will take several clicks, and, a part may fail, but when it fails, it will take several more clicks to repair to 100%. In nray's file, he made it so the part didn't fail. The only difference is, the part that fails cost more money to fix.
MinSin Apr 18, 2018 @ 12:15pm 
Originally posted by Spitball:
Originally posted by dwite40:
So now all parts should repair to 100% with one click at the repair table.

Well, no. It will take several clicks, and, a part may fail, but when it fails, it will take several more clicks to repair to 100%. In nray's file, he made it so the part didn't fail. The only difference is, the part that fails cost more money to fix.
You can fail on the second file?
That is not how it is suppoced to be, i will have to look at it when i have time.
MinSin Apr 18, 2018 @ 12:21pm 
Originally posted by dwite40:
So now all parts should repair to 100% with one click at the repair table.
If you want instant repair of parts i reccomend Bunns mod The modders swiss knife
Last edited by MinSin; Apr 18, 2018 @ 12:22pm
Spitball Apr 18, 2018 @ 1:12pm 
Originally posted by MinSin:
Originally posted by Spitball:

Well, no. It will take several clicks, and, a part may fail, but when it fails, it will take several more clicks to repair to 100%. In nray's file, he made it so the part didn't fail. The only difference is, the part that fails cost more money to fix.
You can fail on the second file?
That is not how it is suppoced to be, i will have to look at it when i have time.

Yes, parts fail on the second file. In nray's file, when you clicked repair, it would repair between 100-104% with zero fails; yours is 99% or below. Not sure why you're not doing the same thing.
Last edited by Spitball; Apr 18, 2018 @ 1:14pm
MinSin Apr 19, 2018 @ 7:06am 
I have now changed how the 100% repair chance version works, so when you press repair an item, instead of calculating it will just set the item to 100%, the way it currently is I replaced the entire repair function with just set durability to 100% so a side effect is it’s also free
< >
Showing 1-15 of 129 comments
Per page: 1530 50