Jump to content

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


nightingale

Recommended Posts

12 hours ago, oniontrain said:

Would installing contract packs cause this to happen when I try to launch a vessel? It looks like there's no vessel loaded and it focuses on the sun when I go to map view. The space center view looks normal but there's some weirdness inside the SPH and VAB. Never had this happen before, it started after I installed a few contract packs (Tourism plus, field research, bases, and GAP). The tourist waypoints were also in weird places and not where they said they were.  It's like they were shifted west about a km or so. Restarting KSP fixes it for one launch but anything I do after that appears to be bugged.

 

The waypoints being shifted is a known issue when using Kopernicus (@Thomas P. is aware of it).

The VAB/SPH and map view issues aren't anything I've ever seen/heard of before.  Post up a KSP.log, this could be due to some exceptions somewhere or other.

Link to comment
Share on other sites

12 minutes ago, chrisl said:

Thank you.  Does this mean that if a kerbal has already been awarded the 2XP for orbiting, that they will get no experience from a contract that tries to grant additional xp?

The way it works is it just assumes that the Kerbal already has the 2XP (whether they actually do or not).  So if they do have it, then it awards it just fine.  If they don't, then they get the bonus 2XP for free.  This is due to the way XP is tied to the flight log - I can't award XP without also awarding XP for the levels below it.

I suppose I could instead award the flight/orbit for the first two XP if they don't have it - it would be a bit more complicated and less obvious to the player what's happening though, so I decided to just go the free XP route.

Link to comment
Share on other sites

36 minutes ago, nightingale said:

The way it works is it just assumes that the Kerbal already has the 2XP (whether they actually do or not).  So if they do have it, then it awards it just fine.  If they don't, then they get the bonus 2XP for free.  This is due to the way XP is tied to the flight log - I can't award XP without also awarding XP for the levels below it.

I suppose I could instead award the flight/orbit for the first two XP if they don't have it - it would be a bit more complicated and less obvious to the player what's happening though, so I decided to just go the free XP route.

So if I setup a moon landing contract (for example) that awarded 1xp, and had Jeb fly that contract 5 times, would he get awarded an xp for each flight (plus all the usual xp from the flight log)?  With RO, you're basically limited to 2 stars worth of xp since manned (kerbaled?) missions to anything further than the moon is really limited until very late in a career game.  I'm trying to come up with a way to let kerbals continue to slowly gain xp from running multiple contracts.  Just not sure if that's possible with the way KSP is currently setup.

Link to comment
Share on other sites

4 minutes ago, chrisl said:

So if I setup a moon landing contract (for example) that awarded 1xp, and had Jeb fly that contract 5 times, would he get awarded an xp for each flight (plus all the usual xp from the flight log)?  With RO, you're basically limited to 2 stars worth of xp since manned (kerbaled?) missions to anything further than the moon is really limited until very late in a career game.  I'm trying to come up with a way to let kerbals continue to slowly gain xp from running multiple contracts.  Just not sure if that's possible with the way KSP is currently setup.

Yup, he'd get one XP each time (up to a max of 64 XP, which gets you to the level cap anyway).

Link to comment
Share on other sites

4 hours ago, nightingale said:

The waypoints being shifted is a known issue when using Kopernicus (@Thomas P. is aware of it).

The VAB/SPH and map view issues aren't anything I've ever seen/heard of before.  Post up a KSP.log, this could be due to some exceptions somewhere or other.

Hmm, uninstalling Waypoint Manager seems to have fixed the VAB problem. Mysteriously.

Link to comment
Share on other sites

6 hours ago, oniontrain said:

Hmm, uninstalling Waypoint Manager seems to have fixed the VAB problem. Mysteriously.

You have the log spam from having an older version of Asteroid Day installed - I can't tell if that's the cause of your problem, but it's certainly going to kill your performance.  I'd update that, then get KSP-AVC (unless you're a CKAN user) to make sure everything else is up to date (because I see a whole bunch of other errors from mods like DOE and KIS and don't know what's safe to ignore).

Link to comment
Share on other sites

Has anyone fiddled with the random orbit generator or ReachSpecificOrbit. What I really want to know is:


    // The deviation window for how close we must match the given orbit.
    // wish to reference.  Higher values give more room for error.  Note: More
    // testing is required to better document the realistic range of values.
    //
    // Type:      double
    // Required:  No (defaulted)
    // Default:   3.0
    //
    deviationWindow = 10.0

What numbers are realistic? What would match a stock "minimal deviation, precise deviation" (or whatever the wording is). I'll do a little playtesting when I finish up what i'm working on, but I figured someone else may have already tried it.

 

Also -  I want to store a list of vessels which have completed a contract. I figure I need to create a List <Vessel> in the group, but I'm struggling with how to add the vessel (by actual vessel identifer preferably) to the list.

I feel like it's something like:

CONTRACT_TYPE
{
    BEHAVIOUR
    {
        type = Expression

        CONTRACT_COMPLETED_SUCCESS
        {
            type = List<Vessel>
            //SatList is my list already created in the main group file. Satellite is a pre-defined label in a VesselParameterGroup
            SatList = @CleverSat:SatList.Add(@Satellite)
        }
    }
}

Which leads me to another question - if I store a vessel defined by a VesselParameterGroup in the data store, what will it store? The label I give it, or the actual vessel id? (I'm hoping the second)

 

tagging @nightingale as I did a ninja edit so you may not have seen.

Edited by severedsolo
Link to comment
Share on other sites

1 hour ago, Speedster159 said:

I have a contract to send two Kerbals into orbit and named the vessel "Gemnii I" ( original ) Anyways the contract for it is not updating to recognize the new vessel and recognized it was already splashed down.

I need more info - I assume this is in the historical missions pack?  You might have better luck asking on that thread first.

Link to comment
Share on other sites

Just now, nightingale said:

I need more info - I assume this is in the historical missions pack?  You might have better luck asking on that thread first.

I honestly have no idea which pack it's from.

The agent for the contract is "Kerbin World-Firsts Record-Keeping Society" Name "Launch two Kerbals to Orbit!"

Link to comment
Share on other sites

1 hour ago, severedsolo said:

Has anyone fiddled with the random orbit generator or ReachSpecificOrbit. What I really want to know is:



    // The deviation window for how close we must match the given orbit.
    // wish to reference.  Higher values give more room for error.  Note: More
    // testing is required to better document the realistic range of values.
    //
    // Type:      double
    // Required:  No (defaulted)
    // Default:   3.0
    //
    deviationWindow = 10.0

What numbers are realistic? What would match a stock "minimal deviation, precise deviation" (or whatever the wording is). I'll do a little playtesting when I finish up what i'm working on, but I figured someone else may have already tried it.

This is one of those things where stock is just a black box, and I've never done the testing required to change that note.  Unless something has changed, the default value is what was used in stock.  As far as I know nobody has actually played around with that one yet, so you may be the first.

1 hour ago, severedsolo said:

Also -  I want to store a list of vessels which have completed a contract. I figure I need to create a List <Vessel> in the group, but I'm struggling with how to add the vessel (by actual vessel identifer preferably) to the list.

I feel like it's something like:


CONTRACT_TYPE
{
    BEHAVIOUR
    {
        type = Expression

        CONTRACT_COMPLETED_SUCCESS
        {
            type = List<Vessel>
            //SatList is my list already created in the main group file. Satellite is a pre-defined label in a VesselParameterGroup
            SatList = @CleverSat:SatList.Add(@Satellite)
        }
    }
}

Which leads me to another question - if I store a vessel defined by a VesselParameterGroup in the data store, what will it store? The label I give it, or the actual vessel id? (I'm hoping the second)

It'll store the vessel id.  There's a feature that I added in 1.9.5 that covers this case exactly.  In VesselParameterGroup, take a look at the defineList attribute.  You can see it used in Tourism Plus here and here.

1 hour ago, severedsolo said:

tagging @nightingale as I did a ninja edit so you may not have seen.

One of the nice things about the new forum is it will mark a thread as unread if the last post gets a ninja edit.  So those no longer cause me trouble like they used to. :)

---

7 minutes ago, Speedster159 said:

I honestly have no idea which pack it's from.

The agent for the contract is "Kerbin World-Firsts Record-Keeping Society" Name "Launch two Kerbals to Orbit!"

No idea.  Could be historic missions (my guess because of the Gemini II name), RP-0, one of Yemo's SETI packs, linuxgurugamer's Advanced Progression and maybe some others I forgot.  Need to at least know which ones you have installed before I can even begin to help.

Edited by nightingale
Link to comment
Share on other sites

7 minutes ago, nightingale said:

 

No idea.  Could be historic missions (my guess because of the Gemini II name), RP-0, one of Yemo's SETI packs, linuxgurugamer's Advanced Progression and maybe some others I forgot.  Need to at least know which ones you have installed before I can even begin to help.

I named it Gemini, the name it suggested or forced? in the contract is "Kerbin Duo Orbiter" And renaming while in orbit and launching it with the name on the contract did not effect.

I have all the packs on CKAN that starts with "Contact Pack: XXX" Except for "The-K Files" and "Initial Contracts"

I also have Historic missions disabled for this save.

Edited by Speedster159
Link to comment
Share on other sites

10 minutes ago, Speedster159 said:

I named it Gemini, the name it suggested or forced? in the contract is "Kerbin Duo Orbiter" And renaming while in orbit and launching it with the name on the contract did not effect.

I have all the packs on CKAN that starts with "Contact Pack: XXX" Except for "The-K Files" and "Initial Contracts"

I also have Historic missions disabled for this save.

That's from Advanced Progression.  Can you provide screenshots of what the problem is?

Link to comment
Share on other sites

5 minutes ago, nightingale said:

That's from Advanced Progression.  Can you provide screenshots of what the problem is?

Here it is.

KSP-Contract.png

The contract tracker on the top right stays that way trough out the launch and spashdown. I've launched another mission instead of Gemini, but it's still ready to launch in the VAB.

Link to comment
Share on other sites

24 minutes ago, Speedster159 said:

The contract tracker on the top right stays that way trough out the launch and spashdown. I've launched another mission instead of Gemini, but it's still ready to launch in the VAB.

That's definitely suspicious.  Raised #472 to track.

Link to comment
Share on other sites

2 hours ago, nightingale said:

It'll store the vessel id.  There's a feature that I added in 1.9.5 that covers this case exactly.  In VesselParameterGroup, take a look at the defineList attribute.  You can see it used in Tourism Plus here and here.

Oh lovely. That's exactly what I need.

Next question: is there any way of getting the OrbitGenerator to exactly match another crafts orbit? The stuff available under Vessel expressions (Ap, PE, Inc, Ecc) doesn't seem to be enough?

Related to the above, but may not be necessary depending on your answer:

Orbit Parameter. MinApA, maxApA etc. don't seem to accept expressions. Is that by design?

Edited by severedsolo
Link to comment
Share on other sites

23 hours ago, nightingale said:

Yup, he'd get one XP each time (up to a max of 64 XP, which gets you to the level cap anyway).

Very cool.  I'll give it a try.  Couple questions.

1) The "parameter" value for AwardExperience should match up to the "define" value from a VesselParameterGroup, correct?
2) I see by the docs that AwardExperience can only award experience as an INT value so you can't award 0.5xp.  Is that a KSP limitation?
3) When you're being offered the contract in mission control, will it say experience is part of the contracts award?

Link to comment
Share on other sites

2 hours ago, severedsolo said:

Next question: is there any way of getting the OrbitGenerator to exactly match another crafts orbit? The stuff available under Vessel expressions (Ap, PE, Inc, Ecc) doesn't seem to be enough?

I've got an issue out there somewhere to improve the logic around the Orbit class so you could just do Vessel.Orbit() and plug that into the OrbitGenerator and other places its needed.  Without that, you'd need to calculate/derive all the orbital elements (I suspect there should be enough information available, but it certainly would be trivial to do in expressions).

2 hours ago, severedsolo said:

Orbit Parameter. MinApA, maxApA etc. don't seem to accept expressions. Is that by design?

Peeked at the code, should work fine.  Let me know if you think there's a bug and I'll dig further.

2 hours ago, chrisl said:

1) The "parameter" value for AwardExperience should match up to the "define" value from a VesselParameterGroup, correct?
2) I see by the docs that AwardExperience can only award experience as an INT value so you can't award 0.5xp.  Is that a KSP limitation?
3) When you're being offered the contract in mission control, will it say experience is part of the contracts award?

1) No - should match with the name value.
2) Yes and no.  I had to hack in each experience point level as an entry in a list (so the list has the values 3 through 64).  Hypothetically I could do it in 0.5 or 0.1 increments, but there needs to be a fixed number.
3) No.  You'll have to either work that into the contract description, or add it as a note if you want it to stand out a little bit more.

Link to comment
Share on other sites

23 hours ago, nightingale said:

You have the log spam from having an older version of Asteroid Day installed - I can't tell if that's the cause of your problem, but it's certainly going to kill your performance.  I'd update that, then get KSP-AVC (unless you're a CKAN user) to make sure everything else is up to date (because I see a whole bunch of other errors from mods like DOE and KIS and don't know what's safe to ignore).

I've gotten it to happen again, it seems to be related to accepting the tour bus contract. I'll do all that and report back.

Link to comment
Share on other sites

@severedsolo - I realized that I'd already done 95% of the work for to get orbits to work in expressions in a previous release.  So I finished off the last 5% to get this to work:

    BEHAVIOUR
    {
        name = OrbitGenerator
        type = OrbitGenerator

        FIXED_ORBIT
        {
            ORBIT = @/targetVessel.Orbit()
        }
    }

Right now there are no methods that work on an Orbit object, but there's plenty I can add (stuff that gets the attributes of the orbit, stuff that changes the orbit).  Let me know what you're looking for (or just raise a GitHub issue) and I can look into adding it.

Link to comment
Share on other sites

53 minutes ago, nightingale said:

@severedsolo - I realized that I'd already done 95% of the work for to get orbits to work in expressions in a previous release.  So I finished off the last 5% to get this to work:


    BEHAVIOUR
    {
        name = OrbitGenerator
        type = OrbitGenerator

        FIXED_ORBIT
        {
            ORBIT = @/targetVessel.Orbit()
        }
    }

Right now there are no methods that work on an Orbit object, but there's plenty I can add (stuff that gets the attributes of the orbit, stuff that changes the orbit).  Let me know what you're looking for (or just raise a GitHub issue) and I can look into adding it.

Ah you are a gentleman thank you! I'll let you know when/if I need anything else.

Hmm, I'm having a few issues with the defineList stuff (or rather recalling it). I'm sure it's me but would you mind telling me where I'm going wrong:

	DATA
	{
	type = Vessel
	groupSat = $SatList.Where(g => g.IsOrbiting()).Random()
	}
	

It's complaining that Where is not a valid method (which is obviously not true)

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