Jump to content

Defining Resources in Interplanetary Space


Warezcrawler

Recommended Posts

Does anybody know how to interpret the settings for rescources found in interplanetary space, i.e. "ResourceType = 3"?

I guess I get the first 3, namely PresenceChance, MinAbundance and MaxAbundance, as these must be the percentages for randomizing if you can find it and how much. However, even when I set PresenceChance = 100 I find no rescources using Karbonite mod pack, I've litterally tried flying from end of atmosphere and all the way up to end of SOI... No result.

example from Karbonite.cfg in "Community Resource Pack"

//Express all numbers as percentages 0.0-100.0, not 0.0-1.0!

GLOBAL_RESOURCE

{

ResourceName = Karbonite

ResourceType = 3

Distribution

{

PresenceChance = 20

MinAbundance = .001

MaxAbundance = .5

MinAltitude = .2

MaxAltitude = 2

MinRange = .01

MaxRange = .5

}

}

So how do I interpret

MinAltitude = .2

MaxAltitude = 2

MinRange = .01

MaxRange = .5

Based on it saying that all numbers are percentages, I'm asking a percentage of what? Of SOI? I've tried putting a lot of different figures on it around kerbin, and searched from end of atmosphere to end of SOI finding nothing?! I have figured that if presence chance is below 100 I just might miss it, which i why I've tried with 100.

Basically I want to set a ring of a rescource around a planet which can then be harvested - but it is nice to know if I'm putting it in 100km orbit or 82000000km orbit :confused:

Thanks for any help you can give me

Link to comment
Share on other sites

Actually the pasted values are just directly from the Community Resources as is. I've tried this

//Express all numbers as percentages 0.0-100.0, not 0.0-1.0!

GLOBAL_RESOURCE

{

ResourceName = Karbonite

ResourceType = 3

Distribution

{

PresenceChance = 100

MinAbundance = 50

MaxAbundance = 50

MinAltitude = 1

MaxAltitude = 50

MinRange = 10

MaxRange = 10

}

}

But my issue is that I cannot find the resources. I've varied the last 4 settings, but I'm missing it. I believe that if I know exactly how to interpret the values, then I figures the I must be able to find it...

Link to comment
Share on other sites

Here is the relevant code snippet from regolith the system the stock system was based on I would guess it will be the same, but without hearing from RD no one knows for sure.


//Altitude band - only applies to atmospheric and interplanetary
if (
(request.ResourceType == HarvestTypes.Atmospheric || request.ResourceType == HarvestTypes.Interplanetary)
&& distro.HasVariableAltitude())
{
var rad = body.Radius;
var ideal = ((rad*distro.MinAltitude) + (rad*distro.MaxAltitude))/2;
//print("REGO: IDEAL = " + ideal);
var range = rand.Next((int)(rad * distro.MinRange), (int)(rad * distro.MaxRange));
var diff = Math.Abs(ideal - request.Altitude);
var rangePerc = diff / range;
var modifier = 1d - rangePerc;
abundance *= (float)modifier;
}

So it is based on planetary radius mostly.

Edited by Svm420
bad grammar is bad
Link to comment
Share on other sites

Here is the relevent code snippet from regolith the sysstem the stock system was absed on I would guess it will be the same, but without hereing from RD no one knows for sure.


//Altitude band - only applies to atmospheric and interplanetary
if (
(request.ResourceType == HarvestTypes.Atmospheric || request.ResourceType == HarvestTypes.Interplanetary)
&& distro.HasVariableAltitude())
{
var rad = body.Radius;
var ideal = ((rad*distro.MinAltitude) + (rad*distro.MaxAltitude))/2;
//print("REGO: IDEAL = " + ideal);
var range = rand.Next((int)(rad * distro.MinRange), (int)(rad * distro.MaxRange));
var diff = Math.Abs(ideal - request.Altitude);
var rangePerc = diff / range;
var modifier = 1d - rangePerc;
abundance *= (float)modifier;
}

So it is based on planetary radius mostly.

Thanks... I'll run further tests. This is an important clue....

If tests are unsuccessfull I'll do as Tellion said and try contacting Roverdude.

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