Jump to content

[1.7.x] Science - Full Reward! (Continued)


Recommended Posts

Science - Full Reward! (Continued)

Get full science rewards from doing your science! Sometimes you just want your entire science reward without bringing seventeen materials bays along. Where do you even put them all? Let's just do the experiment completely the first time! This simple module manager patch teaches your Kerbals to perform their science more thoroughly and completely without having to double, triple, and quadruple-check their findings.

Note: This mod only works with science gained after installation. If you have any science that isn't offering you your full reward, try resetting your experiment and running it again.

Requires Module Manager.

Now on CKAN!

Github: Download or Browse Source (There isn't much to it.)

Are you about to reply to point out that this mod is cheating? Don't worry, you don't have to download this if you don't want to!

But if you're like me and your OCD requires you to get 100% completion on every science situation available but you don't want to grind every experiment many times to get there, then this mod is for you. Give it a try!

Other OCD friendly mods that I like (and therefore recommend):

Science - Full Transmit!

[X] Science! Continued - Science Checklist

Field Research Contract Pack

License: MIT

Here's the original thread. Thanks to @maculator, the original author of this mod! (I hope you don't mind me rereleasing this for newer KSP versions.)

Edited by Tekaoh
Link to post
Share on other sites

=== Previous content broken by the forum, RIP ===

Here's a version that works with the new Breaking Ground ground experiments:

@EXPERIMENT_DEFINITION:HAS[~id[deployed*]]{
	@baseValue = #$scienceCap$
}

 

Edited by Jognt
Tested the shortened version. It works.
Link to post
Share on other sites

I'll PR it to you, it's basically just adding this behind the EXPERIMENT_DEFINITION bit. The reason I changed the % to a @ is not functional, but when using % the value will be moved to the bottom of the list, and it just wasn't pretty IMO. :P

:HAS[~id[deployed*]]
 
I THINK I did the Pull Request thing. This is only my 2nd one ever so let me know if it's wrong.
Edited by Jognt
Cleanup
Link to post
Share on other sites

You may also want to specify a pass. Your patch breaks at the first sight of a mod that touches scienceCap.

As your patch applies in the beginning, you're assigning baseValue the initial scienceCap. Once the scienceCap is changed by anything, baseValue stays at the old value.

Generally, :FINAL passes are frowned upon, but considering how many mods mess with experiment definitions, you may be forced to do a :FINAL.

In short,

 

@EXPERIMENT_DEFINITION:HAS[~id[deployed*]]:FINAL
{
	@baseValue = #$scienceCap$
}

 

Link to post
Share on other sites
34 minutes ago, SilverState said:

You may also want to specify a pass. Your patch breaks at the first sight of a mod that touches scienceCap.

As your patch applies in the beginning, you're assigning baseValue the initial scienceCap. Once the scienceCap is changed by anything, baseValue stays at the old value.

Generally, :FINAL passes are frowned upon, but considering how many mods mess with experiment definitions, you may be forced to do a :FINAL.

In short,

 

@EXPERIMENT_DEFINITION:HAS[~id[deployed*]]:FINAL
{
	@baseValue = #$scienceCap$
}

 

Let's not do FINAL shall we? If you want to be last that bad, just go with FOR[zzzzScienceFullReward].

I left out the pass on purpose since that's up to the distributor to decide. Locally it's running FOR[JogntsTweakables] for instance.

Edit: For those wondering, I cleaned up my posts after realizing I was a jerk to @Tekaoh . He put a lot of effort into getting this mod -continued properly and by the book.

Edited by Jognt
Link to post
Share on other sites
13 minutes ago, Jognt said:

If you want to be last that bad

He doesn't want, he needs to be late in the patching order, otherwise his patch may not do what it's intended to. There's quite a few mods that mess with EXPERIMENT_DEFINITIONs.

Edited by SilverState
Link to post
Share on other sites
1 minute ago, SilverState said:

He doesn;t want, he needs to be last, otherwise his patch may not do what it's intended to. There's quite a few mods that mess with EXPERIMENT_DEFINITIONs.

Yes, but FINAL _really_ shouldn't be used in distribution. You'd prevent anyone from reversing the change for specific experiments for example. There are a LOT of ways to be "at the end of the line" even without using FINAL.

Link to post
Share on other sites

Don't get me wrong, i agree the :FINAL should be avoided at all costs, and ideally should be left to the players to reconfig stuff to their own preferrence. But not everyone respects that, and there's a bunch of :FINAL patches everywhere, once you start mildly modding your game.

Link to post
Share on other sites

Interestingly, the fix in v3.1 did slow the science rate of deployable science back to normal but did not seem to fix the bug with the surface science contracts. With the new code installed, I went to a new place and installed a new ground base and took a new contract, and the status still jumped to 9400% out of 50% and broke the contract.

It looks like this might be a bug in the DLC rather than a problem with the mod. This was reported by someone else 9 days ago. https://bugs.kerbalspaceprogram.com/issues/22701

@Jognt @alex88

Edited by Tekaoh
Link to post
Share on other sites
1 hour ago, Tekaoh said:

Interestingly, the fix in v3.1 did slow the science rate of deployable science back to normal but did not seem to fix the bug with the surface science contracts. With the new code installed, I went to a new place and installed a new ground base and took a new contract, and the status still jumped to 9400% out of 50% and broke the contract.

It looks like this might be a bug in the DLC rather than a problem with the mod. This was reported by someone else 9 days ago. https://bugs.kerbalspaceprogram.com/issues/22701

@Jognt @alex88

Interesting. Just to be sure: Can you confirm that it does not happen without the mod installed?
The deployed experiments should not be touched at all, unless they interact with the vanilla experiments baseValue in some way behind the scenes.

20 hours ago, SilverState said:

Don't get me wrong, i agree the :FINAL should be avoided at all costs, and ideally should be left to the players to reconfig stuff to their own preferrence. But not everyone respects that, and there's a bunch of :FINAL patches everywhere, once you start mildly modding your game.


"If you can't beat them, join them" huh? :P

Edited by Jognt
Link to post
Share on other sites
20 hours ago, SilverState said:

Don't get me wrong, i agree the :FINAL should be avoided at all costs, and ideally should be left to the players to reconfig stuff to their own preferrence. But not everyone respects that, and there's a bunch of :FINAL patches everywhere, once you start mildly modding your game.

And if you encounter such a mod you should inform the owner of the correct way to do it, and why.

Link to post
Share on other sites
1 hour ago, Jognt said:

"If you can't beat them, join them" huh? :P

In this case, I fully believe that the :FINAL is warranted. This MM patch does a single and a very specific thing. When players install this, they're fully aware of what they're installing and what it exactly does. I don't see a case where they'd want to re-patch this (if some other mod messes with balance, this patch would also re-adjust the values accordingly)

50 minutes ago, 5thHorseman said:

And if you encounter such a mod you should inform the owner of the correct way to do it, and why.

Look, I've spent a few weeks writing the configs for Kerbalism's 3.0 science mechanic. 95% of the science configs are my work, and I had to deal with this very exact issue. We did contact a couple of mod creators, requesting changes in their configs, because I was and still am hell bent on avoiding :FINAL. But this is an uphill battle (some never reply, some are inactive, some can't be bothered due to Kerbalism not being everyone's cup of tea), thus not always possible. Currently, I'm running EXPERIMENT_DEFINITION patches very late (:FOR[zzzKerbalism]), and we also incorporate the single run experiments mechanic as well, which has to run :AFTER[zzzKerbalism]. 

All it takes is one bad config to mess this one up, and I would be forced to do the same (:FINAL). There's just no winning in this.

2 hours ago, Tekaoh said:

Interestingly, the fix in v3.1 did slow the science rate of deployable science back to normal but did not seem to fix the bug with the surface science contracts. With the new code installed, I went to a new place and installed a new ground base and took a new contract, and the status still jumped to 9400% out of 50% and broke the contract.

It looks like this might be a bug in the DLC rather than a problem with the mod. This was reported by someone else 9 days ago. https://bugs.kerbalspaceprogram.com/issues/22701

@Jognt @alex88

It's a plugin issue introduced with 1.7.1 (works fine on 1.7.0 and lower). We had to fix this as well. I'll copy paste the explanation from our discord:

Quote

Sir MortimerYesterday at 8:12 PM

they changed the method that calculates the science value of one chunk of data.

until now it was linear, the same amount of data gave you the same amount of value.

the new implementation reduces the science value of subsequent chunks. the first chunk gets full value, the next one a bit less... the last chunk is almost worthless.

to get the full science value out of an experiment you'd have to transmit data in magnitudes larger than what we consider is one full chunk.

probably for breaking grounds, so that the surface experiments continue to produce science value over time, no matter how long they run.

early = high value, over time = low value

I guess that's why their science values are so massive

Therefore, this patch is now useless without plugin support. You should update compatibility stating it's UP TO and including  1.7.0.

Edited by SilverState
Spelling is hard.
Link to post
Share on other sites
23 minutes ago, SilverState said:

All it takes is one bad config to mess this one up, and I would be forced to do the same (:FINAL). There's just no winning in this.

It doesn't mess anything up. Just don't use that mod, plop it in the list of mods that aren't compatible, and explain why. Bam. Your job is done and your mod is 100% functional with the mods it's compatible with.

Link to post
Share on other sites
1 hour ago, SilverState said:

Therefore, this patch is now useless without plugin support. You should update compatibility stating it's UP TO and including  1.7.0.

I think I'd be more interested in investigating plugin support. Might you maybe be able to point me toward some kind of resource that might help me understand what that is and how I might be able to work with it?

Link to post
Share on other sites
2 hours ago, SilverState said:

[snipped a lot]


I understand you're burned out from the Kerbalism 3.0 work you've done as I cannot even begin to imagine the amount of work that took. I'm quite interested in seeing what can be done with this mod still. Because after all, I didn't work on Kerbalism so I still have quite a bit of energy to burn. ;)
For example, these science changes you mention, are they in 1.7.1 or in Breaking Ground? Because depending on the answer the mod can still be perfectly compatible with KSP going forward yet never be compatible with Breaking Ground.

So while respecting the fact that you're really not looking to get back into this rabbit hole, I'd like to second Tekaoh's request for anything that may help understand this new behavior. Perhaps @Sir Mortimer or you can point us to where he found this information?
Even if this specific patch/mod isn't going to work anymore, I have quite a few local/personal stuff that also deals with this. So I'd really like a better understanding of it.

Edited by Jognt
Link to post
Share on other sites
33 minutes ago, Tekaoh said:

Snip

 

17 minutes ago, Jognt said:

Snip

Have a look at these 2 commits:

https://github.com/Kerbalism/Kerbalism/commit/70cbaa00e23cb0c277cc459aa55d2e033ca768a0

https://github.com/Kerbalism/Kerbalism/commit/72eca8cc757adba4cdb82d1f31e43a16994bf9ba

I'm the config guy, so I have no clue what he did there (I don't know C#), but you can probably have a look. Alternatively, drop into our discord and pester Sir Mortimer there, he's reasonably active.

 

@Jognt Regarding the science changes, they're not KSP version specific, they're Kerbalism version specific, i.e. the new science mechanic is present on Kerbalism 3.0+, but you can install it on KSP 1.4 +. So you can still get the new science on an older KSP, DLC is not required. Squad changed something in their code with 1.7.1 (probably to make the new deployable experiments work), and that screws with transmission (you still get full science value if you recover the vessel). This breaks this patch (we literally use the same MM patch, hidden away in a bigger config).

Misread your question.

The change is introduced in 1.7.1, probably for DLC support. I haven't specifically tested 1.7.1 without the DLC, thus the following is an educated guess: The changes are there even without the DLC, and assumed present on 1.7.1 regardless wether Breaking Ground is installed or not.

The bad news is, he only patched our own implementation. I have no clue if this is even fixable for stock modules.

Edited by SilverState
Link to post
Share on other sites
2 hours ago, Jognt said:

So while respecting the fact that you're really not looking to get back into this rabbit hole, I'd like to second Tekaoh's request for anything that may help understand this new behavior. Perhaps @Sir Mortimer or you can point us to where he found this information?

I found it by debug logging the science gains calculated for each chunk of science. I noticed that subsequent chunks got less science points despite being exactly the same size.

Some info about the inner working of Kerbalism, to help understand this in context: when you do an experiment, Kerbalism records a file. Say a crew report is 1MB and worth 1 science points, we have the full 1MB in our storage and start transmitting the data. Kerbalism credits science points once every few kilobytes*, so while you're transmitting that file, your science credit will increase by 0.2 points each 200kb. To calculate the value of a partial file, we used a KSP API function that now returns different values than it did before.

*) actually we now credit based on science value, not file size, but that's irrelevant here

Link to post
Share on other sites
11 minutes ago, Sir Mortimer said:

I found it by debug logging the science gains calculated for each chunk of science. I noticed that subsequent chunks got less science points despite being exactly the same size.

Some info about the inner working of Kerbalism, to help understand this in context: when you do an experiment, Kerbalism records a file. Say a crew report is 1MB and worth 1 science points, we have the full 1MB in our storage and start transmitting the data. Kerbalism credits science points once every few kilobytes*, so while you're transmitting that file, your science credit will increase by 0.2 points each 200kb. To calculate the value of a partial file, we used a KSP API function that now returns different values than it did before.

*) actually we now credit based on science value, not file size, but that's irrelevant here

Cheers! Thanks for popping in. :)

I'm still not quite sure how this would matter for a mod as simple as this one though. I don't know whether the problem @Tekaoh mentioned is there without the mod but I'll assume it is, but this mod doesn't do grand things with science and like @Sir Mortimer said on the github Commit: "Usually this doesn't affect the game at all, because science usually is done in one chunk."

So why would it influence ground experiments when their definition isn't even touched?

Edit: Of course all this is moot if the problem is also there without the mod as the bug report could suggest, in which case it's a base game bug and the mod itself is working fine maybe? :D

Edited by Jognt
Link to post
Share on other sites
On 6/9/2019 at 3:41 PM, Jognt said:

Edit: Of course all this is moot if the problem is also there without the mod as the bug report could suggest, in which case it's a base game bug and the mod itself is working fine maybe? :D

Yep, turned out to be a bug in core that is now resolved with 1.7.2.

Well with that apparently resolved, do we still want to exclude the deployed science from the full reward patch? I understand that the main motivation there was to try to stop screwing up the contracts. But would the general consensus be to continue excluding those or would the majority prefer to get 100% science gains right away on ground science?

Link to post
Share on other sites
12 minutes ago, Tekaoh said:

Yep, turned out to be a bug in core that is now resolved with 1.7.2.

Well with that apparently resolved, do we still want to exclude the deployed science from the full reward patch? I understand that the main motivation there was to try to stop screwing up the contracts. But would the general consensus be to continue excluding those or would the majority prefer to get 100% science gains right away on ground science?

Considering Squad added animations for those experiments it may be fun to see how it plays out. 

The main reason (for me at least) to use this mod is to remove the annoying “Darn it, still not complete?!” feeling. 

I guess it’ll depend on what is more enjoyable, dressing up an outpost and watching Kerbals do their thing or packing it up ASAP and moving along. 

It’s your mod now of course, personally I need to actually play with it before I can judge. (Im not looking forward to Science Lab style ‘load, transmit, leave’, but if my Kerbals can finally look busy without me? Sounds fun maybe)

Link to post
Share on other sites
1 hour ago, Jognt said:

Considering Squad added animations for those experiments it may be fun to see how it plays out. 

The main reason (for me at least) to use this mod is to remove the annoying “Darn it, still not complete?!” feeling. 

I guess it’ll depend on what is more enjoyable, dressing up an outpost and watching Kerbals do their thing or packing it up ASAP and moving along. 

It’s your mod now of course, personally I need to actually play with it before I can judge. (Im not looking forward to Science Lab style ‘load, transmit, leave’, but if my Kerbals can finally look busy without me? Sounds fun maybe)

Yea, that sounds good. I'll try it out for a while and see how it feels the way it is before making any other adjustments. And I'll see who else cares to chime in.

Link to post
Share on other sites
  • 1 month later...
2 hours ago, Ijmmuch said:

Are you this is on ckan?  I only see "Science - Full Transmit" on there.

Yes, it's on CKAN. You could typing "reward" in the "filter by mod name" box. If it doesn't appear, you might want to try refreshing CKAN or making sure your filter settings are correct.

Link to post
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...