Jump to content

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


nightingale

Recommended Posts

@nightingale

Could you help me with syntax a bit?

I have a test contract for available parts.

I want another contract to have a requirement that a part had the test contract performed on it at least 3 times.

I see you have the ContractComplete requirement, but that is only for an entire contract type, which would include all parts; I want it specific to a single part that has had that test contract completed 3+ times.

Consequently, I'd also like the part test contract to only allow it to be performed 10 times before no longer being available for test, which would be a similar Where clause.

Link to comment
Share on other sites

I don't know the working of the Contract Configurator, but I do know that Tourist missions where you have to for instance send 4 tourists on an orbital flight, you CAN send them up 1 at a time on different ships. And as each lands it is shown as complete for that tourist, and when all 4 have returned, it makes the contract complete.

Maybe your Contract could be written similar to that format, but require the part to be tested 3 times. Since each tourist is a separate entity (unique names) Maybe the contract wont recognize the part having 3 entries in the contract (i.e. it will count all of them as complete when the first one is tested) Maybe by requiring testing the part at different locations, (On Launch Pad, At High Atmosphere Altitude, In Low Kerbal Orbit) it would work. Technically you could probably run the test on the same launch with the same part, but I think it would also allow you to test the part on 3 different launches at 3 different locations

Edited by BlackHat
Link to comment
Share on other sites

This blows up completely, so obviously not the way to do it...

Spoiler

CONTRACT_TYPE {
	name = PartTesting
	title = "Test " + @/targetPart
	synopsis = Do this
	completedMessage = You did this

	DATA_EXPAND {
		type = AvailablePart
		targetPart = AllParts()
	}

	REQUIREMENT {
		type = All

		REQUIREMENT {
			type = TechResearched
			part = @/targetPart
		}
		REQUIREMENT {
			type = PartUnlocked
			part = @/targetPart
			invertRequirement = true
		}
		REQUIREMENT {
			type = AcceptContract
			contractType = "PartCertification." + @/targetPart
			invertRequirement = true
		}
		REQUIREMENT {
			type = CompleteContract
			contractType = "PartTesting." + @/targetPart
			maxCount = 5
		}
		REQUIREMENT {
			type = CompleteContract
			contractType = "PartCertification." + @/targetPart
			invertRequirement = true
		}
	}

	BEHAVIOR {
		type = ExperimentalPart
		part = @/targetPart
	}

	PARAMETER {
		type = PartTest
		part = @/targetPart

		PARAMETER {
			type = ReachState
			situation = LANDED
		}
	}
	PARAMETER {
		type = PartTest
		part = @/targetPart

		PARAMETER {
			type = ReachState
			situation = SPLASHED
		}
	}
	PARAMETER {
		type = PartTest
		part = @/targetPart

		PARAMETER {
			type = ReachState
			situation = FLYING
			minAltitude = 1000
			maxAltitude = HomeWorld().FlyingAltitudeThreshold()
		}
	}
	PARAMETER {
		type = PartTest
		part = @/targetPart

		PARAMETER {
			type = ReachState
			situation = FLYING
			minAltitude = HomeWorld().FlyingAltitudeThreshold()
			maxAltitude = HomeWorld().AtmosphereAltitude()
		}
	}
	PARAMETER {
		type = PartTest
		part = @/targetPart

		PARAMETER {
			type = ReachState
			situation = ORBITING
		}
	}
}

 

----

Is this a valid option somehow? I can't get that to work either.

BEHAVIOUR {
	type = Expression
	CONTRACT_COMPLETED_SICCESS {
		SC_Count@/targetPart = $SC_Count@targetPart + 1
	}
}

----

Or this:

CONTRACT_TYPE {
	name = PartTesting.@/targetPart

----

Ugh, too many hours spent on this: I just wanted to use how many times a contract was completed for a given part as requirement for a different contract... it didn't seem too complicated until I tried.

----

Since I was getting nowhere, I tried to just create a generic one-time contract instead, but even this causes it throw exceptions and not work?

	DATA {
		type = AvailablePart
		hidden = true
		targetPart = AllParts().Where(p => !p.IsUnlocked() && p.TechRequired().IsUnlocked() && p.Category() == Engine && p.EngineVacuumThrust() != 0).Random()
	}
		REQUIREMENT {
			type = TechResearched
			part = @/targetPart
		}

 

Edited by Electrocutor
Link to comment
Share on other sites

It seems this mod is not compatible with the current version of KSP. I removed everything I was trying to do and just made a single static contract, and it still blows up with exceptions and doesn't work.

CONTRACT_TYPE {
	name = test
	title = test @/targetPart
	synopsis = Do this
	completedMessage = You did this
	description = description

	DATA {
		type = AvailablePart
		hidden = true
		targetPart = AvailablePart(liquidEngine2)
	}

	REQUIREMENT {
		type = All

		REQUIREMENT {
			type = TechResearched
			part = @/targetPart
		}
		REQUIREMENT {
			type = PartUnlocked
			part = @/targetPart
			invertRequirement = true
		}
	}

	BEHAVIOUR {
		type = ExperimentalPart
		part = @/targetPart
	}

	PARAMETER {
		type = PartTest
		part = @/targetPart

		PARAMETER {
			type = ReachState
			situation = LANDED
		}
	}
}
  • Clean KSP Install
  • Module Manager, Contract Configurator, and this .cfg
  • Steps to Reproduce
    • Start Hard Career
    • Unlock basicRocketry, but not any of the parts (so as to meet requirements)
    • Exit Game
    • Start Game, Load Save
    • Mod Crashed
Link to comment
Share on other sites

I believe this needs to be re-compiled at least, maybe reworked at worst, for 1.5.1.  Some contracts for other mods are not working and they are waiting until this is fixed.  Like Research Bodies space telescope contracts are broken due to Contract Configurator not working correctly.  Its pretty frustrating to have launched the telescope, put it the right orbit, etc yet nothing happens because apparently CC isn't parsing something out of the game to complete the individual requirements.  So hang on and be patient, someone will eventually get it fixed. 

Edited by Murdabenne
Link to comment
Share on other sites

4 hours ago, Murdabenne said:

  Like Research Bodies space telescope contracts are broken due to Contract Configurator not working correctly.  Its pretty frustrating to have launched the telescope, put it the right orbit, etc

I know I meet the RB contract requirements, so I just force contract completion with the Alt-F12 menu and remain patient.

Link to comment
Share on other sites

Have an interesting question that I'm wondering if anyone has a solution to. I've been attempting to create contracts that recreate the Mercury, Gemini, and Apollo Programs. Is it possible to create a parameter that requires a spacecraft to complete a specific number of orbits to fulfill the contract? While for certain missions it works to have a time duration parameter, I'd prefer to not have missions like "Friendship 7" be required to be in orbit for a specific amount of time, but rather a specific number of orbits. Is that possible to do with CC or is that too complex a parameter to record?

Link to comment
Share on other sites

On 8/10/2018 at 1:00 PM, Tonka Crash said:

I'm not at all familiar with Contract Configurator, so this is more a question about what to expect instead of a bug report. I installed it to go with the StationScience mod and the Bases and Station Contract Pack. linuxgurugamer sent me to this thread to ask questions instead of his release thread for the Bases and Station Contract Pack.

  1. I have the StationScience mod, but I'm not seeing any contracts to actually do any of the science experiments. I was offered contracts that hauled all the parts up to stations around Kerbin and the Mun and now they are sitting idle while I rotate crews and haul fertilizer around the system.
  2. Is there a way to add some realistic time delay (30-60 days) between repeating routine maintenance type contracts? I'm getting sick of 72 hours between crew rotations and supply runs to the same station. I'm not exaggerating, I did the math based on completing times in the persistence.sfs file.
  3. When you refuse a contract is there a way to have it actually go away for a couple game weeks. I keep refusing to do contracts that make no sense (supply run to a base with 7 years of supplies) and the contract will clear, I click available contracts and same contract pops up as the only contract on offer.
  4. If I leave Mission Control open I occasionally see contracts pop up and disappear usually before I have a chance to click on it. One of these is to build a Minmus station that I want to put in place before expanding a base on the surface, but I never get a chance.
  5. How are the significance of contracts determined? Random chance?  I've got my first contract to extract ore and return it to Kerbin from anywhere and it's trivial, but a what should be a routine contracts like a supply run for 10 units of life support is exceptional.

I am having these same issues, specifically #1 & #4.

Contracts for the Bases and Station Contract Pack do not appear, or rather, they briefly flicker on the contract list and disappear.

Any help or direction to help myself would be appreciated.

Link to comment
Share on other sites

@Raptus I never got a response to my post. In the last 3 months I've had 2 contracts pop to actually use the Station Science parts. For issue #2 I found editing the contracts to change the cooldown fixed my issue with the contracts popping too frequently. Everything else still is a problem.

Link to comment
Share on other sites

  • 2 weeks later...

The mod itself works in 1.5.1. Mods included in the Contract Pack do not work correctly. Can say that now accurately correctly works KerbinSpaceStation from linuxgurugamer. It has been updated to 1.5.1. Other mods from this package give errors and I had to remove them, which of course significantly affected the level of immersion in the game.

Link to comment
Share on other sites

On 11/22/2018 at 10:03 PM, Sokol_323 said:

The mod itself works in 1.5.1. Mods included in the Contract Pack do not work correctly. Can say that now accurately correctly works KerbinSpaceStation from linuxgurugamer. It has been updated to 1.5.1. Other mods from this package give errors and I had to remove them, which of course significantly affected the level of immersion in the game.

1

Are you sure about that?  I have had problems with it functioning correctly with a lot of mod packs - it doesn't "crash", but it also doesn't function fully and correctly. And it hasn't been updated (per the front page) since April, so there is at least one major and one minor version increase, with another major on the horizon. Is this being maintained at all (obviously not actively maintained), or is it on its way to becoming an orphan, a candidate for adoption?

NOTE:  This is not an attempt to bug the author, nor shame him/her (tone is awfully hard to convey in text).  As a former addon author in another game, I realize that sometimes life happens, and sometimes you just run out of time or energy to do upkeep, especially with a game that changes like KSP.  I was just wondering if this was in need of a fork/re-version, or someone else to take over to get it up to date until the author has time to deal with it.

Edited by Murdabenne
clarification
Link to comment
Share on other sites

13 minutes ago, Murdabenne said:

Are you sure about that?  I have had problems with it functioning correctly with a lot of mod packs - it doesn't "crash", but it also doesn't function fully and correctly. And it hasn't been updated (per the front page) since April, so there is at least one major and one minor version increase, with another major on the horizon. Is this being maintained at all (obviously not actively maintained), or is it on its way to becoming an orphan, a candidate for adoption?

Mod works. But in version 1.5.1 works not quite right. I wrote it. Now I have a career that has moved from version 1.4.5 to version 1.5.1 with all the mods, some of which are still not updated. In packages of the contract is set AnomalySurveyor and KerbinSpaceStation. These contract packages work. But AnomalySurveyor throws an error on SCANSat. You can check other packages. I also get contracts with this mod TST and ResearchBodies. Of course, with the removal of some contract packages, the career became less interesting. But I don't know if this mod will be supported in the future. So now in search of options to make the game more attractive.

Link to comment
Share on other sites

On 11/29/2018 at 10:57 PM, Sokol_323 said:

Mod works. But in version 1.5.1 works not quite right. I wrote it. Now I have a career that has moved from version 1.4.5 to version 1.5.1 with all the mods, some of which are still not updated. In packages of the contract is set AnomalySurveyor and KerbinSpaceStation. These contract packages work. But AnomalySurveyor throws an error on SCANSat. You can check other packages. I also get contracts with this mod TST and ResearchBodies. Of course, with the removal of some contract packages, the career became less interesting. But I don't know if this mod will be supported in the future. So now in search of options to make the game more attractive.

2

I wonder if anyone knows enough about this to fork it or take it over? That is, assuming someone has the time and energy to do so.

 

 

 

Link to comment
Share on other sites

And no, I thought about @linuxgurugamer but he already maintains a ton of stuff, so likely doesn't have the bandwidth for a potentially big chunk like this.  Someone else should step up. 

I would except that I really don't know Windows, graphics, C# or .net at all.  Probably take me months just to get used to the toolchain.  The last thing I coded in seriously was C++ on Unix/Linux, and before that, I was mainly C with make, ksh, awk, and sed on Solaris and Unix before Linux existed (I'm a programming fossil, started with 6502 assembler as a little kid, beautiful little CPU). Mainly system/sockets level stuff: Thanks to Schnier and Stevens, I implemented a lot of cryptographic and communications stuff back when you had to roll your own. Mainly servers with no real user interface other than command line switches, an ini file, and log files or syslog. I did a lot of scaffolding and system glue in Perl and then Python when it was invented.    Since I moved away from being an engineer (I'm now a cardiovascular specialized nurse, long story), I've mainly fiddled with Lua for game scripting/addons.  So I'm afraid I'm not much help, although I am starting to think maybe I should learn C#/Net/Windows just for the mental exercise.

Maybe 6-7 months from now Ill jump in but right now, I simply don't have the knowledge.

 

Link to comment
Share on other sites

6 hours ago, Murdabenne said:

And no, I thought about @linuxgurugamer but he already maintains a ton of stuff, so likely doesn't have the bandwidth for a potentially big chunk like this.  Someone else should step up. 

I may do a recompile, but it will be unsupported and unofficial for now.  It needs more love than I can give it right now

Link to comment
Share on other sites

I have a n Unofficial that works with RemoteTech.

There's a branch called "Experimental". Keep away from that (and from any zip with this on the name), I made a mistake on that branch and didn't fixed it yet.

https://github.com/net-lisias-kspu/ContractConfigurator/releases

Edited by Lisias
tyops, tyops, tyops everywehre!!!
Link to comment
Share on other sites

4 hours ago, linuxgurugamer said:

I may do a recompile, but it will be unsupported and unofficial for now.  It needs more love than I can give it right now

If it does not involve an excessive waste of time and you could recompile it would be greatly appreciated.

Maybe some problems will be solved waiting for an official version.

Thanks.

Link to comment
Share on other sites

12 hours ago, vagabond77 said:

Maybe some problems will be solved waiting for an official version.

Problems will be solved when people solve them.

An Official version should merge the fixes (or perhaps solve it in a better way), but until this happens you will need to choose between fixing it yourself (and then, why don't share the fix?), choose an Unofficial fork that solve your problem without creating another (it can happens!), or play KSP without it.

Edited by Lisias
small rephrasing.
Link to comment
Share on other sites

4 hours ago, Gordon Dry said:

@Lisias Your version, the CC_RemoteTech.dll is broken, I have to use the latest build from @PiezPiedPy or I always have


RTLockStaging
RTLockSAS
RTLockRCS
RTLockActions

 

Nothing changed on Remote Tech since I released my last binary. I also found @PiezPiedPy repository here,  and what he did is EXACTLY what I did - that was exactly what he told me to do! :D 

I used the latest Remote Tech DLL from the official distribution, just to be sure.

There's something more on this that what you are telling - I recompiled my code-tree against 1.4.1 (that I used originally), 1.4.5 and also 1.5.1 just for the lulz, and I got exactly the same binary I published on August, 26th.

49334591-a1b01e80-f5c0-11e8-8ba8-db6098b

Be aware that I "locked" my CC_RemoteTech.dll to work on the same ContractConfigurator I compiled, that it's not the same one that is from the last Official Distribution. I also locked it to work with Remote Tech 1.8 and above (currently, it's on 1.9 version). You can't use "my" CC_RemoteTech without meeting these requirements:
 

[assembly: KSPAssemblyDependency("ContractConfigurator", ContractConfigurator.RemoteTech.Version.major, ContractConfigurator.RemoteTech.Version.minor)]
[assembly: KSPAssemblyDependency("RemoteTech", 1, 8)]

Where:
namespace ContractConfigurator.RemoteTech
{
	static class Version
	{
		public const int major = 1;
		public const int minor = 25;
		public const int patch = 0;
		public const int build = 2;
		public const string Number = "1.25.0.2";
		public const string Text = Number + " Unofficial";
	}
}


Since the upstream's AssemblyInfo says:

[assembly: AssemblyInformationalVersion("1.25.0")]
[assembly: KSPAssembly("ContractConfigurator", 1, 0)]

It's clear what's happening: you are using "my" DLLs with incompatible binaries. We don't mix DLLs from different sources and expect it to work properly - and since I don't intent to stomp on the Maintainer's toes, my DLLs are 'designed" to work only with the DLLs from the same package they belongs. :) 

You gave me gave me a run for my :funds:, my friend. And hinted me that I need to proper instruct people to do not mix DLLs and assets from my Unofficial distributions with the Official (or other unofficial) ones! :D

I created this issue just for you! ;) 
https://github.com/net-lisias-kspu/ContractConfigurator/issues/1

Edited by Lisias
Works as Designed. I always wanted to say that!!! :D
Link to comment
Share on other sites

23 hours ago, Lisias said:

Problems will be solved when people solve them.

An Official version should merge the fixes (or perhaps solve it in a better way), but until this happens you will need to choose between fixing it yourself (and then, why don't share the fix?), choose an Unofficial fork that solve your problem without creating another (it can happens!), or play KSP without it. 

I think the author ( @nightingale ?) is still around although it is apparently he does not have the time right now to deal with updating and reworking this mod.  It happens, no big deal, and I hope whatever things have him busy, they are something good or at least something that turns out well in the end. 

As for forks and fixes: It is on GitHub.  So maybe PM him and ask if he want your fixes as PRs for his main branch.  I'd say, as a courtesy to the original author, any changes you make that fix an issue could be submitted as pull requests on the original repository - Many hands make for lighter work.  I know when I got overwhelmed, pull requests that had been tested were very welcome, they meant my mod had more life, allowed me to focus on other problems, and reduced the time-sink and workload involved in keeping my addon current.

And there goes my excuse for not learning C#/Net/Windows/Unity.  Looks like I have a lot of learning to do, so I can help update a mod like this one eventually (6 months?).  :huh:

EDITORIAL (Feel free to ignore) One last thing: we need to remember that RL is far more important than any game mod.  The authors (and that includes adopters/adopters/rebuilders) do this of their own good will, free of charge, on their own time. Nobody here is demanding anything, which is good, and that makes me proud to be part of this community.  Because "demanding" things is what drove me off being an author in another game (they unfortunately had a toxic community), and I'm sure has or will drive people off if we don't make our intent clear - which can be hard to do in plain old text, so as King Leonidas said, "choose your words wisely" :cool:

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