Jump to content

[1.x+] Community Resource Pack


RoverDude

Recommended Posts

4 minutes ago, JadeOfMaar said:

CRP itself is just a bunch of configs and only adds resources to your game. It doesn't reduce Ore's availability. It doesn't change your game on its own. It doesn't subtract performance. In this case it's very safe to install and uninstall. However, it is a "foundational" mod, massively important, required by nearly every mod (Many, many mods. Prepare to lose your socks.) that uses resources other than the stock set. It's a "set and forget" thing. Once it's installed you don't have to think about it again and it's always doing its job.

CRP is very safe to install, and is very safe to uninstall as long as: You haven't settled into using heavily game-changing mods already; You've uninstalled these heavy mods; Or you're ready to abandon your playthrough.

So I wouldn't have something like, say, "I installed CRP but the new resources (when applicable as dependencies) don't show up in resource distribution" and other such "variables initialized only at new game start"-esque shortcomings I often see in other games? Asking because I sincerely am not familiar (yet) with how KSP handles this, and a lot of other games usually choke or fallback on these modified-after-the-fact things.

In any case, it's good to know that this doesn't seem to be the case for KSP and I can install CRP with minimal worry, if any. Thanks, this further opens up the range of mods I can try out now. :cool:

Link to comment
Share on other sites

@King Arthur No, it's not like that here. You only get problems if you uninstall CRP then mods break because the resources they use are no longer defined. (KSP hangs at startup when it loads an engine that uses undefined resource, or B9 Part Switch detects undefined resources). It just works. So have fun. :)

Link to comment
Share on other sites

17 minutes ago, King Arthur said:

So I wouldn't have something like, say, "I installed CRP but the new resources (when applicable as dependencies) don't show up in resource distribution" and other such "variables initialized only at new game start"-esque shortcomings I often see in other games? Asking because I sincerely am not familiar (yet) with how KSP handles this, and a lot of other games usually choke or fallback on these modified-after-the-fact things.

To clarify on that further from what JadeOfMar said:  Generating a static set of resources and saving it into the save file is efficient and works well - for small worlds.  KSP's world is *not* small.  It instead generates a random seed at the start of the game, and actual resource distribution at any point (and some surface features, and a few other things...) is generated on-demand from that seed, every time you need it.  This means there's very little statically stored in the save file, and you can add/remove resources, features, etc. just by enabling/disabling the generation code to place them.

It also means that your landed ship may not *quite* be landed when you come back after leaving the area due to rounding errors in the floating-point math.  (It wouldn't surprise me that resource distribution would vary slightly as you came back to an area - but it would be unnoticable in-game as you typically only get a few digits of precision there in the displays.)

Link to comment
Share on other sites

While I agree with the other posters that it won't crash your KSP game, I do think there is one thing to watch out for.

Based on some experiments I did back in the 1.1 days, KSP's resource distributions are generated, in order, from a random seed (as @DStaal said). However, if you change which resources are or are not associated with a given planet (and installing CRP does change this), then you change the number of draws from the random number generator. This means that the resource distributions "downstream" of any planets that have gained/lost resources may be completely different.

That's a problem if your save game already has some ISRU bases set up, but not otherwise.

Link to comment
Share on other sites

@DStaal @Starstrider42 I see, many thanks for the insight. I was aware that resource distribution was based on a seed that was initialized at new game start, I just wasn't aware how static or dynamic the systems beyond that seed were. If everything is generated on the fly based upon that seed, then I can understand there won't be any major problems. Fortunately I haven't setup any immovable ISRU-related infrastructure yet, so I don't have anything to worry on that front. Will I need to perform a rescan with my resource scanner satelites, or will they be updated without my intervention?

On a related note, is resource distribution in asteroids also generated on the fly like with planets? I understand that asteroids are handled like ordinary vessels in the save file, unlike planets which are on rails and not recorded in any way in save files. I got curious and took a look inside one of my save files, and asteroids have a "ModuleAsteroidResource" module with a saved value of "displayAbundance", so am I correct in presuming that KSP will generate resources in asteroids dynamically based on this number, changing composition depending upon currently active mods like CRP? I've captured a few asteroids in orbit around Kerbin and like 20 more tracked/untracked outside of Kerbin SOI, it would be a shame if CRP and similar mods only take effect for newly generated asteroids.

Edited by King Arthur
Link to comment
Share on other sites

39 minutes ago, King Arthur said:

@DStaal @Starstrider42 I see, many thanks for the insight. I was aware that resource distribution was based on a seed that was initialized at new game start, I just wasn't aware how static or dynamic the systems beyond that seed were. If everything is generated on the fly based upon that seed, then I can understand there won't be any major problems. Fortunately I haven't setup any immovable ISRU-related infrastructure yet, so I don't have anything to worry on that front. Will I need to perform a rescan with my resource scanner satelites, or will they be updated without my intervention?

On a related note, is resource distribution in asteroids also generated on the fly like with planets? I understand that asteroids are handled like ordinary vessels in the save file, unlike planets which are on rails and not recorded in any way in save files. I got curious and took a look inside one of my save files, and asteroids have a "ModuleAsteroidResource" module with a saved value of "displayAbundance", so am I correct in presuming that KSP will generate resources in asteroids dynamically based on this number, changing composition depending upon currently active mods like CRP? I've captured a few asteroids in orbit around Kerbin and like 20 more tracked/untracked outside of Kerbin SOI, it would be a shame if CRP and similar mods only take effect for newly generated asteroids.

Asteroids work the same way as planetary resources, so you should be fine.

Link to comment
Share on other sites

  • 2 months later...

Hey, so I'm a fair way through a Youtube series in the After Kerbin planet pack and I've built a lander for a certain moon that digs up Alumina and converts it into fuel for the aluminium hybrid rocket from KSPIE.
Thing is, Alumina is supposed to be distributed across the entire surface of this moon so I can refuel anywhere but since AK doesn't have any CRP configs yet it's only in one biome.
So I made an AK config for Alumina, defining a planetary value and then defining distributions for every biome on the moon to ensure it's everywhere.
Problem is, these changes don't update the save file. If I make a new save file the changes get applied, but even changing the resource seed or deleting my scan data for the moon and taking a new orbital survey doesn't apply the changes to the old save.

Is there any way to apply the changes made to resource configs to a save file? Or is the only way to create an entirely new one?
I'm not familiar with how CRP works, does it merely pick a resource seed when the save file is created that has the correct resource distribution? If so, could I create a new save with configs defining my current planetary resource distributions (since I'd like to keep them) plus Alumina all over this one moon and then copy the seed to my old save?

Edit - Nevermind, got a personal hand from someone on the CRP team. Turns out playing on hard mode affects the chance that a resource will be present as well as its abundance, so although I defined my Alumina as 100 presence chance it was actually less than that in game. Upping the presence chance to 1000 fixed the problem, it's in every biome now.

Edited by TheBeardyPenguin
Link to comment
Share on other sites

  • 5 weeks later...

Hi, is there some documentation somewhere regarding what the values in the resource definitions mean and how to add a resource to planets? I'm gathering that Global Resource adds it to all planets. Is it then overruled by Planetary Resource which is in turn overruled by Biome Resource?

Link to comment
Share on other sites

6 hours ago, juanml82 said:

I'm gathering that Global Resource adds it to all planets. Is it then overruled by Planetary Resource which is in turn overruled by Biome Resource?

That is correct. My response in this thread here will help a lot too, though it's not perfect/complete.

 

Link to comment
Share on other sites

  • 1 month later...

I don't know if anyone has noticed but  KSP 1.9 introduced a Fuel Valve which is able to drain any kind of CRP resource and generate large amount of thrust from it. For many resource this makes absolutely no sence at all.

Fortunatly there is a solution which is to add a  RESOURCE_DRAIN_DEFINITION to the resource definition which will look something like this:

RESOURCE_DEFINITION
{
  name = XenonGas
  displayName = #autoLOC_501003 //#autoLOC_501003 = Xenon Gas
  abbreviation = #autoLOC_6002099 //#autoLOC_6002099 = Xe
  density = 0.0001  
  unitCost = 4
  hsp = 120
  flowMode = STAGE_PRIORITY_FLOW
  transfer = PUMP
  isTweakable = true
  volume = 0.1
  RESOURCE_DRAIN_DEFINITION
  {
	isDrainable = true
	showDrainFX = true
	drainFXPriority = 5
	drainForceISP = 5
	drainFXDefinition = gasDraining
  }
}

 

Edited by FreeThinker
Link to comment
Share on other sites

16 hours ago, FreeThinker said:

I don't know if anyone has noticed but  KSP 1.9 introduced a Fuel Valve which is able to drain any kind of CRP resource and generate large amount of thrust from it. For many resource this makes absolutely no sence at all.

Fortunatly there is a solution which is to add a  RESOURCE_DRAIN_DEFINITION to the resource definition which will look something like this:


RESOURCE_DEFINITION
{
  name = XenonGas
  displayName = #autoLOC_501003 //#autoLOC_501003 = Xenon Gas
  abbreviation = #autoLOC_6002099 //#autoLOC_6002099 = Xe
  density = 0.0001  
  unitCost = 4
  hsp = 120
  flowMode = STAGE_PRIORITY_FLOW
  transfer = PUMP
  isTweakable = true
  volume = 0.1
  RESOURCE_DRAIN_DEFINITION
  {
	isDrainable = true
	showDrainFX = true
	drainFXPriority = 5
	drainForceISP = 5
	drainFXDefinition = gasDraining
  }
}

 

So you're saying I can actually make a water rocket?

Link to comment
Share on other sites

17 hours ago, FreeThinker said:

I don't know if anyone has noticed but  KSP 1.9 introduced a Fuel Valve which is able to drain any kind of CRP resource and generate large amount of thrust from it. For many resource this makes absolutely no sence at all.

Fortunatly there is a solution which is to add a  RESOURCE_DRAIN_DEFINITION to the resource definition which will look something like this:


RESOURCE_DEFINITION
{
  name = XenonGas
  displayName = #autoLOC_501003 //#autoLOC_501003 = Xenon Gas
  abbreviation = #autoLOC_6002099 //#autoLOC_6002099 = Xe
  density = 0.0001  
  unitCost = 4
  hsp = 120
  flowMode = STAGE_PRIORITY_FLOW
  transfer = PUMP
  isTweakable = true
  volume = 0.1
  RESOURCE_DRAIN_DEFINITION
  {
	isDrainable = true
	showDrainFX = true
	drainFXPriority = 5
	drainForceISP = 5
	drainFXDefinition = gasDraining
  }
}

 

Yeah I guess we need to decide which resources should be marked not drainable. The crazy thrust thing is pretty silly, can't do much about that, but at least we can cut out the very silly dumping for some.

Link to comment
Share on other sites

On 2/17/2020 at 12:23 AM, Nertea said:

Yeah I guess we need to decide which resources should be marked not drainable. The crazy thrust thing is pretty silly, can't do much about that, but at least we can cut out the very silly dumping for some.

Well that will be problematic because from  a realism perspective, only compressed gasses (like Xenon Gas, Hydrogen, CompressedAir) would be able to flow at the rate executed by the fuel valve. Any other resource would have to be powered by a megawatt powered turbo pump. The exception might be resources that can act as monopropellants (like HTP and Hydrazine) which are able to provide power to the turbo pump of the fuel valve.

Edited by FreeThinker
Link to comment
Share on other sites

3 hours ago, FreeThinker said:

Well that will be problematic because from  a realism perspective, only compressed gasses (like Xenon Gas, Hydrogen, CompressedAir) would be able to flow at the rate executed by the fuel valve. Any other resource would have to be powered by a megawatt powered turbo pump. Exception might be resources that can act as monopropellants (like HYP and Hydrazine) which are able to provide power to the turbo pump of the fuel valve.

Well... that's a fuel valve problem, not a resource definition problem. This should just define whether resources are drainable at all. The logic of the thrust produced should be handled at the exit module. 

Link to comment
Share on other sites

On 2/21/2020 at 10:38 PM, I likeOxidizerrfuel said:

I don't like that this mod shows the MKS resources. 

You mean CRP resources ;)

btw - for other curators, feel free to do PRs for stuff you do not want drainable.

Link to comment
Share on other sites

On 2/22/2020 at 12:38 AM, I likeOxidizerrfuel said:

I don't like that this mod shows the MKS resources. 

You can comment out (with //) or delete the SurfaceScanner.cfg file at gamedata/communityresourcepack

If you're using Scansat, you'll need to do the same with the SCANresource.cfg file at gamedata/scansat/resources

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...

@RoverDude It might be worth updating the forum thread / spacedock version number,
Of course few people download this directly as it is bundled with other mods, but for mod authors it does muddy the waters a little bit I think.

Edited by Beale
English
Link to comment
Share on other sites

On 4/18/2020 at 9:27 PM, Beale said:

@RoverDude It might be worth updating the forum thread / spacedock version number,
Of course few people download this directly as it is bundled with other mods, but for mod authors it does muddy the waters a little bit I think.

I know I don't bundle. Installed via CKAN for any mod of mine.

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...