Jump to content

Limiting science gain via ModuleManager config.


Recommended Posts

Below is a Modulemanager config that can limit (or raise) the science gain per experiment type. I've not tested it a lot but it does what you expect and I can't imagine it causing any other problems. If it does, please let me know and I'll see what I can do. However, it's a very simple config.

Just copy the text below into a *.cfg file and put it in your gamedata folder, or any folder off of your gamedata folder. The below config limits ALL science gained, though Surface Samples are still worth a decent amount. This WILL make early gains harder but you can still pretty easily get a few dozen science around KSC and from there, get yourself to Minmus already! :)

Feel free to post any variations. I'm looking to make a config that is challenging yet possible, and requires visiting at least the Jool system and hopefully another planet or two in order to max out on science, without hurting too much the early ramp up to things like struts and fuel lines, and early science nodes.

Thanks enneract for the final few lines of the config, and adding ":Final" to each actual experiment definition. This will now allow you to tweak each experiment's value but also blanket restrict anything that a mod offers, or anything that comes out in the game in the future. Very clever!

This mod works wonderfully with DMagic's Celestial Body Science Multiplier Editor mod. With this, you can modify experiment gain. With that, you can modify gain per world. With both, you can pretty much custom the gain everywhere with every experiment.

@EXPERIMENT_DEFINITION[*]:HAS[#id[crewReport]]:Final
{
// ORIGINAL: @baseValue = 5
// ORIGINAL: @scienceCap = 5
@baseValue = 3
@scienceCap = 3
}

@EXPERIMENT_DEFINITION[*]:HAS[#id[evaReport]]:Final
{
// ORIGINAL: @baseValue = 8
// ORIGINAL: @scienceCap = 8
@baseValue = 4
@scienceCap = 4
}

@EXPERIMENT_DEFINITION[*]:HAS[#id[mysteryGoo]]:Final
{
// ORIGINAL: @baseValue = 10
// ORIGINAL: @scienceCap = 13
@baseValue = 3
@scienceCap = 4
}

@EXPERIMENT_DEFINITION[*]:HAS[#id[surfaceSample]]:Final
{
// ORIGINAL: @baseValue = 30
// ORIGINAL: @scienceCap = 40
@baseValue = 8
@scienceCap = 10
}

@EXPERIMENT_DEFINITION[*]:HAS[#id[mobileMaterialsLab]]:Final
{
// ORIGINAL: @baseValue = 25
// ORIGINAL: @scienceCap = 32
@baseValue = 4
@scienceCap = 6
}

@EXPERIMENT_DEFINITION[*]:HAS[#id[temperatureScan]]:Final
{
// ORIGINAL: @baseValue = 8
// ORIGINAL: @scienceCap = 8
@baseValue = 2
@scienceCap = 2
}

@EXPERIMENT_DEFINITION[*]:HAS[#id[barometerScan]]:Final
{
// ORIGINAL: @baseValue = 12
// ORIGINAL: @scienceCap = 12
@baseValue = 3
@scienceCap = 3
}

@EXPERIMENT_DEFINITION[*]:HAS[#id[seismicScan]]:Final
{
// ORIGINAL: @baseValue = 20
// ORIGINAL: @scienceCap = 22
@baseValue = 3
@scienceCap = 4
}

@EXPERIMENT_DEFINITION[*]:HAS[#id[gravityScan]]:Final
{
// ORIGINAL: @baseValue = 20
// ORIGINAL: @scienceCap = 22
@baseValue = 4
@scienceCap = 5
}

@EXPERIMENT_DEFINITION[*]:HAS[#id[atmosphereAnalysis]]:Final
{
// ORIGINAL: @baseValue = 20
// ORIGINAL: @scienceCap = 24
@baseValue = 4
@scienceCap = 5
}

@EXPERIMENT_DEFINITION[*]
{
@baseValue *= 0.625
@scienceCap *= 0.625
// Preserve the original file size.
@dataScale /= 0.625
}

Edited by 5thHorseman
Link to comment
Share on other sites

I got it! I've updated the first post but here's the original first post for... well for no reason really.

I'm trying to limit the science gained by experiments via a fairly simple Modulemanager (1.5.7) config. It seems like it'd work but no matter what I set values to, the return on experiments is always exactly the same. Here's the config, can anybody tell me what I'm doing wrong?

Note: The first few (the low tech stuff) I left alone. In particular I tested the thermometer, barometer, and seismometer (I didn't give myself enough Science in my test world to unlock Gravioli Detectors)


@EXPERIMENT_DEFINITION[crewReport]
{
// ORIGINAL: @baseValue = 5
// ORIGINAL: @scienceCap = 5
@baseValue = 5
@scienceCap = 5
}

@EXPERIMENT_DEFINITION[evaReport]
{
// ORIGINAL: @baseValue = 8
// ORIGINAL: @scienceCap = 8
@baseValue = 8
@scienceCap = 8
}

@EXPERIMENT_DEFINITION[mysteryGoo]
{
// ORIGINAL: @baseValue = 10
// ORIGINAL: @scienceCap = 13
@baseValue = 10
@scienceCap = 13
}

@EXPERIMENT_DEFINITION[surfaceSample]
{
// ORIGINAL: @baseValue = 30
// ORIGINAL: @scienceCap = 40
@baseValue = 30
@scienceCap = 40
}

@EXPERIMENT_DEFINITION[mobileMaterialsLab]
{
// ORIGINAL: @baseValue = 25
// ORIGINAL: @scienceCap = 32
@baseValue = 25
@scienceCap = 32
}

@EXPERIMENT_DEFINITION[temperatureScan]
{
// ORIGINAL: @baseValue = 8
// ORIGINAL: @scienceCap = 8
@baseValue = 5
@scienceCap = 5
}

@EXPERIMENT_DEFINITION[barometerScan]
{
// ORIGINAL: @baseValue = 12
// ORIGINAL: @scienceCap = 12
@baseValue = 9
@scienceCap = 9
}

@EXPERIMENT_DEFINITION[seismicScan]
{
// ORIGINAL: @baseValue = 20
// ORIGINAL: @scienceCap = 22
@baseValue = 10
@scienceCap = 11
}

@EXPERIMENT_DEFINITION[gravityScan]
{
// ORIGINAL: @baseValue = 20
// ORIGINAL: @scienceCap = 22
@baseValue = 10
@scienceCap = 11
}

@EXPERIMENT_DEFINITION[atmosphereAnalysis]
{
// ORIGINAL: @baseValue = 20
// ORIGINAL: @scienceCap = 24
@baseValue = 10
@scienceCap = 12
}

Link to comment
Share on other sites

I'm seriously not bumping this just to bump it. I've discovered a few more things.

"baseValue" is actually "how much does it cost to transmit this" while "scienceCap" is "before any biome modfiers, how much is this worth." I'm not sure how the game determines what percentage you'll get back for transmitting it but oh well, no biggie for me as I don't care about that.

Here's a new config that is more restrictive. The "by hand" (and Tier-0) experiments are still worth their base values but everything else is cut, some things significantly. The biggest loser is the materials bay which I cut from 32 to 10. I may make it 15, though. Dunno. Nothing is worth more than that except surface samples which are the pinnacle of science worth at 40. I justify leaving those alone both for their high value early on to bootstrap your research program, and because they encourage the presence of Kerbals on missions.


@EXPERIMENT_DEFINITION[*]:HAS[#id[crewReport]]
{
// ORIGINAL: @baseValue = 5
// ORIGINAL: @scienceCap = 5
@baseValue = 5
@scienceCap = 5
}

@EXPERIMENT_DEFINITION[*]:HAS[#id[evaReport]]
{
// ORIGINAL: @baseValue = 8
// ORIGINAL: @scienceCap = 8
@baseValue = 8
@scienceCap = 8
}

@EXPERIMENT_DEFINITION[*]:HAS[#id[mysteryGoo]]
{
// ORIGINAL: @baseValue = 10
// ORIGINAL: @scienceCap = 13
@baseValue = 10
@scienceCap = 8
}

@EXPERIMENT_DEFINITION[*]:HAS[#id[surfaceSample]]
{
// ORIGINAL: @baseValue = 30
// ORIGINAL: @scienceCap = 40
@baseValue = 30
@scienceCap = 40
}

@EXPERIMENT_DEFINITION[*]:HAS[#id[mobileMaterialsLab]]
{
// ORIGINAL: @baseValue = 25
// ORIGINAL: @scienceCap = 32
@baseValue = 25
@scienceCap = 10
}

@EXPERIMENT_DEFINITION[*]:HAS[#id[temperatureScan]]
{
// ORIGINAL: @baseValue = 8
// ORIGINAL: @scienceCap = 8
@baseValue = 8
@scienceCap = 4
}

@EXPERIMENT_DEFINITION[*]:HAS[#id[barometerScan]]
{
// ORIGINAL: @baseValue = 12
// ORIGINAL: @scienceCap = 12
@baseValue = 12
@scienceCap = 6
}

@EXPERIMENT_DEFINITION[*]:HAS[#id[seismicScan]]
{
// ORIGINAL: @baseValue = 20
// ORIGINAL: @scienceCap = 22
@baseValue = 20
@scienceCap = 8
}

@EXPERIMENT_DEFINITION[*]:HAS[#id[gravityScan]]
{
// ORIGINAL: @baseValue = 20
// ORIGINAL: @scienceCap = 22
@baseValue = 20
@scienceCap = 10
}

@EXPERIMENT_DEFINITION[*]:HAS[#id[atmosphereAnalysis]]
{
// ORIGINAL: @baseValue = 20
// ORIGINAL: @scienceCap = 24
@baseValue = 20
@scienceCap = 10
}

Edited by 5thHorseman
Link to comment
Share on other sites

Have you read this before: http://forum.kerbalspaceprogram.com/threads/62657-Understanding-Science-Points. It's really helpful for this kind of thing.

The transmission cost (or the data size to be more precise, which also affects the reset cost) is baseValue * dataScale * subjectValue (the per biome/per situation multiplier) * scienceValue (the diminishing returns multiplier). And the total science points for a report is the same but without the dataScale multiplier.

Link to comment
Share on other sites

Have you read this before: http://forum.kerbalspaceprogram.com/threads/62657-Understanding-Science-Points. It's really helpful for this kind of thing.

The transmission cost (or the data size to be more precise, which also affects the reset cost) is baseValue * dataScale * subjectValue (the per biome/per situation multiplier) * scienceValue (the diminishing returns multiplier). And the total science points for a report is the same but without the dataScale multiplier.

I did not see that before, and what I *DID* find was far less well put together. Thanks! I figured the multiplier was for the data transfer (because when I made the numbers HUGE it went up as well, but I never changed that multiplier) but I never figured out how to get the transmission cost. Thanks!

Link to comment
Share on other sites

With ModuleManager 2, you could make this really short:


@EXPERIMENT_DEFINITION[*]
{
@baseValue *= 0.625
@scienceCap *= 0.625
// Preserve the original file size.
@dataScale /= 0.625
}

I considered that, however MM2 isn't official yet and I wanted more control over each experiment's return value. I don't want to cripple a fledgling space program, I just want to make it worthwhile (science-wise) to go to other planets :)

Link to comment
Share on other sites

Sweet! I (obviously) missed that. However, the point still stands that the global change would either cripple early science or not limit late science enough. I could probably do a trick where I limit things based on their starting value but that would limit ground samples which I like being super important. I could put in an exception but when you start adding exceptions the "quick way" quickly becomes harder than the way I did it originally :)

Link to comment
Share on other sites

  • 3 weeks later...
I cannot find the post/thread describing how to change the planet/moon multiplier for science. :huh:

Anyone seen it? *dives back into forum*

If you do, post it here. I've not found that info yet either and would like to cut Mun and Minmus down a bit. Crazy that you can get like 10x the science for going there than going to Eeloo.

Link to comment
Share on other sites

Why not combine the two methods?

This gives you the edited ones, and then a blanket nerf to cover any mod-added experiments.

@EXPERIMENT_DEFINITION[*]:HAS[#id[crewReport]]:Final
{
// ORIGINAL: @baseValue = 5
// ORIGINAL: @scienceCap = 5
@baseValue = 3
@scienceCap = 3
}

@EXPERIMENT_DEFINITION[*]:HAS[#id[evaReport]]:Final
{
// ORIGINAL: @baseValue = 8
// ORIGINAL: @scienceCap = 8
@baseValue = 4
@scienceCap = 4
}

@EXPERIMENT_DEFINITION[*]:HAS[#id[mysteryGoo]]:Final
{
// ORIGINAL: @baseValue = 10
// ORIGINAL: @scienceCap = 13
@baseValue = 3
@scienceCap = 4
}

@EXPERIMENT_DEFINITION[*]:HAS[#id[surfaceSample]]:Final
{
// ORIGINAL: @baseValue = 30
// ORIGINAL: @scienceCap = 40
@baseValue = 8
@scienceCap = 10
}

@EXPERIMENT_DEFINITION[*]:HAS[#id[mobileMaterialsLab]]:Final
{
// ORIGINAL: @baseValue = 25
// ORIGINAL: @scienceCap = 32
@baseValue = 4
@scienceCap = 6
}

@EXPERIMENT_DEFINITION[*]:HAS[#id[temperatureScan]]:Final
{
// ORIGINAL: @baseValue = 8
// ORIGINAL: @scienceCap = 8
@baseValue = 2
@scienceCap = 2
}

@EXPERIMENT_DEFINITION[*]:HAS[#id[barometerScan]]:Final
{
// ORIGINAL: @baseValue = 12
// ORIGINAL: @scienceCap = 12
@baseValue = 3
@scienceCap = 3
}

@EXPERIMENT_DEFINITION[*]:HAS[#id[seismicScan]]:Final
{
// ORIGINAL: @baseValue = 20
// ORIGINAL: @scienceCap = 22
@baseValue = 3
@scienceCap = 4
}

@EXPERIMENT_DEFINITION[*]:HAS[#id[gravityScan]]:Final
{
// ORIGINAL: @baseValue = 20
// ORIGINAL: @scienceCap = 22
@baseValue = 4
@scienceCap = 5
}

@EXPERIMENT_DEFINITION[*]:HAS[#id[atmosphereAnalysis]]:Final
{
// ORIGINAL: @baseValue = 20
// ORIGINAL: @scienceCap = 24
@baseValue = 4
@scienceCap = 5
}

@EXPERIMENT_DEFINITION[*]
{
@baseValue *= 0.625
@scienceCap *= 0.625
// Preserve the original file size.
@dataScale /= 0.625
}

Link to comment
Share on other sites

No reaction concerning lowering the planetary multiplier via RSS yet. *pout*

:wink:

Yeah I looked for that too. Seems like something you should be able to do even without RSS. Seems like something that would be in the same science config that I found the experiment stuff.

Oh well :rolleyes:

Link to comment
Share on other sites

You're just looking for a way to alter the celestial body science parameter values, the In Space Low, Srf Landed, Srf Splashed multipliers, the altitude cutoffs, etc...?

Theoretically this is simple. Just create a config file with each planet and the default value for each science param value (though I'm pretty sure that it uses the same value for in space low and in space high, or flying low/flying high. A simple addon could load up this cfg file, check the values, and replace the default science params. This should remain persistent during the game, I assume they would get reset after either backing out to the main menu or quitting.

I'll see if I can come up with something. The only sticking point that I can think of is figuring out when to run it (mainmenu, spacecenter, flight scene) and making it so that autoloading plugins don't break it.

Link to comment
Share on other sites

The only sticking point that I can think of is figuring out when to run it (mainmenu, spacecenter, flight scene) and making it so that autoloading plugins don't break it.

I came up with something the other day that might make this simpler. It allows you to specify multiple scenes to have your addon loaded in, so in this case instead of doing an "every" startup, you could just do something like:

[KSPAddonImproved(KSPAddonImproved.Startup.Flight | 
KSPAddonImproved.Startup.SpaceCenter |
KSPAddonImproved.Startup.TrackingStation, true)]
public class EditScienceParams : MonoBehaviour
{
// etc
}

It might make sidestepping the autoloading plugin possibility very easy to solve

Link to comment
Share on other sites

I came up with something the other day that might make this simpler.

Yeah, I saw that. I really hope Squad gets around to fixing its broken-in-many ways KSPAddon module. I'll check that out if I can't find a way around it, though I think it might work fine from the main menu, and as far as I know there's no way to entirely skip that when loading.

I'm pretty sure that I've got a working method, I just need a config file with all of the default values. The values seem to be reset when you quit and reload, so there's no danger in breaking anything:wink:

I don't suppose anyone wants to fill out a text file with all of the default values for me. I think the values here are accurate.

This is the format they should be in (these default values aren't correct), don't worry about the body index.


Body
{
//Body Name = Kerbin
Body_Index = 1
LandedDataValue = 1
SplashedDataValue = 1
FlyingLowDataValue = 2
FlyingHighDataValue = 3
InSpaceLowDataValue = 1
InSpaceHighDataValue = 2
RecoveredDataValue = 1
FlyingAltitude = 18000
SpaceAltitude = 250000
}

Link to comment
Share on other sites


{
LandedDataValue = 1
SplashedDataValue = 1
FlyingLowDataValue = 1
FlyingHighDataValue = 1
InSpaceLowDataValue = 11
InSpaceHighDataValue = 2
RecoveredDataValue = 4
FlyingAltitude = 18000
SpaceAltitude = 1E+09
}
Kerbin
{
LandedDataValue = 0.3
SplashedDataValue = 0.4
FlyingLowDataValue = 0.7
FlyingHighDataValue = 0.9
InSpaceLowDataValue = 1
InSpaceHighDataValue = 1.5
RecoveredDataValue = 1
FlyingAltitude = 18000
SpaceAltitude = 250000
}
Mun
{
LandedDataValue = 4
SplashedDataValue = 1
FlyingLowDataValue = 1
FlyingHighDataValue = 1
InSpaceLowDataValue = 3
InSpaceHighDataValue = 2
RecoveredDataValue = 2
FlyingAltitude = 18000
SpaceAltitude = 60000
}
Minmus
{
LandedDataValue = 5
SplashedDataValue = 1
FlyingLowDataValue = 1
FlyingHighDataValue = 1
InSpaceLowDataValue = 4
InSpaceHighDataValue = 2.5
RecoveredDataValue = 2.5
FlyingAltitude = 18000
SpaceAltitude = 30000
}
Moho
{
LandedDataValue = 10
SplashedDataValue = 1
FlyingLowDataValue = 1
FlyingHighDataValue = 1
InSpaceLowDataValue = 8
InSpaceHighDataValue = 7
RecoveredDataValue = 7
FlyingAltitude = 18000
SpaceAltitude = 80000
}
Eve
{
LandedDataValue = 8
SplashedDataValue = 8
FlyingLowDataValue = 6
FlyingHighDataValue = 6
InSpaceLowDataValue = 7
InSpaceHighDataValue = 5
RecoveredDataValue = 5
FlyingAltitude = 22000
SpaceAltitude = 400000
}
Duna
{
LandedDataValue = 8
SplashedDataValue = 1
FlyingLowDataValue = 5
FlyingHighDataValue = 5
InSpaceLowDataValue = 7
InSpaceHighDataValue = 5
RecoveredDataValue = 5
FlyingAltitude = 12000
SpaceAltitude = 140000
}
Ike
{
LandedDataValue = 8
SplashedDataValue = 1
FlyingLowDataValue = 1
FlyingHighDataValue = 1
InSpaceLowDataValue = 7
InSpaceHighDataValue = 5
RecoveredDataValue = 5
FlyingAltitude = 18000
SpaceAltitude = 50000
}
Jool
{
LandedDataValue = 30
SplashedDataValue = 1
FlyingLowDataValue = 12
FlyingHighDataValue = 9
InSpaceLowDataValue = 7
InSpaceHighDataValue = 6
RecoveredDataValue = 6
FlyingAltitude = 120000
SpaceAltitude = 4000000
}
Laythe
{
LandedDataValue = 14
SplashedDataValue = 12
FlyingLowDataValue = 11
FlyingHighDataValue = 10
InSpaceLowDataValue = 9
InSpaceHighDataValue = 8
RecoveredDataValue = 8
FlyingAltitude = 10000
SpaceAltitude = 200000
}
Vall
{
LandedDataValue = 12
SplashedDataValue = 1
FlyingLowDataValue = 1
FlyingHighDataValue = 1
InSpaceLowDataValue = 9
InSpaceHighDataValue = 8
RecoveredDataValue = 8
FlyingAltitude = 18000
SpaceAltitude = 90000
}
Bop
{
LandedDataValue = 12
SplashedDataValue = 1
FlyingLowDataValue = 1
FlyingHighDataValue = 1
InSpaceLowDataValue = 9
InSpaceHighDataValue = 8
RecoveredDataValue = 8
FlyingAltitude = 18000
SpaceAltitude = 25000
}
Tylo
{
LandedDataValue = 12
SplashedDataValue = 1
FlyingLowDataValue = 1
FlyingHighDataValue = 1
InSpaceLowDataValue = 10
InSpaceHighDataValue = 8
RecoveredDataValue = 8
FlyingAltitude = 18000
SpaceAltitude = 250000
}
Gilly
{
LandedDataValue = 9
SplashedDataValue = 1
FlyingLowDataValue = 1
FlyingHighDataValue = 1
InSpaceLowDataValue = 8
InSpaceHighDataValue = 6
RecoveredDataValue = 6
FlyingAltitude = 18000
SpaceAltitude = 6000
}
Pol
{
LandedDataValue = 12
SplashedDataValue = 1
FlyingLowDataValue = 1
FlyingHighDataValue = 1
InSpaceLowDataValue = 9
InSpaceHighDataValue = 8
RecoveredDataValue = 8
FlyingAltitude = 18000
SpaceAltitude = 22000
}
Dres
{
LandedDataValue = 8
SplashedDataValue = 1
FlyingLowDataValue = 1
FlyingHighDataValue = 1
InSpaceLowDataValue = 7
InSpaceHighDataValue = 6
RecoveredDataValue = 6
FlyingAltitude = 18000
SpaceAltitude = 25000
}
Eeloo
{
LandedDataValue = 15
SplashedDataValue = 1
FlyingLowDataValue = 1
FlyingHighDataValue = 1
InSpaceLowDataValue = 12
InSpaceHighDataValue = 10
RecoveredDataValue = 10
FlyingAltitude = 18000
SpaceAltitude = 60000
}
Sun

If I interpreted your format correctly. If not, creating a new one should be speedy


public class DumpScienceParams : MonoBehaviour
{
public void Start()
{
/*
Body
{
//Body Name = Kerbin
Body_Index = 1
LandedDataValue = 1
SplashedDataValue = 1
FlyingLowDataValue = 2
FlyingHighDataValue = 3
InSpaceLowDataValue = 1
InSpaceHighDataValue = 2
RecoveredDataValue = 1
FlyingAltitude = 18000
SpaceAltitude = 250000
}
* */
var root = new ConfigNode();

foreach (var body in FlightGlobals.Bodies)
{
var node = root.AddNode(body.name);

var sci = body.scienceValues;

node.AddValue("LandedDataValue", sci.LandedDataValue);
node.AddValue("SplashedDataValue", sci.SplashedDataValue);
node.AddValue("FlyingLowDataValue", sci.FlyingLowDataValue);
node.AddValue("FlyingHighDataValue", sci.FlyingHighDataValue);
node.AddValue("InSpaceLowDataValue", sci.InSpaceLowDataValue);
node.AddValue("InSpaceHighDataValue", sci.InSpaceHighDataValue);
node.AddValue("RecoveredDataValue", sci.RecoveryValue);
node.AddValue("FlyingAltitude", sci.flyingAltitudeThreshold);
node.AddValue("SpaceAltitude", sci.spaceAltitudeThreshold);
}

root.Save("GameData/scienceValues.txt");
Log.Write("root = {0}", root.ToString());

}
}
[KSPAddon(KSPAddon.Startup.Flight, false)]

Link to comment
Share on other sites

Let me know if this breaks anything. You should be able to reset values to their defaults by deleting the mod folder, the .dll, or the .cfg file.

Edit the values in the ScienceParams.cfg file to whatever you want.

http://www./download/6m5s5w55665vo68/Science_Param_Loader.zip

using System;

using UnityEngine;

using System.IO;

namespace ScienceParamLoader

{

[KSPAddonFixed(KSPAddon.Startup.MainMenu, true, typeof(ScienceParamLoader))]

public class ScienceParamLoader: MonoBehaviour

{

private string path = Path.Combine(new DirectoryInfo(KSPUtil.ApplicationRootPath).FullName, "GameData/ScienceParamLoader/ScienceParams.cfg").Replace("\\","/");

public void Start()

{

paramLoader();

}

public void paramLoader()

{

ConfigNode node = ConfigNode.Load(path);

CelestialBody body;

int i;

float f;

if (node == null) print("Science Param config file not found");

else

{

ConfigNode paramNode = node.GetNode("Custom_Science_Params");

foreach (ConfigNode bodyNode in paramNode.GetNodes("Body"))

{

if (Int32.TryParse(bodyNode.GetValue("Body_Index"), out i)) body = FlightGlobals.Bodies;

else continue;

if (float.TryParse(bodyNode.GetValue("LandedDataValue"), out f)) body.scienceValues.LandedDataValue = f;

if (float.TryParse(bodyNode.GetValue("SplashedDataValue"), out f)) body.scienceValues.SplashedDataValue = f;

if (float.TryParse(bodyNode.GetValue("FlyingLowDataValue"), out f)) body.scienceValues.FlyingLowDataValue = f;

if (float.TryParse(bodyNode.GetValue("FlyingHighDataValue"), out f)) body.scienceValues.FlyingHighDataValue = f;

if (float.TryParse(bodyNode.GetValue("InSpaceLowDataValue"), out f)) body.scienceValues.InSpaceLowDataValue = f;

if (float.TryParse(bodyNode.GetValue("InSpaceHighDataValue"), out f)) body.scienceValues.InSpaceHighDataValue = f;

if (float.TryParse(bodyNode.GetValue("RecoveredDataValue"), out f)) body.scienceValues.RecoveryValue = f;

if (float.TryParse(bodyNode.GetValue("FlyingAltitude"), out f)) body.scienceValues.flyingAltitudeThreshold = f;

if (float.TryParse(bodyNode.GetValue("SpaceAltitude"), out f)) body.scienceValues.spaceAltitudeThreshold = f;

print("New Science Paramaters set for [" + body.theName + "]");

}

}

}

}

}

Edited by DMagic
Link to comment
Share on other sites

I have no idea what any of what you guys said meant, but sweet! I'll give this a try.

As the creators of this, would you like to make your own post or could/should I update the first post?

And I see you have "splashed" and "flying" values for bodies without water/air. I assume those are just ignored by KSP?

Edited by 5thHorseman
Link to comment
Share on other sites

I have no idea what any of what you guys said meant, but sweet! I'll give this a try.

As the creators of this, would you like to make your own post or could/should I update the first post?

And I see you have "splashed" and "flying" values for bodies without water/air. I assume those are just ignored by KSP?

If it works I'll make a post in the release forum.

And yes, it ignores values that don't apply to the planet, or rather, the situations when those values might apply just don't ever come up on those planets.

Link to comment
Share on other sites

I made a release thread for this: http://forum.kerbalspaceprogram.com/threads/80220-Celestial-Body-Science-Multiplier-Editor

It seems to be working fine. Also be aware that flying low and in space low values aren't actually used. But someone could easily implement them with a mod (if they don't already) so I left them in.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...