Jump to content

Questions re: cfg file parameters for Science Labs


rasta013

Recommended Posts

Apologies ahead of time for the somewhat tl;dr post but this is bugging me and I can't seem to figure it out...

So, I've been digging for days and only finding snippets of info here and there but have not been able to get any truly complete answers so figured I'd bring my question here to see if anyone can provide some insight. I'm working to reconfigure some of the cfg files for Better Science Labs Continued in an effort to create some variety for each lab beyond form factor as a prelude to me creating my own new labs mod. That said, changing the parameters results in some extremely unpredictable behavior. Specifically, I cannot figure out the mathematics behind these values nor how they interact with each other : SurfaceBonus, ContextBonus, scientistBonus, researchTime, scienceMultiplier. Furthermore, it seems the parameters dataStorage and scienceCap have an additional effect and interaction with these values.

Here's an example of what I mean:

dataStorage = 2000

crewsRequired = 4

SurfaceBonus = 0.15

ContextBonus = 0.35

homeworldMultiplier = 0.01

scientistBonus = 0.25

researchTime = 7

scienceMultiplier = 6

scienceCap = 1000

dataStorage = 500

crewsRequired = 2

SurfaceBonus = 0.25

ContextBonus = 0.1

homeworldMultiplier = 0.01

scientistBonus = 0.25

researchTime = 5

scienceMultiplier = 3

scienceCap = 500

I understand the basics of these values, scientist bonus increases data values per scientist, surface bonus increases data values when data comes from the body the lab is landed on, research time is an exponential value that affects length of research etc etc etc. These are all very clear cut but if you look at the values I have listed above you would expect the 4 man Mk3-8 would actually generate a fair amount of science in relation to the 2 man Mk2-LC but that is far from the case. With these values, both labs landed on the Mun, both labs with the same amount of data same experiments and the Mk2-LC was generating 224 science/day and the Mk3-8 was generating only 7. That doesn't seem right and is VERY confusing too me. I've tried altering the values somewhat and played around with different values but short of matching the numbers between the two labs, the Mk2-LC ALWAYS performs better than the MK3-8 and that makes no sense. It has less scientists, stores less data, has a lower science cap and lower science multipliers yet generates more science per day. This is counter-intuitive so I'm seeking clarification.

FYI - I rebuilt the craft in between my changes to the cfg files to insure that I had the correctly loaded values for the craft when testing numbers.

tl;dr summation: SurfaceBonus, ContextBonus, scientistBonus, researchTime, scienceMultiplier, dataStorage and scienceCap interactions don't seem to make any mathematical sense...

If anyone has any input I would love to hear it.

Link to comment
Share on other sites

I don't like current OP mechanics of the science lab and also read the forums for some information. The lab is a little more balanced when a life support mod is used, but its still producing too much science compared to the little supply consumption in USI LS. For my personal taste the lab is supposed to just produce a little bit of extra science in the background while running other missions.

Looking at the values in those 2 config files its not really surprising you get such confusing results... imho its a mess and has nothing to do with reasonable variation.

Values of the current stock science lab

    MODULE
{
name = ModuleScienceLab
containerModuleIndex = 0
dataStorage = 500
crewsRequired = 1
canResetConnectedModules = True
canResetNearbyModules = True
interactionRange = 5
SurfaceBonus = 0.1
ContextBonus = 0.25
homeworldMultiplier = 0.1
RESOURCE_PROCESS
{
name = ElectricCharge
amount = 10
}
}

MODULE
{
name = ModuleScienceConverter
scientistBonus = 0.25 //Bonus per scientist star - need at least one! So 0.25x - 2.5x
researchTime = 7 //Larger = slower. Exponential!
scienceMultiplier = 5 //How much science does data turn into?
scienceCap = 500 //How much science can we store before having to transmit?
powerRequirement = 5 //EC/Sec to research
ConverterName = Research
StartActionName = Start Research
StopActionName = Stop Research
}

Independent parts

  • Experiments -> Data
    • Maybe: Experiment science * (1.0 + SurfaceBonus) * (1.0 + ContextBonus)
    • Or: Experiment science * (1.0 + SurfaceBonus + ContextBonus)
    • homeworldMultiplier is also applied here (as a penalty)
    • => Imho this part should be kept identical for all labs...

    [*]Data -> Science ratio

    • Based on scienceMultiplier only
    • 1 Data => 5 Science
    • => Far too much for my taste...
    • Essentially this means that you get more than 6 times the science per experiment!
    • => Primary cause for the extreme misbalancing...

    [*]Data -> Science time constraints

    • Based on researchTime AND dataStorage
    • (And somehow also on the sum of stars of all scientists in the lab => scientistBonus)
    • The exact equation seems to be absolutely unknown in this forum...
    • The stock comment says researchTime is an exponential modifier!
    • The stock comment says Larger = slower!
    • dataStorage actually is part of the equation and influences the processing speed!
    • => Most difficult part to tweak...
    • => Most important part to balance against Life Support...

Back to the values in the post above

dataStorage 500 vs. 2000 -> slower vs. faster

researchTime 5 vs. 7 -> faster vs. slower

Those 2 values have the most influence on the outcome (exponential part of the equation).

Most of the other values also have been changed (to cause absolute confusion), but I think those should be rather secondary (only linear influence).

Reasonable tweaks and variation between labs

  • Keep Experiments -> Data constant for all labs
    • => or maybe adapt the bonuses a little to create stationary labs and highly mobile labs
    • => stationary labs don't get much bonus from correct context
    • => highly mobile labs are supposed to be moved around to benefit from the higher bonus values

    [*]Modify Data -> Science ratio a bit with the different labs

    • => Quality of the lab
    • maybe numbers between 0.5 and 1.0 (instead of the stock 5.0)
    • => more expensive lab => better hardware => more science from the same data

    [*]Adapt Data -> Science time constraints to balance against Life Support mods

    • Larger labs (higher dataStorage values) somehow have to be compensated with higher scienceMultiplier values
    • => Therefore we need some sort of guess about what the equation looks like... :/
    • Integers are not enough here... 5 -> 6 makes a huuuge difference
    • Hopefully floats are allowed?

Link to comment
Share on other sites

Well to be perfectly honest, these values were never meant to represent any kind of final version. For that matter, they were values that were far out of whack of each other for the purposes of trying to balance outputs through variations of values. The point I was trying to make was given the explanations for the parameters that are available in the wiki, forums, various cfg files and several different reddit threads they do not match up to the explanations given.

For instance, the SurfaceBonus parameter is supposed to represent a bonus to the value of the science you receive when conducting research while landed on a body. That is true - to a point but only in so far as the bonus that is applied to the value of the data while you are located on the surface. However, if you take the same data and move it to orbit before loading it in the lab you will lose that surface bonus so the parameter does not represent an actual bonus to the science but rather to the data value while landed. In a way, this is a bit of an exploit since you can spend the time to load the data (far shorter) then move to orbit to maintain a steady supply of solar power to do the research (far longer) and you ultimately receive the same science total you would if you remained on the surface. The same thing applies to the ContextBonus only in this case it relates to the location of the lab combined with the location of the experiment. If you conduct an experiment on the Mun and then process said results either on the surface or in orbit around the Mun you will have the ContextBonus value applied again to the data value received when adding into the lab. The bonus applies to an experiment's data value so long as you remain in the SOI where you did the experiment. One additional thing to note is that these values are also affected by the bonuses that are already given to an experiment based on location - Kerbin<Mun<Minmus<Duna etc etc etc. This adds another later of complexity to figuring out balanced values and how the parameters interrelate. The HomeworldMultiplier is meant to function as a penalty; however, that penalty is ONLY applied if you are landed on the surface of Kerbin.

One problem I see is these values are always applied as modifiers to the data value itself and has nothing to do with the actual science return you receive from the lab. This is almost counter-intuitive as it places a higher value on the location of the data processing rather than on the science results you receive for conducting the research. While data from an experiment is the valuable commodity here and that correlates to common sense, where you process the data at normally doesn't matter at all. If you take your results from the Amazon and process them in Las Vegas it doesn't matter - it's the results of the experiment that should make the difference.

As for returns - well it can be debated whether the returns are too high or not. If you take the standard MPL-LG-2 with its default values, the science return is actually rather slow. While you do receive a large amount of science in return (5x the data value) you will trade off time for receiving that. When playing with a life support mod the time factor becomes an issue and I would always recommend that people play with some version of life support no matter which you choose - I actually prefer TACLS myself. Without some sort of LS mod though, time is of no importance and makes a lab a VERY powerful ally to the science game. I fully understand the exponential factor involved in the ResearchTime parameter - that actually has been the easiest to figure out with a value of 1 equating into ~1 second and it works in an exponential form from there with approximate time values of 1-2-4-16-256-65536 etc. These time values relate to how long it takes to process 1 data into 1 science. The equation is then affected by the total amount of data you have in the lab and also appears to be affected by the maximum amount the lab can hold but I'm not sure about that part. How these pieces work I have not been able to nail down yet but it is one of the critical pieces of information needed to fully flesh out the mathematics behind the process.

ScienceRatio is a whole number value only so no fractional decimal forms can be used. As a matter of fact, if you use a decimal value it seems to default to a value of 5 but I have not 100% verified that since finding that whole numbers are the only thing that works - I've only toyed with those.

The end result of all this research into the lab mechanics is intended to be exactly what you mention - a mod containing a variety of labs specialized to do different things in different situations. Mobile labs for fast data processing but very low returns, labs specialized at surface research, very large/heavy labs with slow processing/high returns/huge data storage etc. The biggest issue I'm having though is solving the math behind the interrelation of all the parameters including the data storage values combined with research time as a big hurdle to overcome. In the end, to fully accomplish what I have in mind may take a custom plugin to get past the limitations of stock but I'm hoping that can be avoided for simplicity sake. Ultimately, the math behind all of these relationships will determine whether that is going to be needed or not.

Link to comment
Share on other sites

For instance, the SurfaceBonus parameter is supposed to represent a bonus to the value of the science you receive when conducting research while landed on a body. That is true - to a point but only in so far as the bonus that is applied to the value of the data while you are located on the surface. However, if you take the same data and move it to orbit before loading it in the lab you will lose that surface bonus so the parameter does not represent an actual bonus to the science but rather to the data value while landed. In a way, this is a bit of an exploit since you can spend the time to load the data (far shorter) then move to orbit to maintain a steady supply of solar power to do the research (far longer) and you ultimately receive the same science total you would if you remained on the surface. The same thing applies to the ContextBonus only in this case it relates to the location of the lab combined with the location of the experiment. If you conduct an experiment on the Mun and then process said results either on the surface or in orbit around the Mun you will have the ContextBonus value applied again to the data value received when adding into the lab. The bonus applies to an experiment's data value so long as you remain in the SOI where you did the experiment. One additional thing to note is that these values are also affected by the bonuses that are already given to an experiment based on location - Kerbin<Mun<Minmus<Duna etc etc etc. This adds another later of complexity to figuring out balanced values and how the parameters interrelate. The HomeworldMultiplier is meant to function as a penalty; however, that penalty is ONLY applied if you are landed on the surface of Kerbin.

One problem I see is these values are always applied as modifiers to the data value itself and has nothing to do with the actual science return you receive from the lab. This is almost counter-intuitive as it places a higher value on the location of the data processing rather than on the science results you receive for conducting the research. While data from an experiment is the valuable commodity here and that correlates to common sense, where you process the data at normally doesn't matter at all. If you take your results from the Amazon and process them in Las Vegas it doesn't matter - it's the results of the experiment that should make the difference.

Thats true... after all it is a bit strange that the location of the lab is important when the data is generated. I guess the devs thought it would be too simple without this mechanics, but implementing this modifiers for the data -> science part instead would have introduced too much complexity. This would mean that the science you receive always changes when the lab is moved and that you have to keep track of all experiments currently researched in the lab. The player then would also want to know which experiments are still processing to find out when he can safely move the lab. That requires quite some implementation effort on the backend side and also some new UI elements. Instead the devs went the easy way and simply said they check the location and bonuses when the data is generated... after that step there is only that generic bunch of data left and the lab does not care anymore where exactly it came from.

So I guess you can either remove that part completely by setting the bonuses to zero to make it more realistic, but then you have less variation for your mod. Or you stick to the system the devs implemented... or you implement your own one that continuously tracks the experiments to be researched and the location of the lab.

As for returns - well it can be debated whether the returns are too high or not. If you take the standard MPL-LG-2 with its default values, the science return is actually rather slow. While you do receive a large amount of science in return (5x the data value) you will trade off time for receiving that. When playing with a life support mod the time factor becomes an issue and I would always recommend that people play with some version of life support no matter which you choose - I actually prefer TACLS myself. Without some sort of LS mod though, time is of no importance and makes a lab a VERY powerful ally to the science game.

From what I know TAC LS consumes ressources much quicker compared to USI LS. So with TAC LS the science return could and should be higher to be balanced correctly. Maybe the 5x modifier actually makes sense there, I don't know. I just did some simple calculations regarding USI LS and noticed you can keep those 2 scientist alive forever with just a few tons of supplies and can abuse the time warp again. With only one inline module of supplies you can run your lab a few hundred days and produce a few thousand science. Also keep in mind that if the data bonus modifiers are removed you can keep your lab in kerbin orbit without a problem and easily send lots of supplies or all that stuff TAC uses. Then there is not much anymore that keeps you from time warping until the tech the is unlocked.

I fully understand the exponential factor involved in the ResearchTime parameter - that actually has been the easiest to figure out with a value of 1 equating into ~1 second and it works in an exponential form from there with approximate time values of 1-2-4-16-256-65536 etc. These time values relate to how long it takes to process 1 data into 1 science. The equation is then affected by the total amount of data you have in the lab and also appears to be affected by the maximum amount the lab can hold but I'm not sure about that part. How these pieces work I have not been able to nail down yet but it is one of the critical pieces of information needed to fully flesh out the mathematics behind the process.

ScienceRatio is a whole number value only so no fractional decimal forms can be used. As a matter of fact, if you use a decimal value it seems to default to a value of 5 but I have not 100% verified that since finding that whole numbers are the only thing that works - I've only toyed with those.

I fear the restriction to integer values actually is a huge problem. There is no way to make one lab a little bit faster or slower. If you lower the science value you instantly have a super speed lab and you cant easily compensated for that with one of the other modifiers that only have linear impact on the speed. The current amount of data stored in the lab is also part of the equation and changing the maximum amount of data that can be stored indirectly influences that value if I understand it correctly. So if you create 2 labs and the only difference is that one lab has a maximum data storage of 1000 instead of 500 those labs would be equally fast if you fill them both with only 500 data. But the lab with the larger data storage can become much quicker if you actually fill it up with more than 500 data and reaches the highest speed with 1000 data.

The end result of all this research into the lab mechanics is intended to be exactly what you mention - a mod containing a variety of labs specialized to do different things in different situations. Mobile labs for fast data processing but very low returns, labs specialized at surface research, very large/heavy labs with slow processing/high returns/huge data storage etc. The biggest issue I'm having though is solving the math behind the interrelation of all the parameters including the data storage values combined with research time as a big hurdle to overcome. In the end, to fully accomplish what I have in mind may take a custom plugin to get past the limitations of stock but I'm hoping that can be avoided for simplicity sake. Ultimately, the math behind all of these relationships will determine whether that is going to be needed or not.

That sounds awesome and I am really looking forward to your plugin/mod. Sorry I wasn't able to help with the equation, but from what we can currently see it really does not look too good. An exponential modifier that only allows integers is just rather useless. The only thing that could be tried is to keep all numbers for 2 testing labs the same and increase the researchTime modifier for one lab by 1. This makes the adapted lab much slower than the usual one. Now the dataStorage can be increased step by step until the speed of the new lab is the same as the speed of the usual one again (for maximum amount of data stored). This is then more or less the implementation enforced value that you have to accept if you dont want to create your own plugin. With a bit of luck you get the same speed with a few thousand data storage capacity. With bad luck this value has to be much greater and is not useful anymore.

EDIT:

Instead of just talking I decided to actually do something useful... :D

  • researchTime + 1 leads to 1/10 of the research speed
  • dataStorage * 2 leads to double the research speed

scienceMultiplier = 1
researchTime = 6
dataStorage = 500
@100% => 28.3500 sci/day
researchTime = 7
dataStorage = 500
@100% => 2.8350 sci/day
dataStorage = 1000
@50% => 2.8350 sci/day
@100% => 5.6700 sci/day
dataStorage = 2000
@25% => 2.8350 sci/day
@50% => 5.6700 sci/day
@100% => 11.3400 sci/day
researchTime = 8
dataStorage = 500
@100% => 0.2835 sci/day
dataStorage = 1000
@100% => 0.5670 sci/day
dataStorage = 2000
@100% => 1.1340 sci/day
dataStorage = 4000
@100% => 2.2680 sci/day
researchTime = 9
dataStorage = 500
@100% => 0.0284 sci/day

EDIT2:

I investigated this further by changing only one variable and keeping the others constant.

Im quite sure this is the correct equation:

sci/day = dataStored * scienceMultiplier * sumScientistStars * scientistBonus * 1/10^researchTime * 22680

Example:

dataStored = 500

scienceMultiplier = 2

sumScientistStars = 5 (one scientist with 5 stars in the lab)

scientistBonus = 0.25

researchTime = 7 (default)

500 * 2 * (5 * 0.25) * 1/10000000 * 22680

= 1000 * 1.25 * 0.002268

= 1.25 * 2.268

= 2.835 sci/day

Edited by Iodun
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...