Jump to content

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


nightingale

Recommended Posts

46 minutes ago, danielguo said:

I also faced the issue that I cannot complete the RP-0 First Space Station contract. I traced the contract definition and state as follows:

Contract definition:

  Reveal hidden contents

 

    PARAMETER
    {
        name = vesselGroupCrew
        type = VesselParameterGroup
        title = Bring at least 2 crew to the station.
        define = crewCapsule
        
        completeInSequence = true
        
        PARAMETER
        {
            name = HasCrew
            type = HasCrew
            minCrew = 2
        }
        
        PARAMETER
        {
            name = Rendezvous
            type = Rendezvous
            vessel = spaceStation
            distance = 1000
        }
    }

 

 

From my savefile:

  Reveal hidden contents

    SCENARIO
    {
        name = ContractVesselTracker
        scene = 7, 8, 5
        VESSEL
        {
            key = spaceStation
            id = 682db372-6f22-4419-896f-deb8786de936
            hash = 3434973595
        }
        VESSEL
        {
            key = crewCapsule
            id = 682db372-6f22-4419-896f-deb8786de936
            hash = 3434973595
        }

                PARAM
                {
                    name = VesselParameterGroup
                    id = vesselGroupCrew
                    enabled = False
                    state = Complete
                    values = 0,0,0,0,0
                    ContractIdentifier = RP0.first_spaceStation
                    title = Bring at least 2 crew to the station.
                    notes =
                    completedMessage =
                    completeInSequence = True
                    define = crewCapsule
                    duration = 0
                    trackedVessel = 682db372-6f22-4419-896f-deb8786de936
                    dissassociateVesselsOnContractFailure = True
                    dissassociateVesselsOnContractCompletion = False
                    PARAM
                    {
                        name = HasCrew
                        id = HasCrew
                        state = Complete
                        disableOnStateChange = False
                        values = 0,0,0,0,0
                        ContractIdentifier = RP0.first_spaceStation
                        title =
                        notes =
                        completedMessage =
                        hideChildren = True
                        allowStateReset = True
                        minCrew = 2
                        maxCrew = 2147483647
                        minExperience = 0
                        maxExperience = 5
                        VESSEL_STATS
                        {
                            vessel = 682db372-6f22-4419-896f-deb8786de936
                            state = Complete
                            strength = STRONG
                            completionTime = 825790289.865939
                        }
                        DOCKED_SUB_VESSEL
                        {
                            hash = 928864840
                            strength = STRONG
                            completionTime = 825527630.165411
                        }
                        DOCKED_SUB_VESSEL
                        {
                            hash = 1349686846
                            strength = STRONG
                            completionTime = 825527630.165411
                        }
                        DOCKED_SUB_VESSEL
                        {
                            hash = 448912306
                            strength = STRONG
                            completionTime = 825527630.165411
                        }
                        DOCKED_SUB_VESSEL
                        {
                            hash = 387663875
                            strength = STRONG
                            completionTime = 825527630.165411
                        }
                        DOCKED_SUB_VESSEL
                        {
                            hash = 320161985
                            strength = STRONG
                            completionTime = 825527630.165411
                        }
                        DOCKED_SUB_VESSEL
                        {
                            hash = 1541458004
                            strength = STRONG
                            completionTime = 825527630.165411
                        }
                        DOCKED_SUB_VESSEL
                        {
                            hash = 1197800519
                            strength = STRONG
                            completionTime = 825527630.165411
                        }
                        DOCKED_SUB_VESSEL
                        {
                            hash = 4258214772
                            strength = STRONG
                            completionTime = 825527630.165411
                        }
                        DOCKED_SUB_VESSEL
                        {
                            hash = 2226380522
                            strength = STRONG
                            completionTime = 825527630.165411
                        }
                        DOCKED_SUB_VESSEL
                        {
                            hash = 1605761418
                            strength = STRONG
                            completionTime = 825527630.165411
                        }
                        PARAM
                        {
                            name = CountParameterDelegate`1
                            state = Incomplete
                            disableOnStateChange = False
                            values = 0,0,0,0,0
                            ContractIdentifier = RP0.first_spaceStation
                            title = Count: At least 2
                            notes =
                            completedMessage =
                        }
                    }
                    PARAM
                    {
                        name = Rendezvous
                        id = Rendezvous
                        state = Complete
                        disableOnStateChange = False
                        values = 0,0,0,0,0
                        ContractIdentifier = RP0.first_spaceStation
                        title =
                        notes =
                        completedMessage =
                        allowStateReset = False
                        distance = 1000
                        vessel = spaceStation
                        VESSEL_STATS
                        {
                            vessel = 682db372-6f22-4419-896f-deb8786de936
                            state = Complete
                            strength = STRONG
                            completionTime = 825085743.559574
                        }
                        DOCKED_SUB_VESSEL
                        {
                            hash = 2576738452
                            strength = STRONG
                            completionTime = 825085743.559574
                        }
                        DOCKED_SUB_VESSEL
                        {
                            hash = 68072079
                            strength = STRONG
                            completionTime = 825085743.559574
                        }
                    }
                }

What happened is that in the Rendezvous step, crewCapsule got defined as the same vehicle as spaceStation. When using Rendezvous with Define, is there a guarantee that the "defined vessel" is different from the "target vessel"?

Thanks.

Interesting, that isn't supposed to happen, likely a problem in the rendezvous parameter.  Could you throw this one up on GitHub for me?

Link to comment
Share on other sites

I have a sort of problem (not really), but I'm pretty sure I know the cause. I'm in the middle of doing a debug build, where I ripped everything out of my install and am putting things back in one at a time. I think the below is caused by having the RemoteTech Contract Pack installed, but not having RemoteTech installed yet (I know it's a dependency). Is there the equivalent of a :NEEDS[RemoteTech] you could add, to really really make idiot proof? 'Cuz a certain idiot has been scratching his head about this for longer than he cares to admit publicly. Weird feature request, I know.

Since I'm here, I'll double down and give you an even more niche "not really a bug report":
CC kept throwing NRE's for the longest time, and I finally looked into it. Well it turns out, if you have a SCANSat installed, CC checks whether or not a Biome/Altimetry contract can be triggered (or whatever) based on the existence of SCANSat's included parts (RADAR, MULTI, etc). So if the user in question swapped out those parts for different ones (say, an all in one "SCANSat Ultimate Scanner 3000" model) and then disabled the originals to avoid part clutter... CC throws NREs when it tries to reference them (it doesn't recognize the "new" parts) and I'm pretty sure those contract types don't load right either.

Yeah. I'm not sure that's something you should worry about. I mention it in case someone else files a bug report about it.

(As an aside, it really can't be fun dealing with retarded minutiae like this all the time, I do apologize. But you do a bang up job, and I hope you get something useful out of this. Or you can throw it in the can, where it probably belongs.

Cheers.:))

 

YGgycLB.png?1

Link to comment
Share on other sites

50 minutes ago, Deimos Rast said:

CC kept throwing NRE's for the longest time, and I finally looked into it. Well it turns out, if you have a SCANSat installed, CC checks whether or not a Biome/Altimetry contract can be triggered (or whatever) based on the existence of SCANSat's included parts (RADAR, MULTI, etc). So if the user in question swapped out those parts for different ones (say, an all in one "SCANSat Ultimate Scanner 3000" model) and then disabled the originals to avoid part clutter... CC throws NREs when it tries to reference them (it doesn't recognize the "new" parts) and I'm pretty sure those contract types don't load right either

Bah, why do users insist on modifying their installs? :wink: (joking obviously) - if you can provide me a link to the parts you are using (PM will be fine) I'll see if it can be added to the ScanSat contracts.

Link to comment
Share on other sites

1 hour ago, severedsolo said:

Bah, why do users insist on modifying their installs? :wink: (joking obviously) - if you can provide me a link to the parts you are using (PM will be fine) I'll see if it can be added to the ScanSat contracts.

Well, the alternative solution that I arrived at was just not disabled the SCANSat parts physically (as in not change the .cfg to .DISABLED out of game so they load still) but then use a MM patch to change their category to -1, TechRequired to DELETE and entryCost to DELETE. I only play Career, so it works fine now (at least no NREs). I don't think you really want to have every Tom, Dick and Harry requesting you personally add in their "Super_Kool_Scanner_3000" Unit; isn't there a way to check for, instead of Part "name = SCANsat_Scanner24" instead check for the existence of a Module "name = SCANsat" with "sensorType = 24" (for the MULTI scanner). Looking quickly at the Scanner names and Types, they pretty much match up exactly (except for Radar, which has sensorType = 1, but name = SCANsat_Scanner). Or are we crossing into the territory of expending too much effort for too little gain?

Like I said, I've already solved the issue to my satisfaction, at least as far as CC proper is concerned.

(p.s. didn't know your Station Contract Pack was updated to 1.1+ grabbing now:D)

Link to comment
Share on other sites

42 minutes ago, Deimos Rast said:

isn't there a way to check for, instead of Part "name = SCANsat_Scanner24" instead check for the existence of a Module "name = SCANsat" with "sensorType = 24" (for the MULTI scanner). Looking quickly at the Scanner names and Types, they pretty much match up exactly (except for Radar, which has sensorType = 1, but name = SCANsat_Scanner). Or are we crossing into the territory of expending too much effort for too little gain?

Sort of, it's possible to check for this in PARAMETERS, but not in REQUIREMENTS. I can check for PartModules full stop, but of course ScanSat just uses "ScanSat" as it's module. So this would need to be either a CC enhancement, or just add the part. In the year since I released ScanSat Lite, this is the first problem with parts I've come across (although admittedly as it's actually maintained by Dmagic nowadays, I may have missed them)

So I would say  time to effort ratio is pretty low on just adding the part.

Link to comment
Share on other sites

5 hours ago, Deimos Rast said:

I have a sort of problem (not really), but I'm pretty sure I know the cause. I'm in the middle of doing a debug build, where I ripped everything out of my install and am putting things back in one at a time. I think the below is caused by having the RemoteTech Contract Pack installed, but not having RemoteTech installed yet (I know it's a dependency). Is there the equivalent of a :NEEDS[RemoteTech] you could add, to really really make idiot proof? 'Cuz a certain idiot has been scratching his head about this for longer than he cares to admit publicly. Weird feature request, I know.

It already works this way.

5 hours ago, Deimos Rast said:

YGgycLB.png?1

Whoops.  Fixed for next release.

5 hours ago, Deimos Rast said:

(As an aside, it really can't be fun dealing with retarded minutiae like this all the time, I do apologize. But you do a bang up job, and I hope you get something useful out of this. Or you can throw it in the can, where it probably belongs.

No worries - it's only a bother when I don't even have time to raise the issues on GitHub (which in those cases I just ask people to do it for me. :))

Edited by nightingale
Link to comment
Share on other sites

First of all, definitely loving the variety in the contracts. But is there a way to set which vessel is tracked for a given contract? It seems to be picking by best guess, and it's really screwing me on the optional parts of the SCANSat contracts. Basically my workflow is to put up RemoteTech satellites around a body with a manned mission first, and then send the scanning satellites. But I've got a contract like "Altimetry Scan of Minmus" and it's deciding that for the orbital component, it's going to track RT-Minmus-A (my RemoteTech satellite) instead of my (en-route) scanning satellite. Is there any way to convince the contract to track my scanning satellite when it arrives instead?

Edit: It looks like fixing this with save-file editing would require changing ContractVesselTracker, and that has hashes to go along with the vessel guids :-( Any suggestions? And/or how to change the hash?

Edited by ZachPruckowski
Link to comment
Share on other sites

3 hours ago, ZachPruckowski said:

First of all, definitely loving the variety in the contracts. But is there a way to set which vessel is tracked for a given contract? It seems to be picking by best guess, and it's really screwing me on the optional parts of the SCANSat contracts. Basically my workflow is to put up RemoteTech satellites around a body with a manned mission first, and then send the scanning satellites. But I've got a contract like "Altimetry Scan of Minmus" and it's deciding that for the orbital component, it's going to track RT-Minmus-A (my RemoteTech satellite) instead of my (en-route) scanning satellite. Is there any way to convince the contract to track my scanning satellite when it arrives instead?

Edit: It looks like fixing this with save-file editing would require changing ContractVesselTracker, and that has hashes to go along with the vessel guids :-( Any suggestions? And/or how to change the hash?

Vessel tracking is one of those features that I almost wish that I hadn't implemented, as it fits in the "enough rope to hang yourself (or hang the players from)" category.  Anyway, enough digressing.

The hash is a simple xor of all the part uids.  But if you want to do save file hackery, you're better off changing the VesselParameterGroup parameter back to state=incomplete and enabled=true.

But...  you'd be even better off reporting the issue to @DMagic or @severedsolo - there's a strong chance that the contract can be rewritten/re-jigged to make this less of an issue (but I can't say for sure, because I haven't looked at this specific contract).

Link to comment
Share on other sites

2 hours ago, nightingale said:

Vessel tracking is one of those features that I almost wish that I hadn't implemented, as it fits in the "enough rope to hang yourself (or hang the players from)" category.  Anyway, enough digressing.

The hash is a simple xor of all the part uids.  But if you want to do save file hackery, you're better off changing the VesselParameterGroup parameter back to state=incomplete and enabled=true.

But...  you'd be even better off reporting the issue to @DMagic or @severedsolo - there's a strong chance that the contract can be rewritten/re-jigged to make this less of an issue (but I can't say for sure, because I haven't looked at this specific contract).

Hmm. The save editing didn't work the first time and I decided not to mess with it further because it's not worth the effort for a few dozen science when I could be doing something fun to get that science.

Vessel tracking is a cool feature, I just wish there was a way to say "track this vessel" or even "you got the wrong vessel, guess again".

 

EDIT: I just double-checked and this is actually the SCANSat addon contracts that I'm using. Sorry for the confusion.

Edited by ZachPruckowski
Link to comment
Share on other sites

@nightingale I apologize if this is an easy one, but I cannot find the logic anywhere in the stock contracts or in the documents for the mod. Can I set a parameter so that a mission has to travel a certain distance away from where it starts? Essentially I want to require that a missile has to travel a certain distance to be considered an ICBM.

Thanks and sorry if this is an easy one that I missed!

Link to comment
Share on other sites

12 hours ago, pap1723 said:

@nightingale I apologize if this is an easy one, but I cannot find the logic anywhere in the stock contracts or in the documents for the mod. Can I set a parameter so that a mission has to travel a certain distance away from where it starts? Essentially I want to require that a missile has to travel a certain distance to be considered an ICBM.

Thanks and sorry if this is an easy one that I missed!

Nope!  What I would add to do this would be a WaypointDistance parameter, which you could use to say "must be at least/most X distance from waypoint Y".  You could then put a waypoint at KSC (and make it invisible if you like) and have the parameter triggered off of that.

If this is something you want, please raise an enhancement request on GitHub.

---

New contract pack! @inigma mentioned this one was coming, but I missed the thread until now.

Contract Pack: Sounding Rockets introduces sounding rocket contracts to go with @RoverDude's USI Sounding Rockets mod.

Edited by nightingale
Link to comment
Share on other sites

49 minutes ago, nightingale said:

Nope!  What I would add to do this would be a WaypointDistance parameter, which you could use to say "must be at least/most X distance from waypoint Y".  You could then put a waypoint at KSC (and make it invisible if you like) and have the parameter triggered off of that.

If this is something you want, please raise an enhancement request on GitHub.

---

New contract pack! @inigma mentioned this one was coming, but I missed the thread until now.

Contract Pack: Sounding Rockets introduces sounding rocket contracts to go with @RoverDude's USI Sounding Rockets mod.

Heh ya, I forgot to update this thread. :) it's been a crazy couple of days.

Link to comment
Share on other sites

I play a heavily modded install, and have been playing around with MemGraph to get an idea of where my massive stuttering lag was coming from. During my testing, I noted that I would get frequent, irregular spikes in memory usage in a Career mode game that I wasn't seeing in Sandbox. I tested this in a clean install with only Contract Configurator and a pile of contract packs, leading to the following screenshot of memory usage:

Spoiler

JS3ikEr.jpg

The big blob on the left is me loading the game, then getting to the VAB and dropping a pod on the launch pad. From there on, I noted regular, very high spikes in memory of 30-40 MB/s every 10-20 seconds. This seems to be compounded the more contracts I have - in my fully modded install, these spikes cripple my framerate. Even in a mostly stock install, I got odd slowdowns in my framerate, and frequent stutters. Any idea what could be causing this?

Here's my log file, if that's helpful. 

Edited by Wiseman
Added log file
Link to comment
Share on other sites

45 minutes ago, Wiseman said:

I play a heavily modded install, and have been playing around with MemGraph to get an idea of where my massive stuttering lag was coming from. During my testing, I noted that I would get frequent, irregular spikes in memory usage in a Career mode game that I wasn't seeing in Sandbox. I tested this in a clean install with only Contract Configurator and a pile of contract packs, leading to the following screenshot of memory usage:

  Reveal hidden contents

JS3ikEr.jpg

The big blob on the left is me loading the game, then getting to the VAB and dropping a pod on the launch pad. From there on, I noted regular, very high spikes in memory of 30-40 MB/s every 10-20 seconds. This seems to be compounded the more contracts I have - in my fully modded install, these spikes cripple my framerate. Even in a mostly stock install, I got odd slowdowns in my framerate, and frequent stutters. Any idea what could be causing this?

Here's my log file, if that's helpful. 

In short - contract generation (the stock system continuously tries to generate contracts).  Working on some changes around this for the next big release that should change how it works and hopefully eliminate the constant attempts to generate contracts.

Link to comment
Share on other sites

 

Just popping in to note that since last update I still don't seem to be getting any Field Science or Tourism Plus contracts.  I did get Kick off Tourism and a single Field Science contract offered the day it updated, but nothing since. I have contract packs for Field Science, Tourism, Bases, Remotetech and Scansat. I'm getting very regular contracts for the other three.

 

Link to comment
Share on other sites

1 minute ago, Chippy the Space Dog said:

 

Just popping in to note that since last update I still don't seem to be getting any Field Science or Tourism Plus contracts.  I did get Kick off Tourism and a single Field Science contract offered the day it updated, but nothing since. I have contract packs for Field Science, Tourism, Bases, Remotetech and Scansat. I'm getting very regular contracts for the other three.

 

I have all those except field science and I get tourism plus regularly. Do you have the Old Scansat pack or the ones that come with the mod itself by the way?

Link to comment
Share on other sites

3 minutes ago, Deimos Rast said:

I have all those except field science and I get tourism plus regularly. Do you have the Old Scansat pack or the ones that come with the mod itself by the way?

 

3 minutes ago, Deimos Rast said:

I have all those except field science and I get tourism plus regularly. Do you have the Old Scansat pack or the ones that come with the mod itself by the way?

Its the one by DMagic that's currently on CKAN

 

Oops, ignore that, its by DBT85

Edited by Chippy the Space Dog
Link to comment
Share on other sites

I meant the old SCANSat contract pack  or are the contracts from the SCANsat mod itself, but I'm guessing you just have the mod? If it's the DMagic then you're fine.

 I got nothing, as far as the Tourism Plus goes, sorry..:(  If you installed through CKAN, check that it gave you the latest versions maybe? OTherwise, I'll differ to Nightingale.

Link to comment
Share on other sites

3 minutes ago, Deimos Rast said:

I meant the old SCANSat contract pack  or are the contracts from the SCANsat mod itself, but I'm guessing you just have the mod? If it's the DMagic then you're fine.

 I got nothing, as far as the Tourism Plus goes, sorry..:(  If you installed through CKAN, check that it gave you the latest versions maybe? OTherwise, I'll differ to Nightingale.

 

It is the old contract pack.  I've removed it now to see if it changes anything. It does appear to be the latest version of CC I have installed.

 

Thanks for input. :)

Link to comment
Share on other sites

3 hours ago, Chippy the Space Dog said:

 

It is the old contract pack.  I've removed it now to see if it changes anything. It does appear to be the latest version of CC I have installed.

 

Thanks for input. :)

It may be that the preloader is full of the other contracts, a bug in the previous version meant these weren't generating much so the preloader was filling up but not dishing them out. You could try using the debug tools to clear contracts see if they show up then (warning - this may get rid of active contracts too)

Link to comment
Share on other sites

 

 

 

9 minutes ago, severedsolo said:

It may be that the preloader is full of the other contracts, a bug in the previous version meant these weren't generating much so the preloader was filling up but not dishing them out. You could try using the debug tools to clear contracts see if they show up then (warning - this may get rid of active contracts too)

Thank you. :)  Actually today I uninstalled KSPI-E and it had the unexpected drawback of clearing all my active contracts. Lo and behold, I have a Field Science contract in view now. I think maybe as far as tourism is concerned maybe the Space Agency next door has more leg room.. Guess we'll see..:)

Link to comment
Share on other sites

If I understand it correctly, installing Contract Configurator should disable any contracts for barycenter 'bodies'. Yet I keep getting a contact to explore Plock-Karen (from OPM). The first time I accepted, completed and then removed the contract via cheats as I couldn't decline or expire the contract. The second time I incidentally installed Trans-Keptunian while the contract was still offered, and the contract switched to Es. (Which I accepted, 117 years until I reach its SOI. :P) I also updated Contract Configurator to the last version. Yet, in my last session I got again a contract to explore Plock-Karen. Am I doing something wrong? Or is it a bug?

Link to comment
Share on other sites

31 minutes ago, gdw098 said:

If I understand it correctly, installing Contract Configurator should disable any contracts for barycenter 'bodies'. Yet I keep getting a contact to explore Plock-Karen (from OPM). The first time I accepted, completed and then removed the contract via cheats as I couldn't decline or expire the contract. The second time I incidentally installed Trans-Keptunian while the contract was still offered, and the contract switched to Es. (Which I accepted, 117 years until I reach its SOI. :P) I also updated Contract Configurator to the last version. Yet, in my last session I got again a contract to explore Plock-Karen. Am I doing something wrong? Or is it a bug?

Your understanding is incorrect - contracts built using Contract Configurator have some logic to ignore barycenter bodies, but installing Contract Configurator won't affect the stock contracts.  I know at one point @Sigma was looking at some logic to auto-cancel those, but I'm not sure if he ended up implementing it (because doing that in the stock system can cause performance problems since it'll just keep coming back).

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