Jump to content

Celestial Body Science Multiplier Editor


DMagic

Recommended Posts

Go to my [thread=120731]Mod collection page[/thread] for new updates and information on this mod.

Warning: The contract system uses the "RecoveredDataValue", specified below, extensively for calculating rewards, penalties, deadlines and other factors when generating new contracts. I would recommend not changing this value if you are playing on standard career mode.

This is a simple plugin and config file for editing the default celestial body multipliers.

These are the values that determine the science points given based on your current experimental situation. They include: surface landed, flying low, in space low, etc...

Installation

Place the ScienceParamLoader folder into your GameData folder and edit the ScienceParams.cfg file. The config file can be placed anywhere in the GameData folder, the default location is:

Kerbal Space Program/GameData/ScienceParamLoader/ScienceParams.cfg

Extra config files are provided in the Alternate Config Files folder. Only one config file should be placed in the GameData folder.

Take the desired ScienceParams.cfg file and copy it over the default file found in the directory shown above.

Usage

The current values are set to their defaults. To change them simply alter the numerical values for the desired experimental situation and celestial body.

A restart is required to change the values.

Do not alter the Body_Index value, this is used internally to identify each planet. The Body Name field is only provided for reference, and has no effect.

Be aware that KSP does not seem to use the FlyingHighDataValue or InSpaceHighDataValue for anything, the FlyingLow and InSpaceLow values seem to be used for both situations.

To reset the values either delete the config file or edit the values back to their defaults and restart KSP.

A sample of one of the config file entries. There are separate entries for each celestial body.


Body
{
//Body Name = Kerbin
Body_Index = 1
LandedDataValue = 0.3
SplashedDataValue = 0.4
FlyingLowDataValue = 0.7
FlyingHighDataValue = 0.9
InSpaceLowDataValue = 1
InSpaceHighDataValue = 1.5
RecoveredDataValue = 1
FlyingAltitude = 18000
SpaceAltitude = 250000
}

Feel free to include this file with any of your mods, Module Manager config packages, or anything else. Just make sure that you don't change the location where the plugin and config file are stored.

Source is available on Github.

Changelog:


v3:
- config file can now be placed anywhere in the GameData folder
- uses xEvilReeperx's KSPAddonImproved to allow starting after the mainmenu, should overwrite any science parameter values set by other mods (Real Solar System in particular)

v2:
- minor update; more tolerant of config file errors
- included alternate config file with entries for default pack of Krag's Planet Factory

License: 2-Clause BSD

The KSPAddonImproved attribute is provided by xEvilReeperx; it also uses KSPAddonFixed

The KSPAddonFixed attribute is provided by Majiir.

Edited by DMagic
Link to modlets
Link to comment
Share on other sites

This should also work with any planet mods. However, I can't guarantee that those mods won't overwrite the values set by my mod with its own set of science parameter values. It all depends on when the mod starts up. Mine starts at the main menu, but if something else, Real Solar System for example, starts later it could rewrite the values.

If you want to add more planet definitions (using Krag's planet packs for instance) you can add extra Body {} nodes at the bottom of the config file.

Do note that all Body {} nodes should be placed before the final }, they must be within the larger Custom_Science_Params {} node.

You will need to figure out which Body_Index value corresponds to which planet in the planet pack. I think that Alternis Kerbol and Real Solar System use the same planets and Body_Index values, but you'll have to figure out how to handle those.

If anyone comes up with working config files for other planet packs or for planet reshuffling mods like Alternis I'll be happy to include them in the first post.

Link to comment
Share on other sites

I pulled out the following Celestial body index numbers for the default pack of Krag's Planet Factory. If anyone wants to make a config for those planets these are the Body_Index values you need to use.

aV1pEb2.jpg

Link to comment
Share on other sites

In the example, the FlyingAltitude and SpaceAltitude parameters, how do they correlate to altitude boundaries for science? I thought there were four, flying low, flying high, in space low, in space high and wondered whether those parameters were relevant to that?

edit: Pore spelin

Link to comment
Share on other sites

I released a minor update (currently only available from the mediafire link). It is a little more fault tolerant when trying to add your own config files. The debug log will tell you which planets loaded correctly and which, if any, did not load (the failed planets are listed by their body_index value only).

I also included an alternate config file with the default pack for Krag's Planet Factory created by Rokker. Simply replace the standard file, or copy and past the added Body {} entries yourself.

Link to comment
Share on other sites

I also included an alternate config file with the default pack for Krag's Planet Factory created by Rokker. Simply replace the standard file, or copy and past the added Body {} entries yourself.

Rokker? What a terrible name. :P Lovin the mod btw.

Link to comment
Share on other sites

Would it be possible to fix KSP not reading the FlyingHigh and InSpaceLow values?

For stock part? It would be difficult.

But I could (and now have) implemented this for my parts. It's a simple fix to return the proper value instead of relying on what the regular methods return. The only problem I can see is that it might interfere with the diminishing returns for repeated experiments.

Link to comment
Share on other sites

Ah, so it works with that DMagic Science Animate .dll you made. No problem, if I were to use one for a science mod it'd be that anyway. Much more versatile.

I noticed that the normal setup Sun had an 11x modifier for low space, but only 2x for high. And I wondered why I got such a massive boost even in high space while playing stock. If Squad fixes this it would really upset balance, as a dumb probe into Solar orbit was always an early game cash cow. With a 2x modifier not so much.

Link to comment
Share on other sites

Nice. Now I can use all of your science parts without blasting through KSPI's tree uber-fast.

Edit: This creates "body" nodes, yes? Can be tweaked with MM, yes? Can also prepare sandwiches for me, yes?

Edited by phoenix_ca
Link to comment
Share on other sites

Ah, so it works with that DMagic Science Animate .dll you made. No problem, if I were to use one for a science mod it'd be that anyway. Much more versatile.

It will work with both the next versions of my mod and DMModuleScienceAnimateGeneric (which I hope to update in the next day or so).

Presumably Squad left those values out for a reason, but you never know if they'll use them, or remove them all together.

This creates "body" nodes, yes? Can be tweaked with MM, yes? Can also prepare sandwiches for me, yes?

MM should work, though I'm not sure if there's any reason to use a MM cfg rather than just changing the default config file. You can always delete the config and restart (the program, not a new save) if you want to go back to stock values. I might actually change the node names to something less generic so that there is less chance of some mixup.

Link to comment
Share on other sites

Hmm... do I read this right, could I make "FlyingHighDataValue" available for Kerbol, thereby adding another layer for close visits to the star?

And changing the "InSpaceHighDataValue" so that it is only available beyond Eeloo's orbit, interstellar so to speak?

Link to comment
Share on other sites

Hmm... do I read this right, could I make "FlyingHighDataValue" available for Kerbol, thereby adding another layer for close visits to the star?

And changing the "InSpaceHighDataValue" so that it is only available beyond Eeloo's orbit, interstellar so to speak?

Nope. Unfortunately the sun is a little wonky. According to its celestial body data it does not have an atmosphere, however it does have a max atmosphere height. Despite this contradiction the science system treats the sun as if it has no atmosphere, so no atmospheric data can be collected there.

To change the altitude for the transition from inspacelow to inspacehigh you need to change the "spacealtitude" value, not the data value.

Link to comment
Share on other sites

So not just no readings for atmospheric analysis but no flying low/high at all? Bummer.

Can the sun be given an atmosphere then?

Would be cool to make it get dense real fast, so if you are not careful the craft is either slowed down so much that it crashes into the star or burns up quickly (with DRE).

Link to comment
Share on other sites

MM should work, though I'm not sure if there's any reason to use a MM cfg rather than just changing the default config file. You can always delete the config and restart (the program, not a new save) if you want to go back to stock values. I might actually change the node names to something less generic so that there is less chance of some mixup.

Future-proofing and easier editing. If I create an MM config, I can see very easily which values I've changed (as they'll be the only values in the config), and it'd make updates to this plugin's preferences a bit easier. Sure, I could produce a diff, but I prefer to not touch mod files directly unless I really have to.

Link to comment
Share on other sites

I updated this again.

It now starts up after the Main Menu scene. Using xEvilReeperx's KSPAddonImproved, the plugin can start in any scene and should now overwrite any science parameter changes made by other mods.

It is also possible to put the ScienceParams.cfg file anywhere in the GameData folder, though only one config file will be loaded.

Link to comment
Share on other sites

  • 1 month later...

OMG Thank you! I've been looking for a mod to do this. The Mun and especially Minmus yield too much science for me to feel any sense of challenge or accomplishment playing career mode. Kinda hoped those values would have gotten tweaked in the 0.24 release, but no such luck.

I'm gonna try this as soon as I get home.

Link to comment
Share on other sites

Let us know how it works. I'm waiting to do my tsunami of mod installs until either Interstellar or KAS get an update, and this is a new one I would very much like to add to that collection.

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

This is great! The final piece in my mod-puzzle was making science more precious. Being able to do so myself in a config makes it even better. I am running it with 64bit 24.2 and tons of other mods (including Dmagic Orbital Science) and no problems so far. Thanks!

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...