Jump to content

[1.2.2] Contract Pack: Clever Sats 1.4 (13/12/2016)


severedsolo

Recommended Posts

 

I really like the satellite contracts in KSP, but I get fed up of KSP asking me to move my Remote Tech or SCANsat probes. So, I decided to try and fix it. I present to you: Clever Sats. A replacement for stock Satellite Contracts.

How is this different to the stock Satellite contracts?

  1. Intelligent target selection. Instead of just picking anything that "might" be a satellite at random, you will only be asked to move satellites deployed by this pack. Like your remote-tech comm relay where it is? That's fine, CleverSat will leave it alone. Moved your sats into a constellation? Don't worry about it. CleverSat knows that satellites in a constellation should stay in a constellation. (please see known issues).
  2. RemoteTech Integration - CleverSats will not ask you to deploy a satellite unless you have 50% RemoteTech coverage (assuming you use that mod of course). Highly recommended that you combine this pack with the RemoteTech pack by nightingale.

 

What sort of contracts can I expect from this pack?

Right now, I have these missions:

  • The basic "launch a satellite into orbit" mission. This is pretty much like the stock missions. The harder the contract, the further out, and the wilder the orbit. You'll probably find that one star contracts will give you mainly equatorial, low orbits. Three stars, well all bets are off.
  • Create a satellite constellation - this is a bit of a clever one. It will try and find two satellites which are close by. If it finds them, you'll be asked to synchronise their orbits. Any satellites that are part of a "constellation" should be ignored by other missions (but see Known Issues)
  • Move a Satellite - this is basically like the stock enhanced contracts, you'll be asked to move your satellite to a new position.
  • Move a Constellation - move a constellation of satellites to a new position.
  • Repair a Faulty Satellite
  • (Coming Soon) - Decommission a satellite
  • (Coming at some point - maybe.) Deploy a GPS network
  • Please feel free to suggest more.

Known Issues:

One satellite in a constellation may not be marked as protected, and you may be asked to move it.

Probably some reward balancing issues at the moment.

On the move a constellation mission - the orbital parameters will be displayed multiple times (one for each sat in the constellation). I know how to fix this, I just haven't got round to it yet.

Special Thanks

@nightingale as ever, for his tireless hard work on Contract Configurator.

Installation:

Highly recommended that you install from CKAN (when available).

However, if you insist on installing manually you will need:

Module Manager (available here)
Contract Configurator (available here)
The CleverSat contract pack (duh) (available here)
 

License

CC-BY-NC-SA 4.0

This mod includes version checking using MiniAVC. If you opt-in, it will use the internet to check whether there is a new version available. Data is only read from the internet and no personal information is sent. For a more comprehensive version checking experience, please download the KSP-AVC Plugin

Source available at the release link above.

Edited by severedsolo
Link to comment
Share on other sites

Could you add higher inclination contracts?   High inclination contracts should obviously be considered more difficult.  (Bascially anything above 20 degrees of inclination.)

Also, high eccentricity orbits should be considered.
One particularly interesting contract is a synchronous-period orbit that is high inclination and eccentricity, and requests the apoapsis to be over a specific area of Kerbin.

Link to comment
Share on other sites

9 hours ago, Ruedii said:

Could you add higher inclination contracts?   High inclination contracts should obviously be considered more difficult.  (Bascially anything above 20 degrees of inclination.)

Also, high eccentricity orbits should be considered.
One particularly interesting contract is a synchronous-period orbit that is high inclination and eccentricity, and requests the apoapsis to be over a specific area of Kerbin.

When I first made the pack, I didn't clamp the orbits. The end result was that every contract was a high inclination/high eccentricity orbit brushing the edge of the SOI. So I clamped it.

Basically, the higher the prestige of the contract, the more chance that you will get higher inclination. A three star contract will give you some pretty fun orbits. Having said that, looking at the numbers I think I clamped it a bit too far. I'll look into changing that.

Link to comment
Share on other sites

13 hours ago, severedsolo said:

When I first made the pack, I didn't clamp the orbits. The end result was that every contract was a high inclination/high eccentricity orbit brushing the edge of the SOI. So I clamped it.

Basically, the higher the prestige of the contract, the more chance that you will get higher inclination. A three star contract will give you some pretty fun orbits. Having said that, looking at the numbers I think I clamped it a bit too far. I'll look into changing that.

Cool, but do you have eccentricities and inclinations placed on some synchronous-period orbits as well as the "stationary" one that is equatorial and circular?

Link to comment
Share on other sites

@severedsolo or @nightingale

I play with harder solar system and 6.4k, but the question I have pertain more to HSS. It moves KSC to a high latitude 28.6 to be precise. So it make equatorial based orbits a lot more delta v intensive esp. with my resize. SO I wondered for my personal game how I would go about editing the configs to base inclination request off of 28.6* instead of starting from 0* for inclination challenges. As trivial contracts offering inclination requests of 1.9 say is actually quite hard in my setup. I don't expect you to change the release version for this unless you want to set it up for MM compatibility or need to make some base changes to CC. i just want to know what to change for myself. Thanks! :) 

Link to comment
Share on other sites

@Ruedii - I use the stock orbit generator. It's just set to "RANDOM" - so basically, if you can get it in stock, you can get it in this pack (within theory). The CC library currently doesn't allow orbital period to be specified in the generation algorithm

@Svm420 - Hmm, that's a difficult one. At the moment it's an upper limit on inclination. This is the line in CleverSatCore that determines the inclination.

inclinationFactor = @/targetBody1 == Sun? 0 : Prestige() == Trivial ? 0.1 : Prestige() == Significant ? 0.3 : 0.5

If you were to change the Trivial number to something higher (say 0.3-0.4) you would have a chance at least. As I said though, this is an upper limit, so the equatorial contracts wouldn't go away. What you really need, is for @nightingale to introduce a "minimumInclinationFactor" line to the OrbitGenerator behaviour.

Edited by severedsolo
Link to comment
Share on other sites

12 hours ago, severedsolo said:

What you really need, is for @nightingale to introduce a "minimumInclinationFactor" line to the OrbitGenerator behaviour.

That is exactly what I need. A few more question for you. WHat is the unit on inclnationFactor i.e. How is it using the numebr you give it to determine incination for a contract? Am I able to control solar orbit target chance? I want to make it so I never get solar orbit for trivial, but leave it for significant. Is that possible, and how would I do so for myself? hanks!

Link to comment
Share on other sites

57 minutes ago, Svm420 said:

WHat is the unit on inclnationFactor i.e. How is it using the numebr you give it to determine incination for a contract?

It's a decimal between 0 and 1. 0 is equatorial, 1 is 90 degrees. Within theory, you'd think that this was a linear approach so 0.5 should be 45 degrees, 0.2 is 18 degrees etc. In my experimentation however, I found that 0.5 will give you a highly inclined orbit (it may just be my eyes, but it looked well above 45 - I didn't check actual figures).

This is being drawn from the stock orbit generator, and honestly, nobody has ever fiddled with it before, so I'm learning as I go along. The best thing to do is just experiment (which isn't ideal).

Quote

Am I able to control solar orbit target chance? I want to make it so I never get solar orbit for trivial, but leave it for significant. Is that possible, and how would I do so for myself?

It's a bit quick and dirty, but I'd do this with a simple boolean (code is untested - I'm notorious at syntax issues on first passes):

    DATA
    {
    type = bool
	SunSat = @/targetBody1 == Sun && Prestige() == Trivial
    }

	REQUIREMENT
	{
	name = SunCheck
	type = Expression
	expression = (@/SunSat == false)
	}

	

Edit: If DATA nodes accept conditionals, a cleaner way would be to directly edit targetBody1 (again untested)

   DATA
    {
    type = CelestialBody
    targetBody1 = Prestige() == Trivial ? OrbitedBodies().Where(b => !b.IsSun()).Random() : OrbitedBodies().Random()
    } 

@Svm420 - I found some syntax issues (told ya) and cleaned up the bool. Tagging you so you see it.

Edited by severedsolo
Link to comment
Share on other sites

1 hour ago, severedsolo said:

It's a decimal between 0 and 1. 0 is equatorial, 1 is 90 degrees. Within theory, you'd think that this was a linear approach so 0.5 should be 45 degrees, 0.2 is 18 degrees etc. In my experimentation however, I found that 0.5 will give you a highly inclined orbit (it may just be my eyes, but it looked well above 45 - I didn't check actual figures).

This is being drawn from the stock orbit generator, and honestly, nobody has ever fiddled with it before, so I'm learning as I go along. The best thing to do is just experiment (which isn't ideal).

I don't know how Contract Configurator is handling orbit generation (ie if there is any further customizing the orbit after generating it), but the stock generator can be a little weird. Most of the orbit types have relatively little variation outside of the altitude factor.

Obviously the Molniya and Tundra orbits are fairly limited, so that's not a surprise. But equatorial and polar orbits seem to be locked to 0o and 90o, the inclination factor just seems to change the chance of a reverse orbit. So I think you are basically stuck with random and synchronous orbits for inclination variety. It would be nice, for instance, to adjust a polar orbit to be not-quite polar, or the same with equatorial.

Also, the final Eccentricity argument in the orbit generator doesn't do anything for most orbits. That seems to come from the altitude factor. Which, as you've seen, is another tricky parameter.

I've found that it's hard to get low orbits for both planets and moons. For instance, a very low altitude factor is required to get orbits below 1000km for Kerbin, but will give orbits of around 10km for the Mun or Minmus. If you want, say, something similar to the low/high orbit cutoff you just have to adjust the SMA yourself.

All that said, much of this can be altered after the orbit is generated. Contract Configurator could be modified to allow for a second inclination adjustment (which is trivial, just change the orbit.inclination value after you have a generated orbit) and/or change the SMA and eccentricity (which is a bit trickier and might end up with your Pe being too low).

Link to comment
Share on other sites

22 minutes ago, DMagic said:

I don't know how Contract Configurator is handling orbit generation (ie if there is any further customizing the orbit after generating it), but the stock generator can be a little weird. Most of the orbit types have relatively little variation outside of the altitude factor.

Obviously the Molniya and Tundra orbits are fairly limited, so that's not a surprise. But equatorial and polar orbits seem to be locked to 0o and 90o, the inclination factor just seems to change the chance of a reverse orbit. So I think you are basically stuck with random and synchronous orbits for inclination variety. It would be nice, for instance, to adjust a polar orbit to be not-quite polar, or the same with equatorial.

.....

I've found that it's hard to get low orbits for both planets and moons. For instance, a very low altitude factor is required to get orbits below 1000km for Kerbin, but will give orbits of around 10km for the Mun or Minmus. If you want, say, something similar to the low/high orbit cutoff you just have to adjust the SMA yourself.

I found that low orbit problem myself. This is why Trivial contracts are locked so low, altitude factor is 0.2. I've got around the limited generation by just having everything generate random orbits. At least that way the inclination can be varied.

Link to comment
Share on other sites

This is poorly documented, but you should be able to rig up your own orbit generation in expressions, if you so choose.  Here's a super quick orbit with random inclination between 5-30 degrees (negative or positive).  Untested (naturally).

DATA
{
    type = double
    inc = Random(5.0, 30.0) * int(Random(0, 1) * 2 - 1)
}

BEHAVIOUR
{
    type = OrbitGenerator

    FIXED_ORBIT
    {
        ORBIT
        {
            SMA = 1449999.99996286
            ECC = 0
            INC = @/inc
            LPE = 270.690311604893
            LAN = 1.93635924563296
            MNA = 1.55872660382504
            EPH = 31.3999999999994
        }
    }
}

Let me know if you start getting into this, as you may need either more math functions (Exp, Sin, Cos) or ability to control the random distribution (eg. normal distribution instead of the uniform distribution).

Link to comment
Share on other sites

  • 2 months later...
  • 2 weeks later...

Hey there, I recall enjoying this mod before the KSP v1.1 update, and I'm attempting to troubleshoot something.  I'm reasonably sure it's not this mod that's causing the issue I'm trying to identify.  Anyway, the OP seems to omit a manual download link while suggesting I install by CKAN?  I did that, but if I uninstall this mod, without it being "listed" by CKAN as updated for v1.1.2, I won't be able to reinstall it except for manually.

Is there a Spacedock listing for this mod that I can't find (possibly listed by another name)?  If there is no Spacedock listing, could I request one?  Thanks!

Link to comment
Share on other sites

31 minutes ago, MisterFister said:

Hey there, I recall enjoying this mod before the KSP v1.1 update, and I'm attempting to troubleshoot something.  I'm reasonably sure it's not this mod that's causing the issue I'm trying to identify.  Anyway, the OP seems to omit a manual download link while suggesting I install by CKAN?  I did that, but if I uninstall this mod, without it being "listed" by CKAN as updated for v1.1.2, I won't be able to reinstall it except for manually.

Is there a Spacedock listing for this mod that I can't find (possibly listed by another name)?  If there is no Spacedock listing, could I request one?  Thanks!

You can actually install it from CKAN even if it’s marked as incompatible if you use the command line. The command is:

ckan.exe install <identifier>=<version>

You can get the <identifier> and <version> from CKAN’s metadata details in the GUI, but you'll need to change the filter to “All” or “Incompatible” for it to be listed. As long as all the dependencies are installed, it should install just fine.

Link to comment
Share on other sites

2 hours ago, Torih said:

It is listed in the OP, not spacedock, but still its there :)

https://github.com/severedsolo/CleverSat/releases

Thanks.  Huh.  I coulda sworn I'd mouseover'd all the links, but there it is.  Took me three attempts AFTER you pointed it out to find it.  Anyway, though, I'm also explicitly asking if Spacedock is possible anyway.  That way I can sign up for notification emails.

Link to comment
Share on other sites

12 hours ago, MisterFister said:

Anyway, the OP seems to omit a manual download link while suggesting I install by CKAN?

It's there, it's just hard to find (on purpose, I like people installing by CKAN). Unfortunately CKAN is going to have to wait. I don't like incrementally increasing version numbers just to make CKAN happy, so I try and do an update on release day (by saving it up if I have to).

I have a few new missions for this pack, but a pretty serious bug in Contract Configurator is holding it back. At this point it's more hassle than it's worth to revert the changes, so I'll wait for it to be fixed, so just install manually until the update (I estimate 2-3 weeks as nightingale is away at the moment).

9 hours ago, MisterFister said:

Anyway, though, I'm also explicitly asking if Spacedock is possible anyway.  That way I can sign up for notification emails.

Sorry, spacedock is not going to happen. However, if you want notifications of an update, it is fully AVC compatible.

Edited by severedsolo
Link to comment
Share on other sites

  • 1 month later...
On 25 February 2016 at 0:54 AM, severedsolo said:
  • (Coming at some point - maybe.) Deploy a GPS network

This could be easier to implement if you look at the Figaro GNSS mod, although this hasn't been updated in over a year. I would love you long time if you decided to take over Figaro (and perhaps incorporate it into the Clever Sats mod). I used to use Figaro GNSS networks all the time.

If you do decide to do this, can I suggest (perhaps as an optional setting) that you make it so that Kerbal Engineer Redux and/or MechJeb, etc. won't display lat/long values in their read-outs if there is no GNSS fix received by the active vessel? @sarbian, is it even possible for a third party mod to change parts of MJ like this?

Just a suggestion. :)

(by the way, if you need technical advice about how the networks work in general, I can be of some assistance as I use GNSS routinely for work... I'm a terrible programmer though, so don't ask me for help with that. :P )

Link to comment
Share on other sites

Clever Sats 1.1 Released!

The long awaited 1.1.x update is finally here!

  • Added new mission "Destroy a Rogue AI"
  • Changed ProbeMalfunction to complement RogueAI
  • Added Strategia support

DEPENDENCIES

  • Now requires Contract Configurator 1.13.0
  • Now requires KSP 1.1.3
  • Now requires Module Manager
Link to comment
Share on other sites

12 hours ago, severedsolo said:

Clever Sats 1.1 Released!

The long awaited 1.1.x update is finally here!

  • Added new mission "Destroy a Rogue AI"
  • Changed ProbeMalfunction to complement RogueAI
  • Added Strategia support

DEPENDENCIES

  • Now requires Contract Configurator 1.13.0
  • Now requires KSP 1.1.3
  • Now requires Module Manager

I was going to make a snarky comment about "just how clever..." but RogueAI is pretty clever, yeah.

Grabbing now, thanks.

Link to comment
Share on other sites

  • 3 weeks later...
On 08/07/2016 at 4:55 AM, Slightlylyons said:

The altitude range for the contracts seems to be high, I'm getting contracts from 5 to 14 million meters. Never LKO. Never anything at or below KSO. Just satellites so high they have Mun encounters. 

I haven't changed anything with Sat generation, as you can see in my screenshots. It's possible I need to clamp it a little more though, I'll look into it, after I've finished the next update (Contract Configurator is making some big changes that I need to work on)

On that note:

Users I need your help!

The next update to Contract Configurator will force seriously encourage all contract packs to have an agent and a flag. Now, my photoshop skills Suck, with a capital Suck.

I'll make a makeshift flag for now, as a placeholder, but it's going to suck. So, I'll ask you guys to help me; If somebody could make me a suitable flag for CleverSats, I'll add it and obviously give you full credit.

Right now, the agent doesn't have a name, I'll decide that when I see the flag - I need two flags please:

One scaled to 256x160 pixels, and another one (the same image) scaled to 64x40 pixels.

Link to comment
Share on other sites

So Im not sure if this is relevant to you or not, erring on what I assume is the side of caution.

 

Got this little exception in my career game this eve.

Exception occured while loading contract 'CleverSat.CleverSatProbeMalfunction':
System.Exception: Error parsing statement.
Error occurred near '*':

* <-- HERE ---> System.NullReferenceException: Object reference not set to an instance of an object
  at ContractConfigurator.ExpressionParser.ExpressionParser`1[ContractConfigurator.VesselIdentifier].ParseSimpleStatement[VesselIdentifier] () [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at ContractConfigurator.ExpressionParser.ExpressionParser`1[T].ParseExpression (System.String key, System.String expression, ContractConfigurator.ExpressionParser.DataNode dataNode) [0x00000] in <filename unknown>:0 
  at ContractConfigurator.ExpressionParser.ExpressionParser`1[T].ParseExpressionGeneric (System.String key, System.String expression, ContractConfigurator.ExpressionParser.DataNode dataNode) [0x00000] in <filename unknown>:0 
  at ContractConfigurator.Behaviour.Expression.OnLoad (.ConfigNode configNode) [0x00000] in <filename unknown>:0 
  at ContractConfigurator.ContractBehaviour.Load (.ConfigNode configNode) [0x00000] in <filename unknown>:0 
  at ContractConfigurator.ContractBehaviour.LoadBehaviour (.ConfigNode configNode, ContractConfigurator.ConfiguredContract contract) [0x00000] in <filename unknown>:0 
  at ContractConfigurator.ConfiguredContract.OnLoad (.ConfigNode node) [0x00000] in <filename unknown>:0 

Thought it might have been yours, on account of the whole CleverSat.CleverSatProbeMalfunction thing. Posted the same exception to the CC bugtracker, per the instructions raised by the exception display window. Its here: https://github.com/jrossignol/ContractConfigurator/issues/538

Immediately following the load, I get a notification telling me that I have failed a contract to investigate a malfunctioning satellite. This is impressive as I never accepted such a contract in the first place. So yeah.

Not a lot I can do to load an earlier save, dont think I have one for some while back. Open to suggestions on whether some persistence.sfs editing is warranted, or possible. Cheers!

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