Jump to content

[0.90 + 1.0 update] Contract Science Modifier (v0.4) [2015.01.28]


Ser

Recommended Posts

Modifies science awarded by KSP contracts in a flexible and configurable way

44bc838e1278a7921b1a19a1b1a87846.png

Supported KSP version: 0.90, 1.0

Latest mod version: 0.4

License: GNU GPLv3 (included)

Sources: included

Description:

Science in the game can be understood as a precious knowledge that we crawl the whole Universe on our kerbals' bellies for just to understand how to build new engines or rover wheels.

But what's the idea behind science awarded for certain contract completion? "Sign'ere n we'll give ya half-a-ton of blueprints of that new rover wheels if ya only manage to get to the orbit n hang'ere around abit. Frankly speaken', we've already invented all that stuff a long time ago without launchen' your stupid funny rockets in space."

... ... Well... but who's in charge for the Space Program here? Why do we keep doing all of these: launching rockets, wasting rare materials, killing kerbonauts, spilling extremely poisonous oxidizer into environment when The Korporations on Kerbin can give us much more knowledge than the standard Mun mission can bring at once just for doing almost insignificant favours for them? Does anyone else have a feeling that if it goes that way then soon we'll start getting science in advance or pump it from the ground like oil?

Moving a slider to 10% of science at a career start doesn't help a lot as it reduces ALL science generation including income from experiments thus just making things harder but keeping that terrifying disbalance in place.

That's why this mod.

Also it allows to rebalance science flow from contracts in case you use a variety of contract generating mods each with its own science reward rates and the entire collection thus just cannot have balance from the box.

Download from Curse for KSP 0.90

Download from Kerbal Stuff for KSP 0.90

Stock and Fineprint template update for KSP 1.0 (dropbox)

Version history

0.4 extended configuration capabilities allowing to specify settings per mod, contract or contract parameter types

0.3 added settings for output science values ceiling and non-linearity

0.2 some bug fixed

0.1 primary release

Installation:

If you're installing the mod for the first time, just unzip the package into your KSP\GameData folder.

Updating from version 0.3:

  • If the "factory" settings are OK for you then delete the entire mod's folder and extract a new one.
  • If you have altered the mod's configuration file earlier and are happy with those settings but still want to update: Save the file "contract_science_modifier.cfg" somewhere or copy its entire contents to clipboard. Update the mod as described earlier. Substitute the
    "contract_science_modifier.cfg" with your old one. New version should work fine with your old config.

Usage:

The mod is active once you installed it.

By default the science multiplier is 0.05. This means contract science rewards will be reduced by 20 times and that applies to newly offered contracts only.

You can change this in the .cfg file. The settings are:

scienceMultiplier

Values greater or equal to 0 affect newly offered contracts only, leaving already available or active ones untouched.

Any value less than 0 nullifies science rewards of existing and new contracts except for already completed ones.

Defaults to 1.

Values above 1 are possible but not recommended because they will increase science income from contracts and that's not what this mod is for :D

scienceCeiling

Sets the ceiling that resulting science reward values should never exceed.

Ignored if not greater than 0.

Defaults to 0 (disabled).

scienceNonLinearity

Sets the way of how the resulting values should respect the scienceCeiling setting. Makes sense only with positive scienceCeiling.

true - makes the resulting values smoothly approach the ceiling (non-linear).

Consider that in order to respect the ceiling the values appear lower than expected when using this option.

anything else - original reward values are simply multiplied by the scienceMultiplier (linear)

and everything that appears to be higher than ceiling after that is just set equal to it.

Makes sense only with positive scienceCeiling.

Defaults to false.

bypass

true - makes the mod leave rewards unmodified

anything else - makes the mod apply modifications on contracts' science

Defaults to false.

It is possible to specify settings for all contracts, per specific mods, contract types or contract parameter types.

For extended configuration and usage instructions please view the README.txt file included in the archive

Stock by Squad and FinePrint by Arsonide

Contract Configurator by nightingale

Mission Controller 2 by malkuth

Orbital Material Science by N3h3miah

Orbital Science by DMagic

Station Science by ethernet

1. Let's assume that we want to get the science output of contracts halved. So we set scienceMultiplier = 0.5

If we set scienceCeiling = 0, i.e. disable it, no need to worry about scienceNonLinearity as it doesn't have any effect without ceiling, then we'll get the value of 2 converted to 1, 6 converted to 3, 100 converted to 50 and so on up the infinity (linear behavior).

2. Now let's suppose that we want to keep that progression but limit the science we get by some value, say 20. Then our settings will be as follows:

scienceMultiplier = 0.5

scienceCeiling = 20

scienceNonLinearity = false

So we get: 2 converted to 1, 6 -> 3, 20 -> 10, 40 -> 20, 100 -> 20, 1000 -> 20, 9000 -> 20 and so on: whatever is the value, the output will be no greater than 20. But we'll get the same result for both not-so-cool 100-original-science contract and the coolest 9000-original-science contract because they are too large even after reducing and both are cut to 20.

3. Let's now use the following settings:

scienceMultiplier = 0.5

scienceCeiling = 20

scienceNonLinearity = true

For the original value of 2 we get 1

The value of 6 now gives us 2.6.

20 -> 6.7

40 -> 10

100 -> 14.3

1000 -> 19.2

9000 -> 19.9

As you can see, the higher the original value, the further a result gets from linear halving but on the other side it smoothly approaches the ceiling of 20 we have set,

thus we still get a little more converted reward for a 9000 contract than for a 1000 one and that 0.7 difference really makes us feel that we have done a much greater job.

However, while the raw values aren't so enormous (e.g. 100) the growth of output is reasonable and is not sharply cut by 20.

Edited by Ser
cfg update for KSP 1.0
Link to comment
Share on other sites

Hey Ser: replication was simple. While I suppose there might be interference from my mod, which I forgot to uninstall (though I doubt it), all I had to do was start a new career game. The first 4 had the multiplier properly applied (100x, so it would be easy to see). I then accepted and completed the "launch new vessel" contract, and the new ones which popped up did not have properly applied modifiers.

Javascript is disabled. View full album

Log file.

Link to comment
Share on other sites

Starman4308, Thanks for your help. Think I've found a workaround: as you said, it should not be started/destroyed every scene.

Going to test that a bit and upload a new version than. Hope the source code was useful though.

Edited by Ser
Link to comment
Share on other sites

Starman4308, Thanks for your help. Think I've found a workaround: as you said, it should not be started/destroyed every scene.

Going to test that a bit and upload a new version than. Hope the source code was useful though.

Thanks: had I not already seen the pattern I'm using from another contract science modifier, I probably would've adopted the general structure from your mod.

Two suggestions: you might be able to use HighLogic.CurrentGame.Title to determine if the game has changed, and if nothing works, I am 99% sure what I've got going (also MIT-licensed) is robust and functional. The only change I'm thinking of making to that end is ensuring both the dictionary of previously encountered contracts, and the multiplier code, ignore contracts which have been completed, failed, or declined (which would further reduce the chance of two contracts sharing a GUID).

Link to comment
Share on other sites

Thank you so much, I wanted this for a very long time! Finally I can create a field science only Career

Alright, now I only need to beef up the REAL science. Any mod I can use for this?

Thanks. I knew I'm not alone :)

The new version 0.2 with some bug fix download is about to be available on the Curse page as soon as they check the files.

Edited by Ser
Link to comment
Share on other sites

Thanks. I knew I'm not alone :)

The new version 0.2 with some bug fix download is about to be available on the Curse page as soon as they check the files.

Great.

Alright, now that we can set a global modifier for all contracts, I would also like the next step, which is to replace the science you would have gained by something else like funds or reputation

Link to comment
Share on other sites

Does this mod do something significantly different from the Zero Science Contracts Mod?

Yes, it has a config that allows you to tweak the amount and the way contracts are affected. You can also choose to increment science output if you want that so much.

Hmm... it's a surprise that there are several mods already doing the same thing. Have searched alot before implementing my own but found nothing for some reason.

Cool! I might install this and see if I can get comfortable with any science via contracts, then.

I'm certain that without contract science the campaign is fully playable as the native Science-only game mode is. IMHO that was much better balanced and interesting as it required some effort to gain science and advance further in the tech tree. For example, it made much sense of using planes to do experiments on every Kerbin's biome first then to crawl the whole Mun with rovers to be able to go deep into space thus making you visit every single location in the Universe and deal with every aspect of the game instead of pumping science in tons.

Edited by Ser
Link to comment
Share on other sites

Great.

Alright, now that we can set a global modifier for all contracts, I would also like the next step, which is to replace the science you would have gained by something else like funds or reputation

Is there a real need for that? If you want to increase your fund or reputation income you can always open your save file and modify these two settings:

CAREER

{

StartingFunds = 25000

StartingScience = 0

StartingReputation = 0

FundsGainMultiplier = 1

RepGainMultiplier = 1

ScienceGainMultiplier = 1

FundsLossMultiplier = 1

RepLossMultiplier = 1

}

And that's not more a cheat than doing it with some mod because they are originally set by a player at a campaign start so there should be no difference for your consciense whether you modified them or not.

Edited by Ser
Link to comment
Share on other sites

Alright, your right. Differnt request. I'm started a new campaign with your mod but when I switch back to my old campaign, my new contracst are also affected by your mod. Could you make it so the contract science modifier is only applied when the configuration file it is located in the Career save map?

Link to comment
Share on other sites

Alright, your right. Differnt request. I'm started a new campaign with your mod but when I switch back to my old campaign, my new contracst are also affected by your mod. Could you make it so the contract science modifier is only applied when the configuration file it is located in the Career save map?

The good way to implement that would be having some GUI for settings and keep'em per save. But that's too much for such a little thing. I'll think about it.

Link to comment
Share on other sites

The good way to implement that would be having some GUI for settings and keep'em per save. But that's too much for such a little thing. I'll think about it.

True, but what about another global setting, like the ability to filter on Contract Company. Certain Mods rely heavily on the research by contracts like DMagic Orbital Science

and Station Science. Could you implement an option to ignore these contracts? In other words, don't modify contract science from cetain Companies.

Edited by FreeThinker
Link to comment
Share on other sites

True, but what about another global setting, like the ability to filter on Contract Company. Certain Mods rely heavily on the research my contracts like DMagic Orbital Science

and Station Science. could you allow an ability to ignore these contracts? In other words, don't modify their science.

Or perhaps filtering/filtering-out by contract type - ContractConfigurator gives the ability to create all kinds of contracts where the modder will have likely tuned the science results to something they feel is appropriate.

Link to comment
Share on other sites

If you're open to suggestions, one thing that I do think would be useful would be to allow a "maxScience" value to be defined in the cfg too, where any contract that gives more than X science is reduced to X science - so you can end up with something like this:

1) All contracts give 5% science, so a 200 science contract (normally) now gives 10.

2) maxScience is set to 5, though, so any contract that gives over 5 is reduced to 5: science from that contract is now 5.

3) But a contract normally giving 80 science still gives 4, 50 science still gives 2.5, etc.

The whole point of that would just be to address there being some MASSIVE science contracts that, even if reduced 95% like they are with default settings, still give you 24 science for pretty easy stuff like testing a landing gear while landed (for example).

Or, if it's not totally outside the scope, maybe science could be turned way down for part tests, but could remain relatively higher for other contract types... dunno if that's a realistic thought.

EDIT: Actually, come to think of it, maybe what's going on is that certain contracts aren't being affected by your mod, from FinePrint for example. Is that even possible?

Edited by AccidentalDisassembly
Link to comment
Share on other sites

Thank you people for useful suggestions. I'll think about implementing them.

Haven't tested with any science generating mods so I'll look in that direction now. Contract filtering would be a useful feature I think.

AccidentalDisassembly wrote:

If you're open to suggestions, one thing that I do think would be useful would be to allow a "maxScience" value to be defined in the cfg too, where any contract that gives more than X science is reduced to X science

Yes, it's quite easy to implement, may be in a way of non-linear multiplying: instead of sharply cutting all values at some maximum the output values may "approach" the maximum as orginal values grow but never reach it. That'll feel more natural.

Actually, come to think of it, maybe what's going on is that certain contracts aren't being affected by your mod, from FinePrint for example. Is that even possible?

I don't quite understand, is it a bug or a suggestion?

Link to comment
Share on other sites

Thank you people for useful suggestions. I'll think about implementing them.

Haven't tested with any science generating mods so I'll look in that direction now. Contract filtering would be a useful feature I think.

AccidentalDisassembly wrote:

Yes, it's quite easy to implement, may be in a way of non-linear multiplying: instead of sharply cutting all values at some maximum the output values may "approach" the maximum as orginal values grow but never reach it. That'll feel more natural.

I don't quite understand, is it a bug or a suggestion?

I suppose it's sort of a bug, or rather an additional feature that would be good - it *appears*, anyway, that certain contracts (like aerial surveys from FinePrint) aren't affected by the modifier, and adding FinePrint contracts to the scope of your mod would be cool. =)

You're right, a non-sharp cutoff would be better!

Link to comment
Share on other sites

Just want to say I really like the mod. I was about to go and edit a bunch of mod contracts manually to reduce the science and then you released this mod. Perfect timing. I too would like to see a max science limit feature added. Keep up the awesome work.

Link to comment
Share on other sites

Am I being dense, or is there really no functional difference between setting the value to 0 versus a negative number?

There's no difference if you start a new career.

The difference is when you start using the mod in the middle of a career: a negative value nullifies the contracts you already have in a list in addition to newly offered ones, 0 value doesn't.

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