Jump to content

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


nightingale

Recommended Posts

@nightingale I'm not sure if this is a stock or a CC issue.

First to mention I use the vessel naming priorities, so for example the pod is called "Gemini 3" but the upper stage is called "Titan I-C upper stage (Gemini 3)" and the whole vessel incl. stage 1 and 2 is called "Titan I-C (Gemini 3)".

So, Gemini 3 reached orbit, the countdown of the "Orbit for one week" contract starts counting down.
(The "Orbit for 30 days" contract doesn't recognize that Gemini 3 is already in orbit)

Docking to the Agena Target Vehicle, the "Orbit for one week" contract resets the countdown and also the "Launch a new vessel" is set back to white font.
I should mention that the Agena Target Vehicle has a lower vessel naming priority, so the whole docked vessel is still "Gemini 3".

After undocking the contract still is set back to as nothing ever happened, only the parameters are in green font (Have at least one crewmember on board / Orbit: Kerbin).

Do I have to live with that or could this be fixed (either in stock or in CC)? @SQUAD

Edited by Gordon Dry
just ask them, too
Link to comment
Share on other sites

Next round of confusion... I can't seem to specify multiple EVAs on one contract. I am trying to specify a contract wherein EVA1 is conducted, something else happens (change orbit, rendezvous, dock, whatever), then EVA2 happens, then something else happens, then EVA3 happens. Every time I run this test configuration, ALL The EVA's are recording simultaneously.

 

        PARAMETER
        {
                name = HasAstronautA
                type = All
                disableOnStateChange = true
                PARAMETER
                {
                        name = EVA1
                        type = VesselIsType
                        vesselType = EVA
                }
                PARAMETER
                {
                        name = Duration
                        type = Duration
                        duration = 3m
                        preWaitText = Perform Standup EVA
                        waitingText = Walking in Space...
                        completionText = Get back in.
                        disableOnStateChange = true
                        startCriteria = PARAMETER_COMPLETION
                        parameter = EVA1
                }
        }
        PARAMETER
        {
                name = Duration
                type = Duration
                duration = 3m
                preWaitText = Perform EVA
                waitingText = Retrieve Science from Agena Target Vehicle
                completionText = Get back in.
                disableOnStateChange = true
                startCriteria = PARAMETER_COMPLETION
                parameter = HasAstronautA
        }
        PARAMETER
        {
                name = HasAstronaut2
                type = All
                PARAMETER
                {
                        name = myEVA2
                        type = VesselIsType
                        vesselType = EVA
                }

                PARAMETER
                {
                        name = Duration
                        type = Duration
                        duration = 5m
                        preWaitText = Perform EVA
                        waitingText = Retrieve Science from Agena Target Vehicle
                        completionText = Get back in.
                        disableOnStateChange = true
                        startCriteria = PARAMETER_COMPLETION
                        parameter = myEVA2
                }
        }
        PARAMETER
        {
                name = Duration
                type = Duration
                duration = 7m
                preWaitText = wait
                waitingText = Retrieve Science from Agena Target Vehicle
                completionText = Get back in.
                disableOnStateChange = true
                startCriteria = PARAMETER_COMPLETION
                parameter = HasAstronaut2
        }
        PARAMETER
        {
                name = ReturnHome
                type = ReturnHome
                completeInSequence = true
        }

So, when HasAstronautA/EVA1 happens, that Duration counter starts... but so does the one under HasAstronaut2/myEVA2. When I complete the EVA (note that I can get back in, let the timer run out, then get back out to close out the parameter), the top level Duration starts (As expected, as the start parameter is "HasAstronautA"), but both HasAstronautA and HasAstronautB both score success before the first top level Duration starts... and then BOTH top level Durations start. 

I'm trying to write a detailed Gemini-X contract - there was a "standup EVA" early in the mission, a docking with the Agena, an EVA associated with that docking, and then a rendezvous with an older Agena and an EVA associated with that. This is not the whole contract I have, just a stripped down parameter set to figure out the EVA sequencing (actually doing this on the ground right now). I'm still sure I'm doing something wrong, but I just can't figure out what.

KSP 1.3.1

CC 1.23.3

Link to comment
Share on other sites

Sorry all, been a busy couple weeks with work travel, so I've been quite absent.  Just about to leave on one last international trip, and hopefully things should be a bit less crazy after this one.

On 5/29/2018 at 3:16 PM, Gordon Dry said:

@nightingale

Today I had 2 occasions that manned mission contracts (early career ones) have been fulfilled by probe missions as soon as they have been destroyed in focus (reentry impact for spent upper stage debris).

There was no exception regarding contracts in the log, just the message "Congratulation ..."

Is this known?

Sort of known - I just piggy back off the KSP classes in this case and I've seen cases where they are not very reliable in detecting manned vs. unmanned.  If you want me to dig deeper, raise something on the tracker with details and I'll look when I can.

On 5/30/2018 at 5:19 PM, Gordon Dry said:

@nightingale I'm not sure if this is a stock or a CC issue.

First to mention I use the vessel naming priorities, so for example the pod is called "Gemini 3" but the upper stage is called "Titan I-C upper stage (Gemini 3)" and the whole vessel incl. stage 1 and 2 is called "Titan I-C (Gemini 3)".

So, Gemini 3 reached orbit, the countdown of the "Orbit for one week" contract starts counting down.
(The "Orbit for 30 days" contract doesn't recognize that Gemini 3 is already in orbit)

Docking to the Agena Target Vehicle, the "Orbit for one week" contract resets the countdown and also the "Launch a new vessel" is set back to white font.
I should mention that the Agena Target Vehicle has a lower vessel naming priority, so the whole docked vessel is still "Gemini 3".

After undocking the contract still is set back to as nothing ever happened, only the parameters are in green font (Have at least one crewmember on board / Orbit: Kerbin).

Do I have to live with that or could this be fixed (either in stock or in CC)? @SQUAD

Contract Configurator's system for vessel tracking has always been quirky due to working around stock limitations.  I haven't played around with the new stock stuff yet, but from what I read from @TriggerAu's dev notes on the subject it's just a special module that saves off the correct vessel names.  CC relies more on the vessel's various part ids for each "sub-vessel" (which is a set of connected parts bounded by docking ports/decouplers).  So I don't think the new stock stuff is at play.

I'd say the bug is in the launch new vessel bit - that sounds like it's what's resetting everything.  It does the same logic as the stock one (checking the launchId, which I haven't played with enough to know if that gets changed on docking at all (could it be one of the vessels in play launched prior to contract acceptance?)

10 hours ago, General Apocalypse said:

OK I tried searching an inputting several different configurations but I can't get the contract orbit to show up in the tracking station or map.

Do I need to use a ReachSpecificOrbit PARAMETER with a nested BEHAVIOUR or what do I need to do ?

It's the OrbitGenerator behaviour that is responsible for generating the orbits that you can see in the tracking station.  There's an Orbit.cfg in the test area that has some examples you can try looking at.  For another example, I saw there are a few in severedsolo's Clever Sats contract pack.

@CT96B - You want to use the completeInSequence attribute on your parameters to make things work right:

    // Indicates that this parameter needs to be complete "in sequence".
    // All parameters that are before this parameter in the list (and at
    // the same level) must be completed before this parameter is allowed
    // to complete.
    //
    // Type:      bool
    // Required:  No (defaulted)
    // Default:   false
    //
    completeInSequence = true

Note that this won't play very well with the nesting you have - so you may need to flatten out the parameters a bit.

Link to comment
Share on other sites

you mean like this that I have in the last parameter specified above?

 

        PARAMETER
        {
                name = ReturnHome
                type = ReturnHome
                completeInSequence = true
        }

I'm already doing that.

I'll try flattening things out and see if I can get it to work that way.

Link to comment
Share on other sites

1 hour ago, CT96B said:

you mean like this that I have in the last parameter specified above?

 


        PARAMETER
        {
                name = ReturnHome
                type = ReturnHome
                completeInSequence = true
        }

I'm already doing that.

I'll try flattening things out and see if I can get it to work that way.

You'd need to have completeInSequence on every parameter than needs to wait for a previous parameter to complete.  If I recall correctly from RP-0, you can also have the duration parameter as a child parameter, and the countdown won't start until the parent is ready to complete.

Link to comment
Share on other sites

@nightingale Thanks a bunch it worked like a charm. Working on it right now.

However if I want to set a fixed orbit - let's say 20.000 km from the body. Do I need to use the Fixed Orbit behavior or could I use a Random Orbit behaviour and dictate the maximum apoapsis from the ReachSpecificOrbit parameter or inside the behaviour itself ?

I'm asking this since it's a bit unusual to navigate the fixed orbit parameters , I can do it it's just takes quite some time.

Thanks for your replies.

EDIT : BTW have you considered starting a new forum thread ? This one is massive and next to impossible to navigate. Maybe something like Contract Configurator 2018 Threat ? Just a (most likely misguided) suggestion.

Edited by General Apocalypse
Link to comment
Share on other sites

18 minutes ago, General Apocalypse said:

@nightingale Thanks a bunch it worked like a charm. Working on it right now.

However if I want to set a fixed orbit - let's say 20.000 km from the body. Do I need to use the Fixed Orbit behavior or could I use a Random Orbit behaviour and dictate the maximum apoapsis from the ReachSpecificOrbit parameter or inside the behaviour itself ?

I'm asking this since it's a bit unusual to navigate the fixed orbit parameters , I can do it it's just takes quite some time.

The intention had been to enhance the Orbit class with methods to generate various orbits and allow that to be an input to the OrbitGenerator (or allow it to be used instead).  Unfortunately, that's probably not likely to happen with the amount of time I have for the mod.  Right now your best bet is to figure out the various parameters yourself (you can use expressions to provide some randomization there if you want).

18 minutes ago, General Apocalypse said:

Thanks for your replies.

EDIT : BTW have you considered starting a new forum thread ? This one is massive and next to impossible to navigate. Maybe something like Contract Configurator 2018 Threat ? Just a (most likely misguided) suggestion.

Why?  Only the first page and most recent couple pages are relevant - a new thread wouldn't really change that.  And naming it 2018 means I'd have to create another new thread next year. :)

Link to comment
Share on other sites

I understand your position perfectly. I managed to figure out how to set the distance quite fast. The game does not make it easy I see why previous modders rarely used that behavior , you need to love coding and orbital mechanics to stomach some parts of the original game code.

However that's just another challenge when you want to make your own epic contract pack .

 

Edited by General Apocalypse
Link to comment
Share on other sites

On 6/4/2018 at 7:09 AM, nightingale said:

I'd say the bug is in the launch new vessel bit - that sounds like it's what's resetting everything.

I also came to the conclusion last night while waiting for a maneuver node without warping (orbit change glitch to be avoided) in kinda brain storming - that it would be a good idea to sticky the following statement somewhere every creator of a contract pack would read it:

Don't use the "Launch a new vessel" parameter - this breaks many contracts just too often.

 

Edit:

There is an additional argument:

How often did I accept contracts that have been offered which easily could have been fulfilled with an already orbiting vessel just by changing its orbit and doing the scans?
But no way, I really have to launch a clone of it?

Edited by Gordon Dry
oh I see the typos now
Link to comment
Share on other sites

7 hours ago, Gordon Dry said:

I also came to the conclusion last night while waiting for a maneuver node without warping (orbit change glitch to be avoided) in kinda brain storming - that it would be a good idea to sticky the following statement somewhere every creator of a contract pack would read it:

Don't use the "Launch a new vessel" parameter - this breaks many contracts just too often.

 

Edit:

There is an additional argument:

How often did I accept contracts that have been offered which easily could have been fulfilled with an already orbiting vessel just by changing it's orbit and doing the scans?
But now way, I really have to launch a clone of it?

I get why Arsonide added that from a gameplay perspective to prevent people from farming certain contracts, but I personally don't like it.  The "Launch New Vessel" parameter was added into Contract Configurator as a request from a contract author (I forget who).

Personally I'd rather have something where there needs to be an "initial" state of on the launch pad and use vessel parameters, but that's really a case by case basis.

You might have better luck asking specific contract authors to remove them.  Or you should hypothetically be able to write a module manager script to remove them all automatically in your own game.

Link to comment
Share on other sites

9 hours ago, Gordon Dry said:

How often did I accept contracts that have been offered which easily could have been fulfilled with an already orbiting vessel just by changing it's orbit and doing the scans?

But now way, I really have to launch a clone of it?

There is some value to that . If you want the player to enjoy building a series of vehicles you need to put that in. Otherwise you run into the risk of having a handful of overengineered ships doing everything in one go. That simply cuts the game down to just a few hours for the orbital stage.

IRL the Soviets and NASA made it rain vehicles with almost weekly interplanetary missions.

However I might simply add the option for certain missions to have certain configurations so that the player can follow the epic narrative given to him.

Edited by General Apocalypse
Link to comment
Share on other sites

@General Apocalypse It's like, when I launch an altimetry scanner, it has low res, high res and biome scanners already on board. And RPWS, irradiance scan, magnetometer. And this is in early career. It's a simple and plump early game vessel, which can change orbits by RCS (Using "fore on throttle").

As long as it got enough MonoPropellant to change orbits, it can do all scans and just the next "Orbital survey" contract that pops up which wants high and low orbit RPWS and magnetometer data.

 

I like building vessels, but not cluttering the orbit with dozens of the same type just to have the chance of intersecting any of them increased on the next launch. :cool:

Edited by Gordon Dry
Link to comment
Share on other sites

3 hours ago, Gordon Dry said:

@General Apocalypse It's like, when I launch an altimetry scanner, it has low res, high res and biome scanners already on board. And RPWS, irradiance scan, magnetometer. And this is in early career. It's a simple and plump early game vessel, which can change orbits by RCS (Using "fore on throttle").

As long as it got enough MonoPropellant to change orbits, it can do all scans and just the next "Orbital survey" contract that pops up which wants high and low orbit RPWS and magnetometer data.

 

I like building vessels, but not cluttering the orbit with dozens of the same type just to have the chance of intersecting any of them increased on the next launch. :cool:

Early in game you don't have access to those scanners plus you need them on a polar orbit with quite a lot of solar panels to keep everything running.
I guess each defines early as their own.

Also you can't get Kessler syndrome from just two things in LKO - you're pushing it :D.

After LKO sending a satellite on a polar orbit of Eve , well that's a very different mission , one where you'll be counting each dV and praising the Wolfhound or the Nuclear engine.

Link to comment
Share on other sites

I have an optional objective with Gemini-IX, where if possible the player can dock with the ATDA-02186 (historically, the fairing failed to deploy properly, so they were unable to dock). This allows the player to go historic and Rendezvous, or go with the historic plan and Rendezvous AND dock for some rewards.

        PARAMETER
        {
                name = Rendezvous
                type = Rendezvous
                vessel = ATDA-02186
                distance = 12.0
                title = Rendezvous with the ATDA.
                completeInSequence = true
                disableOnStateChange = true

                PARAMETER
                {
                        name = Docking
                        type = Docking
                        vessel = ATDA-02186
                        title = Dock with Automated Target Docking Adapter
                        optional = true
                        rewardScience = 5
                        rewardReputation = 5
                        rewardFunds = 1000
                        disableOnStateChange = true
                }
        }

 

Link to comment
Share on other sites

Thanks I've noticed the parameter in the wiki today . I guess i just didn't acknowledged it the first time.

One more question.

Is there a way to regenerate contract when you change parameters without having to quit to desktop and then restart the game ? I played a bit with the ingame tools but nothing happened. The CC tools say "BROKEN" at the "Reload Contracts" button. :(

It would save a lot on development time.

Edited by General Apocalypse
Link to comment
Share on other sites

UPDATE : I deleted everything and reinstalled the game and added  just Contract Configurator. The result is the same :

EDIT : I saw that this is listed as bug.  Are there any workarounds ? I do need this while figuring out the exact contract code. I have about 40 different types of contracts in mind and getting them to work is quite a pain when every code change must be tested by powering up the client waiting for the game to load , running the test and then reacting accordingly.

Please help.

JO5YmK3.jpg

Edited by General Apocalypse
Link to comment
Share on other sites

On 6/10/2018 at 1:51 AM, General Apocalypse said:

Is there a way to regenerate contract when you change parameters without having to quit to desktop and then restart the game ? I played a bit with the ingame tools but nothing happened. The CC tools say "BROKEN" at the "Reload Contracts" button. :(

Something about it broke a long time ago (probably because of a stock update?).  To be honest it hasn't been a priority to fix, but will try to look at it when I'm able to spend time on Contract Configurator.  Next week I'm in Mexico City (sorry - not KSP related), and the week after that I'm on vacation.  So it may be a bit before I'm able to get into the swing of things.

Link to comment
Share on other sites

On 10/7/2016 at 11:55 AM, nightingale said:

This is a known limitation without an easy solution.  First of all, nothing in the expression language will (or could) help you - as those are all executed at parse time.  What you need is a parameter that specifies that one or more orbital parameters of a vessel are equal to some value relative to another vessel's orbit.  For n satellites in otherwise identical orbits, it's somewhat straightforward, but gets complicated quickly.

For something like molniya orbits where the goal is to have coverage of a specific geographic area, then I'd do the following:

  • Have a waypoint that is above the spot you want coverage for, at the highest part of the Molniya orbit
  • Have a sequence of parameters that looks something like this:
    • Sat 1 near WP
    • Wait for 8h
    • Sat 2 near WP
    • Wait for 8h
    • Sat 3 near WP
  • To be honest, even the above isn't really good without some enhancements to make it so that everything in the sequence is reset when one of the timers fails.  Otherwise the player can complete sats 1 & 2 and then get stuck.

There's a reason I did it based on coverage and connectivity in the RemoteTech contract pack and didn't try to do too much orbital stuff...

Is this still valid? Sorry if not, I may have missed the post about.

in case it is valid, is possible to do it this way?

  • Create a orbit with 1/3 of the period of the desired orbit, same inclination, matching Pe (waiting orbit)
  • Once this orbit is reached ask for the desired orbit, so Sat 1 would decouple, burn retrograde
  • Once this orbit is reached, ask do the waiting orbit, so the player has to move to the other vessel
  • Repeat until Sat 3 is decoupled

If the player fails, after Sat 1 and Sat 2, it would only be needed to launch a new sat direct into the final orbit (providade that's possible to do this in multiple launches). And if is possible to prevent the same Sat to fulfill the same parameter twice the player would be prevented from exploiting the contract

EDIT: posted a duplicate that got merged.

Edited by VaPaL
Link to comment
Share on other sites

  • 2 weeks later...

Is there any way to set a negative maxPeA? 

Scenario: Apollo-IV after parking orbit set to an ApA of 17218km, and a PeA of -45.7km to ensure destruction of the S-IV-B stage and to help put the CM high enough to test the heat-shield at lunar return reentry conditions. I can set a minApA to match, but I can't seem to set a negative maxPeA (as a fallback I know I can set it to surface, but it would be nice to be able to set it to the historic parameters).

Link to comment
Share on other sites

I'm working on a contract for a satellite constallation. The initial idea, to avoid multiple contract types (one for each orbital plane), is to do the longitude of ascending node dependent on something. Is the following possible? 

[...]
maxCompletions = 3
[...]
BEHAVIOUR{
name = OrbitGenerator
type = OrbitGenerator
	FIXED_ORBIT{
		SMA = 2431280
		ECC = 0.0
		INC = 56
		LAN = ActualCompletions() == 0 ? 0 : ActualCompletions() == 1 ? 120 : 240
		REF = 1
	}
}
[...]

Or should I use the persistent store and increase it's value after each completion? if so, there's an event that triggers at completion that I could use to increase the counter?

Thanks

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