Jump to content

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


nightingale

Recommended Posts

@hargn - The details don't appear to be in those config files (are you linking me to the correct branch?).  That being said, from the error in the log, you still need to change it to reference the group when you use those variables:

On 02/08/2016 at 9:39 AM, nightingale said:

[...] you need to reference the contract group name in the variable when using it (so you probably want something like:


@MyContractGroup:maxUnlockedTechLevel
Link to comment
Share on other sites

On August 1, 2016 at 8:51 PM, baldamundo said:

Mid-way through a career game, I've suddenly hit a bug where contracts (from a bunch of different mods - SETI, Historical Progression, Historic Contracts, at least) which should only be offered once keep being offered as repeats. It seems like it's not blocking the progression though (e.g. subsequent contracts that require the previous one completed are still getting unlocked)

EDIT: Wait a minute...I think this might be the work of a pair of rogue module manager dlls...

But I have exactly this problem and can't figure it out. I only have one module manager dll and it is 2.6.25 for the 1.1.3 ksp version.  I ported my game from 1.1.2 to 1.1.3 and everything worked fine but not the contracts. I installed all the recent 3 CC updates, but still no joy.  Any ideas? Some recent contracts wouldn't complete and it is as if there are two separate RP-0 games going on... one that I ported and as if a new one started also.  So, if it "thinks" my contract can't be offered yet, it doesn't complete it.

Link to comment
Share on other sites

43 minutes ago, Parallax59 said:

But I have exactly this problem and can't figure it out. I only have one module manager dll and it is 2.6.25 for the 1.1.3 ksp version.  I ported my game from 1.1.2 to 1.1.3 and everything worked fine but not the contracts. I installed all the recent 3 CC updates, but still no joy.  Any ideas? Some recent contracts wouldn't complete and it is as if there are two separate RP-0 games going on... one that I ported and as if a new one started also.  So, if it "thinks" my contract can't be offered yet, it doesn't complete it.

Can you post a screenshot with some examples?  As well, I'll need to see a KSP.log and a save file (preferably a non-RP-0 one but I'll take anything).

Link to comment
Share on other sites

You're right @nightingale, there was something missing in my last commit.

If I believe you, as the data maxUnlockedTechLevel is into the group RP0/ComSatContracts I need to write @/RP0/ComSatContracts:maxUnlockedTechLevel to see it into a contract?

Otherwise, I don't know if this feature is implemented into CC : I would use some sort of inheritance between contract groups in order to specialize data.
If you want an example, look for the comSatPrestigeLevel data that is (in the same Groups.cfg file) defined into the ComSatContracts group with a default value, but that I want to redefine into some more specialized contract group (like EPOComSatContracts or SSOComSatContracts). This example isn't working, but it can help you to see what I would request.

Another question I have is : Are the different kind of orbit (KOLNIYA, TUNDRA, STATIONARY, ...) that are available into the OrbitGenerator working for RSS?

Thanks for your answer.

Edited by hargn
Link to comment
Share on other sites

@hargn - Not sure if the inheritance is something that I can easily support.  As far as the orbit types, it just calls the stock functions, so they should work.

@linuxgurugamer - As mentioned above, the KOLNIYA uses a stock function - so I'm about 95% sure that is a stock bug.  But I'll take a closer look to make sure.

@Deimos Rast - Well that's kind of silly, I never use that button.  Anyway, fixed for next release.

Link to comment
Share on other sites

8 minutes ago, nightingale said:

 

@linuxgurugamer - As mentioned above, the KOLNIYA uses a stock function - so I'm about 95% sure that is a stock bug.  But I'll take a closer look to make sure.

 

Would it make sense to put in a check to see if the Ap is > the SOI, and if so, to reject the contract?

Link to comment
Share on other sites

1 minute ago, linuxgurugamer said:

Would it make sense to put in a check to see if the Ap is > the SOI, and if so, to reject the contract?

It's possible (although I'd prefer to try to regenerate the orbit if it's "bad").  That being said, I haven't been able to reproduce it - so far it is correctly limited by the altitudeFactor (defaults to 0.8).  The stock code should set the max apoapsis to SOI * altitudeFactor, which seems to be what I'm seeing.  Do you have a save and/or screenshot with a bad orbit that I can take a look at?

Link to comment
Share on other sites

Just now, nightingale said:

It's possible (although I'd prefer to try to regenerate the orbit if it's "bad").  That being said, I haven't been able to reproduce it - so far it is correctly limited by the altitudeFactor (defaults to 0.8).  The stock code should set the max apoapsis to SOI * altitudeFactor, which seems to be what I'm seeing.  Do you have a save and/or screenshot with a bad orbit that I can take a look at?

Regenerate is good :-)  actually better :D

This was reported to me, by MatoroIgnika on Twitch.  I'll see if he still has that save around, and I'll also see if I can get it to happen for me.

Link to comment
Share on other sites

Actually, it just happened to me.  A Kolniya orbit around the Mun, Ap is 3,584,159m, I believe the Mun has an SOI of 2,429,559 M.

 

OK, zip file link follows, containing the following:

  1. Picture of Mission Control showing the contract in question
  2. 2nd screenshot showing accepted contract
  3. Complete copy of save file

https://www.dropbox.com/s/1eo2x8makafpnz7/ccerrors.zip?dl=0

Link to comment
Share on other sites

20 hours ago, Parallax59 said:

But I have exactly this problem and can't figure it out. I only have one module manager dll and it is 2.6.25 for the 1.1.3 ksp version.  I ported my game from 1.1.2 to 1.1.3 and everything worked fine but not the contracts. I installed all the recent 3 CC updates, but still no joy.  Any ideas? Some recent contracts wouldn't complete and it is as if there are two separate RP-0 games going on... one that I ported and as if a new one started also.  So, if it "thinks" my contract can't be offered yet, it doesn't complete it.

Huh. My problem seemed to disappear after I got rid of the old module manager dlls. Will let y'all know if it recurs.

Link to comment
Share on other sites

@linuxgurugamer - It's not really a stock bug, as the checks for invalid orbits are hardcoded into the stock contracts.  The Kolniya orbit that KSP generates is a real Molniya orbit - it needs to have the highest possible eccentricity, and a period that matches the period of the celestial body.  Because of that, the apoapsis is always the same (and in Mun's case, outside the SOI).

So I've added calls to the stocks checks into the orbit generation code (your contract now errors as invalid).  However, to allow you to fix it and still assign a random body, I've added new CelestialBody methods - CelestialBody.CanHaveKolniyaOrbit() and CelestialBody.CanHaveTundraOrbit().  You can use these to filter out bodies like Mun which no longer allow the Kolniya orbit.

Link to comment
Share on other sites

On August 4, 2016 at 10:28 PM, nightingale said:

Can you post a screenshot with some examples?  As well, I'll need to see a KSP.log and a save file (preferably a non-RP-0 one but I'll take anything).

ok, here is a link to the files requested.  Thanks for looking at this!

https://www.dropbox.com/sh/l25wgqpauy5ndqf/AABmEn_SiI1Uy3xdoAtasFZNa?dl=0 

Link to comment
Share on other sites

11 hours ago, nightingale said:

@linuxgurugamer - It's not really a stock bug, as the checks for invalid orbits are hardcoded into the stock contracts.  The Kolniya orbit that KSP generates is a real Molniya orbit - it needs to have the highest possible eccentricity, and a period that matches the period of the celestial body.  Because of that, the apoapsis is always the same (and in Mun's case, outside the SOI).

So I've added calls to the stocks checks into the orbit generation code (your contract now errors as invalid).  However, to allow you to fix it and still assign a random body, I've added new CelestialBody methods - CelestialBody.CanHaveKolniyaOrbit() and CelestialBody.CanHaveTundraOrbit().  You can use these to filter out bodies like Mun which no longer allow the Kolniya orbit.

Ok.  Sounds reasonable.  When will the new version be released?  

Edited by linuxgurugamer
Link to comment
Share on other sites

@Parallax59 - This is the error that is the cause of your problems:

[EXC 10:09:55.782] MissingMethodException: Method not found: 'FinePrint.Utilities.CelestialUtilities.GenerateOrbit'.
	Contracts.Contract.Generate (System.Type contractType, ContractPrestige difficulty, Int32 seed, State state)
	Contracts.ContractSystem.GenerateContract (Int32 seed, ContractPrestige difficulty, System.Type contractType)
	Contracts.ContractSystem.GenerateContract (System.Int32& seed, ContractPrestige difficulty)
	Contracts.ContractSystem.GenerateContracts (System.Int32& seed, ContractPrestige difficulty, Int32 count)
	Contracts.ContractSystem.RefreshContracts ()
	Contracts.ContractSystem+<UpdateDaemon>c__Iterator81.MoveNext ()

That's the stock contract system falling over (which is why it thinks you haven't done certain contracts - it's failing to load them.  From previous posts, I've heard of this being caused by old versions of DMagic Orbital Science (which I see you have installed).  So I'd update that (and any other mods that need updating - Orbital Decay appears to be spewing errors too).

@linuxgurugamer - I want to implement something quick for filtering out waypoints/orbits in the tracking station, but it shouldn't take too long.  Probably looking at a release Sunday or Monday.

Link to comment
Share on other sites

So, I'm working on the pseudo-random contracts thing we were discussing earlier, and I've noticed weird behaviour.

So the actual "roll a random number, and if it passes generate the contract" part works fine (yay).

However, what I'm observing is contracts popping in and out of being available pretty quickly.

Now, I know you said a few pages ago when we were talking about this, that the RNG will re-roll on every contract generation pass/every contract type, and that's great (and what I want) however - it looks to me like the RN is being re-rolled on contracts which have already generated, and if it rolls a number less than the required one, the contract that ALREADY generated, pops out of existence (which is really bad).

It's probably easiest observed on my CleverSatCore contract - if you pop that in and load up mission control, you'll see the contracts popping in and out of existence while it's generating contracts, after about 30 seconds, it settles down (guessing when it's done trying to generate contracts).

If you need logs or whatever, let me know, but it's pretty easily reproduced. Ideally, I'd like to see it stop trying to roll RN's for that particular contract, when it suceeds.

Oh - also, when one of the contracts does pop out of existence, the "offered" number in Mission Control doesn't update.

Edited by severedsolo
Link to comment
Share on other sites

@Vonnmillard - It mimicks the stock system where if you have sufficient negative rep, you can't be offered any exceptional contracts.

@severedsolo - This sounds like a bug (like a contract requirement check throwing an exception, or just failing incorrectly).  Can you send me a log with debug turned on?

Link to comment
Share on other sites

5 hours ago, nightingale said:

@severedsolo - This sounds like a bug (like a contract requirement check throwing an exception, or just failing incorrectly).  Can you send me a log with debug turned on?

Ta-da! I had to timewarp a little to make it do it, but it did.

Edited by severedsolo
Link to comment
Share on other sites

5 hours ago, severedsolo said:

Ta-da! I had to timewarp a little to make it do it, but it did.

Send you  a PR with the fix (but just for the one contract, I assume you have the same issue in others).  I don't have a good way to make it more transparent, although the DEBUG log message gives a *slight* hint as to the problem:

[DEBUG] ContractConfigurator.ExpressionRequirement: Contract CleverSatCore: requirement Expression was not met.
[DEBUG] ContractConfigurator.ContractType: Cancelling contract of type CleverSatCore (Put a new Satellite in orbit of Kerbin): Failed on contract requirement check.

 

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