Jump to content

[1.3, 1.4, 1.5, 1.6, 1.7, 1.8+] Contract Pack: CommNet Relays 2.1.0 (2019 Jan 13)


Kerbas_ad_astra

Recommended Posts

CommNet Relays

Ever wanted to get money for setting up CommNet network relays? Your dreams can come true with the CommNet Relays contract pack!

CommNetRelaysLogo.png

Features

CommNet Relays is a contract pack for Contract Configurator which gives you contracts for each body in the solar system (besides the homeworld, of course). The contract is to send a satellite with an appropriate dish or combination of dishes into an orbit low enough that surface missions can use the whip antenna instead of having to pack a big dish (so long as a relay is overhead, of course). Missions to your homeworld's moons are required to use an HG-5 or equivalent, missions to the inner planets (Duna/Mars and inward) are required to use an RA-15 or equivalent, while missions to outer planets or moons will need an RA-100 or equivalent. You also have to have your tracking station upgraded to the appropriate level.

The contracts are generated based on the lists of planets and moons in your solar system, so you can install Outer Planets or Real Solar System or whatever you want, and the contracts will automatically adjust themselves accordingly. Additionally, the antenna requirement does not depend on specific parts, but on the combined antenna power of the relay, so it's compatible with all modded antennas automatically. If you really wanted to (and had a computer that could handle it), you could build a relay with 20,000 HG-5 antennas for Jool missions.

(That said, be aware that the contract range requirements are based on stock CommNet ranges, which are in turn based on the stock solar system. I've got some patches that will modify ranges to adapt to Outer Planets and Real Solar System, but those patches assume particular balance choices for antennas and the solar system. At the end of the day, the contract requirement is just a lower bound -- check your link budgets before launch.)

In addition to the basic "relay around body X" contracts, there are a few extra contracts to help improve uptime around the network. You may receive contracts to place relays in highly-inclined, highly-elliptical orbits around the gas giants, so that missions to their moons or in low orbits can stay in contact around them, as well as contracts to place relays in solar orbits to keep contact with probes going behind the Sun (and also the homeworld's parent body, if you're using an alternate solar system in which the homeworld is a moon).

Dependencies

Download and install

From there, just unzip the "ContractPacks/CommNetRelays" folder into your GameData directory.

Known issues and limitations

It might be cool if nightingale implemented a coverage-checking feature like there is for RemoteTech, but as things are, I use the number of relays or relay-like vessels in orbit as a proxy -- four is the minimum to get full coverage (though that could be as low as two depending on how forgiving you've set the line-of-sight "fudge factor" to be), so if you've got five ships with enough relay antennas in low-enough orbit around a body, I figure you have coverage that's good enough and the config won't generate contracts for that body. In general, I've left most of the details of your network unconstrained -- the minimum and/or maximum values in the requirements will keep your satellites within range of the ground, but it's up to you to put your satellites in orbits that are useful for your particular situation.

If you find any other issues, please let me know in the KSP forum thread or on the GitHub repo's issue tracker!

Version history and changelog

  • 2015 07 24: Initial release.
  • 2015 07 25 (1.0.1): Added NewVessel parameter to missions, so each relay will have to be a newly-launched satellite. Bumped up the maximum number of satellites from four to five (to give some redundancy).
  • 2015 08 08 (1.1): RSS and New Horizons compatibility.
    • Moved altitude constraints into DATA nodes so that Module Manager can affect them more easily (as opposed to having magic numbers in both the orbit parameter and the target planet selection logic).
    • Fixed some initial "Escape"/"Orbit" requirements -- they were referring to "Kerbin" specifically, now referring to whatever the homeworld is.
    • Also updated comments on target planet selection logic to match the actual logic used.
    • Added a new "CoMoon" contract to be used when the homeworld is a moon.
  • 2015 12 14 (1.2): Antenna pack compatibility
    • New patches that allow antennas from some addons (Asteroid Day, Hangar, SSR Microsat, USI Kolonization Systems) to qualify for the contracts.
    • Clarified contract wording.
    • Added a dedicated agency to give the contracts.
  • 2016 05 03 (1.3): Antenna rearrangement
    • Moved High Gain Antenna from its own patch, now that the Asteroid Day probe parts are folded into stock.
      • Because this will cause errors on pre-1.1 installs without Asteroid Day, this and later versions are no longer compatible with KSP 1.0.x.
    • Removed the USI patch, since it was causing exceptions for MKS Lite users.
    • Compatible through KSP 1.1.2.
  • 2016 06 26 (1.3.1): Expression expansion
    • Refactored targetbody expressions to reduce calculations-per-frame when contracts are generated.
    • Compatible through KSP 1.1.3.
  • 2016 07 23 (1.4): Mission Control
    • Changes to support Contract Configurator's 1.15.3 update.
      • Because this depends on variables introduced in CC 1.15.3, this and later versions are no longer compatible with KSP 1.1.0-2.
    • Contracts are broken out into individual cfg files (I got tired of scrolling all over the place when editing...)
    • The license is changed to the GPL v3 (or later).
  • 02017 02 25 (2.0.0): Constructing New Relays
    • Renamed to "CommNet Relays". Because it uses the new CommNet system, it is not backwards-compatible with pre-1.2 versions of KSP or 1.x versions of AntennaRange Relays.
    • Backend logic overhauled to use new CC antenna parameter. Specific parts are no longer required to complete contracts.
    • Adjusted some of the contract parameters to reduce duplication and increase available choices.
    • Max/min apoapses adjusted to CommNet balance.
      • Adjusted RSS patch.
      • Added OPM patch.
    • Added new "Super DSN" contract to build enormous DSN relays. Why? Because we can!
  • 02017 07 04 (2.0.1): Hiccup Suppression
    • Adjusted facility requirements to suppress random failures when entering the Tracking Station.
  • 02017 09 04 (2.0.2): De-Proliferation
    • Added 'maxSimultaneous' values for all contracts.
  • 02019 01 13 (2.1.0): Global Coverage
    • Added support for localization (so the minimum KSP version supported is now 1.3.0). Added 'title' field to agent to reduce log spam.

Roadmap

As my schedule permits, I'll get this mod released on CurseForge and CKAN.

If you have other suggestions, please bring them up in the KSP forum thread or raise an issue on the GitHub repo!

Credits

Many thanks to nightingale for Contract Configurator (and for implementing the SemiMajorAxis() method at my request, and accepting my HasAntenna parameter), toadicus for AntennaRange (which inspired the initial revision of this contract pack), and Squad for implementing CommNet!

License

CommNet Relays is copyright 2015-2017 Kerbas_ad_astra. Contract configuration files are released under the GPL v3 license (or any later version). Any redistributions must use a different name and folder (per section 7c). All other rights (e.g. the CommNet Relays logo and agency definition files) reserved.

Edited by Kerbas_ad_astra
CommNet Relays 2.1.0 is here!
Link to comment
Share on other sites

Very cool, this one took me by surprise! Have some rep!

- - - Updated - - -

You can harvest money by setting up one relay around a planet, and switching to that relay when more contracts come up to put relays around that planet. Is there a way to set the "must be a new ship after accepting the contract" requirement for a Contract Configurator pack?

That would be the NewVessel parameter, introduced in CC 1.5.1.

Link to comment
Share on other sites

Very cool, this one took me by surprise! Have some rep!

- - - Updated - - -

That would be the NewVessel parameter, introduced in CC 1.5.1.

Well, now you know why I asked you to implement the SemiMajorAxis() method.

And thanks for the tip! V1.0.1 is out, with that update (and also a bump to the number of orbiters you have around a planet before the contracts stop -- to help people patch coverage gaps). Also with a pretty logo!

Link to comment
Share on other sites

Sweet this takes care of the last gap in my contracts. Now I don't have to "piggyback" my relay opts onto other unmanned contracts. Anything that helps fund my cash strapped program is a big plus!

- - - Updated - - -

Oh yeah, and sooo sweet there is support for Outer Planets. Less work for me to do (currently working on adding them into other contract packs for my own use).

Link to comment
Share on other sites

  • 2 weeks later...

So, I've found an issue with my own addon. I'm standing up an RSS install, and I noticed (when doing other debugging) that this contract pack was giving errors because I set a couple of ORBIT and ESCAPE requirements to refer to "Kerbin" specifically, rather than using a reference to HomeWorld(). Not going to work for RSS! I've got a fix, but there's no point in releasing it until RSS extends AntennaRange's ranges (which it will if NathanKell accepts my pull request to that effect); if you're desperate to use AntennaRange Relays in RSS now, grab the patch file from that pull request, and get the most up-to-date contract configuration from the repo (not a release, but the "Download ZIP" button in the sidebar). Apologies for the goof!

Link to comment
Share on other sites

So, I've found an issue with my own addon. I'm standing up an RSS install, and I noticed (when doing other debugging) that this contract pack was giving errors because I set a couple of ORBIT and ESCAPE requirements to refer to "Kerbin" specifically, rather than using a reference to HomeWorld(). Not going to work for RSS! I've got a fix, but there's no point in releasing it until RSS extends AntennaRange's ranges (which it will if NathanKell accepts my pull request to that effect); if you're desperate to use AntennaRange Relays in RSS now, grab the patch file from that pull request, and get the most up-to-date contract configuration from the repo (not a release, but the "Download ZIP" button in the sidebar). Apologies for the goof!

While you're at it you may want to look at New Horizons support (something I'm in the process of adding into my own contract packs at the moment). If you're unaware, it makes Kerbin a moon of a gas giant... so if you've made any assumptions about Kerbin having child bodies of its own, or the Sun being the parent of Kerbin, those will break in New Horizons....

Link to comment
Share on other sites

While you're at it you may want to look at New Horizons support (something I'm in the process of adding into my own contract packs at the moment). If you're unaware, it makes Kerbin a moon of a gas giant... so if you've made any assumptions about Kerbin having child bodies of its own, or the Sun being the parent of Kerbin, those will break in New Horizons....

I specifically set up the "Lagrange" contracts to work for the homeworld's parent and its "grandparent" if it has one. I didn't realize that New Horizons gave Kerbin "siblings", though -- I'll check the ranges and add a new mission accordingly.

Moons-of-moons (I think OPM adds one) will also trip the "inner planet" contract, since their parents' orbits are small, even if the DTS-M1 won't reach them, but that's why I set up the contracts so that longer-range antennas qualify for shorter-range missions -- it's up to the player to recognize the situation and pick the right tool for the job. :)

Link to comment
Share on other sites

Version 1.1 is out! Here are the changes:

2015 08 08 (1.1): RSS and New Horizons compatibility.

  • Moved altitude constraints into DATA nodes so that Module Manager can affect them more easily (as opposed to having magic numbers in both the orbit parameter and the target planet selection logic).
  • Fixed some initial "Escape"/"Orbit" requirements -- they were referring to "Kerbin" specifically, now referring to whatever the homeworld is.
  • Also updated comments on target planet selection logic to match the actual logic used.
  • Added a new "CoMoon" contract to be used when the homeworld is a moon.

(To use AntennaRange with RSS, you'll need to grab the patch from my pull request unless/until it gets accepted.)

Link to comment
Share on other sites

  • 1 month later...

This contrack pack is promising! I'm having some problem with an Eve mission, though: I get a contract to set a relay sat on Eve's orbit but, before I complete it (I havent left Kerbin SOI yet), if I reload a game there's a chance the contract will fail...

Am I doing something wrong?

Link to comment
Share on other sites

This contrack pack is promising! I'm having some problem with an Eve mission, though: I get a contract to set a relay sat on Eve's orbit but, before I complete it (I havent left Kerbin SOI yet), if I reload a game there's a chance the contract will fail...

Am I doing something wrong?

Not sure what's going on, but could I get a copy of the log - hopefully it'll show the reason the contract went away (which could always be a Contract Configurator bug).

Link to comment
Share on other sites

This contrack pack is promising! I'm having some problem with an Eve mission, though: I get a contract to set a relay sat on Eve's orbit but, before I complete it (I havent left Kerbin SOI yet), if I reload a game there's a chance the contract will fail...

Am I doing something wrong?

As nightingale says, we need a log to diagnose this one. I didn't intend to set any failure conditions or deadline, so unless I've goofed, it sounds like a bug with your system somehow. It may not necessarily be Contract Configurator's fault, either -- I understand that the contract system itself is pretty brittle. It's only in the last couple of versions that the system was fixed so that it didn't break when mod agencies were removed.

That gives me an idea -- have you removed any mods recently (i.e. shortly before this issue came up)? A few weeks ago, I ran into a thorny problem where removing a mod when I had an active contract to test one of its parts caused the contract system (or possibly Contracts Window Plus -- I don't remember which set of errors came first in the log, but they were both unhappy) to choke so hard that the science/reputation/funds display broke and several contracts failed immediately on loading the game. (In the end, I had to roll back to a previous version of the save, reinstall the mod, decline the contract, and then remove the mod.)

Link to comment
Share on other sites

I don't remember removing any mods recently, just updating them (oh, how I would like something like apt-get dist-upgrade!)

I reloaded the last save where this contract was up, it was only a day ago (in game time). And as soon as it fails again, I'll send you the log.

Ah, thanks! For your attention and for your hard (and great) work!

Update: : Sorry, guys! I think I've lost the latest save with this contract still valid. The first one before it is too long ago: about on hundred days (in game time)... :(

Thanks anyway!

Edited by jlcarneiro
Update to my promise
Link to comment
Share on other sites

  • 2 months later...

Are you planning to maintain it?

I use it on 1.0.5 (with the annoying start warning for the version), the 1st contract i gave me in a new career was to put a satellite with both DTS-M1 and the big 88-88 around the Mun... i 've unlocked only the 1st tier of the tech-tree.

Link to comment
Share on other sites

There will be an update when I've had some time to put together a few patches for various mod packs that I use.

There is a requirement in the Mun/Minmus contract to wait until you have the DTS-M1; I don't know why that didn't work on your career.  Are you using the most up-to-date version of Contract Configurator?

In any case, the antenna requirements are "OR"s -- you only need one.

Link to comment
Share on other sites

Yes , i use contract configurator 1.8.3 (latest for now) and a lot of other mod, but ok i didn't understood it was a "OR" for the antenna and not "AND",

finally i validated it (without the com 88-88) so everythhing is fine but a bit confusing in my own opinion:

Also, i would like to suggest you to create your own agency with the logo in your 1st post, so we can see clearly where the contract comes from and what is it.

Thank you for your work. :)

Edited by Skalou
Link to comment
Share on other sites

  • 2 weeks later...

New release, incorporating some changes I've been working on and Skalou's feedback.

  • 2015 12 14 (1.2): Antenna pack compatibility
    • New patches that allow antennas from some addons (Asteroid Day, Hangar, SSR Microsat, USI Koloniation Systems) to qualify for the contracts.
    • Clarified contract wording.
    • Added a dedicated agency to give the contracts.
Link to comment
Share on other sites

  • 1 month later...

You don't have access to the data that makes an antenna AR compatible?

 

@PART[OctoSat_Com_HalfTop]:FOR[AntennaRange]
{
%MODULE[ModuleDataTransmitter]
{
%name = ModuleLimitedDataTransmitter
nominalRange = 3000000
simpleRange = 9000000
maxPowerFactor = 8
maxDataFactor = 4
}
}

 

 

Link to comment
Share on other sites

6 hours ago, Miravlix said:

You don't have access to the data that makes an antenna AR compatible?

 


@PART[OctoSat_Com_HalfTop]:FOR[AntennaRange]
{
%MODULE[ModuleDataTransmitter]
{
%name = ModuleLimitedDataTransmitter
nominalRange = 3000000
simpleRange = 9000000
maxPowerFactor = 8
maxDataFactor = 4
}
}

 

 

First, a quick digression -- that patch should say "NEEDS[AntennaRange]", since "FOR[x]" tells ModuleManager that "x" is installed -- so if AntennaRange isn't actually installed, that patch will trick MM into thinking that it is installed, and other AntennaRange patches may be applied, but without AR itself, none of the patched antennas will work.

To your actual question -- reading the Contract Configurator documentation, I can query if a part has the ModuleLimitedDataTransmitter, and look for a specific range (e.g. must have an antenna with range X), but it doesn't look like I can specify a minimum bound (e.g. must have an antenna with range at least X).  @nightingale, if there's some nuance to PartValidation that I'm missing that will let me check a part parameter against a bound, please let me know!  (This would also be a nice feature to have if it doesn't exist yet...similar to the current MODULE-within-PartValidation feature, just with the capability to have "range >= 1000000000" or the like.)

To get that kind of functionality right now, I think I would have to write a DLL with "ModuleLunarRangeAntenna" and the like (they wouldn't have to do much, just indicate in the VAB that "this antenna has the range to connect a planet with its moons" and so on -- but it would need to be a DLL so that the PartLoader doesn't eat the modules during loading), use MM (which I know can filter by comparing variables in greater-than/less-than boundaries) to apply those modules to appropriate antennas, and then set up the contracts to look for those modules.  At this time, I don't feel that it's worth the trouble to go this route, since there actually aren't that many antennas which (a) ship natively with AntennaRange patches (there are lots of third-party patches flying around, but I don't want to request an antenna unless I know it will do the job) and (b) have a long enough range to be useful as relays.

Link to comment
Share on other sites

3 hours ago, Kerbas_ad_astra said:

To your actual question -- reading the Contract Configurator documentation, I can query if a part has the ModuleLimitedDataTransmitter, and look for a specific range (e.g. must have an antenna with range X), but it doesn't look like I can specify a minimum bound (e.g. must have an antenna with range at least X).  @nightingale, if there's some nuance to PartValidation that I'm missing that will let me check a part parameter against a bound, please let me know!  (This would also be a nice feature to have if it doesn't exist yet...similar to the current MODULE-within-PartValidation feature, just with the capability to have "range >= 1000000000" or the like.)

Could be doable, raise an enhancement on GitHub. I'll warn you that there are quite a few pending enhancements that have been requested - you're probably looking at two weeks or so before I can get to this one. 

Link to comment
Share on other sites

I didn't make the OctoSat code, someone else tried to make it AR compatible, but for some reason it was broken, I found out every entry was missing simpleRange, so the Sat only worked while loaded. Anyway that lead me to speculate why it was needed to both write an AR entry and one for this pack.

Can you read the range value at all?

Then a quick hack to export it into your own list of antennas that could be searched or sorted depending on range? Of Course only as a temporary fix as it's bad to copy, resulting in wasted memory.

Link to comment
Share on other sites

Module Manager can certainly read the range value, but that's not really the limiting factor.  I can very easily find individual parts which qualify and then do something to their individual configurations with Module Manager, but I don't know of a way to get data out of those configs into something else (e.g. their names into the contract definition) without knowing their specific names and such in advance.  Everything that Module Manager does is geared around diving into diving into configs and modifying them in-place.  There are some ways to reach from one config into another, but it's all in "pull"-relationships -- I can edit one config using data from another, but I have to have a specific, unambiguous path to that other config, which is not the case here.

I am less familiar with Contract Configurator, but it appears to be similar -- there are some special-purpose parameters which can be "fuzzy" (i.e. have at least so many Kerbals on board, have an orbit at least X kilometers across), but the general-purpose stuff that works with any part and any module is all geared around calling out specifics.

Link to comment
Share on other sites

The last update is really good! :)

Thank you!

An other suggest, look at this familly waiting for their son to joining them:

Spoiler

FkO0oFB.png

 

From what i read it's doable by adding your mod to kerbal stuff or if you want to keep only 1 source, by cheking the CKAN thread:

the-comprehensive-kerbal-archive-network-ckan-package-manager

don't forget the dependancies and recommanded mod' if you do it.

if you don't do it, no problem! and thank you again to share this mod.:wink:

 

Edited by Skalou
Link to comment
Share on other sites

Grumble, kids these days an' their see-cans...bah, humbug!  Back in my day, we had ta' download and install our mods in 1.44 MB chunks at 300 baud, uphill both ways, and we liked it!

I don't use it myself (I tinker too much with deleting parts I don't use, and I use a bunch of addons which predate it), so I'm not wild about "supporting" it.  On the other hand, the last time (the only time) someone else made a config for one of my mods, they goofed up the dependencies and recommendations.

In any case, there's not enough time on my plate to deal with it just yet.  Big push coming up in the real solar system.  I'm glad you enjoy it in its current CKAN-less state for the time being...

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