Jump to content

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


nightingale

Recommended Posts

39 minutes ago, inigma said:

    BEHAVIOUR
    {
        name = SpawnVessel
        type = SpawnVessel
        deferVesselCreation = false

        VESSEL
        {
            name = KSS Rix
            craftURL = ContractPacks/GAP/Assets/Sea/Inigma Class Carrier.craft
            vesselType = Ship
            owned = false
            targetBody = Kerbin
            
            lat = @/carrierLat
            lon = @/carrierLon
            alt = -1
            heading = 90
            
            CREW
            {
                name = NewKerbal( Male , "Adm. Redbiertje Kerman" , "Pilot")
                addToRoster = false
                
            }

        }

}

 

this is not giving me a male Adm. Redbiertje Kerman consistently.

neither is 

            CREW
            {
                name =Adm. Redbiertje Kerman

                gender = Male
                addToRoster = false
                
            }

 

as the exception comes back saying that gender is not a recognized attribute for Crew.

The second one should give you lots of warnings about unrecognized attributes, and you wouldn't just try random stuff that's not in the documentation, generate warnings, and then post that it doesn't work, would you? ;)

The first "works" only because it will automatically convert Kerbal to a string, but then ends up automatically generating a gender because it's lost the rest of the Kerbal info.  Basically, I never added the new Kerbal support to the CREW nodes (guess I missed it).  Raise a new enhancement request, please.

10 minutes ago, inigma said:

I have this parameter in a contract:

    PARAMETER
    {
        name = ReachState
        type = ReachState
        
        maxAcceleration = 2.0
        
        failWhenUnmet = true
    }

This parameter shows with green completed check mark as expected. But when you exceed 2 gees, the parameter loses its green completed check mark, and it doesn't fail the contract, but instead when the craft goes back under 2 gees, the parameter goes back to complete with a green check mark. Is this working as designed, or is this attribute supposed to fail the contract outright?

Should fail it outright, so raise a bug on GitHub, please.

Link to comment
Share on other sites

4 minutes ago, nightingale said:

 

5 minutes ago, nightingale said:

The second one should give you lots of warnings about unrecognized attributes, and you wouldn't just try random stuff that's not in the documentation, generate warnings, and then post that it doesn't work, would you? ;)

Actually I was attempting to do this since I read it on the wiki. ;) https://github.com/jrossignol/ContractConfigurator/wiki/SpawnVessel-Behaviour

CREW node has gender specified:

 

        // A CREW node indicates one or more crew members to add to the
        // vessel.  The CREW node may be specified multiple times.
        CREW
        {
            // Name for the crew member - if not provided, one is
            // auto-generated.
            //
            // Type:      string
            // Required:  No
            //
            name = Patrick R. Kerman

            // Gender of the kerbal.  If not specified, will be assigned a random
            // gender.
            //
            // Type:      ProtoCrewMember.Gender
            // Required:  No
            // Values:
            //     Male
            //     Female
            //
            gender = Female

            // Whether or not the Kerbal should be added to the roster on 
            // recovery.
            //
            // Type:      bool
            // Required:  No (defaulted)
            // Default:   true
            //
            addToRoster = true

            // Number of crew to generate from this node.  Shouldn't be
            // supplied if name is supplied.
            //
            // Type:      int
            // Required:  No (defaulted)
            // Default:   1
            //
            count = 1
        }

 

this is what I'm using per the above, but debug is saying that gender is not a recognized attribute. Is gender a recognized attribute or was it deprecated when you introduced NewKerbal?:

            CREW
            {
                name =Adm. Redbiertje Kerman

                gender = Male
                addToRoster = false
                
            }

Link to comment
Share on other sites

9 hours ago, nightingale said:

 

18 hours ago, linuxgurugamer said:

3. Experiments seem to only be complete-able one time.  After completing an experiment at the first location, it appears to be fulfilled when going to the next location

Normally, this is where you'd want to use disableOnStateChange = false, but there's not state change back to incomplete for the experiment ones.  What you need to do is set it with VisitWaypointFirst, then CollectScience with completeInSequence = true.  This will prevent the CollectScience from being able to fire unless you're at the waypoint.

18 hours ago, linuxgurugamer said:

4. This isn't a problem, just wondering if there is a better way:  I'm using the following line to make sure that unused waypoints aren't shown at all:  hidden = @/numWaypoints >= 5? false:true

Since the ternary expression is using a boolean to get a boolean, you can just do:

hidden = @/numWaypoints < 5

First, thanks, I'll check this out this evening

I can't believe I did that with the hidden, all I can say is that I was tired at the time

I'm not sure I understand your answer to #3.  Not what to do, but how do do it.  How do I set the state for an experiment to false? 

Link to comment
Share on other sites

9 hours ago, inigma said:

Actually I was attempting to do this since I read it on the wiki. ;) https://github.com/jrossignol/ContractConfigurator/wiki/SpawnVessel-Behaviour

CREW node has gender specified:

<snip>

this is what I'm using per the above, but debug is saying that gender is not a recognized attribute. Is gender a recognized attribute or was it deprecated when you introduced NewKerbal?:

            CREW
            {
                name =Adm. Redbiertje Kerman

                gender = Male
                addToRoster = false
                
            }

Docs are wrong, that was probably a copy + paste from SpawnKerbal (oops, sorry!).  I'll just be making it support NewKerbal() type stuff instead of providing all those attributes though.

3 hours ago, linuxgurugamer said:

First, thanks, I'll check this out this evening

I can't believe I did that with the hidden, all I can say is that I was tired at the time

I'm not sure I understand your answer to #3.  Not what to do, but how do do it.  How do I set the state for an experiment to false? 

Forget the state setting - I just meant that's what you'd normally do in other cases (like with ReachState).  What you want is something like this:

VesselParameterGroup
|- VisitWaypoint
\- CollectScience (completeInSequence = true)
Edited by nightingale
Link to comment
Share on other sites

37 minutes ago, nightingale said:

Docs are wrong, that was probably a copy + paste from SpawnKerbal (oops, sorry!).  I'll just be making it support NewKerbal() type stuff instead of providing all those attributes though.

Forget the state setting - I just meant that's what you'd normally do in other cases (like with ReachState).  What you want is something like this:


VesselParameterGroup
|- VisitWaypoint
\- CollectScience (completeInSequence = true)

Ok, makes sense now.

Thanks.

 

Just for planning, I have a few people asking me about this pack:

  1. I assume the next version will be 1.9.2?
  2. Any ETA on a release date?

 

Thanks

Link to comment
Share on other sites

14 minutes ago, linuxgurugamer said:

Ok, makes sense now.

Thanks.

 

Just for planning, I have a few people asking me about this pack:

  1. I assume the next version will be 1.9.2?
  2. Any ETA on a release date?

 

Thanks

1.9.2 should be out in the next couple of days. 

Link to comment
Share on other sites

On January 1, 2016 at 8:39 AM, nightingale said:

This could be done by a mod, but it has nothing to do with Contract Configurator.

 

I'm wondering though... I thought I had heard it is possible to set up a contract to run similar to the "world first" style of contracts that ksp offers (meaning it has to automatically be accepted)... 

I suppose that I can just live with the behavior of destroying the entire vessel if it does not return back into the atmosphere within 2 minutes as I see that the destroy vessel is listed as a behavior in the api. 

I could have the 3 requirements; 1. part "Inline cockpit"unlocked, 2. part "Mk1 command module" unlocked {inverted}, 3. Vessal has part "Inline cockpit"

I do not remember how to setup a contract to have the property of auto & mandatory acceptance though.

 

Edited by ToneStack
Link to comment
Share on other sites

Whats the difference in these two parameters, they seem to do the same thing:

                        situation = SrfLanded
                        location = Surface

Oh, and thanks for the update on 1.9.2

I tried this:

VesselParameterGroup
|- VisitWaypoint
\- CollectScience (completeInSequence = true)

and there one thing  thing wrong with it:

  1. The second, I am not sure that you can do anything about, based on your earlier comments:  Once I run an experiment, it goes green in the contracts window, and is green for all succeeding waypoints.  Note that the "Collect science" line IS white until I run the experiment.  Is there any way (either now or in the future) that you can come up with a way to unset an experiment, say, after it was transmitted?

One other thing which may not be fixable and is not a high priority:

  1. In the mission control, where you select the missions, all parts of the mission are visible before selecting the mission, and even after the mission is selected, all parts are shown when you select it

Good news is that the waypoints are working properly, and so is the WaypointManager and the stuff in the RandomWaypointNear.  You even fixed something I didn't tell you about :-)  which was that the waypoint manager was showing the generated waypoints in reverse order

 

I'm still working on the completeInSequence

---

On a different note, someone just asked me a question about my UnmannedContracts pack.  Would it be possible to have some way to either combine contracts into one, or at least have some way to add their deadlines together?  This specific question was about using slingshot maneuvers to have a single probe go to multiple planets.  The deadline may be fine for a single destination, but when doing two contracts together, it may not be possible to complete in time.

Edited by linuxgurugamer
addl info
Link to comment
Share on other sites

Ok, I've just finished trying to get this completeInSequence working as you described.

Doesn't work, at least for the second and third of the iterated parameters.

Here is what happens:

  1. Start mission, all science (3 for the rover I'm using, including a thermometer) is shown properly in Contracts+ window.  Waypoint manager shows the first waypont (screenshot 0)
  2. Got to  waypoint (screenshot 1)
  3. Collected science (screenshot 2)
  4. Traveled to Waypoint 2 (screenshot 3)
  5. Collected temperature @waypoint 2 (screenshot 4)
  6. Got to Waypoint 3, look at the Contracts window (screenshot 5)

If I remove the completeInSequence, the contract completes.  With it there, it doesn't complete, even if I do another temperature scan.

This is using the dev version of the dll, which I downloaded earlier today.

Here is a link to the zip file with the contract and the images:  https://www.dropbox.com/s/dink6mpjres4qtc/rover.zip?dl=0

Hope this helps

---

On another note, this may be an enhancement request:  I'd like to make the science reward dependent on how close to the waypoint the rover is.  Is there a function which will return the distance from the waypont?

Also, I noticed that waypoints which were generated in contracts which I then cancelled stayed in the Waypoint window.  Will they go away eventually?

Edited by linuxgurugamer
Link to comment
Share on other sites

8 hours ago, ToneStack said:

I'm wondering though... I thought I had heard it is possible to set up a contract to run similar to the "world first" style of contracts that ksp offers (meaning it has to automatically be accepted)... 

I suppose that I can just live with the behavior of destroying the entire vessel if it does not return back into the atmosphere within 2 minutes as I see that the destroy vessel is listed as a behavior in the api. 

I could have the 3 requirements; 1. part "Inline cockpit"unlocked, 2. part "Mk1 command module" unlocked {inverted}, 3. Vessal has part "Inline cockpit"

I do not remember how to setup a contract to have the property of auto & mandatory acceptance though.

Ah, I see.  Yes, there is a DestroyVessel behaviour that you can set up to destroy a vessel on contract failure (although I've never tried it on the active vessel).  What I mean though was that it didn't really make sense having that be tied to a contract, but I suppose using the autoAccept would work.  Look for it on the CONTRACT_TYPE node.

5 hours ago, linuxgurugamer said:

Whats the difference in these two parameters, they seem to do the same thing:


                        situation = SrfLanded
                        location = Surface

They are the same, it's the other values in the list that makes it different.

5 hours ago, linuxgurugamer said:
  1. The second, I am not sure that you can do anything about, based on your earlier comments:  Once I run an experiment, it goes green in the contracts window, and is green for all succeeding waypoints.  Note that the "Collect science" line IS white until I run the experiment.  Is there any way (either now or in the future) that you can come up with a way to unset an experiment, say, after it was transmitted?

Nothing at the moment, raise a GitHub request and I'll think about it (thought not in the near-term).

5 hours ago, linuxgurugamer said:

One other thing which may not be fixable and is not a high priority:

  1. In the mission control, where you select the missions, all parts of the mission are visible before selecting the mission, and even after the mission is selected, all parts are shown when you select it

Bug, may or may not be an easy fix, raise it and I'll investigate.

5 hours ago, linuxgurugamer said:

On a different note, someone just asked me a question about my UnmannedContracts pack.  Would it be possible to have some way to either combine contracts into one, or at least have some way to add their deadlines together?  This specific question was about using slingshot maneuvers to have a single probe go to multiple planets.  The deadline may be fine for a single destination, but when doing two contracts together, it may not be possible to complete in time.

I saw the post, but I think they just wanted longer durations to allow for the possibility of that type of maneuver, not necessarily to have a contract for both.  Anyway, no, there is no way to add deadlines or combine contracts.

3 hours ago, linuxgurugamer said:

Ok, I've just finished trying to get this completeInSequence working as you described.

Doesn't work, at least for the second and third of the iterated parameters.

Here is what happens:

<snip>

If I remove the completeInSequence, the contract completes.  With it there, it doesn't complete, even if I do another temperature scan.

Okay, looks like the issue is a higher priority then.  Raise it and I'll see what I can do.  Actually, one thing you can try is to have the VisitWaypoint as a child of the CollectScience.  That may work, as I made changes to make that work with Duration timers before.  No idea if it will be at the start of list of children (which is what you'd want) or at the end.  Looking at what you have that means you'll unfortunately need a lot of duplication.

3 hours ago, linuxgurugamer said:

On another note, this may be an enhancement request:  I'd like to make the science reward dependent on how close to the waypoint the rover is.  Is there a function which will return the distance from the waypont?

Assuming you mean the distance at the time the contract is offered (that's when expressions are executed), then it is theoretically possible, but I'd need to add a function for it.  Enhancement request.

3 hours ago, linuxgurugamer said:

Also, I noticed that waypoints which were generated in contracts which I then cancelled stayed in the Waypoint window.  Will they go away eventually?

WaypointManager bug, please raise it on that GitHub.

Link to comment
Share on other sites

Big bugfix release, thanks to @inigma, @severedsolo and @linuxgurugamer who have been patiently waiting on this release.  Download now!

Contract Configurator 1.9.2

  • Added minRateOfClimb and maxRateOfClimb to ReachState.
  • Support negative altitudes in ReachState.
  • Fixed major contract pre-loader exception on startup (thanks smjjames).
  • Fixed error handling in expression parser (thanks severedsolo).
  • Fixed HasCrew incorrectly only handling kerbals of type 'Crew' (thanks bertibott).
  • Fixed exception in uniqueness checks that were done at the contract group level (thanks severedsolo).
  • Fixed issue with SpawnPassengers always spawning passengers instead of whatever the contract specified (thanks inigma).
  • Fixed issue with Vessel values not being properly saved in the VAB/SPH for uniqueness checks (thanks severedsolo).
  • Fixed issue with the GROUP_ALL and CONTRACT_ALL uniqueness checks not working as advertised (thanks severedsolo).
  • Fixed FacilityRequirement breaking down in the tracking station (thanks cordilon).
  • Fixed a number of WaypointGenerator issues (thanks linuxgurugamer).
Link to comment
Share on other sites

6 hours ago, nightingale said:
12 hours ago, linuxgurugamer said:

On a different note, someone just asked me a question about my UnmannedContracts pack.  Would it be possible to have some way to either combine contracts into one, or at least have some way to add their deadlines together?  This specific question was about using slingshot maneuvers to have a single probe go to multiple planets.  The deadline may be fine for a single destination, but when doing two contracts together, it may not be possible to complete in time.

I saw the post, but I think they just wanted longer durations to allow for the possibility of that type of maneuver, not necessarily to have a contract for both.  Anyway, no, there is no way to add deadlines or combine contracts.

Ok, thanks

6 hours ago, nightingale said:
10 hours ago, linuxgurugamer said:

On another note, this may be an enhancement request:  I'd like to make the science reward dependent on how close to the waypoint the rover is.  Is there a function which will return the distance from the waypont?

Assuming you mean the distance at the time the contract is offered (that's when expressions are executed), then it is theoretically possible, but I'd need to add a function for it.  Enhancement request.

No, I was hoping to use it at the time of completion. As in the closer to the waypoint the experiment is run, the more science is returned.

Anyway, while I'm disappointed in the results (no reflection on you), I am happy that at least I'm giving you better and more complete information for you to be able to at least identify the issues.

Thanks for all your hard work.

I'm going to release the Rover Contracts without the completeInSequence for now (after testing your possible solution) later today

 

 

 

5 hours ago, inigma said:

Thanks for all your hard work on this one nightingale. You really are an awesome developer. I hope to release GAP 1.0 beta perhaps tomorrow.

Looking forward to it.  I know of at least one streamer who is eagerly waiting for it

Edited by linuxgurugamer
Link to comment
Share on other sites

10 hours ago, nightingale said:
  • Fixed a number of WaypointGenerator issues (thanks linuxgurugamer).

Hmm, it seems that this broke something. I was upgraded from ContractConfigurator 1.9.1 to 1.9.2 through CKAN today (no other updates) and all waypoints related to ContractConfigurator contracts vanished (not visible in tracking station nor Waypoint Manager mod).

Custom waypoints (created via Waypoint Manager) and waypoints of non-ContractConfigurator contracts still appear.

Downgrading back to 1.9.1 makes the issue go away (so I'm pretty sure 1.9.2 broke it).

The affected contracts were

  • K-Files EP1: Strange Things ("The K-Files" pack)
  • Investigate magnetic anomaly on Kerbin ("Anomaly Surveyor" pack)

Unfortunately, I forgot to save the log when on 1.9.2, so I'll re-install it and see if there are any exceptions.

Link to comment
Share on other sites

1 minute ago, linuxgurugamer said:

Were these contracts already in progress?

Try finishing them before upgrading.  One of the bugs fixed was waypoints not going away, so I suppose there could be a conflict here.

LGG

Yes, they indeed were.

So, I'll do as you suggest and upgrade after I finished those two. (So, I better figure out how to reach those two monoliths on the mountains ;) )

Link to comment
Share on other sites

Okay, that's a problem with backwards compatibility because the old versions were saving junk in one of the fields related to waypoint visibility.  Releasing a hotfix, get it here.

Contract Configurator 1.9.2.1

  • Fixed problem with loading waypoints from older versions of Contract Configurator (thanks SpaceNomad).

                                                                                                   

2 hours ago, linuxgurugamer said:

I know that you can specify a minVersion in a ContractGroup, can you do that in a Contract_Type as well?  i don't see it in the wiki

Nope, the intention with that field is to disable a contract pack on the main menu if loading it would break a save game.  No intention to handle it at such a low level, but if it's something you *really* want, then it's probably possible using child contract groups.

Edited by nightingale
Link to comment
Share on other sites

2 hours ago, nightingale said:

Okay, that's a problem with backwards compatibility because the old versions were saving junk in one of the fields related to waypoint visibility.  Releasing a hotfix, get it here.

Contract Configurator 1.9.2.1

  • Fixed problem with loading waypoints from older versions of Contract Configurator (thanks SpaceNomad).

That indeed fixed it. Thank, you! :D

And it (or 1.9.2 most probably) even fixed a bug I discovered while you were fixing the backwards compatibility issue (the game did not register that Mulder was onboard).

Unfortunately, I now have another problem, which I suspect is not a Contract Configurator bug, but a logic error in the K-Files pack (Mulder is supposed to go on EVA, but he can't since he is a Tourist). So, I'll report it there.

Link to comment
Share on other sites

3 hours ago, nightingale said:

Okay, that's a problem with backwards compatibility because the old versions were saving junk in one of the fields related to waypoint visibility.  Releasing a hotfix, get it here.

Contract Configurator 1.9.2.1

  • Fixed problem with loading waypoints from older versions of Contract Configurator (thanks SpaceNomad).

                                                                                                   

Nope, the intention with that field is to disable a contract pack on the main menu if loading it would break a save game.  No intention to handle it at such a low level, but if it's something you *really* want, then it's probably possible using child contract groups.

I don't think it's important.

Thanks

Link to comment
Share on other sites

6 minutes ago, linuxgurugamer said:

I'm testing some new stuff.  I'm using Hyperedit to put ships in orbit, but apparently that doesn't set the following function:

bool HaveReached()

So, what do I have to do to have a planet marked as reached? 

I'd raise that with @Ezriilc. As a workaround, I think you can just quick save and load and it'll trigger. 

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