Jump to content

[1.10.1+] Contract Configurator [v1.30.5] [2020-10-05]


nightingale

Recommended Posts

Version 0.4.0 is out, now supports a good chunk of new KSP 0.90 features. Download it now!

Contract Configurator 0.4.0

- Added WaypointGenerator behaviour. Allows creation of waypoints.

- Added VisitWaypoint parameter (for use with WaypointGenerator behaviour).

- Added OrbitGenerator behaviour. Allows creation of orbits.

- Added ReachSpecificOrbit parameter (for use with OrbitGenerator behaviour).

- Added HasCrew requirement. Allows filtering on trait, experience level and count.

- Updated HasCrew parameter to support trait and experience level filtering.

- Added VesselMass parameter.

- Added Facility requirement - requires that a player has a facility upgraded to a specified level.

- Added SCANsatCoverage parameter and requirement (big thanks @tattagreis on the SCANsat integration).

- Added support for turning up log levels through the ContractConfigurator.cfg file (thanks @tattagreis).

- Fixed a bug in the HasPart parameter for parts with an underscore in the name (thanks @tattagreis).

- HasCrew now errors if minCrew > maxCrew (thanks @tattagreis).

- Most requirements are no longer checked on active contracts. Exposed attribute to override default behaviour through config file (thanks @scerion).

- Added ability to reload all CONTRACT_TYPE nodes on demand (via Alt-F9).

- Various minor bug-fixes.

Feature Spotlight: Orbits & Waypoints

Orbits and waypoints are both split into two parts - a generator BEHAVIOUR that will generate orbits and waypoints based on either fixed parameters or using randomization, and a PARAMETER for visiting waypoints or achieving orbits. Because they are decoupled, this allows for more flexibility:

  • Generate waypoints/orbits without tying them to a parameter (perhaps the player has to "find" the right one).
  • Create future parameters using orbits/waypoints that behave differently
  • Have multiple parameters that reference the same orbit/waypoint

Feature Spotlight: SCANsat

I can't thank tattagreis enough for this one - full credit goes to him. I would've *eventually* gotten around to SCANsat integration, but he did the whole thing and threw a pull request my way. Anyway, there's a PARAMETER for having a certain coverage % for a given scan type/planet, as well as a REQUIREMENT for having a minimum/maximum coverage %. So go give all the rep to tattagreis - he made several other contributions along with this one.

Feature Spotlight: No more restarting KSP!

If you're building Contract Configurator contracts and want to change something, there's no more need to restart KSP! Make your change, open up the debugging menu (Alt-F9 on windows) and press the reload button. May cause problems with active/offered contracts, use only for testing. You've been warned.

There's lots more, so have a look at the change log, and as always - happy contracting!

Link to comment
Share on other sites

Version 0.4.0 is out, now supports a good chunk of new KSP 0.90 features. Download it now!

Feature Spotlight: No more restarting KSP!

If you're building Contract Configurator contracts and want to change something, there's no more need to restart KSP! Make your change, open up the debugging menu (Alt-F9 on windows) and press the reload button. May cause problems with active/offered contracts, use only for testing. You've been warned.

There's lots more, so have a look at the change log, and as always - happy contracting!

Debug window is alt-F12 actually :D Alt-F9 is load a specific quicksave.

Love the new features! Esp the no need to restart :D so much easier to test contracts now. Hopefully should have full set of KSA homework soon :D

Link to comment
Share on other sites

Question - Can I define an Orbit behavior that uses an expression for some of the orbital parameters? for example, if I have completed one contract where I've reached a specific orbit, I'd like to have the "next" contract in progression be "same orbit but off by 120 degrees" (likely a change to the EPH/MNA values or LPE)?

Maybe a better way would be some type or behavior or parameter that defines a radial distance from another object in the orbit (that object being defined by a prior contract)

Essentially, the goal is to create a series of contracts to launch satellites that are "spaced out" along an orbit.

So can i use the persistent expressions in behaviors or parameters?

Edited by westamastaflash
Link to comment
Share on other sites

Debug window is alt-F12 actually :D Alt-F9 is load a specific quicksave.

The idea was to give it a key that doesn't really clash - F12 for stock debug, F11 is module manager, F10 was... some other common mod? Anyway, F9 is one of the worst things I could've chosen. I'll just rebind it in the next release to F11 or F12 and live with the clash.

Love the new features! Esp the no need to restart :D so much easier to test contracts now. Hopefully should have full set of KSA homework soon :D

Nice stuff, glad you're getting good use out of it!

Question - Can I define an Orbit behavior that uses an expression for some of the orbital parameters? for example, if I have completed one contract where I've reached a specific orbit, I'd like to have the "next" contract in progression be "same orbit but off by 120 degrees" (likely a change to the EPH/MNA values or LPE)?

Maybe a better way would be some type or behavior or parameter that defines a radial distance from another object in the orbit (that object being defined by a prior contract)

Essentially, the goal is to create a series of contracts to launch satellites that are "spaced out" along an orbit.

So can i use the persistent expressions in behaviors or parameters?

Short answer - no yet, but probably soon?

Long answer - What you're describing I've thought of as the "RemoteTech" problem - how do you define a contract that effectively says "launch a RemoteTech relay satelite constallation"? I'm trying to make Contract Configurator into a very big toolbox, so hopefully there will soon be multiple ways to solve this one:

  • Using an expression for config node attributes. This one actually isn't too hard since I already have the expression parser. It can probably have a lot of applications, so I'll try to get this one in the near term.
  • Specifying a *specific* vessel in any of the parameters. Right now the only support is for "any" vessel. What I hope to do is to extend the VesselParameterGroup so you can specify one vessel or a group of vessels. I'll have to see once I look at this if it could actually be used to solve this problem (not sure if it can, but may serve as the base for other things).
  • Specifying a minDistance to *any* other craft - this is a variation on what you suggested, and I hadn't really thought about it before. It's simple enough to work pretty well.
  • Using the future RemoteTech-specific parameters I plan to build. It may be possible to have a parameter that says "be in continuous contract with Kerbin for 6 hours". If the 3 satellites can survive a day in orbit without the connection dropping... then things are probably good. If you weren't trying to solve a RemoteTech problem, then obviously this answer wouldn't apply.

To be honest, not sure which of these ones will make the next release - but I'll have at least one solution to this problem when I introduce RemoteTech support (which is planned for this release).

Link to comment
Share on other sites

Long answer - What you're describing I've thought of as the "RemoteTech" problem - how do you define a contract that effectively says "launch a RemoteTech relay satelite constallation"? I'm trying to make Contract Configurator into a very big toolbox, so hopefully there will soon be multiple ways to solve this one:

  • Using an expression for config node attributes. This one actually isn't too hard since I already have the expression parser. It can probably have a lot of applications, so I'll try to get this one in the near term.
  • Specifying a *specific* vessel in any of the parameters. Right now the only support is for "any" vessel. What I hope to do is to extend the VesselParameterGroup so you can specify one vessel or a group of vessels. I'll have to see once I look at this if it could actually be used to solve this problem (not sure if it can, but may serve as the base for other things).
  • Specifying a minDistance to *any* other craft - this is a variation on what you suggested, and I hadn't really thought about it before. It's simple enough to work pretty well.
  • Using the future RemoteTech-specific parameters I plan to build. It may be possible to have a parameter that says "be in continuous contract with Kerbin for 6 hours". If the 3 satellites can survive a day in orbit without the connection dropping... then things are probably good. If you weren't trying to solve a RemoteTech problem, then obviously this answer wouldn't apply.

To be honest, not sure which of these ones will make the next release - but I'll have at least one solution to this problem when I introduce RemoteTech support (which is planned for this release).

Excellent! In fact I was thinking of this for remotetech :-)

In the meantime, I at least have the ability to specify a specific SMA and can make it so only one contract shows up at at time.

Is there a way to make it so that if I have 3 of the same contracts going, only one of them is completed when I reach the designated orbit?

Link to comment
Share on other sites

Excellent! In fact I was thinking of this for remotetech :-)

In the meantime, I at least have the ability to specify a specific SMA and can make it so only one contract shows up at at time.

Is there a way to make it so that if I have 3 of the same contracts going, only one of them is completed when I reach the designated orbit?

Not right now. Possibly soon. It get what you're trying to do - have 3 contracts for launching the 3 satellites. It may end up that you have to put the 3 together in one contract grouped under 3 VesselParameterGroup nodes, and have a special parameter in each that says the vessel is not the same as the other ones... but I need to dig into it a bit. Anyway, I think that's a better solution as you only occupy one contract slot (which are more valuable with the limits on un-upgraded buildings) *and* you can assign rewards to the parameters to still get the same behaviour.

Link to comment
Share on other sites

I was going to take the time after the 0.4.0 release until Christmas off from modding. But while I was doing the waypoints for the 0.4.0 release, I found something that really bugged me. The stock settings for waypoints were that you had to get within 500m to consider the waypoint visited (or 15,000m in the air). Those numbers are HUGE! Why so far? So I tried it.... It's hard when all you have is the map view. So I decided to do something. That something is THIS. :D

Link to comment
Share on other sites

Version 0.4.1 is out, with some minor fixes and new parameters courtesy of tattagreis. Download it now!

Contract Configurator 0.4.1

- Added OrbitalInclination parameter (thanks tattagreis).

- Added OrbitalEccentricity parameter (thanks tattagreis).

- Added OrbitalApoapsis parameter (thanks tattagreis).

- Added OrbitalPeriapsis parameter (thanks tattagreis).

- Fixed defaults for SCANsatCoverage requirement.

- Moved debug key from Alt-F9 to Alt-F10.

- Added LICENSE.txt into download file.

- Minor bug fixes.

Link to comment
Share on other sites

Version 0.4.2 is out. Mostly a bug fix release, but a major reworking of the validation logic should give more useful error messages when debugging contracts. Download it now!

Contract Configurator 0.4.2

- Improved validation when loading configuration. More checking for invalid cases and better error messaging.

- Added HasPassengers parameter.

- Added Funds requirement.

- Added Science requirement.

- Added Repuration requirement.

- Allow zero min speed for ReachSpeedEnvelope; improved titles.

- Minor bug fixes.

Link to comment
Share on other sites

Is it possible for a Using a Specific Ship parameter?

Been planned for a while, but I keep putting it off. It's difficult because KSP doesn't have a very good concept of a "specific ship". If I have two vessels, with internal identifiers of Vessel A and Vessel B and I dock them, then I will have one vessel called Vessel A (or possibly Vessel B). When I undock them, I will have Vessel A and Vessel C. I can identify by name instead, but the player can change that easy enough. I have ideas on how to work around this... but haven't quite gotten around to it yet.

I'll most likely do it along with the VesselSpawner behaviour (which is another one that was requested quite a while back). There's some logic between them that might be common.

Link to comment
Share on other sites

I created some simple scan missions for the SCANsat extension, covering all scannable main planets and Kerbin's moons.

Prepare to earn funds with scanning! :)

download: removed do unsecure host. See post #119 to get a new download link.

Edited by tattagreis
Link to comment
Share on other sites

I created some simple scan missions for the SCANsat extension, covering all scannable main planets and Kerbin's moons.

Prepare to earn funds with scanning! :)

Awesome! I'll link to this in the first post. A couple items:

  1. You'll need to include a license file in your download, as per the official Add-on Posting rules.
  2. Can you change the directory structure so the missions aren't in a subdirectory of ContractConfigurator? More a personal preference to keep it separate - but it'll also make it clear that the license under ContractConfigurator doesn't apply to the missions (unless you end up using the same license, but still).
  3. Suggestion - if you post up on Curse, KerbalStuff or GitHub, you can then get KSP-AVC versioning and CKAN support, both highly recommended for a better user experience!

Edited by nightingale
removed download link from quote
Link to comment
Share on other sites

Hmmm..... yeah, I got that too now... it downloads both the RAR (which is legit) and DOWNLOAD.exe which is filled with bad stuff. Please switch to a more... reputable download site (or GitHub/KerbalStuff/Curse). I removed the download link from the first post until you get a chance to fix it.

Link to comment
Share on other sites

Nope! Just a ... moment for me too. I removed the link my missions are zipped, not a exe file). I'm sorry for any troubles. I hope no one else tried to download it. The counter shows only 2 downloads.

I'm not used to download pages. Any suggestions for better and not paid one? :(

Link to comment
Share on other sites

What a terrible start to contribute stuff to kerbal community! :D

Thanks for informing me AlphaAsh. I removed the link and rehosted on Google Drive.

I made some scanning missions for Contract Configurator using the SCANsat extension. The missions cover all scannable main planets and Kerbin's moons. Starting new game isn't required, if you have already scanned more than 90% of Kerbin's surface your next mission will be Mun/Minmus and so on. To get the first mission (Scan Kerbin) offered, you have to research the SCAN RADAR Altimetry Sensor from SCANsat.

Tested with:

Contract Configurator(v0.4.2) and SCANsat(v9.0 due API change)

This is ment to be an example for creating scanning contracts with CC. Feel free to add/change missions. If you have an urge to contribute those changes, send me a note!

I do not plan to extend this mission pack. If you want to release an improved one, I would be glad! :)

Download

From GitHub: [Download]

License

Im not really sure why some .cfg files need a license but anyway: SCANsat Mission Pack is licensed with WTFPLv2

Edited by tattagreis
fixed url to latest
Link to comment
Share on other sites

tattagreis, I am impressed, truly impressed with this. One final request though, could you please upload it as a "zip" file? This would help me tremendously :)

Also, if you don't intend on further maintaining your set of files, if you want, I can take them and put to github and maintain them there...

Link to comment
Share on other sites

What a terrible start to contribute stuff to kerbal community! :D

Thanks for informing me AlphaAsh. I removed the link and rehosted on Google Drive.

I made some scanning missions for Contract Configurator using the SCANsat extension. The missions cover all scannable main planets and Kerbin's moons. Starting new game isn't required, if you have already scanned more than 90% of Kerbin's surface your next mission will be Mun/Minmus and so on. To get the first mission (Scan Kerbin) offered, you have to research the SCAN RADAR Altimetry Sensor from SCANsat.

Tested with:

Contract Configurator(v0.4.2) and SCANsat(v8.1)

This is ment to be an example for creating scanning contracts with CC. Feel free to add/change missions. If you have an urge to contribute those changes, send me a note!

I do not plan to extend this mission pack. If you want to release an improved one, I would be glad! :)

Download

From GitHub: [Download]

License

Im not really sure why some .cfg files need a license but anyway: SCANsat Mission Pack is licensed with WTFPLv2

Awesome stuff. The first post is now updated with links to this post and to the GitHub release area. When 0.5.0 comes around, I'll release my own contract pack. I'm not telling for what yet. :)

Link to comment
Share on other sites

Awesome stuff. The first post is now updated with links to this post and to the GitHub release area. When 0.5.0 comes around, I'll release my own contract pack. I'm not telling for what yet. :)

Aaaaand here we go:


$ ckan show ContractConfigurator-SCANsat
SCANsat mission pack: A Mission pack creating SCANsat contracts

Module info:
- version: 1.0
- authors: SimonTheSourcerer
- status: stable
- license: public-domain

Depends:
- ContractConfigurator
- SCANsat

Provides:
- ContractConfigurator-SCANsat

Resources:
- repository: https://github.com/SimonTheSourcerer/CCSCANsatMissionPack

Showing 10 installed files:
- GameData/CC_Contracts
- GameData/CC_Contracts/SCANsat
- GameData/CC_Contracts/SCANsat/ScanDres.cfg
- GameData/CC_Contracts/SCANsat/ScanDuna.cfg
- GameData/CC_Contracts/SCANsat/ScanEeloo.cfg
- GameData/CC_Contracts/SCANsat/ScanEve.cfg
- GameData/CC_Contracts/SCANsat/ScanKerbin.cfg
- GameData/CC_Contracts/SCANsat/ScanMinmus.cfg
- GameData/CC_Contracts/SCANsat/ScanMoho.cfg
- GameData/CC_Contracts/SCANsat/ScanMun.cfg

@tattagreis: I am aware that the license is not shown to be "WTFL", I'll check on our side what the problem might be.

Link to comment
Share on other sites

Is there a way to indicate a vessel should have only parts from a certain manufacturer and / or author?

I would love to set up a contract where Professor Phineas Kerbenstein wants to show the world that the only way to space hegemony is via his vertical propulsion emporium and thereby requires satellite / mun base / whatever be created with only parts sanctioned by his empire :cool:

Link to comment
Share on other sites

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