nightingale

[1.6.x+] Contract Configurator [v1.27.1] [2018-12-28]

Recommended Posts

1 hour ago, Mordrehl said:

Does this by chance fix the issue with Tourism Plus and the counter not working?

I knew I forgot something, sorry about that.  Raised #595.

As a general statement, this is why bug reports are better off in GitHub - with all the threads I manage some stuff can occasionally slip through the cracks (usually I put bug reports straight in there myself, but time's been short lately and I missed this one).

Share this post


Link to post
Share on other sites
1 hour ago, nightingale said:

I knew I forgot something, sorry about that.  Raised #595.

As a general statement, this is why bug reports are better off in GitHub - with all the threads I manage some stuff can occasionally slip through the cracks (usually I put bug reports straight in there myself, but time's been short lately and I missed this one).

 

heh yup ... that's why it was raised in GitHub on the Tourism pack :P

Share this post


Link to post
Share on other sites
2 hours ago, Mordrehl said:

heh yup ... that's why it was raised in GitHub on the Tourism pack :P

Oh... then it's even more on me, since the onus shouldn't necessarily be on you guys to know what's a contract pack issue versus a Contract Configurator issue.  Same problem though - too many trackers, and I tend to pay more attention to the Contract Configurator one.  Well, and the KSP tracker, but that's a whole other ballgame....

Edited by nightingale

Share this post


Link to post
Share on other sites

@nightingale

I've tested rare science Contracts on Grassland and Tundra.

The waypoints are now where they should be :-)

 

Nice work

  • Like 1

Share this post


Link to post
Share on other sites

Just installed the latest updates to this as well as X Science and everyone is getting along like old friends again.

 

Thanks for all the hard work nightingale, and for all your patience with overzealous fans of your work.

  • Like 1

Share this post


Link to post
Share on other sites

Is there a way to deactivate the per-prestige-level limit for contracts? I dug into the .cfg files of CC but I had no luck.

Custom barn kit seems to change only the total number of active contracts, which is the stock limit system..

does it mean it needs a total recompile? ugh

Share this post


Link to post
Share on other sites
18 minutes ago, PaganoCristo said:

Is there a way to deactivate the per-prestige-level limit for contracts? I dug into the .cfg files of CC but I had no luck.

Custom barn kit seems to change only the total number of active contracts, which is the stock limit system..

does it mean it needs a total recompile? ugh

You can raise the limit multiplier in the difficulty settings (or in the save file), but you cannot disable them entirely.

Share this post


Link to post
Share on other sites

The incompatibility with research bodies seems to be back unfortunately (with the same "withdrew contract" log spam). I tries again and again to create explore and satelite contracts for Minmus (which is not available), making the game lag to the point it's unplayable :D

Uninstaling Contract Configurator or disabling ResearchBodies solves the problem. However disabling ResearchBodies ended creating a huge number of explore minmus contract, which crashed my game on opening the contract windows :confused:

I was wondering if it'd be possible, as a safety measure, to reduce the frequency at which contract configurator tries to spawn contracts ? That way if there's a conflict like this one, at the very least it doesn't create crash/lag inducing behaviour. No idea if it's feasible at all though :D

Dunno if the fix should happen on your side either, but it seems you were the one that fixed it last time :)

In any case keep up the good work :)

Share this post


Link to post
Share on other sites
9 hours ago, Stoh said:

The incompatibility with research bodies seems to be back unfortunately (with the same "withdrew contract" log spam). I tries again and again to create explore and satelite contracts for Minmus (which is not available), making the game lag to the point it's unplayable :D

Uninstaling Contract Configurator or disabling ResearchBodies solves the problem. However disabling ResearchBodies ended creating a huge number of explore minmus contract, which crashed my game on opening the contract windows :confused:

I was wondering if it'd be possible, as a safety measure, to reduce the frequency at which contract configurator tries to spawn contracts ? That way if there's a conflict like this one, at the very least it doesn't create crash/lag inducing behaviour. No idea if it's feasible at all though :D

Dunno if the fix should happen on your side either, but it seems you were the one that fixed it last time :)

In any case keep up the good work :)

Tried quickly in the dev build of ResearchBodies, and didn't really reproduce much here.  There was an error (the "toolbar" error" that I guess @JPLRepo had missed fixing for this build).  I don't know if that's the cause of your issue though, I'd need to see a KSP.log to say much more.

  • Like 2

Share this post


Link to post
Share on other sites
34 minutes ago, nightingale said:

Tried quickly in the dev build of ResearchBodies, and didn't really reproduce much here.  There was an error (the "toolbar" error" that I guess @JPLRepo had missed fixing for this build).  I don't know if that's the cause of your issue though, I'd need to see a KSP.log to say much more.

Yup. I done goofed that one.
I've updated my dev build of ResearchBodies. If people are using it with CC, then go re-download it from here.

 

  • Like 2

Share this post


Link to post
Share on other sites

Tried again with the latest update of ResearchBodies, but it doesn't change anything. It doesn't seem toolbar related either (might be wrong though).

Some log as asked :

[LOG 09:18:40.534] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.561] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.561] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.585] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.585] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.585] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.611] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.611] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.611] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.637] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.637] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.646] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Position satellite in a Kolniya orbit around Minmus."
[LOG 09:18:40.668] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.669] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.669] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.678] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Position satellite in synchronous orbit of Minmus."
[LOG 09:18:40.684] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Position satellite in a polar orbit of Duna."

This log can happen almost a hundred time per second.

To give some more context, I think this started happening after I finished a Mun explore contract (I think it was dock two vessels together near Mun), I noticed it first while orbiting the Mun right after that.

Share this post


Link to post
Share on other sites

@nightingale

I'm hoping you can help me with a problem, which, while may not be in CC, is being triggered by CC (same issue which was in the Blizzy Toolbar wrapper).

VOID with CC (no toolbar) generates the following error:

NotSupportedException: The invoked member is not supported in a dynamic module.
  at System.Reflection.Emit.AssemblyBuilder.GetExportedTypes () [0x00000] in <filename unknown>:0 
  at VOID.VOIDCore_Generic`1[VOID.VOIDCore_SpaceCentre].LoadModulesOfType[IVOID_Module] () [0x00000] in <filename unknown>:0 
  at VOID.VOIDCore_Generic`1[T].DrawGUI (System.Object sender) [0x00000] in <filename unknown>:0 
  at VOID.VOIDCore.OnGUI () [0x00000] in <filename unknown>:0 
  at VOID.VOIDMaster`1[T].OnGUI () [0x00000] in <filename unknown>:0 

 

I've traced it to this code, specifically the GetExportedTypes line:

 AssemblyLoader.LoadedAssembly assy;
for (int aIdx = 0; aIdx < AssemblyLoader.loadedAssemblies.Count; aIdx++)
{
	assy = AssemblyLoader.loadedAssemblies[aIdx];

	Type[] loadedTypes;
	try
	{
		loadedTypes = assy.assembly.GetExportedTypes();

		Type loadedType;

		for (int tIdx = 0; tIdx < loadedTypes.Length; tIdx++)
		{
			loadedType = loadedTypes[tIdx];

			if (
				loadedType.IsInterface ||
				loadedType.IsAbstract ||
				!typeof(U).IsAssignableFrom(loadedType) ||
				typeof(VOIDCore).IsAssignableFrom(loadedType))
                {
					continue;
				}

 

so for now, I just added a Try/Catch around that line, and it seems to work.  But I'm sure there is a better way, I was hoping you could help.

Thanks

Share this post


Link to post
Share on other sites
8 hours ago, Stoh said:

Tried again with the latest update of ResearchBodies, but it doesn't change anything. It doesn't seem toolbar related either (might be wrong though).

Some log as asked :


[LOG 09:18:40.534] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.561] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.561] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.585] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.585] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.585] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.611] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.611] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.611] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.637] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.637] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.646] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Position satellite in a Kolniya orbit around Minmus."
[LOG 09:18:40.668] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.669] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.669] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.678] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Position satellite in synchronous orbit of Minmus."
[LOG 09:18:40.684] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Position satellite in a polar orbit of Duna."

This log can happen almost a hundred time per second.

To give some more context, I think this started happening after I finished a Mun explore contract (I think it was dock two vessels together near Mun), I noticed it first while orbiting the Mun right after that.

Well, those aren't Contract Configurator contracts, so that's just Research Bodies doing what it does - preventing contracts from being generated as best it can (by stomping them as they come up).  The fact that installing Contract Configurator makes it seem worse could just be a side effect of one of the many things that CC does (such as changing contract limits somewhat).

The other factor is that ResearchBodies only has a dev build in 1.2 right now - there's a Celestial Body weighting system now that @JPLRepo hasn't integrated yet.  So I suspect this is something that could go away once that gets taken care of.

  • Like 2

Share this post


Link to post
Share on other sites

Hi everyone, I haven't used CC in awhile. I loaded it & a few Contract packs up, first game I get the yellow warnings. Is this anything to be concerned about or easily rectifiable with a config file edit? Thanks in advance.

DWb93ZE.png

Edited by sneekyzeke
Clarity

Share this post


Link to post
Share on other sites
7 minutes ago, sneekyzeke said:

Hi everyone, I haven't used CC in awhile. I loaded it & a few Contract packs up, first game I get the yellow warnings. Is this anything to be concerned about or easily rectifiable with a config file edit? Thanks in advance.

DWb93ZE.png

Yellow warnings are fine (probably just means it's not updated for 1.15.0+)

You might find it doesn't quite look right in mission control, but the contracts should basically work.

  • Like 2

Share this post


Link to post
Share on other sites

@linuxgurugamer - Yup, the try/catch will work.  Alternatively, if you search for the assembly by name, and only call GetExportedTypes() on the assembly you're looking for will work (which is better since that's an expensive call anyway).

@sneekyzeke - The yellow stuff can typically be ignored by end users.

  • Like 1

Share this post


Link to post
Share on other sites
1 minute ago, nightingale said:

@linuxgurugamer - Yup, the try/catch will work.  Alternatively, if you search for the assembly by name, and only call GetExportedTypes() on the assembly you're looking for will work (which is better since that's an expensive call anyway).

Well, the way it's written, I don't know the name :-(

So I'll leave it that way for now, until I get a better handle on it.

Thanks

Share this post


Link to post
Share on other sites

@linuxgurugamer - I have a similar implementation:

https://github.com/jrossignol/ContractConfigurator/blob/master/source/ContractConfigurator/ContractConfigurator.cs#L437-L469

To be honest, you want the try/catch anyway - as soon as you start dipping into those assemblies, you have no idea what you're going to find (including stuff that was compiled against the wrong .net or KSP version).

Share this post


Link to post
Share on other sites
1 minute ago, nightingale said:

@linuxgurugamer - I have a similar implementation:

https://github.com/jrossignol/ContractConfigurator/blob/master/source/ContractConfigurator/ContractConfigurator.cs#L437-L469

To be honest, you want the try/catch anyway - as soon as you start dipping into those assemblies, you have no idea what you're going to find (including stuff that was compiled against the wrong .net or KSP version).

thank you.

Always nice to hear from the experts

  • Like 1

Share this post


Link to post
Share on other sites

 

12 hours ago, Stoh said:

Tried again with the latest update of ResearchBodies, but it doesn't change anything. It doesn't seem toolbar related either (might be wrong though).

Some log as asked :


[LOG 09:18:40.534] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.561] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.561] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.585] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.585] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.585] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.611] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.611] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.611] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.637] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.637] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.646] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Position satellite in a Kolniya orbit around Minmus."
[LOG 09:18:40.668] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.669] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.669] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Explore Minmus."
[LOG 09:18:40.678] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Position satellite in synchronous orbit of Minmus."
[LOG 09:18:40.684] 10/27/2016 9:18:40 AM,ResearchBodies,WithDrew contract "Position satellite in a polar orbit of Duna."

This log can happen almost a hundred time per second.

To give some more context, I think this started happening after I finished a Mun explore contract (I think it was dock two vessels together near Mun), I noticed it first while orbiting the Mun right after that.

3 hours ago, nightingale said:

Well, those aren't Contract Configurator contracts, so that's just Research Bodies doing what it does - preventing contracts from being generated as best it can (by stomping them as they come up).  The fact that installing Contract Configurator makes it seem worse could just be a side effect of one of the many things that CC does (such as changing contract limits somewhat).

The other factor is that ResearchBodies only has a dev build in 1.2 right now - there's a Celestial Body weighting system now that @JPLRepo hasn't integrated yet.  So I suspect this is something that could go away once that gets taken care of.

@Stoh - As @nightingale said. This is a ResearchBodies issue. and it is a dev build for 1.2. And work is still underway to resolve the weighting system.
In the meantime I have removed that log message. so if you go over to ResearchBodies thread and download the dev zip again it will fix this log message issue.

Share this post


Link to post
Share on other sites

 

@nightingale @JPLRepo Thanks for the quick answers (and fix !) :D

The least I can do is test what it does (but maybe I shouldn't post this in this thread ?) :

  • The performance hit still seem to be here, maybe it is related to the cost of generating contracts rather than the log spam ?
  • The log spam is indeed greatly reduced, there seem to be still some log spam, but at a lesser frequency - so I'm not even sure it's related. Just adding it here in case it have some use. The Kopernicus one is most likely unrelated... but heh.
[ERR 22:02:42.477] TextGenerator Error: No Text Set called Adjectives, Depreciative exists.
[ERR 22:02:42.952] TextGenerator Error: No Text Set called Adjectives, Depreciative exists.
[ERR 22:02:42.952] TextGenerator Error: No Text Set called Adjectives, Depreciative exists.
[ERR 22:02:42.952] TextGenerator Error: No Text Set called Adjectives, Depreciative exists.
[ERR 22:02:42.952] TextGenerator Error: No Text Set called Adjectives, Depreciative exists.
[ERR 22:02:42.952] TextGenerator Error: No Text Set called Adjectives, Depreciative exists.
[ERR 22:02:49.118] TextGenerator Error: No Text Set called Adjectives, Depreciative exists.

[...]

[EXC 22:13:09.504] NullReferenceException: Object reference not set to an instance of an object
	Kopernicus.RuntimeUtility.LateUpdate ()

 

That's it, not much to report. BTW I'm well aware that this kind of support/maintenance is a lot of work (especially on a temporary release !), so not putting any pressure. I'm just reporting in case theses might be useful.

 

Share this post


Link to post
Share on other sites
49 minutes ago, Stoh said:

 

@nightingale @JPLRepo Thanks for the quick answers (and fix !) :D

The least I can do is test what it does (but maybe I shouldn't post this in this thread ?) :

  • The performance hit still seem to be here, maybe it is related to the cost of generating contracts rather than the log spam ?
  • The log spam is indeed greatly reduced, there seem to be still some log spam, but at a lesser frequency - so I'm not even sure it's related. Just adding it here in case it have some use. The Kopernicus one is most likely unrelated... but heh.

[ERR 22:02:42.477] TextGenerator Error: No Text Set called Adjectives, Depreciative exists.
[ERR 22:02:42.952] TextGenerator Error: No Text Set called Adjectives, Depreciative exists.
[ERR 22:02:42.952] TextGenerator Error: No Text Set called Adjectives, Depreciative exists.
[ERR 22:02:42.952] TextGenerator Error: No Text Set called Adjectives, Depreciative exists.
[ERR 22:02:42.952] TextGenerator Error: No Text Set called Adjectives, Depreciative exists.
[ERR 22:02:42.952] TextGenerator Error: No Text Set called Adjectives, Depreciative exists.
[ERR 22:02:49.118] TextGenerator Error: No Text Set called Adjectives, Depreciative exists.

[...]

[EXC 22:13:09.504] NullReferenceException: Object reference not set to an instance of an object
	Kopernicus.RuntimeUtility.LateUpdate ()

 

That's it, not much to report. BTW I'm well aware that this kind of support/maintenance is a lot of work (especially on a temporary release !), so not putting any pressure. I'm just reporting in case theses might be useful.

 

The first error comes from stock, and implies an issue of some kind with your StoryDefs.cfg.  Could be steam needs to be re-validated, could be that it's a mod making changes to that, or a bad Module Manager config, or some other issue.

The second is Kopernicus. :wink:

Share this post


Link to post
Share on other sites

I'd like to give "attaboys" to nightingale, severedsolo, & DBT85 for giving me a completely fresh playthru of 1.2. See, I had my opening career strategy lined up like steps: 1,2,3, etc. In my current game, which I'm about to start over, :rolleyes: I'm ready to do a Mun fly-by, and oops, overweight, gotta upgrade the launchpad. Oops, where's all them megabux I always had before? I'm broke! But I have some highly trained Kerbals! :D Time to pay closer attention to finances. Thanks everybody! :)

  • Like 2

Share this post


Link to post
Share on other sites

Hello,

I found a conflict between the mod "contact configurator V1.20.3" and Infernal Robotics v2.0.6.

Indeed, contract configurator prevents infernal robotics of customized template icon in the VAB and SPH and in game.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now