Jump to content

Mod to Generate Science Contracts by Searching Science Archives to Find New Science to Do


arkie87
 Share

What should the name of this mod be?  

34 members have voted

  1. 1. What should the name of this mod be?

    • Contract Configurator Pack: Field Research
      16
    • Contract Configurator Pack: Undiscovered Science
      12
    • Contract Configurator Pack: Science Explorer
      2
    • It's own mod: Do Science!
      4


Recommended Posts

Already got it so you could filter it any which way - it'll be just as easy to do surface only, orbital only, flight only, biome-specific, etc.

Ugh, I thought I was just about done, but realized I don't have anything for looking at what experiments can actually be DONE by the player. Research is part of it, but there are other aspects:

  1. Does the player have the pre-requisite building upgrade (EVA and samples)? For EVA it's even uglier, because you can do EVAs on the surface of Kerbin without an upgrade, so it's got some special cases.
  2. Asteroid sample experiments are a big outlier. Hypothetically, you can do it right on day 1, but I wouldn't want to offer the player "do an asteroid sample while landed in Kerbin's grasslands" in a simple 1-star contract. :)
  3. Is there even a way to tell that a given experiment requires a part? I'll have to look closer at that.

It's never as easy as you first think :/

I'd say do whatever is easiest. Maybe just dont offer these contracts for Kerbin...

I dont think there is a way to tell if an experiment requires a part; you probably will manually have to tell it to check...

If all that is too hard, i'd say just check if a player has unlocked surface samples, and if so, tell players to collect surface sample from X biome. That would be a GREAT start!

Link to comment
Share on other sites

Ugh, I thought I was just about done, but realized I don't have anything for looking at what experiments can actually be DONE by the player. Research is part of it, but there are other aspects:

  1. Does the player have the pre-requisite building upgrade (EVA and samples)? For EVA it's even uglier, because you can do EVAs on the surface of Kerbin without an upgrade, so it's got some special cases.
  2. Asteroid sample experiments are a big outlier. Hypothetically, you can do it right on day 1, but I wouldn't want to offer the player "do an asteroid sample while landed in Kerbin's grasslands" in a simple 1-star contract. :)
  3. Is there even a way to tell that a given experiment requires a part? I'll have to look closer at that.

2. GameVariables.Instance.UnlockedSpaceObjectDiscovery(ScenarioUpgradeableFacilities.GetFacilityLevel(SpaceCenterFacility.TrackingStation))

And really maybe it's better not to worry about where the asteroid sample comes from, just ask for a class size. And these are infinitely repeatable on different asteroids so it doesn't much matter anyway.

1. Something like 2, but I don't have the exact code on hand. :cool:

3. I'm not aware of anywhere that experiments are tied to actual parts, I suppose you could loop through all of the parts with a ModuleScienceExperiment and check their experimentID, then check if any valid part is available.

Link to comment
Share on other sites

Alrighty, thanks again DMagic, got all the progression stuff in. Took a while to figure out that AvailablePart.moduleInfos[].moduleName I was looking for was not "ModuleScienceExperiment", not "ScienceExperiment", but "Science Experiment". Jeez.

Anyway, I think I've got all the groundwork stuff done, so now it's mostly a question of putting the contracts together, which hopefully won't take too long (but I can sometimes get carried away when I come up with an interesting idea for a contract...).

So what do we want to call this thing? Going through a couple names in my head, and right now I like "Contract Pack: Field Research". Thoughts?

Link to comment
Share on other sites

Alrighty, thanks again DMagic, got all the progression stuff in. Took a while to figure out that AvailablePart.moduleInfos[].moduleName I was looking for was not "ModuleScienceExperiment", not "ScienceExperiment", but "Science Experiment". Jeez.

Anyway, I think I've got all the groundwork stuff done, so now it's mostly a question of putting the contracts together, which hopefully won't take too long (but I can sometimes get carried away when I come up with an interesting idea for a contract...).

So what do we want to call this thing? Going through a couple names in my head, and right now I like "Contract Pack: Field Research". Thoughts?

Biome Research? To indicate that the mod is integrated with KSP biomes... or Biome Field Research?

When i thought the author of "For Science!" mod might be interested in writing this mod, i thought it should be called "Do Science!"...

Link to comment
Share on other sites

I was asking as a solution for the issue of figuring out whether or not a contract is valid, but maybe it's being looked at the wrong way? Maybe an area should be identified, then a contract built around it? Maybe if a scansat dependency is unavoidable, scanning could be incorporated in the contract building, making it so that you have to have a minimum level of scan detail for certain types of contracts?

Link to comment
Share on other sites

I was asking as a solution for the issue of figuring out whether or not a contract is valid, but maybe it's being looked at the wrong way? Maybe an area should be identified, then a contract built around it? Maybe if a scansat dependency is unavoidable, scanning could be incorporated in the contract building, making it so that you have to have a minimum level of scan detail for certain types of contracts?

Ah I see. I'm thinking for the first version I'll just leave it as is, but it will need to be addressed at some point. My current thinking (which hasn't been vetted by looking at what's possible) is to do a walkthrough of the vertices of the underlying data structure that represents the planet's mesh/PQS (which I finally just figured out stands for Planet Quad Sphere). For each vertex get the biome and flag whether it's above or below sea level. Use that information to get a % of land/water for each biome. I can then use that to estimate what biome/situation combinations can be considered extremely difficult and filter them out (or better yet, filter them into special 3-star contracts that make the difficulty clear).

I have no idea how hard that will be code wise. I have no idea how performant it will be (do I need to do it one-time only at game start and cache the results to disk? or perhaps once per game without caching?). Regardless, I can't see it being something that can be done per scene change/game load.

As far as the player figuring out where the biomes are, the most I'll do is give suggestions in the mod's thread. SCANsat is one, KRE shows the current biome, and the stock cheat menu has the biome overlay. Out of game, the wiki has biome maps for everything, and I'm sure there's more options out there too. Some players may want to figure it out on their own, as the biome names often give enough of a hint ("Highlands", "Northern Craters", "Poles", etc.)

- - - Updated - - -

Biome Research? To indicate that the mod is integrated with KSP biomes... or Biome Field Research?

When i thought the author of "For Science!" mod might be interested in writing this mod, i thought it should be called "Do Science!"...

Ah, but there are also experiments that are non-biome specific. :)

Link to comment
Share on other sites

So what do we want to call this thing? Going through a couple names in my head, and right now I like "Contract Pack: Field Research". Thoughts?

Perhaps something like Directed Contracts or Directed Science? "Field Research" sounds more like something new rather than making contracts more productive.

Link to comment
Share on other sites

Perhaps something like Directed Contracts or Directed Science? "Field Research" sounds more like something new rather than making contracts more productive.

Oh but it is something new... the contracts aren't all just going to be "go do experiment X at location Y"... that's too boring. Going to have to make some more interesting contracts than that. :)

Link to comment
Share on other sites

Oh but it is something new... the contracts aren't all just going to be "go do experiment X at location Y"... that's too boring. Going to have to make some more interesting contracts than that. :)

i look forward to being surprised by your idea(s) :sticktongue:

Link to comment
Share on other sites

Well, I was getting way too many "Splashed down at Kerbin's Mountains" shenanigans, so I had to implement something. It's still a work in progress, but I was able to read from the height map directly, so it's relatively fast. Got some interesting data from it:

[TABLE=class: grid, width: 160]

[TR]

[TD]Biome[/TD]

[TD=align: right]Land%[/TD]

[/TR]

[TR]

[TD]Badlands[/TD]

[TD=align: right]84.25[/TD]

[/TR]

[TR]

[TD]Deserts[/TD]

[TD=align: right]80.33[/TD]

[/TR]

[TR]

[TD]Grasslands[/TD]

[TD=align: right]66.99[/TD]

[/TR]

[TR]

[TD]Highlands[/TD]

[TD=align: right]99.57[/TD]

[/TR]

[TR]

[TD]Ice Caps[/TD]

[TD=align: right]0.20[/TD]

[/TR]

[TR]

[TD]Mountains[/TD]

[TD=align: right]99.39[/TD]

[/TR]

[TR]

[TD]Shores[/TD]

[TD=align: right]0.16[/TD]

[/TR]

[TR]

[TD]Tundra[/TD]

[TD=align: right]48.39[/TD]

[/TR]

[TR]

[TD]Water[/TD]

[TD=align: right]0.00[/TD]

[/TR]

[/TABLE]

Some are fairly unsurprising, but there's some outliers - the ice caps are all water? Does that mean that the ice caps are actually implemented not as terrain but as a structure? That probably also would explain the 50/50 split on tundra. Grasslands also seems to have a surprisingly high percentage of water.

Link to comment
Share on other sites

Sounds like something you could integrate into your spreadsheet!

It's pulled directly from the height and biome maps, which are undoubtedly buried in the game code so I doubt you'd be able to do the same thing in perl. But if you want me to provide the data for the other bodies, I can do that once I get everything verified.

Link to comment
Share on other sites

You're cross-checking biome name and terrain height at a location?

Are you assigning ocean based on anything below 0m? I'm pretty sure that the ice caps are all at 0m, which would explain that biome. Maybe you should make the cutoff -1m or -5m, something like that. The terrain height comes from the pqsController right? It will give negative values under the ocean, so it should work.

Link to comment
Share on other sites

You're cross-checking biome name and terrain height at a location?

Are you assigning ocean based on anything below 0m? I'm pretty sure that the ice caps are all at 0m, which would explain that biome. Maybe you should make the cutoff -1m or -5m, something like that. The terrain height comes from the pqsController right? It will give negative values under the ocean, so it should work.

Correct on everything you said above. I'm going to play around with the numbers a bit and see if there's stuff right at/near the threshold to see if that change the ice caps (and possibly grasslands, those numbers just don't feel right).

Link to comment
Share on other sites

Gotta run, so will just post the raw data. Had to take a completely new approach, but the numbers are way more sensible. :)

Ice Caps = 0.999788348589873

Shores = 0.111981799797776

Water = 0.00176463097382161

Grasslands = 0.98367677703172

Highlands = 0.999844123454224

Tundra = 0.858763471355644

Mountains = 0.996277338296882

Badlands = 1

Deserts = 0.993243243243243

Link to comment
Share on other sites

I am slightly alarmed by the 0.18% of water that's land, myself. Can you dump coordinates of water in land biomes, and vice versa?

Heh, you read my mind. What I found was that there are many, many PQSmod objects that modify the terrain height. I had hoped that just using the height map directly would be close enough for my purposes, but there's a lot of areas that get modified significantly by other things (like the ice sheet that has some logic for setting it to 30m across the board). So I changed it to take a random sampling of locations to gather the biome data and doing it using a normal vector (which is significantly slower). But doing it this way, I have the coordinates for those outliers, so I'm thinking I'll make contracts for visiting the rare biome/situation combinations and provide waypoints to guide the player.

Oh, and I though there were some archipelago type islands that account for the ocean/landed combinations? Not sure, once I get to the stage where I'm testing those extracted locations I'll post some screenshots. :)

Link to comment
Share on other sites

That sounds totally awesome @nightingale. Can't wait to see a full array of land mass percentages. I can finally rule out [email protected], and complete my list of all possible reports with a science point spreadsheet. This is even more scientific than MythBusters. :D

The contracts with waypoints to complete the more difficult biome studies are what will make this one of the must-have mods in my book. Way to go!

Link to comment
Share on other sites

I've been watching this thread with much interest for the past 4 days. It is fascinating to see people collaborate on a brilliant idea.

This contract pack/generator will be the biggest thing of all.

As for the naming of this pack I would suggest "Undiscovered Science". What do you think?

Link to comment
Share on other sites

I've been watching this thread with much interest for the past 4 days. It is fascinating to see people collaborate on a brilliant idea.

This contract pack/generator will be the biggest thing of all.

As for the naming of this pack I would suggest "Undiscovered Science". What do you think?

Oooh, there's something I like about that name, I'll have to give it some thought.

Now, how about some rare science? It's kind of disappointing that there's nothing in the text that actually refers to the fact that it's splashed down.

1kpVzTN.png

If anyone wants to do some exploring, here's a few of the other rare science locations that I collected:

Land waypoints for biome Water
-76.552734375, 171.826171875
-77.607421875, 171.826171875
72.861328125, 343.564453125
Water waypoints for biome Ice Caps
72.158203125, 343.564453125
74.619140625, 346.552734375
72.158203125, 346.552734375
Water waypoints for biome Highlands
-3.427734375, 19.599609375
Water waypoints for biome Mountains
40.869140625, 211.376953125
-59.326171875, 317.021484375
-21.181640625, 65.654296875
Water waypoints for biome Deserts
10.458984375, 260.947265625
4.306640625, 244.423828125
8.876953125, 227.900390625
Water waypoints for biome Badlands
-2.373046875, 70.576171875
-13.798828125, 47.021484375
-17.841796875, 30.322265625

Link to comment
Share on other sites

Now, how about some rare science? It's kind of disappointing that there's nothing in the text that actually refers to the fact that it's splashed down.

http://i.imgur.com/1kpVzTN.png

Based on my calculations, a materials study while splashed down yields 9 science, but while landed yields 7.5; while you are clearly splashed down in the image, you aren't being recognized as splashed down in the game. That is just weird. Speaking of weird, how about the name "Weird Science?" :P

Speaking of naming, is this planned to be a standalone mod or a contract pack for the Contract Configurator? I was thinking it was a CC contract pack that would be called something like the "Kepler Science Explorer" pack.

Link to comment
Share on other sites

Based on my calculations, a materials study while splashed down yields 9 science, but while landed yields 7.5; while you are clearly splashed down in the image, you aren't being recognized as splashed down in the game. That is just weird. Speaking of weird, how about the name "Weird Science?" :P

Speaking of naming, is this planned to be a standalone mod or a contract pack for the Contract Configurator? I was thinking it was a CC contract pack that would be called something like the "Kepler Science Explorer" pack.

Huh, weird. I actually spawned in shallow water and had to roll myself deeper. Guess I didn't go quite deep enough. :P

It'll be a Contract Configurator contract pack. Weird Science doesn't do it for me, but I do like "Science Explorer".

Link to comment
Share on other sites

I think "Science Explorer contract pack" would be good if it is just a contract pack.

But if it is a mod that will stop offering a contract after and only after you sucked all the science out of a location, then I think "Do Science!" would be better.

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.

 Share

×
×
  • Create New...