• "My mind is always racing." - Justin Bieber
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Dear Guest. Follow RaceDepartment on Twitter, Facebook, Instagram, Twitch, Steam and YouTube.

ModLoader Modding - Getting wear values

Discussion in 'My Summer Car' started by Mazen91, Nov 5, 2017.

  1. Mazen91

    Mazen91

    Messages:
    17
    Ratings:
    +4
    Hey everyone,

    I'm fairly new to modding games. In fact this is the first game which I'm trying to mod.
    I did fairly easy things like showing the percentages of your players stats. That was easy since that are PlayMaker variables.(https://github.com/piotrulos/MSCModLoader/wiki/All-known-playmaker-Variables-and-Events)

    But how would I get other values, like the current wear of parts? They are saved in the savegame file. I could try to read that file from the mod, but even if that works those values would be "old".

    Is there a way of getting values of variables which I assume he only uses during a session internally?

    Thank you all in advance,
    Mazen
     
  2. Hennimore

    Hennimore

    Messages:
    12
    Ratings:
    +0
    You can access the part wear values live. Now I won't be able to help you in any other way than to point you in the right direction since I do not mod and have not seen or used the mod tools.

    The wear values are under SATSUMA 557kg, 248 > CarSimulation > MechanicalWear

    All public variables are as follows:

    WearAltenator
    WearCrankshaft
    WearGearbox
    Wearheadgasket
    WearPiston1
    WearPiston2
    WearPiston3
    WearPiston4
    WearRockershaft
    WearStarter
    WearWaterpump

    These values work from 100 down to 0 with 100 being perfect (think of these as percentage values).

    There is also wear values for the fan belt but I couldn't find it. That works differently to the other wear values only going from 0 to 1. I can't remember which way around it goes but form what I remember 0 is full health and 1 is fully worn but I might be wrong.

    Sorry I cannot be of any more help other than this.
     
  3. Mazen91

    Mazen91

    Messages:
    17
    Ratings:
    +4
    Thats a great help, thank you!
    But may I ask how you know where to find those values if you don't mod yourself and haven't even used moddig tools?

    Anyways, I'll see if I can find any of those objects later today.
     
  4. Hennimore

    Hennimore

    Messages:
    12
    Ratings:
    +0
    Hey, I use some plugins for the game, one of the plugins being "developer toolset". This allows you to view and alter basically all variables within the game. I had a quick browse on it for you and found them values. I subsequently installed the tools required to develop plugins and opened a plugin that no longer works called Engine Fixer. The values have changed and now throw errors so I have no idea where the values are held but I will send you a link to the GitHub to view the code and give you an idea.

    https://github.com/haverdaden/MSC_Playground/tree/master/Enginefixer

    Open the .cs file and have a look through. None of the values work due to the big update, you just get an error in-game, but I'd be interested to know myself where they are now and how to get the plugin going again.

    Good luck.
     
  5. Mazen91

    Mazen91

    Messages:
    17
    Ratings:
    +4
    I'll look into this for sure.
    I'm thinking of a mod where you need to uninstall a part and then be able to inspect it. It won't tell you the exact percentage but something like "That thing is totally fcked" or "It might do for another mile or so".