Jump to content

cymon4380

Members
  • Posts

    9
  • Joined

  • Last visited

Posts posted by cymon4380

  1. Hello there! I'm working at KSP mod that allows a player to upgrade parts. How to increase engine thrust by 15% or set a new value? Same with electricity generator. At the same time, also reduce fuel flow by 10% or set a new value.

    Here's an example:

      Basic engine Improved engine
    Thrust (kN) 200 230
    Fuel flow (u/s) 16 14.4
    EC generation (u/s) 10 12

    Hope this information will be enough. Thanks in advance for your reply!

  2. 55 minutes ago, HebaruSan said:

    That's probably impossible to prevent, given that the user controls the computer where the code runs.

    It's probably also a bad idea to try to prevent it. What user would keep using a mod that didn't allow them to play the way they wanted to?

    Ok, I got it. Anyway, how can I know if the game was saved and then save mod settings into save file? And also load settings when loading save. Please reply ASAP, I wanna create my mod in a few days. Thank you.

  3. 8 hours ago, HebaruSan said:

    Before you worry about the file name, you should try to use the built-in save/load functionality if at all possible. If your class inherits from ScenarioModule and has the KSPScenario attribute, its OnSave and OnLoad methods will be called when the game saves and loads, and the parameter is a ConfigNode that you can save to/load from, that will automatically be included in/retrieved from the save file.

     

    I worry about the file name because I'm making a salary mod and I'm afraid players will be able to bypass it. For example, a player quicksaved a game, paid to kerbals their salary and then quickloaded and saved funds. I'm new to mod development, so I don't know literally anything about saving data. Also, if a player loads a fairly old save, all settings should load too.

  4. Hello there! I'm making a plugin for KSP and I've run into an issue. How to get the save file game was saved to, like quicksave.sfs, persistent.sfs, etc.? For example, some settings need to be saved to SFS file, and when a player loads some save (persistent, quicksave or other), they'll need to load too.

    GAME {
    	(some game stuff)
    }
    
    MY_MOD {
    	param1 = 1
        param2 = Some Parameter
        param3 = true
    }

    Thank you in advance for your answer :)

×
×
  • Create New...